From 5e7f81678dd82506b7e3c9cc33bb2596f96df1af Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 14 Jan 2017 10:33:49 +0800 Subject: [PATCH 01/22] Added some fixes by Toben thanks Toben --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 0dcfc5cd9..2237350e9 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -21019,7 +21019,7 @@ type=Instant [/card] [card] name=Congregation at Dawn -auto=moveTo(ownerlibrary) notatarget(creature|mylibrary) +auto=name(select creatures) moveTo(exile) and!(transforms((,newability[moveto(ownerlibrary)])) oneshot)! notatarget(creature|mylibrary) text=Search your library for up to three creature cards and reveal them. Shuffle your library, then put those cards on top of it in any order. mana={G}{G}{W} type=Instant @@ -24989,7 +24989,8 @@ subtype=Equipment [card] name=Darksteel Reactor abilities=indestructible -auto=@each my upkeep:counter(0/0,1,charge) all(this) && this(counter{0/0.20.charge})>=wingame +auto=@each my upkeep:counter(0/0,1,charge) all(this) +auto=this(counter{0/0.1.charge}>=20)while wingame text=Darksteel Reactor is indestructible. ("Destroy" effects and lethal damage don't destroy it.) -- At the beginning of your upkeep, you may put a charge counter on Darksteel Reactor. -- When Darksteel Reactor has twenty or more charge counters on it, you win the game. mana={4} type=Artifact @@ -35677,7 +35678,7 @@ subtype=Aura name=Eternity Vessel text=Eternity Vessel enters the battlefield with X charge counters on it, where X is your life total. Landfall — Whenever a land enters the battlefield under your control, you may have your life total become the number of charge counters on Eternity Vessel. auto=counter(0/0,lifetotal,Charge) -auto=@movedto(land|myBattlefield):may lifeset:0 controller && thisforeach(counter{0/0.1.Charge}) life:1 +auto=@movedto(land|myBattlefield):may lifeset:counter{0%0.1.Charge} controller auto=Eternity Vessel enters the battlefield with X charge counters on it, where X is your life total. -- Landfall - Whenever a land enters the battlefield under your control, you may have your life total become the number of charge counters on Eternity Vessel. mana={6} type=Artifact @@ -91162,7 +91163,7 @@ toughness=4 [card] name=Rhox Pikemaster abilities=first strike -auto=lord(other soldiers|mybattlefield) first strike +auto=lord(other soldier|mybattlefield) first strike text=First strike (This creature deals combat damage before creatures without first strike.) -- Other Soldier creatures you control have first strike. mana={2}{W}{W} type=Creature @@ -105240,7 +105241,7 @@ toughness=4 [/card] [card] name=Sosuke's Summons -auto=token(Snake,Snake Creature,1/1)*2 +auto=token(Snake,Snake Creature,1/1,green)*2 autograveyard=@movedto(mybattlefield) from(snake[-token]):may moveto(myhand) all(this) text=Put two 1/1 green Snake creature tokens onto the battlefield. -- Whenever a nontoken Snake enters the battlefield under your control, you may return Sosuke's Summons from your graveyard to your hand. mana={2}{G} From 0ab872e152109e5ad71723c3911107bc47e86eb3 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 16 Jan 2017 06:48:07 +0800 Subject: [PATCH 02/22] Additional primitive fixes --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 2237350e9..dea5e5f37 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -17388,7 +17388,7 @@ toughness=3 [card] name=Centaur Vinecrasher abilities=trample -auto=counter(1/1,1,type:land:graveyard) +auto=foreach(land|graveyard) counter(1/1,1) autograveyard=@movedto(land|graveyard):pay({G}{G}) moveto(ownerhand) text=Trample -- Centaur Vinecrasher enters the battlefield with a number of +1/+1 counters on it equal to the number of land cards in all graveyards. -- Whenever a land card is put into a graveyard from anywhere, you may pay {G}{G}. If you do, return Centaur Vinecrasher from your graveyard to your hand. mana={3}{G} @@ -24022,7 +24022,7 @@ type=Artifact [/card] [card] name=Custodi Soulbinders -auto=counter(1/1,1,type:other creature:battlefield) +auto=foreach(other creature|battlefield) counter(1/1,1) auto={2}{w}{C(1/1,-1)}:token(Spirit,Creature Spirit,1/1,white flying) text=Custodi Soulbinders enters the battlefield with X +1/+1 counters on it, where X is the number of other creatures on the battlefield. -- {2}{W}, Remove a +1/+1 counter from Custodi Soulbinders: Put a 1/1 white Spirit creature token with flying onto the battlefield. mana={3}{W} @@ -30164,7 +30164,7 @@ type=Artifact [/card] [card] name=Drakestown Forgotten -auto=counter(1/1,1,type:creature:graveyard) +auto=foreach(creature|graveyard) counter(1/1,1) auto={2}{b}{C(1/1,-1)}:target(creature) -1/-1 ueot text=Drakestown Forgotten enters the battlefield with X +1/+1 counters on it, where X is the number of creature cards in all graveyards. -- {2}{B}, Remove a +1/+1 counter from Drakestown Forgotten: Target creature gets -1/-1 until end of turn. mana={4}{B} @@ -32542,7 +32542,7 @@ type=Instant [/card] [card] name=Edge of Autumn -auto=if type(land|mybattlefield)~lessthan~5 then target(land[basic]|mybattlefield) moveTo(mybattlefield) +auto=if type(land|mybattlefield)~lessthan~5 then target(land[basic]|mylibrary) moveTo(mybattlefield) autohand={S(land|mybattlefield)}{cycle}:name(cycling) draw:1 text=If you control four or fewer lands, search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. -- Cycling - Sacrifice a land. (Sacrifice a land, Discard this card: Draw a card.) mana={1}{G} @@ -36482,7 +36482,7 @@ subtype=Aura [card] name=Extract from Darkness auto=all(player) deplete:2 -auto=moveto(mybattlefield) target(creature|mygraveyard) +auto=moveto(mybattlefield) target(creature|graveyard) text=Each player puts the top two cards of his or her library into his or her graveyard. Then put a creature card from a graveyard onto the battlefield under your control. mana={3}{U}{B} type=Sorcery From d86b9119a46e3549b12c6498cccc72a8026efc25 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 17 Jan 2017 18:24:50 +0800 Subject: [PATCH 03/22] fix castcard interaction to reveal window uses afterrevealed and becomes --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index dea5e5f37..a03efd3e5 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -3888,8 +3888,8 @@ subtype=Aura [/card] [card] name=Animist's Awakening -auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~2 then reveal:x optionone all(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshotoptiontwoend revealend -auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then reveal:x optionone all(land|reveal) moveto(mybattlefield) optiononeend optiontwo nname(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend revealendd +auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~2 then reveal:x optionone all(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend revealend +auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then reveal:x optionone all(land|reveal) moveto(mybattlefield) optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend revealend text=Reveal the top X cards of your library. Put all land cards from among them onto the battlefield tapped and the rest on the bottom of your library in a random order. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, untap those lands. mana={X}{G} type=Sorcery @@ -70972,7 +70972,7 @@ toughness=1 [/card] [card] name=Mindclaw Shaman -auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[instant;sorcery]|reveal) castcard(restricted) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[instant;sorcery]|reveal) moveto(myexile) and!( becomes(tobecast) )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed all(tobecast|myexile) castcard(restricted) afterrevealedend revealend text=When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. You may cast an instant or sorcery card from it without paying its mana cost. mana={4}{R} type=Creature @@ -111623,7 +111623,7 @@ type=Instant [/card] [card] name=Surging Sentinels -autostack=if casted(this) then reveal:4 optionone name(Ripple) target(Surging Sentinels|reveal) castcard(restricted) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend +autostack=if casted(this) then reveal:4 optionone name(Cast Card) target(Surging Sentinels|reveal) moveto(mylibrary) and!( becomes(tobecast) )! optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend afterrevealed all(tobecast|mylibrary) castcard(restricted) afterrevealedend revealend text=First strike -- Ripple 4 (When you cast this spell, you may reveal the top four cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.) mana={2}{W} type=Creature From d03ebdace8eb7f6fa156c3b3de96a49b9bc544ac Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 18 Jan 2017 22:13:51 +0800 Subject: [PATCH 04/22] Support for KLD and AER Kaladesh & Aether Revolt --- projects/mtg/include/AllAbilities.h | 21 ++++++ projects/mtg/include/ExtraCost.h | 23 +++++++ projects/mtg/include/MTGDefinitions.h | 4 +- projects/mtg/include/Player.h | 1 + projects/mtg/src/AIPlayerBaka.cpp | 7 ++ projects/mtg/src/AllAbilities.cpp | 70 +++++++++++++++---- projects/mtg/src/CardGui.cpp | 9 +++ projects/mtg/src/ExtraCost.cpp | 99 +++++++++++++++++++++++++++ projects/mtg/src/GuiStatic.cpp | 26 +++++-- projects/mtg/src/MTGAbility.cpp | 42 ++++++++++++ projects/mtg/src/MTGDefinitions.cpp | 4 +- projects/mtg/src/ManaCost.cpp | 18 ++++- projects/mtg/src/Player.cpp | 1 + projects/mtg/src/Rules.cpp | 1 + 14 files changed, 306 insertions(+), 20 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 6bd22aace..7dc230333 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -560,6 +560,14 @@ private: { intValue = card->controller()->opponent()->raidcount; } + else if (s == "pstormcount") + { + intValue = card->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL); + } + else if (s == "ostormcount") + { + intValue = card->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL); + } else if (s == "countallspell") { intValue = card->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + card->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL); @@ -4514,6 +4522,19 @@ public: AAAlterPoison * clone() const; ~AAAlterPoison(); }; +//Energy Counter +class AAAlterEnergy: public ActivatedAbilityTP +{ +public: + int energy; + + AAAlterEnergy(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, int energy, ManaCost * _cost = NULL, + int who = TargetChooser::UNSET); + int resolve(); + const string getMenuText(); + AAAlterEnergy * clone() const; + ~AAAlterEnergy(); +}; /* Standard Damager, can choose a NEW target each time the price is paid */ class TADamager: public TargetAbility { diff --git a/projects/mtg/include/ExtraCost.h b/projects/mtg/include/ExtraCost.h index c6a8e1438..6eca8f69e 100644 --- a/projects/mtg/include/ExtraCost.h +++ b/projects/mtg/include/ExtraCost.h @@ -216,6 +216,19 @@ public: virtual SnowCost * clone() const; }; +//Energy cost +class EnergyCost : public ExtraCost +{ +private: + int enc; + +public: + EnergyCost(int enc = 0); + virtual int canPay(); + virtual int doPay(); + virtual EnergyCost * clone() const; +}; + //untap cost class UnTapCost : public ExtraCost { @@ -295,6 +308,16 @@ public: virtual int doPay(); virtual Delve * clone() const; }; +//improvise +class Improvise : public ExtraCost +{ +public: + Improvise(TargetChooser *_tc = NULL); + virtual int canPay(); + virtual int isPaymentSet(); + virtual int doPay(); + virtual Improvise * clone() const; +}; //offering cost class Offering : public ExtraCost { diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index f218bc8b6..31521b878 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -262,7 +262,9 @@ class Constants CONDUITED = 140, CANBLOCKTAPPED = 141, OPPNOMAXHAND = 142, - NB_BASIC_ABILITIES = 143, + CANTCREW = 143, + HIDDENFACE = 144, + NB_BASIC_ABILITIES = 145, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/include/Player.h b/projects/mtg/include/Player.h index e63862e78..6ba887610 100644 --- a/projects/mtg/include/Player.h +++ b/projects/mtg/include/Player.h @@ -42,6 +42,7 @@ public: int skippingTurn; int extraTurn; int drawCounter; + int energyCount; int epic; int forcefield; int initLife; diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index d02f991ad..f0ce55514 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -595,6 +595,13 @@ int OrderedAIAction::getEfficiency() efficiency = 90; } } + else if (dynamic_cast(a)) + { + if (playerAbilityTarget && playerAbilityTarget == p) + { + efficiency = 90; + } + } else if (ATokenCreator * atc = dynamic_cast(a)) { efficiency = 80; diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index d1097855c..5fb08a1e2 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1010,6 +1010,40 @@ AAAlterPoison::~AAAlterPoison() { } +//AA Energy Counters +AAAlterEnergy::AAAlterEnergy(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, int energy, ManaCost * _cost, + int who) : + ActivatedAbilityTP(observer, _id, _source, _target, _cost, who), energy(energy) +{ +} + +int AAAlterEnergy::resolve() +{ + Damageable * _target = (Damageable *) getTarget(); + if (_target) + { + Player * pTarget = (Player*)_target; + if(pTarget) + pTarget->energyCount += energy; + } + return 0; +} + +const string AAAlterEnergy::getMenuText() +{ + WParsedInt parsedNum(energy); + return _(parsedNum.getStringValue() + " Energy ").c_str(); +} + +AAAlterEnergy * AAAlterEnergy::clone() const +{ + return NEW AAAlterEnergy(*this); +} + +AAAlterEnergy::~AAAlterEnergy() +{ +} + //Damage Prevent AADamagePrevent::AADamagePrevent(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, int preventing, ManaCost * _cost, int who) : @@ -2011,6 +2045,12 @@ int AAProliferate::resolve() a->oneShot = true; pcounters.push_back(a); } + else if(pTarget && pTarget->energyCount && pTarget == source->controller()) + { + MTGAbility * a = NEW AAAlterEnergy(game, game->mLayers->actionLayer()->getMaxId(), source, target, 1, NULL); + a->oneShot = true; + pcounters.push_back(a); + } else if (cTarget && cTarget->counters) { Counters * counters = cTarget->counters; @@ -7909,17 +7949,9 @@ int AACastCard::resolveSpell() } if (_target) { - if (_target->isLand()) - { - MTGCardInstance * copy = _target->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->temp,noEvent); - copy->changeController(source->controller(),true); - Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, 1); - spell->resolve(); - delete spell; - } - else - { + putinplay = true; + Spell * spell = NULL; MTGCardInstance * copy = NULL; if ((normal || asNormalMadness)||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY))) @@ -7943,12 +7975,24 @@ int AACastCard::resolveSpell() if (game->targetChooser) { game->targetChooser->Owner = source->controller(); - spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); + if(putinplay) + { + spell = NEW Spell(game, 0,copy,game->targetChooser,NULL, 1); + spell->resolve(); + } + else + spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); game->targetChooser = NULL; } else { - spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); + if(putinplay) + { + spell = NEW Spell(game, 0,copy,NULL,NULL, 1); + spell->resolve(); + } + else + spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); } if (copy->has(Constants::STORM)) @@ -7980,7 +8024,7 @@ int AACastCard::resolveSpell() andAbilityClone->addToGame(); } } - } + this->forceDestroy = true; processed = true; return 1; diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 6fc544d15..bd5cb850b 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -533,6 +533,7 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos) // Draw the "unknown" card model JRenderer * renderer = JRenderer::GetInstance(); JQuadPtr q; + MTGCardInstance * thiscard = dynamic_cast (card); float x = pos.actX; @@ -553,6 +554,14 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos) items.clear(); if (q.get() && q->mTex) { + //test + //draw black border ingame only + if(thiscard && thiscard->getObserver()) + { + renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5)); + renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240)); + } + q->SetHotSpot(static_cast (q->mTex->mWidth / 2), static_cast (q->mTex->mHeight / 2)); float scale = pos.actZ * 250 / q->mHeight; diff --git a/projects/mtg/src/ExtraCost.cpp b/projects/mtg/src/ExtraCost.cpp index a1ee9b63b..8b43bd422 100644 --- a/projects/mtg/src/ExtraCost.cpp +++ b/projects/mtg/src/ExtraCost.cpp @@ -232,6 +232,37 @@ int SnowCost::doPay() return 0; } +//Energy Cost +EnergyCost * EnergyCost::clone() const +{ + EnergyCost * ec = NEW EnergyCost(*this); + return ec; +} + +EnergyCost::EnergyCost(int enc) : +ExtraCost("Energy Cost"),enc(enc) +{ +} + +int EnergyCost::canPay() +{ + if(source->controller()->energyCount >= enc) + { + return 1; + } + return 0; +} + +int EnergyCost::doPay() +{ + if(source->controller()->energyCount) + { + source->controller()->energyCount -= enc; + return 1; + } + return 0; +} + //life cost LifeCost * LifeCost::clone() const { @@ -1118,6 +1149,74 @@ int Delve::doPay() return 0; } +//IMPROVISE +Improvise * Improvise::clone() const +{ + Improvise * ec = NEW Improvise(*this); + if (tc) + ec->tc = tc->clone(); + return ec; +} + +Improvise::Improvise(TargetChooser *_tc) : + ExtraCost("Select Artifacts To Tap", _tc) +{ +} + +int Improvise::canPay() +{ + return isPaymentSet(); +} + +int Improvise::isPaymentSet() +{ + ManaCost * toReduce = NEW ManaCost(source->getManaCost()); + tc->maxtargets = source->getManaCost()->getCost(Constants::MTG_COLOR_ARTIFACT); + if (tc->getNbTargets()) + { + toReduce->remove(Constants::MTG_COLOR_ARTIFACT, tc->getNbTargets()); + } + if (target && (!source->controller()->getManaPool()->canAfford(toReduce))) + { + target = NULL; + SAFE_DELETE(toReduce); + return 0; + } + if (target && (source->controller()->getManaPool()->canAfford(toReduce))) + { + /*if (target->getObserver()->guiOpenDisplay) + target->getObserver()->ButtonPressed(target->getObserver()->guiOpenDisplay);*/ + SAFE_DELETE(toReduce); + return 1; + } + SAFE_DELETE(toReduce); + return 0; +} + +int Improvise::doPay() +{ + if (target && tc->getNbTargets()) + { + ManaCost * toReduce = NEW ManaCost(source->getManaCost()); + + toReduce->remove(Constants::MTG_COLOR_ARTIFACT, tc->getNbTargets()); + + target->controller()->getManaPool()->pay(toReduce); + SAFE_DELETE(toReduce); + vectortargetlist = tc->getTargetsFrom(); + for (vector::iterator it = targetlist.begin(); it != targetlist.end(); it++) + { + MTGCardInstance * targetCard = dynamic_cast(*it); + source->storedCard = targetCard->createSnapShot(); + targetCard->tap(); + } + if (tc) + tc->initTargets(); + return 1; + } + return 0; +} + /////////////// //Sacrifice target as cost for Offering Offering * Offering::clone() const diff --git a/projects/mtg/src/GuiStatic.cpp b/projects/mtg/src/GuiStatic.cpp index baa30379a..97ab1cf4a 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -31,6 +31,7 @@ void GuiAvatar::Render() JRenderer * r = JRenderer::GetInstance(); int life = player->life; int poisonCount = player->poisonCount; + int energyCount = player->energyCount; WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); //Avatar @@ -108,10 +109,10 @@ void GuiAvatar::Render() { case TOP_LEFT: mFont->SetColor(ARGB((int)actA / 4, 0, 0, 0)); - mFont->DrawString(buffer, actX + 2, actY + 2); + mFont->DrawString(buffer, actX + 2, actY - 2); mFont->SetScale(1.3f); mFont->SetColor(ARGB((int)actA, lx, ly, lz)); - mFont->DrawString(buffer, actX + 1, actY + 1); + mFont->DrawString(buffer, actX + 1, actY - 1); mFont->SetScale(1); break; case BOTTOM_RIGHT: @@ -122,8 +123,8 @@ void GuiAvatar::Render() break; } //poison - char poison[5]; - if (poisonCount > 0) + char poison[10]; + if (poisonCount >= 0) { sprintf(poison, "%i", poisonCount); switch (corner) @@ -138,6 +139,23 @@ void GuiAvatar::Render() break; } } + //energy + char energy[15]; + if (energyCount >= 0) + { + sprintf(energy, "%i", energyCount); + switch (corner) + { + case TOP_LEFT: + mFont->SetColor(ARGB((int)actA / 1, 255, 255, 0)); + mFont->DrawString(energy, actX + 2, actY + 17); + break; + case BOTTOM_RIGHT: + mFont->SetColor(ARGB((int)actA / 1 ,255, 255, 0)); + mFont->DrawString(energy, actX, actY - 27, JGETEXT_RIGHT); + break; + } + } PlayGuiObject::Render(); } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 81be0636c..cb39af59d 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -329,6 +329,37 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe if(!count) return 0; } + check = restriction[i].find("revolt"); + if(check != string::npos) + { + int count = 0; + for(unsigned int k = 0; k < player->game->hand->cardsSeenThisTurn.size(); k++) + { + MTGCardInstance * tCard = player->game->hand->cardsSeenThisTurn[k]; + if(tCard && tCard->previousZone == card->controller()->game->battlefield) + count++; + } + for(unsigned int k = 0; k < player->game->exile->cardsSeenThisTurn.size(); k++) + { + MTGCardInstance * tCard = player->game->exile->cardsSeenThisTurn[k]; + if(tCard && tCard->previousZone == card->controller()->game->battlefield) + count++; + } + for(unsigned int k = 0; k < player->game->library->cardsSeenThisTurn.size(); k++) + { + MTGCardInstance * tCard = player->game->library->cardsSeenThisTurn[k]; + if(tCard && tCard->previousZone == card->controller()->game->battlefield) + count++; + } + for(unsigned int k = 0; k < player->game->graveyard->cardsSeenThisTurn.size(); k++) + { + MTGCardInstance * tCard = player->game->graveyard->cardsSeenThisTurn[k]; + if(tCard && tCard->previousZone == card->controller()->game->battlefield) + count++; + } + if(!count) + return 0; + } check = restriction[i].find("morbid"); if(check != string::npos) { @@ -2949,6 +2980,17 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG return a; } + //alter energy + vector splitEnergy = parseBetween(s, "alterenergy:", " ", false); + if (splitEnergy.size()) + { + int energy = atoi(splitEnergy[1].c_str()); + Targetable * t = spell ? spell->getNextTarget() : NULL; + MTGAbility * a = NEW AAAlterEnergy(observer, id, card, t, energy, NULL, who); + a->oneShot = 1; + return a; + } + //prevent next damage vector splitPrevent = parseBetween(s, "prevent:", " ", false); if (splitPrevent.size()) diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 8087fcb11..363f1a6e7 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -173,7 +173,9 @@ const char* Constants::MTGBasicAbilities[] = { "asflash", "conduited", "canblocktapped", - "oppnomaxhand" + "oppnomaxhand", + "cantcrew", + "hiddenface"//test for facedown }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index 77f67eb65..289c1351f 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -159,6 +159,15 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan tc = tcf.createTargetChooser("creature|mybattlefield", c); manaCost->addExtraCost(NEW Offering(tc,true)); } + else if(value.substr(0,2) == "e:") + {//Energy Cost + vectorvalSplit = parseBetween(value,"e:"," ",false); + if (valSplit.size()) { + WParsedInt* energytopay = NEW WParsedInt(valSplit[1], NULL, c); + manaCost->addExtraCost(NEW EnergyCost(energytopay->getValue())); + SAFE_DELETE(energytopay); + } + } else //Exile manaCost->addExtraCost(NEW ExileTargetCost(tc)); @@ -248,12 +257,19 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan break; } case 'i' : + if(value == "improvise") + { + if(!tc) + tc = tcf.createTargetChooser("artifact[-tapped]|myBattlefield", c); + manaCost->addExtraCost(NEW Improvise(tc)); + } + else { SAFE_DELETE(tc); manaCost->add(0,1); manaCost->addExtraCost(NEW SnowCost); - break; } + break; case 'q': if(value == "q") { diff --git a/projects/mtg/src/Player.cpp b/projects/mtg/src/Player.cpp index 6fcb9b0fd..6a95ca748 100644 --- a/projects/mtg/src/Player.cpp +++ b/projects/mtg/src/Player.cpp @@ -34,6 +34,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck * skippingTurn = 0; extraTurn = 0; drawCounter = 0; + energyCount = 0; epic = 0; forcefield = 0; raidcount = 0; diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index 5bf16d833..fc4681608 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -409,6 +409,7 @@ void Rules::initGame(GameObserver *g, bool currentPlayerSet) p->poisonCount = initState.playerData[i].player->poisonCount; p->damageCount = initState.playerData[i].player->damageCount; p->preventable = initState.playerData[i].player->preventable; + p->energyCount = initState.playerData[i].player->energyCount; if (initState.playerData[i].player->mAvatarName.size()) { p->mAvatarName = initState.playerData[i].player->mAvatarName; From 71c1512ef2d901ffc923f6d0e276e4bfb862dce8 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Fri, 20 Jan 2017 15:37:36 +0800 Subject: [PATCH 05/22] some fixes primitve corrections --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index a03efd3e5..ad1c6b099 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -18653,7 +18653,7 @@ subtype=Equipment [/card] [card] name=Chittering Host -abilities=haste +abilities=haste,menace auto=all(other creature|myBattlefield) menace ueot auto=all(other creature|myBattlefield) 1/0 ueot auto=meldfrom(Graf Rats|Midnight Scavengers) @@ -42820,7 +42820,7 @@ name=Garruk, Caller of Beasts auto=counter(0/0,4,loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Reveal Cards) reveal:5 optionone target(creature|reveal) moveto(myhand) and!( all(creature|reveal) moveto(myhand) )! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend revealend auto={C(0/0,-3,Loyalty)}:name(-3: Put in Play) notatarget(creature[green]|myhand) moveto(mybattlefield) -auto={C(0/0,-3,Loyalty)}:name(-7: Emblem) emblem transforms((,newability[@movedTo(*[creature]|mystack):moveto(mybattlefield) notatarget(creature|mylibrary)])) forever dontremove +auto={C(0/0,-7,Loyalty)}:name(-7: Emblem) emblem transforms((,newability[@movedTo(*[creature]|mystack):moveto(mybattlefield) notatarget(creature|mylibrary)])) forever dontremove text=+1: Reveal the top five cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order. -- -3: You may put a green creature card from your hand onto the battlefield. -- -7: You get an emblem with "Whenever you cast a creature spell, you may search your library for a creature card, put it onto the battlefield, then shuffle your library." mana={4}{G}{G} type=Planeswalker @@ -70972,7 +70972,7 @@ toughness=1 [/card] [card] name=Mindclaw Shaman -auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[instant;sorcery]|reveal) moveto(myexile) and!( becomes(tobecast) )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed all(tobecast|myexile) castcard(restricted) afterrevealedend revealend +auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[instant;sorcery]|reveal) moveto(myexile) and!( becomes(tobecast) )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed all(tobecast|myexile) moveto(myexile) and!( activate castcard(normal) )! afterrevealedend revealend text=When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. You may cast an instant or sorcery card from it without paying its mana cost. mana={4}{R} type=Creature @@ -99533,7 +99533,7 @@ toughness=3 [/card] [card] name=Shatterskull Recruit -auto=menace +abilities=menace text=Menace (This creature can't be blocked except by two or more creatures.) mana={3}{R}{R} type=Creature @@ -111623,7 +111623,7 @@ type=Instant [/card] [card] name=Surging Sentinels -autostack=if casted(this) then reveal:4 optionone name(Cast Card) target(Surging Sentinels|reveal) moveto(mylibrary) and!( becomes(tobecast) )! optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend afterrevealed all(tobecast|mylibrary) castcard(restricted) afterrevealedend revealend +autostack=if casted(this) then reveal:4 optionone name(Cast Card) target(Surging Sentinels|reveal) moveto(mylibrary) and!( becomes(tobecast) )! optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend afterrevealed all(tobecast|mylibrary) moveto(mylibrary) and!( activate castcard(normal) )! afterrevealedend revealend text=First strike -- Ripple 4 (When you cast this spell, you may reveal the top four cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.) mana={2}{W} type=Creature @@ -113406,7 +113406,7 @@ type=Land [card] name=Tarox Bladewing abilities=flying,haste -auto={discard(tarox bladewing|myhand)}:dynamicability && dynamicability +auto={discard(other *[share!name!]|myhand)}:dynamicability text=Flying, haste -- Grandeur - Discard another card named Tarox Bladewing: Tarox Bladewing gets +X/+X until end of turn, where X is its power. mana={2}{R}{R}{R} type=Legendary Creature @@ -115591,7 +115591,7 @@ toughness=2 [/card] [card] name=Thorncaster Sliver -auto=lord(sliver|mybattlefield) transforms((,newability[@combat(attacking) source(this):damage:1 target(creature,player)])) +auto=lord(sliver|mybattlefield) transforms((,newability[@combat(attacking) source(this):damage:1 target(*[creature;player])])) text=Sliver creatures you control have "Whenever this creature attacks, it deals 1 damage to target creature or player." mana={4}{R} type=Creature From e558f21ebca6049340328d67787189c6bfb59ce4 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Fri, 20 Jan 2017 15:39:27 +0800 Subject: [PATCH 06/22] add penergy & oenergy count energy counters available --- projects/mtg/include/AllAbilities.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 7dc230333..a744e34f3 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -552,6 +552,14 @@ private: intValue +=1; } } + else if (s == "penergy") + { + intValue = card->controller()->energyCount; + } + else if (s == "oenergy") + { + intValue = card->controller()->opponent()->energyCount; + } else if (s == "praidcount") { intValue = card->controller()->raidcount; From 0b9468da1b839dbea395824ba31ff7258cf05cfa Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Fri, 20 Jan 2017 16:49:00 +0800 Subject: [PATCH 07/22] add EXP Zendikar Expeditions --- projects/mtg/bin/Res/sets/EXP/_cards.dat | 231 +++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 projects/mtg/bin/Res/sets/EXP/_cards.dat diff --git a/projects/mtg/bin/Res/sets/EXP/_cards.dat b/projects/mtg/bin/Res/sets/EXP/_cards.dat new file mode 100644 index 000000000..5d0b46be7 --- /dev/null +++ b/projects/mtg/bin/Res/sets/EXP/_cards.dat @@ -0,0 +1,231 @@ +[meta] +author=Wagic Team +name=Zendikar Expeditions +year=2016 +total=45 +[/meta] +[card] +primitive=Ancient Tomb +id=409567 +rarity=M +[/card] +[card] +primitive=Arid Mesa +id=405092 +rarity=M +[/card] +[card] +primitive=Blood Crypt +id=405093 +rarity=M +[/card] +[card] +primitive=Bloodstained Mire +id=405094 +rarity=M +[/card] +[card] +primitive=Breeding Pool +id=405095 +rarity=M +[/card] +[card] +primitive=Canopy Vista +id=405096 +rarity=M +[/card] +[card] +primitive=Cascade Bluffs +id=409563 +rarity=M +[/card] +[card] +primitive=Cinder Glade +id=405097 +rarity=M +[/card] +[card] +primitive=Dust Bowl +id=409568 +rarity=M +[/card] +[card] +primitive=Eye of Ugin +id=409569 +rarity=M +[/card] +[card] +primitive=Fetid Heath +id=409562 +rarity=M +[/card] +[card] +primitive=Fire-Lit Thicket +id=409560 +rarity=M +[/card] +[card] +primitive=Flooded Grove +id=409566 +rarity=M +[/card] +[card] +primitive=Flooded Strand +id=405098 +rarity=M +[/card] +[card] +primitive=Forbidden Orchard +id=409570 +rarity=M +[/card] +[card] +primitive=Godless Shrine +id=405099 +rarity=M +[/card] +[card] +primitive=Graven Cairns +id=409559 +rarity=M +[/card] +[card] +primitive=Hallowed Fountain +id=405100 +rarity=M +[/card] +[card] +primitive=Horizon Canopy +id=409571 +rarity=M +[/card] +[card] +primitive=Kor Haven +id=409572 +rarity=M +[/card] +[card] +primitive=Mana Confluence +id=409573 +rarity=M +[/card] +[card] +primitive=Marsh Flats +id=405101 +rarity=M +[/card] +[card] +primitive=Misty Rainforest +id=405102 +rarity=M +[/card] +[card] +primitive=Mystic Gate +id=409557 +rarity=M +[/card] +[card] +primitive=Overgrown Tomb +id=405103 +rarity=M +[/card] +[card] +primitive=Polluted Delta +id=405104 +rarity=M +[/card] +[card] +primitive=Prairie Stream +id=405105 +rarity=M +[/card] +[card] +primitive=Rugged Prairie +id=409565 +rarity=M +[/card] +[card] +primitive=Sacred Foundry +id=405106 +rarity=M +[/card] +[card] +primitive=Scalding Tarn +id=405107 +rarity=M +[/card] +[card] +primitive=Smoldering Marsh +id=405108 +rarity=M +[/card] +[card] +primitive=Steam Vents +id=405109 +rarity=M +[/card] +[card] +primitive=Stomping Ground +id=405110 +rarity=M +[/card] +[card] +primitive=Strip Mine +id=409574 +rarity=M +[/card] +[card] +primitive=Sunken Hollow +id=405111 +rarity=M +[/card] +[card] +primitive=Sunken Ruins +id=409558 +rarity=M +[/card] +[card] +primitive=Tectonic Edge +id=409575 +rarity=M +[/card] +[card] +primitive=Temple Garden +id=405112 +rarity=M +[/card] +[card] +primitive=Twilight Mire +id=409564 +rarity=M +[/card] +[card] +primitive=Verdant Catacombs +id=405113 +rarity=M +[/card] +[card] +primitive=Wasteland +id=409576 +rarity=M +[/card] +[card] +primitive=Watery Grave +id=405114 +rarity=M +[/card] +[card] +primitive=Windswept Heath +id=405115 +rarity=M +[/card] +[card] +primitive=Wooded Bastion +id=409561 +rarity=M +[/card] +[card] +primitive=Wooded Foothills +id=405116 +rarity=M +[/card] From 37b3f2806541693ae6573b88092f76418579f547 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 21 Jan 2017 04:29:16 +0800 Subject: [PATCH 08/22] additional fixes --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 95 +++++++------------- projects/mtg/src/MTGAbility.cpp | 8 ++ 2 files changed, 39 insertions(+), 64 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index ad1c6b099..f7f6186eb 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -7015,8 +7015,7 @@ toughness=3 name=Avatar of Fury abilities=flying auto={R}:1/0 -otherrestriction=type(land|opponentbattlefield)~morethan~7 -other={R}{R} +anyzone=this(variable{type:land:opponentbattlefield}>6) changecost(colorless:-6) forcedalive text=If an opponent controls seven or more lands, Avatar of Fury costs {6} less to cast. -- Flying -- {R}: Avatar of Fury gets +1/+0 until end of turn. mana={6}{R}{R} type=Creature @@ -7027,8 +7026,7 @@ toughness=6 [card] name=Avatar of Might abilities=trample -otherrestriction=type(creature|mybattlefield)~lessthan~type(creature|opponentbattlefield)-3 -other={G}{G} +anyzone=while(restriction{outnumbered}) changecost(colorless:-6) forcedalive text=If an opponent controls at least four more creatures than you, Avatar of Might costs {6} less to cast. -- Trample (If this creature would deal enough damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player or planeswalker.) mana={6}{G}{G} type=Creature @@ -7061,8 +7059,7 @@ toughness=2 [card] name=Avatar of Will abilities=flying -otherrestriction=type(*|opponenthand)~equalto~0 -other={U}{U} +anyzone=this(variable{type:*:opponenthand}<1) changecost(colorless:-6) forcedalive text=If an opponent has no cards in hand, Avatar of Will costs {6} less to cast. -- Flying mana={6}{U}{U} type=Creature @@ -7074,8 +7071,7 @@ toughness=6 name=Avatar of Woe abilities=fear auto={T}:bury target(creature) -otherrestriction=type(creature|graveyard)~morethan~9 -other={B}{B} +anyzone=this(variable{type:creature:graveyard}>9) changecost(colorless:-6) forcedalive text=If there are ten or more creature cards total in all graveyards, Avatar of Woe costs {6} less to cast. -- Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- {T}: Destroy target creature. It can't be regenerated. mana={6}{B}{B} type=Creature @@ -19956,16 +19952,11 @@ toughness=3 [/card] [card] name=Cloud Key -auto=choice name(Artifact) counter(0/0,1,CloudKeyA) all(this) -auto=choice name(Creature) counter(0/0,1,CloudKeyC) all(this) -auto=choice name(Enchantment) counter(0/0,1,CloudKeyE) all(this) -auto=choice name(Instant) counter(0/0,1,CloudKeyI) all(this) -auto=choice name(Sorcery) counter(0/0,1,CloudKeyS) all(this) -auto=this(counter{0/0.1.CloudKeyA}) lord(Artifact|mycastingzone) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyC}) lord(Creature|mycastingzone) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyE}) lord(Enchantment|mycastingzone) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyI}) lord(Instant|mycastingzone) altercost(colorless,-1) -auto=this(counter{0/0.1.CloudKeyS}) lord(Sorcery|mycastingzone) altercost(colorless,-1) +auto=choice name(Artifact) transforms((,newability[lord(Artifact|mycastingzone) changecost(colorless:-1)])) forever +auto=choice name(Creature) transforms((,newability[lord(Creature|mycastingzone) changecost(colorless:-1)])) forever +auto=choice name(Enchantment) transforms((,newability[lord(Enchantment|mycastingzone) changecost(colorless:-1)])) forever +auto=choice name(Instant) transforms((,newability[lord(Instant|mycastingzone) changecost(colorless:-1)])) forever +auto=choice name(Sorcery) transforms((,newability[lord(Sorcery|mycastingzone) changecost(colorless:-1)])) forever text=As Cloud Key enters the battlefield, choose artifact, creature, enchantment, instant, or sorcery. -- Spells you cast of the chosen type cost {1} less to cast. mana={3} type=Artifact @@ -31585,7 +31576,7 @@ toughness=3 [card] name=Dusk Feaster abilities=flying -autohand=while(restriction{delirium}) altercost(colorless,-2) +anyzone=while(restriction{delirium}) changecost(colorless:-2) forcedalive text=Delirium — Dusk Feaster costs {2} less to cast if there are four or more card types among cards in your graveyard. -- Flying mana={5}{B}{B} type=Creature @@ -96278,7 +96269,7 @@ type=Instant [/card] [card] name=Scour the Laboratory -autohand=while(restriction{delirium}) altercost(colorless,-2) +anyzone=while(restriction{delirium}) changecost(colorless:-2) forcedalive auto=draw:3 text=Delirium — Scour the Laboratory costs {2} less to cast if there are four or more card types among cards in your graveyard. -- Draw three cards. mana={4}{U}{U} @@ -98104,29 +98095,16 @@ toughness=2 [/card] [card] name=Semblance Anvil -auto=choice name(Artifact) moveTo(myexile) notatarget(artifact|myhand) && counter(0/0,1,Artifact) all(this) -auto=choice name(Artifact Creature) moveTo(myexile) notatarget(creature[artifact]|myhand) && counter(0/0,1,ArtifactCreature) all(this) -auto=choice name(Creature) moveTo(myexile) notatarget(creature|myhand) && counter(0/0,1,Creature) all(this) -auto=choice name(Enchantment) moveTo(myexile) notatarget(enchantment|myhand) && counter(0/0,1,Enchantment) all(this) -auto=choice name(Instant) moveTo(myexile) notatarget(instant|myhand) && counter(0/0,1,Instant) all(this) -auto=choice name(Sorcery) moveTo(myexile) notatarget(sorcery|myhand) && counter(0/0,1,Sorcery) all(this) -auto=choice name(Tribal Instant) moveTo(myexile) notatarget(instant[tribal]|myhand) && counter(0/0,1,TribalInstant) all(this) -auto=choice name(Tribal Sorcery) moveTo(myexile) notatarget(sorcery[tribal]|myhand) && counter(0/0,1,TribalSorcery) all(this) +auto=choice name(Artifact) moveTo(myexile) notatarget(artifact|myhand) and!( all(this) transforms((,newability[lord(artifact|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Artifact Creature) moveTo(myexile) notatarget(creature[artifact]|myhand) and!( all(this) transforms((,newability[lord(*[creature;artifact]|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Creature) moveTo(myexile) notatarget(creature|myhand) and!( all(this) transforms((,newability[lord(creature|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Enchantment) moveTo(myexile) notatarget(enchantment|myhand) and!( all(this) transforms((,newability[lord(enchantment|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Instant) moveTo(myexile) notatarget(instant|myhand) and!( all(this) transforms((,newability[lord(instant|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Sorcery) moveTo(myexile) notatarget(sorcery|myhand) and!( all(this) transforms((,newability[lord(sorcery|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Tribal Instant) moveTo(myexile) notatarget(instant[tribal]|myhand) and!( all(this) transforms((,newability[lord(*[instant;tribal]|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Tribal Sorcery) moveTo(myexile) notatarget(sorcery[tribal]|myhand) and!( all(this) transforms((,newability[lord(*[sorcery;tribal]|mycastingzone) changecost(colorless:-2)])) forever )! +auto=choice name(Planeswalker) moveTo(myexile) notatarget(planeswalker|myhand) and!( all(this) transforms((,newability[lord(planeswalker|mycastingzone) changecost(colorless:-2)])) forever )! auto=choice name(cancel) donothing -auto=this(counter{0/0.1.Artifact}) lord(artifact|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.ArtifactCreature}) lord(artifact[-creature]|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[-artifact]|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.ArtifactCreature}) lord(creature[artifact]|mycastingzone) altercost(colorless,-2 ) -auto=this(counter{0/0.1.Creature}) lord(creature|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.Enchantment}) lord(enchantment|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.Instant}) lord(instant|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.Sorcery}) lord(sorcery|mycastingzone) altercost( colorless, -2 ) -auto=this(counter{0/0.1.TribalInstant}) lord(tribal[-instant]|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalInstant}) lord(instant[-tribal]|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalInstant}) lord(instant[tribal]|mycastingzone) altercost(colorless,-2 ) -auto=this(counter{0/0.1.TribalSorcery}) lord(tribal[-sorcery]|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[-tribal]|mycastingzone) altercost(colorless,-2) -auto=this(counter{0/0.1.TribalSorcery}) lord(sorcery[tribal]|mycastingzone) altercost(colorless,-2) text=Imprint - When Semblance Anvil enters the battlefield, you may exile a nonland card from your hand. -- Spells you cast that share a card type with the exiled card cost {2} less to cast. mana={3} type=Artifact @@ -99907,28 +99885,17 @@ toughness=2 [/card] [card] name=Shimmer -auto=choice name(plains gets phasing) counter(0/0,1,Plains) -auto=choice name(island gets phasing) counter(0/0,1,Island) -auto=choice name(swamp gets phasing) counter(0/0,1,Swamp) -auto=choice name(mountain gets phasing) counter(0/0,1,Mountain) -auto=choice name(forest gets phasing) counter(0/0,1,Forest) -auto=choice name(lair gets phasing) counter(0/0,1,Lair) -auto=choice name(locus gets phasing) counter(0/0,1,Locus) -auto=choice name(desert gets phasing) counter(0/0,1,Desert) -auto=choice name(urza's mine gets phasing) counter(0/0,1,Urza's Mine) -auto=choice name(urza's power-plant gets phasing) counter(0/0,1,Urza's Power-Plant) -auto=choice name(urza's tower gets phasing) counter(0/0,1,Urza's Tower) -auto=this(counter{0/0.1.Plains}) lord(plains) phasing -auto=this(counter{0/0.1.Island}) lord(island) phasing -auto=this(counter{0/0.1.Swamp}) lord(swamp) phasing -auto=this(counter{0/0.1.Mountain}) lord(mountain) phasing -auto=this(counter{0/0.1.Forest}) lord(forest) phasing -auto=this(counter{0/0.1.Lair}) lord(lair) phasing -auto=this(counter{0/0.1.Locus}) lord(locus) phasing -auto=this(counter{0/0.1.Desert}) lord(desert) phasing -auto=this(counter{0/0.1.Urza's Mine}) lord(urza's mine) phasing -auto=this(counter{0/0.1.Urza's Power-Plant}) lord(urza's power-plant) phasing -auto=this(counter{0/0.1.Urza's Tower}) lord(urza's tower) phasing +auto=choice name(plains gets phasing) transforms((,newability[lord(plains) phasing])) forever +auto=choice name(island gets phasing) transforms((,newability[lord(island) phasing])) forever +auto=choice name(swamp gets phasing) transforms((,newability[lord(swamp) phasing])) forever +auto=choice name(mountain gets phasing) transforms((,newability[lord(mountain) phasing])) forever +auto=choice name(forest gets phasing) transforms((,newability[lord(forest) phasing])) forever +auto=choice name(lair gets phasing) transforms((,newability[lord(lair) phasing])) forever +auto=choice name(locus gets phasing) transforms((,newability[lord(locus) phasing])) forever +auto=choice name(desert gets phasing) transforms((,newability[lord(desert) phasing])) forever +auto=choice name(urza's mine gets phasing) transforms((,newability[lord(urza's mine) phasing])) forever +auto=choice name(urza's power-plant gets phasing) transforms((,newability[lord(urza's power-plant) phasing])) forever +auto=choice name(urza's tower gets phasing) transforms((,newability[lord(urza's tower) phasing])) forever text=As Shimmer enters the battlefield, choose a land type. -- Each land of the chosen type has phasing. (It phases in or out before its controller untaps during each of his or her untap steps. While it's phased out, it's treated as though it doesn't exist.) mana={2}{U}{U} type=Enchantment diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index cb39af59d..e29295ba3 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -541,6 +541,14 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe return 0; } + check = restriction[i].find("outnumbered");//opponent controls atleast 4 or more creatures than you + if(check != string::npos) + { + bool isoutnumbered = (card->controller()->opponent()->inPlay()->countByType("creature") - card->controller()->inPlay()->countByType("creature"))>3; + if(!isoutnumbered) + return 0; + } + check = restriction[i].find("hasdefender"); if(check != string::npos) { From 6fe57be1152664e3460ede594ae45902fe24b3ff Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 22 Jan 2017 00:14:46 +0800 Subject: [PATCH 09/22] fix for cards with restrictions --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 10 +++++----- projects/mtg/include/Player.h | 1 + projects/mtg/src/Damage.cpp | 1 + projects/mtg/src/GameObserver.cpp | 1 + projects/mtg/src/MTGAbility.cpp | 8 ++++++++ projects/mtg/src/Player.cpp | 1 + 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index f7f6186eb..2fafc9a73 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -75301,7 +75301,7 @@ type=Sorcery [/card] [card] name=Nature's Will -auto=@combatdamaged(player) from(creature|myBattlefield):tap all(land|opponentBattlefield) && untap all(land|myBattlefield) +auto=@each combatdamage restriction{opponentdamagedbycombat}:tap all(land|opponentBattlefield) && untap all(land|myBattlefield) text=Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control. mana={2}{G}{G} type=Enchantment @@ -79039,7 +79039,7 @@ toughness=3 [/card] [card] name=Ongoing Investigation -auto=@combatdamaged(player) from(creature|mybattlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@each combatdamage restriction{opponentdamagedbycombat}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto={1}{G}{e(creature|mygraveyard)}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller && life:2 text=Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. mana={1}{U} @@ -86578,7 +86578,7 @@ type=Instant [card] name=Pyrewild Shaman autohand={1}{R}{discard}:name(bloodrush) target(creature[attacking]) 3/1 ueot -autograveyard=@combatdamaged(player) from(creature|mybattlefield):pay({3}) moveto(ownerhand) +autograveyard=@each combatdamage restriction{opponentdamagedbycombat}:pay({3}) moveto(ownerhand) text=Bloodrush — {1}{R}, Discard Pyrewild Shaman: Target attacking creature gets +3/+1 until end of turn. -- Whenever one or more creatures you control deal combat damage to a player, if Pyrewild Shaman is in your graveyard, you may pay {3}. If you do, return Pyrewild Shaman to your hand. mana={2}{R} type=Creature @@ -90875,7 +90875,7 @@ toughness=3 [/card] [card] name=Reveille Squad -auto=@combat(attacking,sourcenottap) source(creature|opponentbattlefield):may untap all(creature|mybattlefield) +auto=@each blockers restriction{type(creature[attacking]|opponentbattlefield)~morethan~0} sourcenottap:may untap all(creature|mybattlefield) text=Whenever one or more creatures attack you, if Reveille Squad is untapped, you may untap all creatures you control. mana={2}{W}{W} type=Creature @@ -116417,7 +116417,7 @@ toughness=2 name=Thunderblade Charge target=creature,player auto=damage:3 -autograveyard=@combatdamaged(player) from(creature|mybattlefield):pay({2}{R}{R}{R}) name(pay to cast) activate name(pay to cast) castcard(restricted) +autograveyard=@each combatdamage restriction{opponentdamagedbycombat}:pay({2}{R}{R}{R}) name(pay to cast) activate name(pay to cast) castcard(restricted) text=Thunderblade Charge deals 3 damage to target creature or player. -- Whenever one or more creatures you control deal combat damage to a player, if Thunderblade Charge is in your graveyard, you may pay {2}{R}{R}{R}. If you do, you may cast it without paying its mana cost. mana={1}{R}{R} type=Sorcery diff --git a/projects/mtg/include/Player.h b/projects/mtg/include/Player.h index 6ba887610..b69619f2c 100644 --- a/projects/mtg/include/Player.h +++ b/projects/mtg/include/Player.h @@ -45,6 +45,7 @@ public: int energyCount; int epic; int forcefield; + int dealsdamagebycombat; int initLife; int raidcount; int handmodifier; diff --git a/projects/mtg/src/Damage.cpp b/projects/mtg/src/Damage.cpp index 3fff0b8f7..50b2b3f5d 100644 --- a/projects/mtg/src/Damage.cpp +++ b/projects/mtg/src/Damage.cpp @@ -260,6 +260,7 @@ int Damage::resolve() target->lifeLostThisTurn += damage; if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. { + source->controller()->dealsdamagebycombat = 1; // for restriction check vector values = MTGAllCards::getCreatureValuesById();//getting a weird crash here. rarely. for (size_t i = 0; i < values.size(); ++i) { diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 884e332db..2a6f6f1a4 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -213,6 +213,7 @@ void GameObserver::nextGamePhase() currentPlayer->nonCombatDamage = 0; currentPlayer->drawCounter = 0; currentPlayer->raidcount = 0; + currentPlayer->dealsdamagebycombat = 0; //clear check for restriction currentPlayer->opponent()->raidcount = 0; currentPlayer->prowledTypes.clear(); currentPlayer->opponent()->damageCount = 0; //added to clear odcount diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index e29295ba3..e4715c33c 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -540,6 +540,14 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe if(card->controller()->raidcount < 1) return 0; } + + + check = restriction[i].find("opponentdamagedbycombat"); + if(check != string::npos) + { + if(card->controller()->dealsdamagebycombat < 1) + return 0; + } check = restriction[i].find("outnumbered");//opponent controls atleast 4 or more creatures than you if(check != string::npos) diff --git a/projects/mtg/src/Player.cpp b/projects/mtg/src/Player.cpp index 6a95ca748..188bfd8c6 100644 --- a/projects/mtg/src/Player.cpp +++ b/projects/mtg/src/Player.cpp @@ -37,6 +37,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck * energyCount = 0; epic = 0; forcefield = 0; + dealsdamagebycombat = 0; raidcount = 0; handmodifier = 0; snowManaG = 0; From 7f6e96459c9b88b2b5a4d482e887dc0499bcc12e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 23 Jan 2017 11:41:19 +0800 Subject: [PATCH 10/22] added "energized" event energizedof(player):do something energizedfoeof(player):do something also some fixes in the primitives --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 36 ++++++++++---------- projects/mtg/include/AllAbilities.h | 28 +++++++++++++++ projects/mtg/include/WEvent.h | 9 +++++ projects/mtg/src/AllAbilities.cpp | 7 ++++ projects/mtg/src/MTGAbility.cpp | 8 +++++ projects/mtg/src/WEvent.cpp | 11 ++++++ 6 files changed, 81 insertions(+), 18 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 2fafc9a73..531ecb07f 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -23337,8 +23337,8 @@ subtype=Arcane [/card] [card] name=Crushing Vines -auto=choice name(Destroy flying creature) destroy target(creature[flying]) -auto=choice name(Destroy artifact) destroy target(artifact) +target=*[artifact;creature&flying] +auto=destroy text=Choose one - Destroy target creature with flying, or destroy target artifact. mana={2}{G} type=Instant @@ -43592,18 +43592,18 @@ type=Sorcery [card] name=Geth, Lord of the Vault abilities=intimidate -auto={0}{B}:name(X = 0) moveTo(myBattlefield) target(*[artifact;creature;manacost=0]|opponentgraveyard) && tap && deplete:0 opponent -auto={1}{B}:name(X = 1) moveTo(myBattlefield) target(*[artifact;creature;manacost=1]|opponentgraveyard) && tap && deplete:1 opponent -auto={2}{B}:name(X = 2) moveTo(myBattlefield) target(*[artifact;creature;manacost=2]|opponentgraveyard) && tap && deplete:2 opponent -auto={3}{B}:name(X = 3) moveTo(myBattlefield) target(*[artifact;creature;manacost=3]|opponentgraveyard) && tap && deplete:3 opponent -auto={4}{B}:name(X = 4) moveTo(myBattlefield) target(*[artifact;creature;manacost=4]|opponentgraveyard) && tap && deplete:4 opponent -auto={5}{B}:name(X = 5) moveTo(myBattlefield) target(*[artifact;creature;manacost=5]|opponentgraveyard) && tap && deplete:5 opponent -auto={6}{B}:name(X = 6) moveTo(myBattlefield) target(*[artifact;creature;manacost=6]|opponentgraveyard) && tap && deplete:6 opponent -auto={7}{B}:name(X = 7) moveTo(myBattlefield) target(*[artifact;creature;manacost=7]|opponentgraveyard) && tap && deplete:7 opponent -auto={8}{B}:name(X = 8) moveTo(myBattlefield) target(*[artifact;creature;manacost=8]|opponentgraveyard) && tap && deplete:8 opponent -auto={9}{B}:name(X = 9) moveTo(myBattlefield) target(*[artifact;creature;manacost=9]|opponentgraveyard) && tap && deplete:9 opponent -auto={10}{B}:name(X = 10) moveTo(myBattlefield) target(*[artifact;creature;manacost=10]|opponentgraveyard) && tap && deplete:10 opponent -auto={11}{B}:name(X = 11) moveTo(myBattlefield) target(*[artifact;creature;manacost=11]|opponentgraveyard) && tap && deplete:11 opponent +auto={0}{B}:name(X = 0) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=0]|opponentgraveyard) && deplete:0 opponent +auto={1}{B}:name(X = 1) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=1]|opponentgraveyard) && deplete:1 opponent +auto={2}{B}:name(X = 2) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=2]|opponentgraveyard) && deplete:2 opponent +auto={3}{B}:name(X = 3) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=3]|opponentgraveyard) && deplete:3 opponent +auto={4}{B}:name(X = 4) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=4]|opponentgraveyard) && deplete:4 opponent +auto={5}{B}:name(X = 5) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=5]|opponentgraveyard) && deplete:5 opponent +auto={6}{B}:name(X = 6) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=6]|opponentgraveyard) && deplete:6 opponent +auto={7}{B}:name(X = 7) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=7]|opponentgraveyard) && deplete:7 opponent +auto={8}{B}:name(X = 8) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=8]|opponentgraveyard) && deplete:8 opponent +auto={9}{B}:name(X = 9) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=9]|opponentgraveyard) && deplete:9 opponent +auto={10}{B}:name(X = 10) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=10]|opponentgraveyard) && deplete:10 opponent +auto={11}{B}:name(X = 11) moveTo(myBattlefield) and!( tap(noevent) )! target(*[artifact;creature;manacost=11]|opponentgraveyard) && deplete:11 opponent text=Intimidate -- {X}{B}: Put target artifact or creature card with converted mana cost X from an opponent's graveyard onto the battlefield under your control tapped. Then that player puts the top X cards of his or her library into his or her graveyard. mana={4}{B}{B} type=Legendary Creature @@ -52655,7 +52655,7 @@ toughness=3 [/card] [card] name=Hollow Specter -auto=@combatdamagefoeof(player) from(this):may pay({x}) name(Specter Pay X) Reveal:x revealzone(opponenthand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand)],newability[reject])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend revealend +auto=@combatdamagefoeof(player) from(this):may pay({x}) name(Specter Pay X) Reveal:x revealzone(opponenthand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend revealend text=Flying -- Whenever Hollow Specter deals combat damage to a player, you may pay {X}. If you do, that player reveals X cards from his or her hand and you choose one of them. That player discards that card. mana={1}{B}{B} type=Creature @@ -77312,7 +77312,7 @@ type=Artifact name=Noggin Whack other={1}{b} name(Prowl) otherrestriction=prowl -auto=Reveal:3 revealzone(opponenthand) optionone choice name(choose Discards) target(<2>*|reveal) transforms((,newability[moveto(ownerhand)],newability[reject])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend revealend +auto=Reveal:3 revealzone(opponenthand) optionone choice name(choose Discards) target(<2>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend revealend text=Prowl {1}{B} (You may cast this for its prowl cost if you dealt combat damage to a player this turn with a Rogue.) -- Target player reveals three cards from his or her hand. You choose two of them. That player discards those cards. mana={2}{B}{B} type=Tribal Sorcery @@ -86039,7 +86039,7 @@ type=Instant [card] name=Pulse of the Dross target=player -auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand)],newability[reject])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) afterrevealedend revealend +auto=Reveal:3 revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) transforms((,newability[moveto(ownerhand) and!(reject)!])) oneshot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) oneshot optiontwoend afterrevealed if type(*|myhand)~lessthan~type(*|opponenthand) then moveto(myhand) afterrevealedend revealend text=Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. Then if that player has more cards in hand than you, return Pulse of the Dross to its owner's hand. mana={1}{B}{B} type=Sorcery @@ -89065,7 +89065,7 @@ toughness=1 name=Reanimate target=creature|graveyard auto=moveTo(myBattlefield) -auto=damage:manacost controller +auto=life:-manacost controller text=Put target creature card from a graveyard onto the battlefield under your control. You lose life equal to its converted mana cost. mana={B} type=Sorcery diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index a744e34f3..a1f684c96 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1464,6 +1464,34 @@ public: return NEW TrCombatTrigger(*this); } }; +class TrplayerEnergized: public Trigger +{ +public: + bool thiscontroller, thisopponent; + TrplayerEnergized(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false, bool thiscontroller = false, bool thisopponent = false) : + Trigger(observer, id, source,once, tc),thiscontroller(thiscontroller),thisopponent(thisopponent) + { + } + + int triggerOnEventImpl(WEvent * event) + { + WEventplayerEnergized * e = dynamic_cast (event); + if (!e) return 0; + if (!tc->canTarget(e->player)) return 0; + if(thiscontroller) + if(e->player != source->controller()) + return 0; + if(thisopponent) + if(e->player == source->controller()) + return 0; + return 1; + } + + TrplayerEnergized * clone() const + { + return NEW TrplayerEnergized(*this); + } +}; class TrcardDrawn: public Trigger { diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 39ed06385..1358bf57d 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -306,6 +306,15 @@ struct WEventCardTransforms : public WEventCardUpdate { virtual Targetable * getTarget(int target); }; +//alterenergy event +struct WEventplayerEnergized : public WEvent { + WEventplayerEnergized(Player * player,int nb_count); + Player * player; + int nb_count; + using WEvent::getTarget; + virtual Targetable * getTarget(Player * player); +}; + std::ostream& operator<<(std::ostream&, const WEvent&); #endif diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 5fb08a1e2..9f1e66df8 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1024,7 +1024,14 @@ int AAAlterEnergy::resolve() { Player * pTarget = (Player*)_target; if(pTarget) + { pTarget->energyCount += energy; + if(energy > 0) + { + WEvent * e = NEW WEventplayerEnergized(pTarget, energy); + game->receiveEvent(e); + }//todo loses enegy event + } } return 0; } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index e4715c33c..6db798db9 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -982,6 +982,14 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell attackingTrigger,attackedAloneTrigger,notBlockedTrigger,attackBlockedTrigger,blockingTrigger); } + + //energized player - controller of card + if (TargetChooser * tc = parseSimpleTC(s, "energizedof", card)) + return NEW TrplayerEnergized(observer, id, card, tc,once,true,false); + + //energized player - opponent of card controller + if (TargetChooser * tc = parseSimpleTC(s, "energizedfoeof", card)) + return NEW TrplayerEnergized(observer, id, card, tc,once,false,true); //drawn player - controller of card - dynamic version drawof(player) -> returns current controller even with exchange of card controller if (TargetChooser * tc = parseSimpleTC(s, "drawof", card)) diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index 9573a5631..0bf9b176d 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -240,6 +240,11 @@ WEventCombatStepChange::WEventCombatStepChange(CombatStep step) : WEvent(), step(step) { } + +WEventplayerEnergized::WEventplayerEnergized(Player * player, int nb_count) : + player(player), nb_count(nb_count) +{ +} ; Targetable * WEventDamage::getTarget(int target) @@ -408,6 +413,12 @@ Targetable * WEventCardTransforms::getTarget(int target) return NULL; } +Targetable * WEventplayerEnergized::getTarget(Player * player) +{ + if (player) return player; + return NULL; +} + std::ostream& WEvent::toString(std::ostream& out) const { return out << "EVENT"; From 94aefa6dba532664994a578159e17c72d3df0439 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 23 Jan 2017 18:32:58 +0800 Subject: [PATCH 11/22] notany attribute anytypeofmana makes manacost colorless... wip --- .../mtg/bin/Res/missing_cards_by_sets/OGW.txt | 6 - projects/mtg/bin/Res/sets/primitives/mtg.txt | 562 +++++++++--------- projects/mtg/include/MTGCardInstance.h | 1 + projects/mtg/include/MTGDefinitions.h | 3 +- projects/mtg/src/CardDescriptor.cpp | 9 +- projects/mtg/src/GameObserver.cpp | 20 + projects/mtg/src/MTGCardInstance.cpp | 1 + projects/mtg/src/MTGDefinitions.cpp | 3 +- projects/mtg/src/TargetChooser.cpp | 4 + 9 files changed, 323 insertions(+), 286 deletions(-) diff --git a/projects/mtg/bin/Res/missing_cards_by_sets/OGW.txt b/projects/mtg/bin/Res/missing_cards_by_sets/OGW.txt index f6ad4f094..4b1cee149 100644 --- a/projects/mtg/bin/Res/missing_cards_by_sets/OGW.txt +++ b/projects/mtg/bin/Res/missing_cards_by_sets/OGW.txt @@ -68,12 +68,6 @@ mana={4}{G} type=Sorcery [/card] [card] -name=Oath of Nissa -text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells. -mana={G} -type=Legendary Enchantment -[/card] -[card] name=Reality Smasher text=({C} represents colorless mana.) -- Trample, haste -- Whenever Reality Smasher becomes the target of a spell an opponent controls, counter that spell unless its controller discards a card. mana={4}{C} diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 531ecb07f..de29caf15 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -140,7 +140,7 @@ toughness=5 [card] name=Abolish target=artifact,enchantment -other={discard(plains|myhand)} name(Discard a Plains) +other={D(plains|myhand)} name(Discard a Plains) auto=destroy text=You may discard a Plains card rather than pay Abolish's mana cost. -- Destroy target artifact or enchantment. mana={1}{W}{W} @@ -888,7 +888,7 @@ toughness=2 [card] name=Advanced Stitchwing abilities=flying -autograveyard={2}{u}{discard(*|myhand)}{discard(*|myhand)}:moveTo(mybattlefield) and!(tap(noevent))! +autograveyard={2}{u}{D(*|myhand)}{D(*|myhand)}:moveTo(mybattlefield) and!(tap(noevent))! text=Flying -- {2}{U}, Discard two cards: Return Advanced Stitchwing from your graveyard to the battlefield tapped. mana={3}{U}{U} type=Creature @@ -2360,23 +2360,23 @@ toughness=3 [/card] [card] name=Alexi, Zephyr Mage -auto={X}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 0) donothing -auto={1}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 1) target(creature) moveTo(ownerhand) -auto={2}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 2) target(<2>creature) moveTo(ownerhand) -auto={3}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 3) target(<3>creature) moveTo(ownerhand) -auto={4}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 4) target(<4>creature) moveTo(ownerhand) -auto={5}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 5) target(<5>creature) moveTo(ownerhand) -auto={6}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 6) target(<6>creature) moveTo(ownerhand) -auto={7}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 7) target(<7>creature) moveTo(ownerhand) -auto={8}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 8) target(<8>creature) moveTo(ownerhand) -auto={9}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 9) target(<9>creature) moveTo(ownerhand) -auto={10}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 10) target(<10>creature) moveTo(ownerhand) -auto={11}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 11) target(<11>creature) moveTo(ownerhand) -auto={12}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 12) target(<12>creature) moveTo(ownerhand) -auto={13}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 13) target(<13>creature) moveTo(ownerhand) -auto={14}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 14) target(<14>creature) moveTo(ownerhand) -auto={15}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 15) target(<15>creature) moveTo(ownerhand) -auto={16}{U}{T}{discard(*|myhand)}{discard(*|myhand)}:name(X = 16) target(<16>creature) moveTo(ownerhand) +auto={X}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 0) donothing +auto={1}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 1) target(creature) moveTo(ownerhand) +auto={2}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 2) target(<2>creature) moveTo(ownerhand) +auto={3}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 3) target(<3>creature) moveTo(ownerhand) +auto={4}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 4) target(<4>creature) moveTo(ownerhand) +auto={5}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 5) target(<5>creature) moveTo(ownerhand) +auto={6}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 6) target(<6>creature) moveTo(ownerhand) +auto={7}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 7) target(<7>creature) moveTo(ownerhand) +auto={8}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 8) target(<8>creature) moveTo(ownerhand) +auto={9}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 9) target(<9>creature) moveTo(ownerhand) +auto={10}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 10) target(<10>creature) moveTo(ownerhand) +auto={11}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 11) target(<11>creature) moveTo(ownerhand) +auto={12}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 12) target(<12>creature) moveTo(ownerhand) +auto={13}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 13) target(<13>creature) moveTo(ownerhand) +auto={14}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 14) target(<14>creature) moveTo(ownerhand) +auto={15}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 15) target(<15>creature) moveTo(ownerhand) +auto={16}{U}{T}{D(*|myhand)}{D(*|myhand)}:name(X = 16) target(<16>creature) moveTo(ownerhand) text={X}{U}, {T}, Discard two cards: Return X target creatures to their owners' hands. mana={3}{U}{U} type=Legendary Creature @@ -2927,7 +2927,7 @@ toughness=2 [card] name=Amugaba abilities=flying -auto={2}{U}{discard(*|myhand)}:moveTo(ownerhand) +auto={2}{U}{D(*|myhand)}:moveTo(ownerhand) text=Flying -- {2}{U}, Discard a card: Return Amugaba to its owner's hand. mana={5}{U}{U} type=Creature @@ -4055,7 +4055,7 @@ toughness=2 [/card] [card] name=Anurid Brushhopper -auto={discard(*|myhand)}{discard(*|myhand)}:(blink)ueot +auto={D(*|myhand)}{D(*|myhand)}:(blink)ueot text=Discard two cards: Exile Anurid Brushhopper. Return it to the battlefield under its owner's control at the beginning of the next end step. mana={1}{G}{W} type=Creature @@ -4310,7 +4310,7 @@ toughness=1 [/card] [card] name=Aquamoeba -auto={discard(*|myhand)}:swap +auto={D(*|myhand)}:swap text=Discard a card: Switch Aquamoeba's power and toughness until end of turn. mana={1}{U} type=Creature @@ -4520,7 +4520,7 @@ type=Sorcery [/card] [card] name=Arc Mage -auto={2}{R}{T}{discard(*|myhand)}:damage:1 target(creature,player) && activate damage:1 target(creature,player) +auto={2}{R}{T}{D(*|myhand)}:damage:1 target(creature,player) && activate damage:1 target(creature,player) text={2}{R}, {T}, Discard a card: Arc Mage deals 2 damage divided as you choose among one or two target creatures and/or players. mana={2}{R} type=Creature @@ -5798,7 +5798,7 @@ subtype=Aura [/card] [card] name=Artificer's Intuition -auto={U}{discard(artifact|myhand)}:moveTo(myhand) target(artifact[manacost<=1]|mylibrary) +auto={U}{D(artifact|myhand)}:moveTo(myhand) target(artifact[manacost<=1]|mylibrary) text={U}, Discard an artifact card: Search your library for an artifact card with converted mana cost 1 or less, reveal that card, and put it into your hand. Then shuffle your library. mana={1}{U} type=Enchantment @@ -7335,7 +7335,7 @@ toughness=* [card] name=Aven Trooper abilities=flying -auto={2}{W}{discard(*|myHand)}:1/2 +auto={2}{W}{D(*|myHand)}:1/2 text=Flying -- {2}{W}, Discard a card: Aven Trooper gets +1/+2 until end of turn. mana={3}{W} type=Creature @@ -7375,7 +7375,7 @@ toughness=3 [/card] [card] name=Avenger en-Dal -auto={2}{W}{T}{discard(*|myhand)}:target(creature[attacking]) dynamicability moveTo(exile) +auto={2}{W}{T}{D(*|myhand)}:target(creature[attacking]) dynamicability moveTo(exile) text={2}{W}, {T}, Discard a card: Exile target attacking creature. Its controller gains life equal to its toughness. mana={1}{W} type=Creature @@ -8104,7 +8104,7 @@ toughness=2 [/card] [card] name=Balloon Peddler -auto={U}{T}{discard(*|myhand)}:flying target(creature) +auto={U}{T}{D(*|myhand)}:flying target(creature) text={U}, {T}, Discard a card: Target creature gains flying until end of turn. mana={2}{U} type=Creature @@ -8217,7 +8217,7 @@ toughness=2 [card] name=Balshan Griffin abilities=flying -auto={1}{U}{discard(*|myhand)}:moveTo(hand) +auto={1}{U}{D(*|myhand)}:moveTo(hand) text=Flying -- {1}{U}, Discard a card: Return Balshan Griffin to its owner's hand. mana={3}{U}{U} type=Creature @@ -8852,7 +8852,7 @@ type=Sorcery [card] name=Baru, Fist of Krosa auto=@movedto(forest|battlefield):all(creature[green]|mybattlefield) +1/+1 ueot && all(creature[green]|mybattlefield) trample ueot -auto={discard(other *[share!name!]|myhand)}:token(Wurm,creature Wurm,type:land:mybattlefield/type:land:mybattlefield,green) controller +auto={D(other *[share!name!]|myhand)}:token(Wurm,creature Wurm,type:land:mybattlefield/type:land:mybattlefield,green) controller text=Whenever a Forest enters the battlefield, green creatures you control get +1/+1 and gain trample until end of turn. -- Grandeur - Discard another card named Baru, Fist of Krosa: Put an X/X green Wurm creature token onto the battlefield, where X is the number of lands you control. mana={3}{G}{G} type=Legendary Creature @@ -10741,7 +10741,7 @@ type=Land [/card] [card] name=Blaster Mage -auto={R}{T}{discard(*|myhand)}:destroy target(wall) +auto={R}{T}{D(*|myhand)}:destroy target(wall) text={R}, {T}, Discard a card: Destroy target Wall. mana={2}{R} type=Creature @@ -12553,7 +12553,7 @@ toughness=2 [/card] [card] name=Bog Witch -auto={B}{T}{discard(*|myhand)}:Add{B}{B}{B} +auto={B}{T}{D(*|myhand)}:Add{B}{B}{B} text={B}, {T}, Discard a card: Add {B}{B}{B} to your mana pool. mana={2}{B} type=Creature @@ -12804,7 +12804,7 @@ toughness=1 [/card] [card] name=Bola Warrior -auto={R}{T}{discard(*|myhand)}:cantblock target(creature) +auto={R}{T}{D(*|myhand)}:cantblock target(creature) text={R}, {T}, Discard a card: Target creature can't block this turn. mana={1}{R} type=Creature @@ -13152,7 +13152,7 @@ toughness=4 [/card] [card] name=Borborygmos Enraged -auto={discard(land|myhand)}:target(creature,player) damage:3 +auto={D(land|myhand)}:target(creature,player) damage:3 auto=@combatdamaged(player) from(this):reveal:3 optionone name(Reveal) target(<3>land|reveal) moveto(myhand) optiononeend optiontwo name(Send To Grave) choice all(*|reveal) moveto(mygraveyard) optiontwoend revealend text=Trample -- Whenever Borborygmos Enraged deals combat damage to a player, reveal the top three cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard. -- Discard a land card: Borborygmos Enraged deals 3 damage to target creature or player. mana={4}{R}{R}{G}{G} @@ -15532,7 +15532,7 @@ toughness=2 [/card] [card] name=Cackling Witch -auto={X}{B}{T}{discard(*|myhand)}:thisforeach(X) 1/0 target(creature) +auto={X}{B}{T}{D(*|myhand)}:thisforeach(X) 1/0 target(creature) text={X}{B}, {T}, Discard a card: Target creature gets +X/+0 until end of turn. mana={1}{B} type=Creature @@ -15719,7 +15719,7 @@ type=Enchantment [/card] [card] name=Call the Bloodline -auto={1}{discard(*|myhand)}:token(Vampire Knight,creature Vampire Knight,1/1,black,lifelink) limit:1 +auto={1}{D(*|myhand)}:token(Vampire Knight,creature Vampire Knight,1/1,black,lifelink) limit:1 text={1}, Discard a card: Put a 1/1 black Vampire Knight creature token with lifelink onto the battlefield. Activate this ability only once each turn. mana={1}{B} type=Enchantment @@ -17373,7 +17373,7 @@ toughness=1 [card] name=Centaur Veteran abilities=trample -auto={G}{discard(*|myhand)}:regenerate +auto={G}{D(*|myhand)}:regenerate text=Trample -- {G}, Discard a card: Regenerate Centaur Veteran. mana={5}{G} type=Creature @@ -17467,7 +17467,7 @@ toughness=1 [/card] [card] name=Cephalid Inkshrouder -auto={discard(*|myHand)}:shroud && unblockable +auto={D(*|myHand)}:shroud && unblockable text=Discard a card: Cephalid Inkshrouder gains shroud until end of turn and is unblockable this turn. (A permanent with shroud can't be the target of spells or abilities.) mana={2}{U} type=Creature @@ -20131,7 +20131,7 @@ toughness=1 [card] name=Cloudseeder abilities=flying -auto={U}{T}{discard(*|myhand)}:token(Cloud Sprite,creature faerie, 1/1,flying,cloud blue) +auto={U}{T}{D(*|myhand)}:token(Cloud Sprite,creature faerie, 1/1,flying,cloud blue) text=Flying -- {U}, {T}, Discard a card: Put a 1/1 blue Faerie creature token named Cloud Sprite onto the battlefield. It has flying and "Cloud Sprite can block only creatures with flying." mana={1}{U} type=Creature @@ -20795,7 +20795,7 @@ type=Enchantment [/card] [card] name=Compulsion -auto={1}{U}{discard(*|myhand)}:draw:1 controller +auto={1}{U}{D(*|myhand)}:draw:1 controller auto={1}{U}{S}:draw:1 controller text={1}{U}, Discard a card: Draw a card. -- {1}{U}, Sacrifice Compulsion: Draw a card. mana={1}{U} @@ -21629,7 +21629,7 @@ toughness=1 [card] name=Coral Net target=creature[green;white] -auto=teach(creature) upcost[{discard(*|myhand)}] sacrifice +auto=teach(creature) upcost[{D(*|myhand)}] sacrifice text=Enchant green or white creature -- Enchanted creature has "At the beginning of your upkeep, sacrifice this creature unless you discard a card." mana={U} type=Enchantment @@ -22369,7 +22369,7 @@ type=Instant [/card] [card] name=Crashing Centaur -auto={G}{discard(*|myhand)}:trample +auto={G}{D(*|myhand)}:trample auto=aslongas(*|mygraveyard) 2/2 >6 auto=aslongas(*|mygraveyard) shroud >6 text={G}, Discard a card: Crashing Centaur gains trample until end of turn. -- Threshold - As long as seven or more cards are in your graveyard, Crashing Centaur gets +2/+2 and has shroud. (It can't be the target of spells or abilities.) @@ -23485,7 +23485,7 @@ toughness=0 [/card] [card] name=Cryptbreaker -auto={b}{1}{T}{discard(*|myhand)}:token(Zombie,Creature Zombie,2/2,black) +auto={b}{1}{T}{D(*|myhand)}:token(Zombie,Creature Zombie,2/2,black) auto={T(creature[Zombie]|myBattlefield)}{T(creature[Zombie]|myBattlefield)}{T(creature[Zombie]|myBattlefield)}:draw:1 controller && life:-1 controller text={1}{B}, {T}, Discard a card: Put a 2/2 black Zombie creature token onto the battlefield. -- Tap three untapped Zombies you control: You draw a card and you lose 1 life. mana={B} @@ -23496,7 +23496,7 @@ toughness=1 [/card] [card] name=Cryptic Cruiser -auto={2}{u}{discard(*|opponentexile)}:tap target(creature) +auto={2}{u}{D(*|opponentexile)}:tap target(creature) text=Devoid (This card has no color.) -- {2}{U}, Put a card an opponent owns from exile into that player's graveyard: Tap target creature. mana={3}{U} type=Creature @@ -24623,10 +24623,10 @@ type=Instant name=Dark Deal auto=count(type:*:myhand) auto=all(*|myhand) reject -auto=draw:countedamountplus1plusend controller +auto=draw:countedamountminus1minusend controller auto=count(type:*:opponenthand) auto=all(*|opponenthand) reject -auto=draw:countedamountplus1plusend opponent +auto=draw:countedamountminus1minusend opponent text=Each player discards all the cards in his or her hand, then draws that many cards minus one. mana={2}{B} type=Sorcery @@ -25459,7 +25459,7 @@ subtype=Aura [/card] [card] name=Dawnstrider -auto={G}{T}{discard(*|myhand)}:fog oneshot +auto={G}{T}{D(*|myhand)}:fog oneshot text={G}, {T}, Discard a card: Prevent all combat damage that would be dealt this turn. mana={1}{G} type=Creature @@ -26476,7 +26476,7 @@ type=Instant [card] name=Deepcavern Imp abilities=flying,haste -auto=upcost[{discard(*|myhand)};next upkeep] sacrifice +auto=upcost[{D(*|myhand)};next upkeep] sacrifice text=Flying, haste -- Echo - Discard a card. (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.) mana={2}{B} type=Creature @@ -26598,7 +26598,7 @@ toughness=1 [/card] [card] name=Deepwood Drummer -auto={G}{T}{discard(*|myhand)}:2/2 target(creature) +auto={G}{T}{D(*|myhand)}:2/2 target(creature) text={G}, {T}, Discard a card: Target creature gets +2/+2 until end of turn. mana={1}{G} type=Creature @@ -27080,7 +27080,7 @@ subtype=Aura name=Demonic Collusion target=*|mylibrary auto=moveTo(myhand) -buyback={3}{B}{B}{discard(*|myhand)}{discard(*|myhand)} +buyback={3}{B}{B}{D(*|myhand)}{D(*|myhand)} text=Buyback - Discard two cards. (You may discard two cards in addition to any other costs as you cast this spell. If you do, put this card into your hand as it resolves.) -- Search your library for a card and put that card into your hand. Then shuffle your library. mana={3}{B}{B} type=Sorcery @@ -27963,7 +27963,7 @@ toughness=1 [/card] [card] name=Devout Witness -auto={W}{T}{discard(*|myhand)}:destroy target(artifact,enchantment) +auto={W}{T}{D(*|myhand)}:destroy target(artifact,enchantment) text={1}{W}, {T}, Discard a card: Destroy target artifact or enchantment. mana={2}{W} type=Creature @@ -28411,7 +28411,7 @@ toughness=3 [/card] [card] name=Dirty Wererat -auto={B}{discard(*|myhand)}:regenerate +auto={B}{D(*|myhand)}:regenerate auto=aslongas(*|mygraveyard) 2/2 >6 auto=aslongas(*|mygraveyard) cantblock >6 text={B}, Discard a card: Regenerate Dirty Wererat. -- Threshold - As long as seven or more cards are in your graveyard, Dirty Wererat gets +2/+2 and can't block. @@ -30184,7 +30184,7 @@ type=Enchantment [/card] [card] name=Dralnu's Pet -other={3}{B}{U}{U}{discard(other creature|myhand)} name(Kicker) +other={3}{B}{U}{U}{D(other creature|myhand)} name(Kicker) auto=if paid(alternative) then counter(1/1,storedmanacost) && transforms((,flying)) forever text=Kicker - {2}{B}, Discard a creature card. (You may pay {2}{B} and discard a creature card in addition to any other costs as you cast this spell.) -- If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost. mana={1}{U}{U} @@ -31798,8 +31798,8 @@ toughness=2 [/card] [card] name=Dwarven Armorer -auto={R}{T}{discard(*|myhand)}:counter(0/1,1) target(creature) -auto={R}{T}{discard(*|myhand)}:counter(1/0,1) target(creature) +auto={R}{T}{D(*|myhand)}:counter(0/1,1) target(creature) +auto={R}{T}{D(*|myhand)}:counter(1/0,1) target(creature) text={R}, {T}, Discard a card: Put a +0/+1 counter or a +1/+0 counter on target creature. mana={R} type=Creature @@ -32157,7 +32157,7 @@ type=Enchantment [card] name=Earsplitting Rats auto=name(discard) transforms((,newability[ability$!name(discard) notatarget(*|myhand) reject!$ controller],newability[ability$!name(discard) notatarget(*|myhand) reject!$ opponent])) ueot -auto={discard(*|myhand)}:regenerate +auto={D(*|myhand)}:regenerate text=When Earsplitting Rats enters the battlefield, each player discards a card. -- Discard a card: Regenerate Earsplitting Rats. mana={3}{B} type=Creature @@ -33347,7 +33347,7 @@ toughness=3 [/card] [card] name=Elusive Tormentor -auto={1}{discard(*|myhand)}:flip(Insidious Mist) +auto={1}{D(*|myhand)}:flip(Insidious Mist) text={1}, Discard a card: Transform Elusive Tormentor. mana={2}{B}{B} type=Creature @@ -34998,7 +34998,7 @@ type=Instant [card] name=Ephemeron abilities=flying -auto={discard(*|myhand)}:moveTo(myhand) +auto={D(*|myhand)}:moveTo(myhand) text=Flying -- Discard a card: Return Ephemeron to its owner's hand. mana={4}{U}{U} type=Creature @@ -35045,7 +35045,7 @@ type=Sorcery [card] name=Epiphany Storm target=creature -auto=teach(creature) {R}{T}{discard(*|myhand)}:draw:1 controller +auto=teach(creature) {R}{T}{D(*|myhand)}:draw:1 controller text=Enchant creature -- Enchanted creature has "Red, Tap, Discard a card: Draw a card." mana={R} type=Enchantment @@ -35156,7 +35156,7 @@ toughness=7 name=Erebos's Emissary auto=bestow bstw auto=bestow teach(creature) +3/+3 -auto={discard(*|myhand)}:+2/+2 ueot +auto={D(*|myhand)}:+2/+2 ueot bestow={5}{b} text=Bestow {5}{B} (If you cast this card for its bestow cost, it's an Aura spell with enchant creature. It becomes a creature again if it's not attached to a creature.) -- Discard a creature card: Erebos's Emissary gets +2/+2 until end of turn. If Erebos's Emissary is an Aura, enchanted creature gets +2/+2 until end of turn instead. -- Enchanted creature gets +3/+3. mana={3}{B} @@ -35309,7 +35309,7 @@ toughness=4 [card] name=Escape Artist abilities=unblockable -auto={U}{discard(*|myhand)}:moveTo(ownerhand) +auto={U}{D(*|myhand)}:moveTo(ownerhand) text=Escape Artist is unblockable. -- {U}, Discard a card: Return Escape Artist to its owner's hand. mana={1}{U} type=Creature @@ -36758,7 +36758,7 @@ type=Sorcery [/card] [card] name=Face of Fear -auto={2}{B}{discard(*|myhand)}:fear +auto={2}{B}{D(*|myhand)}:fear text={2}{B}, Discard a card: Face of Fear gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) mana={5}{B} type=Creature @@ -37711,7 +37711,7 @@ toughness=4 [/card] [card] name=Fauna Shaman -auto={G}{T}{discard(creature|myhand)}:moveTo(myhand) target(creature|myLibrary) +auto={G}{T}{D(creature|myhand)}:moveTo(myhand) target(creature|myLibrary) text={G},{T}, Discard a creature card: Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. mana={1}{G} type=Creature @@ -39089,7 +39089,7 @@ toughness=1 [/card] [card] name=Firefright Mage -auto={1}{R}{T}{discard(*|myhand)}:target(creature) transforms((,newability[cantbeblockedby(-artfiact;-red)])) ueot +auto={1}{R}{T}{D(*|myhand)}:target(creature) transforms((,newability[cantbeblockedby(-artfiact;-red)])) ueot text={1}{R}, {T}, Discard a card: Target creature can't be blocked this turn except by artifact creatures and/or red creatures. mana={R} type=Creature @@ -39876,7 +39876,7 @@ toughness=2 [/card] [card] name=Fledgling Imp -auto={B}{discard(*|myhand)}:flying +auto={B}{D(*|myhand)}:flying text={B}, Discard a card: Fledgling Imp gains flying until end of turn. mana={2}{B} type=Creature @@ -40073,7 +40073,7 @@ toughness=2 [/card] [card] name=Fleshgrafter -auto={discard(artifact|myhand)}:2/2 +auto={D(artifact|myhand)}:2/2 text=Discard an artifact card: Fleshgrafter gets +2/+2 until end of turn. mana={2}{B} type=Creature @@ -40416,7 +40416,7 @@ subtype=Aura [/card] [card] name=Flowstone Channeler -auto={1}{R}{T}{discard(*|myhand)}:1/-1 && haste target(creature) +auto={1}{R}{T}{D(*|myhand)}:1/-1 && haste target(creature) text={1}{R}, {T}, Discard a card: Target creature gets +1/-1 and gains haste until end of turn. mana={2}{R} type=Creature @@ -40506,10 +40506,10 @@ toughness=4 [/card] [card] name=Flowstone Sculpture -auto={2}{discard(*|myhand)}:counter(1/1,1) -auto={2}{discard(*|myhand)}:name(flying) transforms((,flying)) forever -auto={2}{discard(*|myhand)}:name(first strike) transforms((,first strike)) forever -auto={2}{discard(*|myhand)}:name(trample) transforms((,trample)) forever +auto={2}{D(*|myhand)}:counter(1/1,1) +auto={2}{D(*|myhand)}:name(flying) transforms((,flying)) forever +auto={2}{D(*|myhand)}:name(first strike) transforms((,first strike)) forever +auto={2}{D(*|myhand)}:name(trample) transforms((,trample)) forever text={2}, Discard a card: Put a +1/+1 counter on Flowstone Sculpture or Flowstone Sculpture gains flying, first strike, or trample. (This effect lasts indefinitely.) mana={6} type=Artifact Creature @@ -40717,7 +40717,7 @@ toughness=3 name=Foil target=*|stack auto=fizzle -other={discard(island|myhand)}{discard(other *|myhand)} name(Discard an Island and Another Card) +other={D(island|myhand)}{D(other *|myhand)} name(Discard an Island and Another Card) text=You may discard an Island card and another card rather than pay Foil's mana cost. -- Counter target spell. mana={2}{U}{U} type=Instant @@ -40933,7 +40933,7 @@ type=Land name=Forbid target=*|stack auto=fizzle -buyback={1}{U}{U}{discard(*|myhand)}{discard(*|myhand)} +buyback={1}{U}{U}{D(*|myhand)}{D(*|myhand)} text=Buyback - Discard two cards. (You may discard two cards in addition to any other costs as you cast this spell. If you do, put this card into your hand as it resolves.) -- Counter target spell. mana={1}{U}{U} type=Instant @@ -42961,7 +42961,7 @@ toughness=1 [card] name=Gathan Raiders facedown={3} -autofacedown={discard(*|myhand)}:morph +autofacedown={D(*|myhand)}:morph auto=aslongas(*|myhand) 2/2 <1 text=Hellbent - Gathan Raiders gets +2/+2 if you have no cards in hand. -- Morph - Discard a card. (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={3}{R}{R} @@ -43506,7 +43506,7 @@ type=Land name=Geralf's Masterpiece abilities=flying auto=foreach(*|myhand) -1/-1 -autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap(noevent))! +autograveyard={3}{U}{D(*|myhand)}{D(*|myhand)}{D(*|myhand)}:moveto(myhand) and!(tap(noevent))! text=Flying -- Geralf's Masterpiece gets -1/-1 for each card in your hand. -- {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. mana={3}{U}{U} type=Creature @@ -43858,7 +43858,7 @@ toughness=4 [/card] [card] name=Ghost Tactician -auto={W}{T}{discard(*|myhand)}:lord(creature|mybattlefield) 1/0 +auto={W}{T}{D(*|myhand)}:lord(creature|mybattlefield) 1/0 text={W}, {T}, Discard a card: Creatures you control get +1/+0 until end of turn. mana={4}{W} type=Creature @@ -44059,7 +44059,7 @@ name=Ghostly Wings target=creature auto=1/1 auto=flying -auto={discard(*|myhand)}:teach(creature) moveTo(ownerhand) +auto={D(*|myhand)}:teach(creature) moveTo(ownerhand) text=Enchant creature -- Enchanted creature gets +1/+1 and has flying. -- Discard a card: Return enchanted creature to its owner's hand. mana={1}{U} type=Enchantment @@ -44147,7 +44147,7 @@ type=Instant [/card] [card] name=Ghoulsteed -auto={2}{B}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! +auto={2}{B}{D(*|myhand)}{D(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text={2}{B}, Discard two cards: Return Ghoulsteed from your graveyard to the battlefield tapped. mana={4}{B} type=Creature @@ -44571,7 +44571,7 @@ toughness=0 [card] name=Gigapede abilities=shroud -autograveyard={discard(*|myhand)}:moveTo(myhand) myUpkeepOnly +autograveyard={D(*|myhand)}:moveTo(myhand) myUpkeepOnly text=Shroud (This permanent can't be the target of spells or abilities.) -- At the beginning of your upkeep, if Gigapede is in your graveyard, you may discard a card. If you do, return Gigapede to your hand. mana={3}{G}{G} type=Creature @@ -45048,7 +45048,7 @@ toughness=2 [card] name=Glint-Eye Nephilim auto=@combatdamaged(player) from(this):draw:thatmuch controller -auto={1}{discard(*|myhand)}:1/1 +auto={1}{D(*|myhand)}:1/1 text=Whenever Glint-Eye Nephilim deals combat damage to a player, draw that many cards. -- {1}, Discard a card: Glint-Eye Nephilim gets +1/+1 until end of turn. mana={U}{B}{R}{G} type=Creature @@ -46753,7 +46753,7 @@ toughness=1 [/card] [card] name=Goldmeadow Lookout -auto={W}{T}{discard(*|myhand)}:token(139397) +auto={W}{T}{D(*|myhand)}:token(139397) text={W}, {T}, Discard a card: Put a 1/1 white Kithkin Soldier creature token named Goldmeadow Harrier onto the battlefield. It has "{W}, {T}: Tap target creature." mana={3}{W} type=Creature @@ -47988,7 +47988,7 @@ type=Enchantment [/card] [card] name=Greel, Mind Raker -auto={X}{B}{T}{discard(*|myhand)}{discard(*|myhand)}:discard:X target(player) +auto={X}{B}{T}{D(*|myhand)}{D(*|myhand)}:discard:X target(player) text={X}{B}, {T}, Discard two cards: Target player discards X cards at random. mana={3}{B}{B} type=Legendary Creature @@ -48072,7 +48072,7 @@ toughness=3 [/card] [card] name=Greenseeker -auto={G}{T}{discard(*|myhand)}:moveTo(myHand) target(land[basic]|mylibrary) +auto={G}{T}{D(*|myhand)}:moveTo(myHand) target(land[basic]|mylibrary) text={G}, {T}, Discard a card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. mana={G} type=Creature @@ -48707,7 +48707,7 @@ toughness=3 [/card] [card] name=Grotesque Hybrid -auto={discard(*|myhand)}:flying & protection from white && protection from green +auto={D(*|myhand)}:flying & protection from white && protection from green auto=@combatdamaged(creature) from(this):all(trigger[to]) bury text=Whenever Grotesque Hybrid deals combat damage to a creature, destroy that creature. It can't be regenerated. -- Discard a card: Grotesque Hybrid gains flying and protection from green and from white until end of turn. mana={4}{B} @@ -49355,7 +49355,7 @@ toughness=2 name=Gurzigost auto=@each my upkeep restriction{type(*|mygraveyard)~morethan~1}:transforms((,newability[choice name(put at bottom of library) target(<2>*|mygraveyard) bottomoflibrary],newability[choice sacrifice])) ueot auto=@each my upkeep restriction{type(*|mygraveyard)~lessthan~2}:sacrifice -auto={G}{G}{discard(*|myhand)}:transforms((,newability[@combat(blocked turnlimited) source(this):may name(assign combat damage to defending player) thisforeach(power>=1) damage:1 opponent && fog from(this)])) ueot +auto={G}{G}{D(*|myhand)}:transforms((,newability[@combat(blocked turnlimited) source(this):may name(assign combat damage to defending player) thisforeach(power>=1) damage:1 opponent && fog from(this)])) ueot text=At the beginning of your upkeep, sacrifice Gurzigost unless you put two cards from your graveyard on the bottom of your library. -- {G}{G}, Discard a card: You may have Gurzigost assign its combat damage this turn as though it weren't blocked. mana={3}{G}{G} type=Creature @@ -49870,23 +49870,23 @@ toughness=6 [/card] [card] name=Hammer Mage -auto={R}{T}{discard(*|myhand)}:name(X <= 0) destroy all(artifact[manacost<=0]) -auto={1}{R}{T}{discard(*|myhand)}:name(X <= 1) destroy all(artifact[manacost<=1]) -auto={2}{R}{T}{discard(*|myhand)}:name(X <= 2) destroy all(artifact[manacost<=2]) -auto={3}{R}{T}{discard(*|myhand)}:name(X <= 3) destroy all(artifact[manacost<=3]) -auto={4}{R}{T}{discard(*|myhand)}:name(X <= 4) destroy all(artifact[manacost<=4]) -auto={5}{R}{T}{discard(*|myhand)}:name(X <= 5) destroy all(artifact[manacost<=5]) -auto={6}{R}{T}{discard(*|myhand)}:name(X <= 6) destroy all(artifact[manacost<=6]) -auto={7}{R}{T}{discard(*|myhand)}:name(X <= 7) destroy all(artifact[manacost<=7]) -auto={8}{R}{T}{discard(*|myhand)}:name(X <= 8) destroy all(artifact[manacost<=8]) -auto={9}{R}{T}{discard(*|myhand)}:name(X <= 9) destroy all(artifact[manacost<=9]) -auto={10}{R}{T}{discard(*|myhand)}:name(X <= 10) destroy all(artifact[manacost<=10]) -auto={11}{R}{T}{discard(*|myhand)}:name(X <= 11) destroy all(artifact[manacost<=11]) -auto={12}{R}{T}{discard(*|myhand)}:name(X <= 12) destroy all(artifact[manacost<=12]) -auto={13}{R}{T}{discard(*|myhand)}:name(X <= 13) destroy all(artifact[manacost<=13]) -auto={14}{R}{T}{discard(*|myhand)}:name(X <= 14) destroy all(artifact[manacost<=14]) -auto={15}{R}{T}{discard(*|myhand)}:name(X <= 15) destroy all(artifact[manacost<=15]) -auto={16}{R}{T}{discard(*|myhand)}:name(X <= 16) destroy all(artifact[manacost<=16]) +auto={R}{T}{D(*|myhand)}:name(X <= 0) destroy all(artifact[manacost<=0]) +auto={1}{R}{T}{D(*|myhand)}:name(X <= 1) destroy all(artifact[manacost<=1]) +auto={2}{R}{T}{D(*|myhand)}:name(X <= 2) destroy all(artifact[manacost<=2]) +auto={3}{R}{T}{D(*|myhand)}:name(X <= 3) destroy all(artifact[manacost<=3]) +auto={4}{R}{T}{D(*|myhand)}:name(X <= 4) destroy all(artifact[manacost<=4]) +auto={5}{R}{T}{D(*|myhand)}:name(X <= 5) destroy all(artifact[manacost<=5]) +auto={6}{R}{T}{D(*|myhand)}:name(X <= 6) destroy all(artifact[manacost<=6]) +auto={7}{R}{T}{D(*|myhand)}:name(X <= 7) destroy all(artifact[manacost<=7]) +auto={8}{R}{T}{D(*|myhand)}:name(X <= 8) destroy all(artifact[manacost<=8]) +auto={9}{R}{T}{D(*|myhand)}:name(X <= 9) destroy all(artifact[manacost<=9]) +auto={10}{R}{T}{D(*|myhand)}:name(X <= 10) destroy all(artifact[manacost<=10]) +auto={11}{R}{T}{D(*|myhand)}:name(X <= 11) destroy all(artifact[manacost<=11]) +auto={12}{R}{T}{D(*|myhand)}:name(X <= 12) destroy all(artifact[manacost<=12]) +auto={13}{R}{T}{D(*|myhand)}:name(X <= 13) destroy all(artifact[manacost<=13]) +auto={14}{R}{T}{D(*|myhand)}:name(X <= 14) destroy all(artifact[manacost<=14]) +auto={15}{R}{T}{D(*|myhand)}:name(X <= 15) destroy all(artifact[manacost<=15]) +auto={16}{R}{T}{D(*|myhand)}:name(X <= 16) destroy all(artifact[manacost<=16]) text={X}{R}, {T}, Discard a card: Destroy all artifacts with converted mana cost X or less. mana={1}{R} type=Creature @@ -50558,7 +50558,7 @@ type=Enchantment name=Haunted Dead abilities=flying auto=token(Spirit,Creature Spirit,1/1,white,flying) -autograveyard={1}{B}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! +autograveyard={1}{B}{D(*|myhand)}{D(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text=When Haunted Dead enters the battlefield, put a 1/1 white Spirit creature token with flying onto the battlefield. -- {1}{B}, Discard two cards: Return Haunted Dead from your graveyard to the battlefield tapped. mana={3}{B} type=Creature @@ -51388,7 +51388,7 @@ type=Enchantment [/card] [card] name=Heir of Falkenrath -auto={discard(*|myhand)}:flip(Heir to the Night) limit:1 +auto={D(*|myhand)}:flip(Heir to the Night) limit:1 text=Discard a card: Transform Heir of Falkenrath. Activate this ability only once each turn. mana={1}{B} type=Creature @@ -52454,7 +52454,7 @@ toughness=2 [/card] [card] name=Hisoka, Minamo Sensei -auto={2}{U}{discard(*|myhand)}:fizzle target(*[manacost=storedmanacost]|stack) +auto={2}{U}{D(*|myhand)}:fizzle target(*[manacost=storedmanacost]|stack) text={2}{U}, Discard a card: Counter target spell if it has the same converted mana cost as the discarded card. mana={2}{U}{U} type=Legendary Creature @@ -54313,7 +54313,7 @@ toughness=8 [/card] [card] name=Hypochondria -auto={W}{discard(*|myhand)}:prevent:3 target(creature,player) +auto={W}{D(*|myhand)}:prevent:3 target(creature,player) auto={S}:prevent:3 target(creature,player) text={W}, Discard a card: Prevent the next 3 damage that would be dealt to target creature or player this turn. -- {W}, Sacrifice Hypochondria: Prevent the next 3 damage that would be dealt to target creature or player this turn. mana={1}{W} @@ -54364,7 +54364,7 @@ toughness=2 [/card] [card] name=Icatian Crier -auto={1}{W}{T}{discard(*|myhand)}:token(Citizen,creature citizen, 1/1, white)*2 +auto={1}{W}{T}{D(*|myhand)}:token(Citizen,creature citizen, 1/1, white)*2 text={1}{W}, {T}, Discard a card: Put two 1/1 white Citizen creature tokens onto the battlefield. mana={2}{W} type=Creature @@ -54911,7 +54911,7 @@ toughness=2 name=Immobilizing Ink target=creature auto=doesnotuntap -auto=teach(creature) {1}{discard(*|myhand)}:untap +auto=teach(creature) {1}{D(*|myhand)}:untap text=Enchant creature -- Enchanted creature doesn't untap during its controller's untap step. -- Enchanted creature has "{1}, Discard a card: Untap this creature." mana={1}{U} type=Enchantment @@ -56120,7 +56120,7 @@ subtype=Aura [/card] [card] name=Insolent Neonate -auto={discard(*|myhand)}{s}:draw:1 +auto={D(*|myhand)}{s}:draw:1 abilities=menace text=Menace (This creature can't be blocked except by two or more creatures.) -- Discard a card, Sacrifice Insolent Neonate: Draw a card. mana={R} @@ -56196,7 +56196,7 @@ toughness=3 [/card] [card] name=Instigator -auto={1}{B}{B}{T}{discard(*|myhand)}:lord(creature|opponentBattlefield) mustattack ueot +auto={1}{B}{B}{T}{D(*|myhand)}:lord(creature|opponentBattlefield) mustattack ueot text={1}{B}{B}, {T}, Discard a card: Creatures target player controls attack this turn if able. mana={1}{B} type=Creature @@ -57479,9 +57479,9 @@ toughness=1 [/card] [card] name=Jaya Ballard, Task Mage -auto={R}{T}{discard(*|myHand)}:destroy target(*[blue]) -auto={1}{R}{T}{discard(*|myHand)}:damage:3 && cantregen target(creature,player) -auto={5}{R}{R}{discard(*|myHand)}:damage:6 all(creature,player) +auto={R}{T}{D(*|myHand)}:destroy target(*[blue]) +auto={1}{R}{T}{D(*|myHand)}:damage:3 && cantregen target(creature,player) +auto={5}{R}{R}{D(*|myHand)}:damage:6 all(creature,player) text={R}, {T}, Discard a card: Destroy target blue permanent. -- {1}{R}, {T}, Discard a card: Jaya Ballard, Task Mage deals 3 damage to target creature or player. A creature dealt damage this way can't be regenerated this turn. -- {5}{R}{R}, {T}, Discard a card: Jaya Ballard deals 6 damage to each creature and each player. mana={1}{R}{R} type=Legendary Creature @@ -57961,7 +57961,7 @@ toughness=12 [/card] [card] name=Jolrael, Empress of Beasts -auto={2}{G}{T}{discard(*|myhand)}{discard(*|myhand)}:name(lands become 3/3 creatures)target(player) all(land|targetedpersonsbattlefield) becomes(Creature,3/3) ueot +auto={2}{G}{T}{D(*|myhand)}{D(*|myhand)}:name(lands become 3/3 creatures)target(player) all(land|targetedpersonsbattlefield) becomes(Creature,3/3) ueot text={2}{G}, {T}, Discard two cards: All lands target player controls become 3/3 creatures until end of turn. They're still lands. mana={3}{G}{G} type=Legendary Creature @@ -58430,7 +58430,7 @@ toughness=1 name=Junk Golem auto=counter(1/1,3) auto=upcost[{C(1/1,-1)}] sacrifice -auto={discard(*|myhand)}:counter(1/1,1) +auto={D(*|myhand)}:counter(1/1,1) text=Junk Golem enters the battlefield with three +1/+1 counters on it. -- At the beginning of your upkeep, sacrifice Junk Golem unless you remove a +1/+1 counter from it. -- {1}, Discard a card: Put a +1/+1 counter on Junk Golem. mana={4} type=Artifact Creature @@ -61135,22 +61135,22 @@ toughness=5 [/card] [card] name=Knollspine Invocation -auto={1}{discard(*[manacost=1]|myhand)}:damage:1 target(creature,player) -auto={2}{discard(*[manacost=2]|myhand)}:damage:2 target(creature,player) -auto={3}{discard(*[manacost=3]|myhand)}:damage:3 target(creature,player) -auto={4}{discard(*[manacost=4]|myhand)}:damage:4 target(creature,player) -auto={5}{discard(*[manacost=5]|myhand)}:damage:5 target(creature,player) -auto={6}{discard(*[manacost=6]|myhand)}:damage:6 target(creature,player) -auto={7}{discard(*[manacost=7]|myhand)}:damage:7 target(creature,player) -auto={8}{discard(*[manacost=8]|myhand)}:damage:8 target(creature,player) -auto={9}{discard(*[manacost=9]|myhand)}:damage:9 target(creature,player) -auto={10}{discard(*[manacost=10]|myhand)}:damage:10 target(creature,player) -auto={11}{discard(*[manacost=11]|myhand)}:damage:11 target(creature,player) -auto={12}{discard(*[manacost=12]|myhand)}:damage:12 target(creature,player) -auto={13}{discard(*[manacost=13]|myhand)}:damage:13 target(creature,player) -auto={14}{discard(*[manacost=14]|myhand)}:damage:14 target(creature,player) -auto={15}{discard(*[manacost=15]|myhand)}:damage:15 target(creature,player) -auto={16}{discard(*[manacost=16]|myhand)}:damage:16 target(creature,player) +auto={1}{D(*[manacost=1]|myhand)}:damage:1 target(creature,player) +auto={2}{D(*[manacost=2]|myhand)}:damage:2 target(creature,player) +auto={3}{D(*[manacost=3]|myhand)}:damage:3 target(creature,player) +auto={4}{D(*[manacost=4]|myhand)}:damage:4 target(creature,player) +auto={5}{D(*[manacost=5]|myhand)}:damage:5 target(creature,player) +auto={6}{D(*[manacost=6]|myhand)}:damage:6 target(creature,player) +auto={7}{D(*[manacost=7]|myhand)}:damage:7 target(creature,player) +auto={8}{D(*[manacost=8]|myhand)}:damage:8 target(creature,player) +auto={9}{D(*[manacost=9]|myhand)}:damage:9 target(creature,player) +auto={10}{D(*[manacost=10]|myhand)}:damage:10 target(creature,player) +auto={11}{D(*[manacost=11]|myhand)}:damage:11 target(creature,player) +auto={12}{D(*[manacost=12]|myhand)}:damage:12 target(creature,player) +auto={13}{D(*[manacost=13]|myhand)}:damage:13 target(creature,player) +auto={14}{D(*[manacost=14]|myhand)}:damage:14 target(creature,player) +auto={15}{D(*[manacost=15]|myhand)}:damage:15 target(creature,player) +auto={16}{D(*[manacost=16]|myhand)}:damage:16 target(creature,player) text={X}, Discard a card with converted mana cost X: Knollspine Invocation deals X damage to target creature or player. mana={1}{R}{R} type=Enchantment @@ -61597,7 +61597,7 @@ toughness=1 [/card] [card] name=Korlash, Heir to Blackblade -auto={discard(other *[share!name!]|myhand)}:moveto(mybattlefield) and!(tap(noevent))! target(swamp|mylibrary) +auto={D(other *[share!name!]|myhand)}:moveto(mybattlefield) and!(tap(noevent))! target(swamp|mylibrary) anyzone=type:swamp:mybattlefield/type:swamp:mybattlefield cdaactive auto={1}{B}:regenerate text=Korlash, Heir to Blackblade's power and toughness are each equal to the number of Swamps you control. -- {1}{B}: Regenerate Korlash. -- Grandeur - Discard another card named Korlash, Heir to Blackblade: Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library. @@ -61713,23 +61713,23 @@ toughness=12 name=Kozilek, the Great Distortion abilities=menace autostack=if casted(this) then thisforeach(variable{phandcount}<7) draw:1 -auto={discard(*[manacost=0]|myhand)}:name(X = 0) fizzle target(*[manacost=0]|stack) restriction{type(*[manacost=0]|myhand)~morethan~0,type(*[manacost=0]|stack)~morethan~0} -auto={discard(*[manacost=1]|myhand)}:name(X = 1) fizzle target(*[manacost=1]|stack) restriction{type(*[manacost=1]|myhand)~morethan~0,type(*[manacost=1]|stack)~morethan~0} -auto={discard(*[manacost=2]|myhand)}:name(X = 2) fizzle target(*[manacost=2]|stack) restriction{type(*[manacost=2]|myhand)~morethan~0,type(*[manacost=2]|stack)~morethan~0} -auto={discard(*[manacost=3]|myhand)}:name(X = 3) fizzle target(*[manacost=3]|stack) restriction{type(*[manacost=3]|myhand)~morethan~0,type(*[manacost=3]|stack)~morethan~0} -auto={discard(*[manacost=4]|myhand)}:name(X = 4) fizzle target(*[manacost=4]|stack) restriction{type(*[manacost=4]|myhand)~morethan~0,type(*[manacost=4]|stack)~morethan~0} -auto={discard(*[manacost=5]|myhand)}:name(X = 5) fizzle target(*[manacost=5]|stack) restriction{type(*[manacost=5]|myhand)~morethan~0,type(*[manacost=5]|stack)~morethan~0} -auto={discard(*[manacost=6]|myhand)}:name(X = 6) fizzle target(*[manacost=6]|stack) restriction{type(*[manacost=6]|myhand)~morethan~0,type(*[manacost=6]|stack)~morethan~0} -auto={discard(*[manacost=7]|myhand)}:name(X = 7) fizzle target(*[manacost=7]|stack) restriction{type(*[manacost=7]|myhand)~morethan~0,type(*[manacost=7]|stack)~morethan~0} -auto={discard(*[manacost=8]|myhand)}:name(X = 8) fizzle target(*[manacost=8]|stack) restriction{type(*[manacost=8]|myhand)~morethan~0,type(*[manacost=8]|stack)~morethan~0} -auto={discard(*[manacost=9]|myhand)}:name(X = 9) fizzle target(*[manacost=9]|stack) restriction{type(*[manacost=9]|myhand)~morethan~0,type(*[manacost=9]|stack)~morethan~0} -auto={discard(*[manacost=10]|myhand)}:name(X = 10) fizzle target(*[manacost=10]|stack) restriction{type(*[manacost=10]|myhand)~morethan~0,type(*[manacost=10]|stack)~morethan~0} -auto={discard(*[manacost=11]|myhand)}:name(X = 11) fizzle target(*[manacost=11]|stack) restriction{type(*[manacost=11]|myhand)~morethan~0,type(*[manacost=11]|stack)~morethan~0} -auto={discard(*[manacost=12]|myhand)}:name(X = 12) fizzle target(*[manacost=12]|stack) restriction{type(*[manacost=12]|myhand)~morethan~0,type(*[manacost=12]|stack)~morethan~0} -auto={discard(*[manacost=13]|myhand)}:name(X = 13) fizzle target(*[manacost=13]|stack) restriction{type(*[manacost=13]|myhand)~morethan~0,type(*[manacost=13]|stack)~morethan~0} -auto={discard(*[manacost=14]|myhand)}:name(X = 14) fizzle target(*[manacost=14]|stack) restriction{type(*[manacost=14]|myhand)~morethan~0,type(*[manacost=14]|stack)~morethan~0} -auto={discard(*[manacost=15]|myhand)}:name(X = 15) fizzle target(*[manacost=15]|stack) restriction{type(*[manacost=15]|myhand)~morethan~0,type(*[manacost=15]|stack)~morethan~0} -auto={discard(*[manacost=16]|myhand)}:name(X = 16) fizzle target(*[manacost=16]|stack) restriction{type(*[manacost=16]|myhand)~morethan~0,type(*[manacost=16]|stack)~morethan~0} +auto={D(*[manacost=0]|myhand)}:name(X = 0) fizzle target(*[manacost=0]|stack) restriction{type(*[manacost=0]|myhand)~morethan~0,type(*[manacost=0]|stack)~morethan~0} +auto={D(*[manacost=1]|myhand)}:name(X = 1) fizzle target(*[manacost=1]|stack) restriction{type(*[manacost=1]|myhand)~morethan~0,type(*[manacost=1]|stack)~morethan~0} +auto={D(*[manacost=2]|myhand)}:name(X = 2) fizzle target(*[manacost=2]|stack) restriction{type(*[manacost=2]|myhand)~morethan~0,type(*[manacost=2]|stack)~morethan~0} +auto={D(*[manacost=3]|myhand)}:name(X = 3) fizzle target(*[manacost=3]|stack) restriction{type(*[manacost=3]|myhand)~morethan~0,type(*[manacost=3]|stack)~morethan~0} +auto={D(*[manacost=4]|myhand)}:name(X = 4) fizzle target(*[manacost=4]|stack) restriction{type(*[manacost=4]|myhand)~morethan~0,type(*[manacost=4]|stack)~morethan~0} +auto={D(*[manacost=5]|myhand)}:name(X = 5) fizzle target(*[manacost=5]|stack) restriction{type(*[manacost=5]|myhand)~morethan~0,type(*[manacost=5]|stack)~morethan~0} +auto={D(*[manacost=6]|myhand)}:name(X = 6) fizzle target(*[manacost=6]|stack) restriction{type(*[manacost=6]|myhand)~morethan~0,type(*[manacost=6]|stack)~morethan~0} +auto={D(*[manacost=7]|myhand)}:name(X = 7) fizzle target(*[manacost=7]|stack) restriction{type(*[manacost=7]|myhand)~morethan~0,type(*[manacost=7]|stack)~morethan~0} +auto={D(*[manacost=8]|myhand)}:name(X = 8) fizzle target(*[manacost=8]|stack) restriction{type(*[manacost=8]|myhand)~morethan~0,type(*[manacost=8]|stack)~morethan~0} +auto={D(*[manacost=9]|myhand)}:name(X = 9) fizzle target(*[manacost=9]|stack) restriction{type(*[manacost=9]|myhand)~morethan~0,type(*[manacost=9]|stack)~morethan~0} +auto={D(*[manacost=10]|myhand)}:name(X = 10) fizzle target(*[manacost=10]|stack) restriction{type(*[manacost=10]|myhand)~morethan~0,type(*[manacost=10]|stack)~morethan~0} +auto={D(*[manacost=11]|myhand)}:name(X = 11) fizzle target(*[manacost=11]|stack) restriction{type(*[manacost=11]|myhand)~morethan~0,type(*[manacost=11]|stack)~morethan~0} +auto={D(*[manacost=12]|myhand)}:name(X = 12) fizzle target(*[manacost=12]|stack) restriction{type(*[manacost=12]|myhand)~morethan~0,type(*[manacost=12]|stack)~morethan~0} +auto={D(*[manacost=13]|myhand)}:name(X = 13) fizzle target(*[manacost=13]|stack) restriction{type(*[manacost=13]|myhand)~morethan~0,type(*[manacost=13]|stack)~morethan~0} +auto={D(*[manacost=14]|myhand)}:name(X = 14) fizzle target(*[manacost=14]|stack) restriction{type(*[manacost=14]|myhand)~morethan~0,type(*[manacost=14]|stack)~morethan~0} +auto={D(*[manacost=15]|myhand)}:name(X = 15) fizzle target(*[manacost=15]|stack) restriction{type(*[manacost=15]|myhand)~morethan~0,type(*[manacost=15]|stack)~morethan~0} +auto={D(*[manacost=16]|myhand)}:name(X = 16) fizzle target(*[manacost=16]|stack) restriction{type(*[manacost=16]|myhand)~morethan~0,type(*[manacost=16]|stack)~morethan~0} text=When you cast Kozilek, the Great Distortion, if you have fewer than seven cards in hand, draw cards equal to the difference. -- Menace -- Discard a card with converted mana cost X: Counter target spell with converted mana cost X. mana={8}{C}{C} type=Legendary Creature @@ -61994,7 +61994,7 @@ toughness=2 [/card] [card] name=Kris Mage -auto={R}{T}{discard(*|myhand)}:damage:1 target(creature,player) +auto={R}{T}{D(*|myhand)}:damage:1 target(creature,player) text={R}, {T}, Discard a card: Kris Mage deals 1 damage to target creature or player. mana={R} type=Creature @@ -62016,7 +62016,7 @@ toughness=6 [card] name=Krosan Archer abilities=reach -auto={G}{discard(*|myhand)}:0/2 +auto={G}{D(*|myhand)}:0/2 text=Reach (This creature can block creatures with flying.) -- {G}, Discard a card: Krosan Archer gets +0/+2 until end of turn. mana={3}{G} type=Creature @@ -62228,8 +62228,8 @@ toughness=1 [/card] [card] name=Krovikan Sorcerer -auto={T}{discard(*[-black]|myhand)}:draw:1 -auto={T}{discard(*[black]|myhand)}:draw:2 && transforms((,newability[reject target(*[fresh]|myhand)])) +auto={T}{D(*[-black]|myhand)}:draw:1 +auto={T}{D(*[black]|myhand)}:draw:2 && transforms((,newability[reject target(*[fresh]|myhand)])) text={T}, Discard a nonblack card: Draw a card. -- {T}, Discard a black card: Draw two cards, then discard one of them. mana={2}{U} type=Creature @@ -63105,7 +63105,7 @@ type=Instant [/card] [card] name=Latulla, Keldon Overseer -auto={X}{R}{T}{discard(*|myhand)}{discard(*|myhand)}:damage:X target(creature,player) +auto={X}{R}{T}{D(*|myhand)}{D(*|myhand)}:damage:X target(creature,player) text={X}{R}, {T}, Discard two cards: Latulla, Keldon Overseer deals X damage to target creature or player. mana={3}{R}{R} type=Legendary Creature @@ -64319,7 +64319,7 @@ other={5}{R} name(pay 5 mana) target=creature auto=damage:5 text=As an additional cost to cast Lightning Axe, discard a card or pay {5}. -- Lightning Axe deals 5 damage to target creature. -mana={R}{discard(other *|myhand)} +mana={R}{D(other *|myhand)} type=Instant [/card] [card] @@ -64736,7 +64736,7 @@ toughness=1 [card] name=Lim-Dul's Paladin abilities=trample -auto=upcostmulti[{discard(*|myhand)}] sacrifice && draw:1 controller +auto=upcostmulti[{D(*|myhand)}] sacrifice && draw:1 controller auto=@combat(blocked,turnlimited) source(this):6/3 ueot auto=@combat(notblocked) source(this):preventAllCombatDamage from(this) ueot && life:-4 opponent text=Trample -- At the beginning of your upkeep, sacrifice Lim-Dul's Paladin unless you discard a card. If you sacrifice it this way, draw a card. -- Whenever Lim-Dul's Paladin becomes blocked, it gets +6/+3 until end of turn. -- Whenever Lim-Dul's Paladin attacks and isn't blocked, it assigns no combat damage this turn and defending player loses 4 life. @@ -65139,7 +65139,7 @@ toughness=2 [/card] [card] name=Llanowar Mentor -auto={G}{T}{discard(*|myhand)}:token(Llanowar Elves) +auto={G}{T}{D(*|myhand)}:token(Llanowar Elves) text={G}, {T}, Discard a card: Put a 1/1 green Elf Druid creature token named Llanowar Elves onto the battlefield. It has "{T}: Add {G} to your mana pool." mana={G} type=Creature @@ -65718,7 +65718,7 @@ toughness=1 [/card] [card] name=Lotleth Troll -auto={discard(creature|myhand)}:counter(1/1,1) +auto={D(creature|myhand)}:counter(1/1,1) auto={B}:regenerate abilities=trample text=Trample -- Discard a creature card: Put a +1/+1 counter on Lotleth Troll. -- {B}: Regenerate Lotleth Troll. @@ -66525,7 +66525,7 @@ toughness=3 [/card] [card] name=Lys Alana Scarblade -auto={T}{discard(elf|myhand)}:foreach(elf|mybattlefield) -1/-1 target(creature) +auto={T}{D(elf|myhand)}:foreach(elf|mybattlefield) -1/-1 target(creature) text={T}, Discard an Elf card: Target creature gets -X/-X until end of turn, where X is the number of Elves you control. mana={2}{B} type=Creature @@ -66595,7 +66595,7 @@ toughness=2 [card] name=Mad Prophet abilities=haste -auto={T}{discard(*|myhand)}:draw:1 controller +auto={T}{D(*|myhand)}:draw:1 controller text=Haste -- {T}, Discard a card: Draw a card. mana={3}{R} type=Creature @@ -66785,7 +66785,7 @@ type=Instant [/card] [card] name=Mageta the Lion -auto={2}{W}{W}{T}{discard(*|myhand)}{discard(*|myhand)}:bury all(other creature) +auto={2}{W}{W}{T}{D(*|myhand)}{D(*|myhand)}:bury all(other creature) text={2}{W}{W}, {T}, Discard two cards: Destroy all creatures except for Mageta the Lion. Those creatures can't be regenerated. mana={3}{W}{W} type=Legendary Creature @@ -66972,7 +66972,7 @@ toughness=7 name=Magmatic Insight auto=draw:2 controller text=As an additional cost to cast Magmatic Insight, discard a land card. -- Draw two cards. -mana={R}{discard(land|myhand)} +mana={R}{D(land|myhand)} type=Sorcery [/card] [card] @@ -68429,7 +68429,7 @@ toughness=3 [card] name=Markov Dreadknight abilities=flying -auto={2}{B}{discard(*|myhand)}:counter(1/1,2) +auto={2}{B}{D(*|myhand)}:counter(1/1,2) text=Flying -- {2}{B}, Discard a card: Put two +1/+1 counters on Markov Dreadknight. mana={3}{B}{B} type=Creature @@ -69071,7 +69071,7 @@ type=Instant [/card] [card] name=Masticore -auto=upcost[{discard(*|myhand)}] sacrifice +auto=upcost[{D(*|myhand)}] sacrifice auto={2}:damage:1 target(creature) auto={2}:regenerate text=At the beginning of your upkeep, sacrifice Masticore unless you discard a card. -- {2}: Masticore deals 1 damage to target creature. -- {2}: Regenerate Masticore. @@ -69368,7 +69368,7 @@ type=Enchantment [/card] [card] name=Medicine Bag -auto={1}{T}{discard(*|myhand)}:regenerate target(creature) +auto={1}{T}{D(*|myhand)}:regenerate target(creature) text={1}, {T}, Discard a card: Regenerate target creature. mana={3} type=Artifact @@ -69675,7 +69675,7 @@ type=Sorcery [/card] [card] name=Mental Discipline -auto={1}{U}{discard(*|myhand)}:draw:1 +auto={1}{U}{D(*|myhand)}:draw:1 text={1}{U}, Discard a card: Draw a card. mana={1}{U}{U} type=Enchantment @@ -69872,7 +69872,7 @@ type=Instant [card] name=Mercurial Chemister auto={U}{T}:draw:2 controller -auto={R}{T}{discard(*|myhand)}:damage:storedmanacost target(creature) +auto={R}{T}{D(*|myhand)}:damage:storedmanacost target(creature) text={U}, {T}: Draw two cards. -- {R}, {T}, Discard a card: Mercurial Chemister deals damage to target creature equal to the discarded card's converted mana cost. mana={3}{U}{R} type=Creature @@ -70198,7 +70198,7 @@ type=Artifact [/card] [card] name=Mesmeric Trance -auto={U}{discard(*|myhand)}:draw:1 +auto={U}{D(*|myhand)}:draw:1 auto=cumulativeupcost[{1}] sacrifice text=Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- {U}, Discard a card: Draw a card. mana={1}{U}{U} @@ -70819,8 +70819,8 @@ toughness=2 [/card] [card] name=Mind Over Matter -auto={discard(*|myhand)}:tap target(artifact,creature,land) -auto={discard(*|myhand)}:untap target(artifact,creature,land) +auto={D(*|myhand)}:tap target(artifact,creature,land) +auto={D(*|myhand)}:untap target(artifact,creature,land) text=Discard a card: You may tap or untap target artifact, creature, or land. mana={2}{U}{U}{U}{U} type=Enchantment @@ -71023,7 +71023,7 @@ toughness=6 [card] name=Mindless Automaton auto=counter(1/1,2) -auto={1}{discard(*|myhand)}:counter(1/1,1) +auto={1}{D(*|myhand)}:counter(1/1,1) auto={C(1/1,-2)}:draw:1 controller text=Mindless Automaton enters the battlefield with two +1/+1 counters on it. -- {1}, Discard a card: Put a +1/+1 counter on Mindless Automaton. -- Remove two +1/+1 counters from Mindless Automaton: Draw a card. mana={4} @@ -72640,7 +72640,7 @@ toughness=4 [/card] [card] name=Molten Vortex -auto={R}{discard(land|myhand)}:damage:2 target(creature,player) +auto={R}{D(land|myhand)}:damage:2 target(creature,player) text={R}, Discard a land card: Molten Vortex deals 2 damage to target creature or player. mana={R} type=Enchantment @@ -72659,7 +72659,7 @@ toughness=4 [/card] [card] name=Molten-Tail Masticore -auto=upcost[{discard(*|myhand)}] sacrifice +auto=upcost[{D(*|myhand)}] sacrifice auto={4}{E(creature|mygraveyard)}:damage:4 target(creature,player) auto={2}:regenerate text=At the beginning of your upkeep, sacrifice Molten-Tail Masticore unless you discard a card. -- {4}, Exile a creature card from your graveyard: Molten-Tail Masticore deals 4 damage to target creature or player. -- {2}: Regenerate Molten-Tail Masticore. @@ -72900,7 +72900,7 @@ toughness=1 name=Monstrify target=creature auto=4/4 -retrace={3}{G}{discard(land|myhand)} +retrace={3}{G}{D(land|myhand)} text=Target creature gets +4/+4 until end of turn. -- Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) mana={3}{G} type=Sorcery @@ -73482,7 +73482,7 @@ toughness=1 [/card] [card] name=Mortiphobia -auto={1}{B}{discard(*|myhand)}:moveto(exile) target(*|graveyard) +auto={1}{B}{D(*|myhand)}:moveto(exile) target(*|graveyard) auto={1}{B}{S}:moveto(exile) target(*|graveyard) text={1}{B}, Discard a card: Exile target card from a graveyard. -- {1}{B}, Sacrifice Mortiphobia: Exile target card from a graveyard. mana={1}{B}{B} @@ -74065,7 +74065,7 @@ toughness=4 [/card] [card] name=Murderer's Axe -auto={discard(*|myhand)}:equip +auto={D(*|myhand)}:equip auto=2/2 text=Equipped creature gets +2/+2. -- Equip—Discard a card. mana={4} @@ -75068,7 +75068,7 @@ toughness=2 [/card] [card] name=Narcissism -auto={G}{discard(*|myhand)}:2/2 target(creature) +auto={G}{D(*|myhand)}:2/2 target(creature) auto={G}{S}:2/2 target(creature) text={G}, Discard a card: Target creature gets +2/+2 until end of turn. -- {G}, Sacrifice Narcissism: Target creature gets +2/+2 until end of turn. mana={2}{G} @@ -76058,7 +76058,7 @@ toughness=4 [/card] [card] name=Netter en-Dal -auto={W}{T}{discard(*|myhand)}:cantattack target(creature) +auto={W}{T}{D(*|myhand)}:cantattack target(creature) text={W}, {T}, Discard a card: Target creature can't attack this turn. mana={W} type=Creature @@ -76162,7 +76162,7 @@ toughness=1 [card] name=Neurok Prodigy abilities=flying -auto={discard(artifact|myhand)}:moveto(ownerhand) +auto={D(artifact|myhand)}:moveto(ownerhand) text=Flying -- Discard an artifact card: Return Neurok Prodigy to its owner's hand. mana={2}{U} type=Creature @@ -76739,7 +76739,7 @@ text={T}, Sacrifice Nihil Spellbomb: Exile all cards from target player's gravey [/card] [card] name=Nihilistic Glee -auto={2}{B}{discard(*|myhand)}:target(opponent) life:-1 && life:1 controller +auto={2}{B}{D(*|myhand)}:target(opponent) life:-1 && life:1 controller auto=aslongas(*|myhand) {L:2}{1}:draw:1 <1 text={2}{B}, Discard a card: Target opponent loses 1 life and you gain 1 life. -- Hellbent - {1}, Pay 2 life: Draw a card. Activate this ability only if you have no cards in hand. mana={2}{B}{B} @@ -77413,7 +77413,7 @@ type=Sorcery [card] name=Noose Constrictor abilities=reach -auto={discard(*|myhand)}:1/1 ueot +auto={D(*|myhand)}:1/1 ueot text=Reach -- Discard a card: Noose Constrictor gets +1/+1 until end of turn. mana={1}{G} type=Creature @@ -77512,7 +77512,7 @@ type=Sorcery [/card] [card] name=Notorious Assassin -auto={2}{B}{T}{discard(*|myhand)}:bury target(creature[-black]) +auto={2}{B}{T}{D(*|myhand)}:bury target(creature[-black]) text={2}{B}, {T}, Discard a card: Destroy target nonblack creature. It can't be regenerated. mana={3}{B} type=Creature @@ -78094,6 +78094,14 @@ mana={1}{R} type=Enchantment [/card] [card] +name=Oath of Nissa +auto=reveal:3 optionone name(Get a card) target(<1>*[creature;land;planeswalker]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend +auto=lord(planeswalker|mycastingzone) anytypeofmana +text=When Oath of Nissa enters the battlefield, look at the top three cards of your library. You may reveal a creature, land, or planeswalker card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- You may spend mana as though it were mana of any color to cast planeswalker spells. +mana={G} +type=Legendary Enchantment +[/card] +[card] name=Oath of the Ancient Wood auto=may counter(1/1,1) target(creature) restriction{type(creature|battlefield)~morethan~0} auto=@movedTo(enchantment|myBattlefield) restriction{type(creature|battlefield)~morethan~0}:may counter(1/1,1) target(creature) @@ -78226,7 +78234,7 @@ type=Sorcery name=Oblivion Crown target=creature abilities=flash -auto=teach(creature) {discard(*|myhand)}:1/1 +auto=teach(creature) {D(*|myhand)}:1/1 text=Enchant creature -- Enchanted creature has "Discard a card: This creature gets +1/+1 until end of turn." mana={1}{B} type=Enchantment @@ -78846,7 +78854,7 @@ toughness=1 [/card] [card] name=Olivia's Dragoon -auto={discard(*|myhand)}:flying ueot +auto={D(*|myhand)}:flying ueot text=Discard a card: Olivia's Dragoon gains flying until end of turn. mana={1}{B} type=Creature @@ -79151,7 +79159,7 @@ toughness=1 name=Oona's Grace target=player auto=draw:1 -retrace={2}{U}{discard(land|myhand)} +retrace={2}{U}{D(land|myhand)} text=Target player draws a card. -- Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) mana={2}{U} type=Instant @@ -79966,7 +79974,7 @@ type=Instant [card] name=Oriss, Samite Guardian auto={T}:name(prevent all damage) target(creature) transforms((,newability[preventalldamage to(this)])) ueot -auto={discard(*[share!name!]|myhand)}:target(player) maxCast(*)0 ueot && all(creature|targetedpersonsbattlefield) cantattack ueot +auto={D(*[share!name!]|myhand)}:target(player) maxCast(*)0 ueot && all(creature|targetedpersonsbattlefield) cantattack ueot text={T}: Prevent all damage that would be dealt to target creature this turn. Grandeur — Discard another card named Oriss, Samite Guardian: Target player can't cast spells this turn, and creatures that player controls can't attack this turn. mana={1}{W}{W} type=Legendary Creature @@ -80200,7 +80208,7 @@ type=Instant [/card] [card] name=Outbreak -other={discard(swamp|myhand)} name(Discard a Swamp) +other={D(swamp|myhand)} name(Discard a Swamp) auto=chooseatype all(creature[chosentype]) -1/-1 chooseend text=You may discard a Swamp card rather than pay Outbreak's mana cost. -- Choose a creature type. All creatures of that type get -1/-1 until end of turn. mana={3}{B} @@ -80266,7 +80274,7 @@ type=Enchantment [/card] [card] name=Overeager Apprentice -auto={S}{discard(*|myhand)}:Add{B}{B}{B} +auto={S}{D(*|myhand)}:Add{B}{B}{B} text=Discard a card, Sacrifice Overeager Apprentice: Add {B}{B}{B} to your mana pool. mana={2}{B} type=Creature @@ -80378,7 +80386,7 @@ toughness=5 [/card] [card] name=Overtaker -auto={3}{U}{T}{discard(*|myhand)}:target(creature) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot +auto={3}{U}{T}{D(*|myhand)}:target(creature) transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot text={3}{U}, {T}, Discard a card: Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. mana={1}{U} type=Creature @@ -80551,7 +80559,7 @@ type=Sorcery [card] name=Pack Rat anyzone=type:rat:mybattlefield/type:rat:mybattlefield cdaactive -auto={2}{B}{discard(*|myhand)}:token(Pack Rat) +auto={2}{B}{D(*|myhand)}:token(Pack Rat) text=Pack Rat's power and toughness are each equal to the number of Rats you control. -- {2}{B}, Discard a card: Put a token onto the battlefield that's a copy of Pack Rat. mana={1}{B} type=Creature @@ -81281,7 +81289,7 @@ toughness=1 [/card] [card] name=Patchwork Gnomes -auto={discard(*|myhand)}:regenerate +auto={D(*|myhand)}:regenerate text=Discard a card: Regenerate Patchwork Gnomes. mana={3} type=Artifact Creature @@ -81373,7 +81381,7 @@ type=Instant [/card] [card] name=Patrol Hound -auto={discard(*|myhand)}:first strike +auto={D(*|myhand)}:first strike text=Discard a card: Patrol Hound gains first strike until end of turn. mana={1}{W} type=Creature @@ -81531,7 +81539,7 @@ type=Instant [/card] [card] name=Peace of Mind -auto={W}{discard(*|myhand)}:life:3 +auto={W}{D(*|myhand)}:life:3 text={W}, Discard a card: You gain 3 life. mana={1}{W} type=Enchantment @@ -81693,7 +81701,7 @@ toughness=1 [/card] [card] name=Pegasus Refuge -auto={2}{discard(*|myhand)}:token(Pegasus,Creature Pegasus, 1/1,flying white) +auto={2}{D(*|myhand)}:token(Pegasus,Creature Pegasus, 1/1,flying white) text={2}, Discard a card: Put a 1/1 white Pegasus creature token with flying onto the battlefield. mana={3}{W} type=Enchantment @@ -82359,7 +82367,7 @@ subtype=Aura [card] name=Phantatog auto={S(enchantment|myBattlefield)}:1/1 -auto={discard(*|myhand)}:1/1 +auto={D(*|myhand)}:1/1 text=Sacrifice an enchantment: Phantatog gets +1/+1 until end of turn. -- Discard a card: Phantatog gets +1/+1 until end of turn. mana={1}{W}{U} type=Creature @@ -83749,7 +83757,7 @@ type=Sorcery [/card] [card] name=Plague Witch -auto={B}{T}{discard(*|myhand)}:-1/-1 target(creature) +auto={B}{T}{D(*|myhand)}:-1/-1 target(creature) text={B}, {T}, Discard a card: Target creature gets -1/-1 until end of turn. mana={1}{B} type=Creature @@ -85814,7 +85822,7 @@ toughness=2 [/card] [card] name=Psychatog -auto={discard(*|myhand)}:1/1 +auto={D(*|myhand)}:1/1 auto={E(*|mygraveyard)}{E(*|mygraveyard)}:1/1 text=Discard a card: Psychatog gets +1/+1 until end of turn. -- Exile two cards from your graveyard: Psychatog gets +1/+1 until end of turn. mana={1}{U}{B} @@ -85865,7 +85873,7 @@ name=Psychic Overload target=*|battlefield auto=tap auto=teach(*) doesnotuntap -auto=teach(*) {discard(*|myhand)}{discard(*|myhand)}:untap +auto=teach(*) {D(*|myhand)}{D(*|myhand)}:untap text=Enchant permanent -- When Psychic Overload enters the battlefield, tap enchanted permanent. -- Enchanted permanent doesn't untap during its controller's untap step. -- Enchanted permanent has "Discard two artifact cards: Untap this permanent." mana={3}{U} type=Enchantment @@ -86019,7 +86027,7 @@ toughness=3 [card] name=Pulsating Illusion abilities=flying -auto={discard(*|myhand)}:4/4 limit:1 +auto={D(*|myhand)}:4/4 limit:1 text=Flying -- Discard a card: Pulsating Illusion gets +4/+4 until end of turn. Activate this ability only once each turn. mana={4}{U} type=Creature @@ -86421,7 +86429,7 @@ toughness=3 [/card] [card] name=Putrid Imp -auto={discard(*|myhand)}:flying +auto={D(*|myhand)}:flying auto=aslongas(*|mygraveyard) 1/1 >6 auto=aslongas(*|mygraveyard) cantblock >6 text=Discard a card: Putrid Imp gains flying until end of turn. -- Threshold - As long as seven or more cards are in your graveyard, Putrid Imp gets +1/+1 and can't block. @@ -86444,7 +86452,7 @@ toughness=2 [card] name=Putrid Raptor facedown={3} -autofacedown={discard(zombie|myhand)}:morph +autofacedown={D(zombie|myhand)}:morph text=Morph - Discard a Zombie card. (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={4}{B}{B} type=Creature @@ -87785,7 +87793,7 @@ subtype=Gate [/card] [card] name=Rakdos Guildmage -auto={3}{B}{discard(*|myhand)}:-2/-2 target(creature) +auto={3}{B}{D(*|myhand)}:-2/-2 target(creature) auto={3}{R}:token(Goblin,Creature Goblin,2/1,red,haste,unearth) text=({(b/r)} can be paid with either {B} or {R}.) -- {3}{B}, Discard a card: Target creature gets -2/-2 until end of turn. -- {3}{R}: Put a 2/1 red Goblin creature token with haste onto the battlefield. Exile it at the beginning of the next end step. mana={BR}{BR} @@ -88622,7 +88630,7 @@ toughness=4 [/card] [card] name=Ravenous Bloodseeker -auto={discard(*|myhand)}:2/-2 ueot +auto={D(*|myhand)}:2/-2 ueot text=Discard a card: Ravenous Bloodseeker gets +2/-2 until end of turn. mana={1}{R} type=Creature @@ -88925,7 +88933,7 @@ toughness=5 [card] name=Razormane Masticore auto=first strike -auto=upcost[{discard(*|myhand)}] sacrifice +auto=upcost[{D(*|myhand)}] sacrifice auto=@each my draw:may damage:3 target(creature) text=First strike (This creature deals combat damage before creatures without first strike.) -- At the beginning of your upkeep, sacrifice Razormane Masticore unless you discard a card. -- At the beginning of your draw step, you may have Razormane Masticore deal 3 damage to target creature. mana={5} @@ -90436,11 +90444,11 @@ type=Sorcery [card] name=Resilient Wanderer abilities=first strike -auto={discard(*|myhand)}:name(White) protection from white -auto={discard(*|myhand)}:name(Blue) protection from blue -auto={discard(*|myhand)}:name(Black) protection from black -auto={discard(*|myhand)}:name(Red) protection from red -auto={discard(*|myhand)}:name(Green) protection from green +auto={D(*|myhand)}:name(White) protection from white +auto={D(*|myhand)}:name(Blue) protection from blue +auto={D(*|myhand)}:name(Black) protection from black +auto={D(*|myhand)}:name(Red) protection from red +auto={D(*|myhand)}:name(Green) protection from green text=First strike -- Discard a card: Resilient Wanderer gains protection from the color of your choice until end of turn. mana={2}{W}{W} type=Creature @@ -91305,7 +91313,7 @@ toughness=4 [/card] [card] name=Ridged Kusite -auto={1}{B}{T}{discard(*|myhand)}:1/0 && first strike target(creature) +auto={1}{B}{T}{D(*|myhand)}:1/0 && first strike target(creature) text={1}{B}, {T}, Discard a card: Target creature gets +1/+0 and gains first strike until end of turn. mana={B} type=Creature @@ -93404,7 +93412,7 @@ toughness=5 [/card] [card] name=Rummaging Goblin -auto={t}{discard(*|myhand)}:draw:1 +auto={t}{D(*|myhand)}:draw:1 text={T}, Discard a card: Draw a card. mana={2}{R} type=Creature @@ -93726,7 +93734,7 @@ type=Land [/card] [card] name=Rushwood Herbalist -auto={G}{T}{discard(*|myhand)}:regenerate target(creature) +auto={G}{T}{D(*|myhand)}:regenerate target(creature) text={G}, {T}, Discard a card: Regenerate target creature. mana={2}{G} type=Creature @@ -93890,7 +93898,7 @@ name=Ruthless Disposal target=<2>creature auto=-13/-13 ueot text=As an additional cost to cast Ruthless Disposal, discard a card and sacrifice a creature. -- Two target creatures each get -13/-13 until end of turn. -mana={4}{B}{S(creature|mybattlefield)}{discard(*|myhand)} +mana={4}{B}{S(creature|mybattlefield)}{D(*|myhand)} type=Sorcery [/card] [card] @@ -95370,7 +95378,7 @@ type=Instant [card] name=Savage Conception auto=token(Beast,creature beast, 3/3,green) -retrace={3}{G}{G}{discard(land|myhand)} +retrace={3}{G}{G}{D(land|myhand)} text=Put a 3/3 green Beast creature token onto the battlefield. -- Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) mana={3}{G}{G} type=Sorcery @@ -97774,7 +97782,7 @@ toughness=3 [/card] [card] name=Seismic Assault -auto={discard(land|myhand)}:damage:2 target(creature,player) +auto={D(land|myhand)}:damage:2 target(creature,player) text=Discard a land card: Seismic Assault deals 2 damage to target creature or player. mana={R}{R}{R} type=Enchantment @@ -97791,7 +97799,7 @@ toughness=4 [/card] [card] name=Seismic Mage -auto={2}{R}{T}{discard(*|myhand)}:destroy target(land) +auto={2}{R}{T}{D(*|myhand)}:destroy target(land) text={2}{R}, {T}, Discard a card: Destroy target land. mana={3}{R} type=Creature @@ -100367,7 +100375,7 @@ type=Instant name=Shred Memory target=*|graveyard auto=moveTo(exile) -autohand={1}{B}{B}{discard(this|myhand)}:moveTo(myhand) target(*[manacost=2]|mylibrary) asSorcery +autohand={1}{B}{B}{D(this|myhand)}:moveTo(myhand) target(*[manacost=2]|mylibrary) asSorcery text=Exile up to four target cards from a single graveyard. -- Transmute {1}{B}{B} ({1}{B}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={1}{B} type=Instant @@ -101577,7 +101585,7 @@ toughness=4 [/card] [card] name=Silverglade Pathfinder -auto={1}{G}{T}{discard(*|myhand)}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|myLibrary) +auto={1}{G}{T}{D(*|myhand)}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|myLibrary) text={1}{G}, {T}, Discard a card: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Creature @@ -101659,7 +101667,7 @@ toughness=4 [/card] [card] name=Simian Brawler -auto={discard(land|myHand)}:1/1 +auto={D(land|myHand)}:1/1 text=Discard a land card: Simian Brawler gets +1/+1 until end of turn. mana={3}{G} type=Creature @@ -101860,7 +101868,7 @@ toughness=3 [/card] [card] name=Sinister Concoction -auto={B}{L}{discard(*|myhand)}{m}{S}:destroy target(creature) +auto={B}{L}{D(*|myhand)}{m}{S}:destroy target(creature) text={B}, Pay 1 life, Put the top card of your library into your graveyard, Discard a card, Sacrifice Sinister Concoction: Destroy target creature. mana={B} type=Enchantment @@ -102328,7 +102336,7 @@ subtype=Equipment [card] name=Skirge Familiar abilities=flying -auto={discard(*|myhand)}:Add{B} +auto={D(*|myhand)}:Add{B} text=Flying -- Discard a card: Add {B} to your mana pool. mana={4}{B} type=Creature @@ -102405,7 +102413,7 @@ toughness=1 [/card] [card] name=Skirk Ridge Exhumer -auto={B}{discard(*|myhand)}{T}:token(Festering Goblin) +auto={B}{D(*|myhand)}{T}:token(Festering Goblin) text={B}, {T}, Discard a card: Put a 1/1 black Zombie Goblin creature token named Festering Goblin onto the battlefield. It has "When Festering Goblin dies, target creature gets -1/-1 until end of turn." mana={1}{B} type=Creature @@ -102455,7 +102463,7 @@ toughness=2 [/card] [card] name=Skirsdag Supplicant -auto={b}{t}{discard(*|myhand)}:all(player) life:-2 +auto={b}{t}{D(*|myhand)}:all(player) life:-2 text={B}, {T}, Discard a card: Each player loses 2 life. mana={2}{B} type=Creature @@ -102701,7 +102709,7 @@ toughness=1 [card] name=Skullmead Cauldron auto={T}:life:1 -auto={T}{discard(*|myhand)}:life:3 +auto={T}{D(*|myhand)}:life:3 text={T}: You gain 1 life. -- {T}, Discard a card: You gain 3 life. mana={4} type=Artifact @@ -103229,7 +103237,7 @@ toughness=3 [card] name=Skyshroud Vampire abilities=flying -auto={discard(creature|myhand)}:2/2 +auto={D(creature|myhand)}:2/2 text=Flying -- Discard a creature card: Skyshroud Vampire gets +2/+2 until end of turn. mana={3}{B}{B} type=Creature @@ -103306,7 +103314,7 @@ toughness=1 [card] name=Skywing Aven abilities=flying -auto={discard(*|myhand)}:moveto(ownerhand) +auto={D(*|myhand)}:moveto(ownerhand) text=Flying -- Discard a card: Return Skywing Aven to its owner's hand. mana={2}{U} type=Creature @@ -103867,7 +103875,7 @@ toughness=7 [/card] [card] name=Sliversmith -auto={1}{T}{discard(*|myhand)}:token(Metallic Sliver,artifact creature sliver, 1/1) +auto={1}{T}{D(*|myhand)}:token(Metallic Sliver,artifact creature sliver, 1/1) text={1}, {T}, Discard a card: Put a 1/1 colorless Sliver artifact creature token named Metallic Sliver onto the battlefield. mana={2} type=Artifact Creature @@ -103965,7 +103973,7 @@ toughness=3 [/card] [card] name=Slumbering Tora -auto={2}{discard(*[spirit,arcane]|myhand)}:transforms((Artifact Creature Cat,setpower=storedmanacost,settoughness=storedtoughness)) ueot +auto={2}{D(*[spirit,arcane]|myhand)}:transforms((Artifact Creature Cat,setpower=storedmanacost,settoughness=storedtoughness)) ueot text={2}, Discard a Spirit or Arcane card: Slumbering Tora becomes an X/X Cat artifact creature until end of turn, where X is the discarded card's converted mana cost. mana={3} type=Artifact @@ -104163,7 +104171,7 @@ toughness=3 name=Snag auto=preventAllCombatDamage from(creature[-blocked]) ueot text=You may discard a Forest card rather than pay Snag's mana cost. -- Prevent all combat damage that would be dealt by unblocked creatures this turn. -other={discard(forest|myhand)} name(Discard Forest to Cast) +other={D(forest|myhand)} name(Discard Forest to Cast) mana={3}{G} type=Instant [/card] @@ -104680,7 +104688,7 @@ type=Instant [/card] [card] name=Solitary Confinement -auto=upcost[{discard(*|myhand)}] sacrifice +auto=upcost[{D(*|myhand)}] sacrifice auto=phasealter(remove,draw,controller) abilities=playershroud auto=preventalldamage to(controller) @@ -105003,7 +105011,7 @@ toughness=3 [/card] [card] name=Sophic Centaur -auto={2}{G}{G}{T}{discard(*|myhand)}:life:twicetype:*:myhand controller +auto={2}{G}{G}{T}{D(*|myhand)}:life:twicetype:*:myhand controller text={2}{G}{G}, {T}, Discard a card: You gain 2 life for each card in your hand. mana={3}{G} type=Creature @@ -105865,7 +105873,7 @@ toughness=1 [/card] [card] name=Sparkspitter -auto={R}{T}{discard(*|myhand)}:token(Spark Elemental) +auto={R}{T}{D(*|myhand)}:token(Spark Elemental) text={R}, {T}, Discard a card: Put a 3/1 red Elemental creature token named Spark Elemental onto the battlefield. It has trample, haste, and "At the beginning of the end step, sacrifice Spark Elemental." mana={2}{R} type=Creature @@ -108088,7 +108096,7 @@ toughness=1 [card] name=Stalking Bloodsucker abilities=flying -auto={1}{B}{discard(*|myhand)}:2/2 +auto={1}{B}{D(*|myhand)}:2/2 text=Flying -- {1}{B}, Discard a card: Stalking Bloodsucker gets +2/+2 until end of turn. mana={4}{B}{B} type=Creature @@ -108201,7 +108209,7 @@ subtype=Aura [/card] [card] name=Stampede Driver -auto={1}{G}{T}{discard(*|myhand)}:lord(creature|myBattlefield) 1/1 && lord(creature|mybattlefield) trample +auto={1}{G}{T}{D(*|myhand)}:lord(creature|myBattlefield) 1/1 && lord(creature|mybattlefield) trample text={1}{G}, {T}, Discard a card: Creatures you control get +1/+1 and gain trample until end of turn. mana={G} type=Creature @@ -108882,7 +108890,7 @@ type=Enchantment [/card] [card] name=Stern Constable -auto={T}{discard(*|myhand)}:tap target(creature) +auto={T}{D(*|myhand)}:tap target(creature) text={T}, Discard a card: Tap target creature. mana={W} type=Creature @@ -109123,7 +109131,7 @@ subtype=Equipment [card] name=Stitchwing Skaab abilities=flying -auto={1}{U}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! +auto={1}{U}{D(*|myhand)}{D(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text=Flying -- {1}{U}, Discard two cards: Return Stitchwing Skaab from your graveyard to the battlefield tapped. mana={3}{U} type=Creature @@ -110246,7 +110254,7 @@ toughness=2 [/card] [card] name=Stromkirk Condemned -auto={discard(*|myhand)}:all(vampire|mybattlefield) +1/+1 ueot limit:1 +auto={D(*|myhand)}:all(vampire|mybattlefield) +1/+1 ueot limit:1 text=Discard a card: Vampires you control get +1/+1 until end of turn. Activate this ability only once each turn. mana={B}{B} type=Creature @@ -110329,7 +110337,7 @@ toughness=1 [/card] [card] name=Stronghold Biologist -auto={U}{U}{T}{discard(*|myhand)}:fizzle target(creature|stack) +auto={U}{U}{T}{D(*|myhand)}:fizzle target(creature|stack) text={U}{U}, {T}, Discard a card: Counter target creature spell. mana={2}{U} type=Creature @@ -110347,7 +110355,7 @@ type=Sorcery [/card] [card] name=Stronghold Machinist -auto={U}{U}{T}{discard(*|myhand)}:fizzle target(*[-creature]|stack) +auto={U}{U}{T}{D(*|myhand)}:fizzle target(*[-creature]|stack) text={U}{U}, {T}, Discard a card: Counter target noncreature spell. mana={2}{U} type=Creature @@ -111546,7 +111554,7 @@ target=auto auto=trample auto=storedmanacost/0 text=As an additional cost to cast Surge of Strength, discard a red or green card. -- Target creature gains trample and gets +X/+0 until end of turn, where X is that creature's converted mana cost. -mana={R}{G}{discard(*[red;green]|myhand)} +mana={R}{G}{D(*[red;green]|myhand)} type=Instant [/card] [card] @@ -111687,7 +111695,7 @@ type=Sorcery [/card] [card] name=Survival of the Fittest -auto={G}{discard(creature|myhand)}:moveTo(myhand) target(creature|myLibrary) +auto={G}{D(creature|myhand)}:moveTo(myhand) target(creature|myLibrary) text={G}, Discard a creature card: Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. mana={1}{G} type=Enchantment @@ -112576,7 +112584,7 @@ name=Syphon Life target=player auto=life:-2 auto=life:2 controller -retrace={1}{B}{B}{discard(land|myhand)} +retrace={1}{B}{B}{D(land|myhand)} text=Target player loses 2 life and you gain 2 life. -- Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) mana={1}{B}{B} type=Sorcery @@ -113373,7 +113381,7 @@ type=Land [card] name=Tarox Bladewing abilities=flying,haste -auto={discard(other *[share!name!]|myhand)}:dynamicability +auto={D(other *[share!name!]|myhand)}:dynamicability text=Flying, haste -- Grandeur - Discard another card named Tarox Bladewing: Tarox Bladewing gets +X/+X until end of turn, where X is its power. mana={2}{R}{R}{R} type=Legendary Creature @@ -114830,7 +114838,7 @@ toughness=1 [/card] [card] name=Thalakos Drifters -auto={discard(*|myhand)}:shadow +auto={D(*|myhand)}:shadow text=Discard a card: Thalakos Drifters gains shadow until end of turn. (This creature can block or be blocked by only creatures with shadow.) mana={2}{U}{U} type=Creature @@ -114860,7 +114868,7 @@ toughness=1 [card] name=Thalakos Scout abilities=shadow -auto={discard(*|myhand)}:moveTo(myhand) +auto={D(*|myhand)}:moveTo(myhand) text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- Discard a card: Return Thalakos Scout to its owner's hand. mana={2}{U} type=Creature @@ -116006,7 +116014,7 @@ toughness=2 [/card] [card] name=Thraben Standard Bearer -auto={1}{W}{t}{discard(*|myhand)}:token(Human Soldier,creature Human Soldier,1/1,white) +auto={1}{W}{t}{D(*|myhand)}:token(Human Soldier,creature Human Soldier,1/1,white) text={1}{W}, {T}, Discard a card: Put a 1/1 white Human Soldier creature token onto the battlefield. mana={W} type=Creature @@ -117163,7 +117171,7 @@ toughness=1 [card] name=Tin Street Market target=land -auto=teach(land) transforms((,newability[{T}{discard(*|myhand)}:draw:1 controller])) +auto=teach(land) transforms((,newability[{T}{D(*|myhand)}:draw:1 controller])) text=Enchant land -- Enchanted land has "{T}, Discard a card: Draw a card." mana={4}{R} type=Enchantment @@ -117228,7 +117236,7 @@ toughness=2 [/card] [card] name=Tireless Tribe -auto={discard(*|myhand)}:0/4 +auto={D(*|myhand)}:0/4 text=Discard a card: Tireless Tribe gets +0/+4 until end of turn. mana={W} type=Creature @@ -117460,7 +117468,7 @@ toughness=1 [card] name=Tolarian Sentinel abilities=flying -auto={U}{T}{discard(*|myhand)}:moveTo(ownerhand) target(*|myBattlefield) +auto={U}{T}{D(*|myhand)}:moveTo(ownerhand) target(*|myBattlefield) text=Flying -- {U}, {T}, Discard a card: Return target permanent you control to its owner's hand. mana={3}{U} type=Creature @@ -117573,7 +117581,7 @@ toughness=3 [/card] [card] name=Tonic Peddler -auto={W}{T}{discard(*|myhand)}:life:3 target(player) +auto={W}{T}{D(*|myhand)}:life:3 target(player) text={W}, {T}, Discard a card: Target player gains 3 life. mana={1}{W} type=Creature @@ -117795,7 +117803,7 @@ subtype=Aura name=Tormenting Voice auto=draw:2 text=As an additional cost to cast Tormenting Voice, discard a card. -- Draw two cards. -mana={1}{R}{discard(*|myhand)} +mana={1}{R}{D(*|myhand)} type=Sorcery [/card] [card] @@ -117933,7 +117941,7 @@ type=Artifact [/card] [card] name=Tortured Existence -auto={discard(creature|myhand)}:moveTo(myhand) target(creature|mygraveyard) +auto={D(creature|myhand)}:moveTo(myhand) target(creature|mygraveyard) text={B}, Discard a creature card: Return target creature card from your graveyard to your hand. mana={B} type=Enchantment @@ -118266,7 +118274,7 @@ toughness=3 [/card] [card] name=Toymaker -auto={1}{T}{discard(*|myhand)}:target(artifact[-creature]) dynamicability transforms((creature,setpower=0,settoughness=0)) ueot +auto={1}{T}{D(*|myhand)}:target(artifact[-creature]) dynamicability transforms((creature,setpower=0,settoughness=0)) ueot text={1}, {T}, Discard a card: Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn. (It retains its abilities.) mana={2} type=Artifact Creature @@ -118316,7 +118324,7 @@ toughness=1 [card] name=Trade Routes auto={1}:moveTo(ownerhand) target(land|myBattlefield) -auto={1}{discard(land|myhand)}:draw:1 +auto={1}{D(land|myhand)}:draw:1 text={1}: Return target land you control to its owner's hand. -- {1}, Discard a land card: Draw a card. mana={1}{U} type=Enchantment @@ -118334,7 +118342,7 @@ toughness=4 [/card] [card] name=Trading Post -auto={1}{T}{discard(*|myhand)}:life:4 +auto={1}{T}{D(*|myhand)}:life:4 auto={1}{T}{L}:token(Goat,Creature Goat,0/1,white) auto={1}{T}{S(creature|myBattlefield)}:moveTo(myhand) target(artifact|mygraveyard) auto={1}{T}{S(artifact|myBattlefield)}:draw:1 @@ -118442,7 +118450,7 @@ toughness=6 [/card] [card] name=Trained Pronghorn -auto={discard(*|myhand)}:all(this) prevent:9999 +auto={D(*|myhand)}:all(this) prevent:9999 text=Discard a card: Prevent all damage that would be dealt to Trained Pronghorn this turn. mana={1}{W} type=Creature @@ -119104,7 +119112,7 @@ subtype=Equipment [/card] [card] name=Trespasser il-Vec -auto={discard(*|myhand)}:shadow +auto={D(*|myhand)}:shadow text=Discard a card: Trespasser il-Vec gains shadow until end of turn. (It can block or be blocked by only creatures with shadow.) mana={2}{B} type=Creature @@ -119301,8 +119309,8 @@ subtype=Aura [/card] [card] name=Trickster Mage -auto={U}{T}{discard(*|myhand)}:tap target(artifact,creature,land) -auto={U}{T}{discard(*|myhand)}:untap target(artifact,creature,land) +auto={U}{T}{D(*|myhand)}:tap target(artifact,creature,land) +auto={U}{T}{D(*|myhand)}:untap target(artifact,creature,land) text={U}, {T}, Discard a card: You may tap or untap target artifact, creature, or land. mana={U} type=Creature @@ -119892,7 +119900,7 @@ toughness=1 [/card] [card] name=Tunneler Wurm -auto={discard(*|myhand)}:regenerate +auto={D(*|myhand)}:regenerate text=Discard a card: Regenerate Tunneler Wurm. mana={6}{G}{G} type=Creature @@ -120788,7 +120796,7 @@ toughness=2 [card] name=Undead Gladiator autohand=__CYCLING__({1}{B}) -autograveyard={1}{B}{discard(*|myhand)}:moveTo(myhand) myUpkeepOnly +autograveyard={1}{B}{D(*|myhand)}:moveTo(myhand) myUpkeepOnly text={1}{B}, Discard a card: Return Undead Gladiator from your graveyard to your hand. Activate this ability only during your upkeep. -- Cycling {1}{B} ({1}{B}, Discard this card: Draw a card.) mana={1}{B}{B} type=Creature @@ -120933,7 +120941,7 @@ type=Instant [/card] [card] name=Undertaker -auto={B}{T}{discard(*|myhand)}:moveTo(ownerhand) target(creature|mygraveyard) +auto={B}{T}{D(*|myhand)}:moveTo(ownerhand) target(creature|mygraveyard) text={B}, {T}, Discard a card: Return target creature card from your graveyard to your hand. mana={1}{B} type=Creature @@ -121708,7 +121716,7 @@ toughness=4 [/card] [card] name=Urborg Syphon-Mage -auto={2}{B}{T}{discard(*|myhand)}:life:-2 opponent && life:2 controller +auto={2}{B}{T}{D(*|myhand)}:life:-2 opponent && life:2 controller text={2}{B}, {T}, Discard a card: Each other player loses 2 life. You gain life equal to the life lost this way. mana={2}{B} type=Creature @@ -122194,7 +122202,7 @@ toughness=1 [/card] [card] name=Vampire Hounds -auto={discard(creature|myhand)}:2/2 +auto={D(creature|myhand)}:2/2 text=Discard a creature card: Vampire Hounds gets +2/+2 until end of turn. mana={2}{B} type=Creature @@ -123525,7 +123533,7 @@ toughness=5 name=Vexing Sphinx abilities=flying auto=@each my upkeep:counter(0/0,1,Age) -auto=thisforeach(counter{0/0.1.Age}) upcost[{discard(*|myhand)}] sacrifice +auto=thisforeach(counter{0/0.1.Age}) upcost[{D(*|myhand)}] sacrifice auto=@movedTo(this|graveyard) from(battlefield):thisforeach(counter{0/0.1.Age}) draw:1 controller text=Flying -- Cumulative upkeep - Discard a card. (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- When Vexing Sphinx dies, draw a card for each age counter on it. mana={1}{U}{U} @@ -123707,7 +123715,7 @@ toughness=1 [/card] [card] name=Viashino Skeleton -auto={1}{B}{discard(*|myhand)}:regenerate +auto={1}{B}{D(*|myhand)}:regenerate text={1}{B}, Discard a card: Regenerate Viashino Skeleton. mana={3}{R} type=Creature @@ -125304,7 +125312,7 @@ subtype=Aura [/card] [card] name=Volrath the Fallen -auto={discard(creature|myhand)}:storedmanacost/storedmanacost ueot +auto={D(creature|myhand)}:storedmanacost/storedmanacost ueot text={1}{B}, Discard a creature card: Volrath the Fallen gets +X/+X until end of turn, where X is the discarded card's converted mana cost. mana={3}{B}{B}{B} type=Legendary Creature @@ -127206,7 +127214,7 @@ toughness=1 name=Waste Away auto=-5/-5 target(creature) text=As an additional cost to cast Waste Away, discard a card. -- Target creature gets -5/-5 until end of turn. -mana={4}{B}{discard(*|myhand)} +mana={4}{B}{D(*|myhand)} type=Instant [/card] [card] @@ -127334,7 +127342,7 @@ toughness=3 [/card] [card] name=Waterfront Bouncer -auto={U}{T}{discard(*|myhand)}:moveTo(ownerhand) target(creature) +auto={U}{T}{D(*|myhand)}:moveTo(ownerhand) target(creature) text={U}, {T}, Discard a card: Return target creature to its owner's hand. mana={1}{U} type=Creature @@ -128653,7 +128661,7 @@ subtype=Aura name=Wild Guess auto=draw:2 text=As an additional cost to cast Wild Guess, discard a card. -- Draw two cards. -mana={R}{R}{discard(*|myhand)} +mana={R}{R}{D(*|myhand)} type=Sorcery [/card] [card] @@ -128706,11 +128714,11 @@ toughness=4 [/card] [card] name=Wild Mongrel -auto={discard(*|myhand)}:name(becomes white ueot) 1/1 && transforms((,white)) ueot -auto={discard(*|myhand)}:name(becomes blue ueot) 1/1 && transforms((,blue)) ueot -auto={discard(*|myhand)}:name(becomes black ueot) 1/1 && transforms((,black)) ueot -auto={discard(*|myhand)}:name(becomes red ueot) 1/1 && transforms((,red)) ueot -auto={discard(*|myhand)}:name(becomes green ueot) 1/1 && transforms((,green)) ueot +auto={D(*|myhand)}:name(becomes white ueot) 1/1 && transforms((,white)) ueot +auto={D(*|myhand)}:name(becomes blue ueot) 1/1 && transforms((,blue)) ueot +auto={D(*|myhand)}:name(becomes black ueot) 1/1 && transforms((,black)) ueot +auto={D(*|myhand)}:name(becomes red ueot) 1/1 && transforms((,red)) ueot +auto={D(*|myhand)}:name(becomes green ueot) 1/1 && transforms((,green)) ueot text=Discard a card: Wild Mongrel gets +1/+1 and becomes the color of your choice until end of turn. mana={1}{G} type=Creature @@ -129877,7 +129885,7 @@ type=Instant [/card] [card] name=Wolf of Devil's Breach -auto=this(attacking) {1}{R}{discard(*|myhand)}:damage:storedmanacost target(creature,planeswalker) +auto=this(attacking) {1}{R}{D(*|myhand)}:damage:storedmanacost target(creature,planeswalker) text=Whenever Wolf of Devil's Breach attacks, you may pay {1}{R} and discard a card. If you do, Wolf of Devil's Breach deals damage to target creature or planeswalker equal to the discarded card's converted mana cost. mana={3}{R}{R} type=Creature @@ -130414,7 +130422,7 @@ toughness=15 [card] name=Worm Harvest auto=foreach(land|mygraveyard) token(Worm,creature worm,1/1,blackgreen) -retrace={2}{BG}{BG}{BG}{discard(land|myhand)} +retrace={2}{BG}{BG}{BG}{D(land|myhand)} text=Put a 1/1 black and green Worm creature token onto the battlefield for each land card in your graveyard. -- Retrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) mana={2}{BG}{BG}{BG} type=Sorcery @@ -132028,7 +132036,7 @@ toughness=3 [/card] [card] name=Zombie Infestation -auto={discard(*|myhand)}{discard(*|myhand)}:token(Zombie,Creature Zombie,2/2,black) +auto={D(*|myhand)}{D(*|myhand)}:token(Zombie,Creature Zombie,2/2,black) text=Discard two cards: Put a 2/2 black Zombie creature token onto the battlefield. mana={1}{B} type=Enchantment diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 1949b3468..5fe7d6016 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -266,6 +266,7 @@ public: int myconvertedcost; ManaCost * computeNewCost(MTGCardInstance * card,ManaCost * oldCost, ManaCost * refCost,bool noTrinisphere = false); int countTrini; + bool anymanareplacement; vectorimprintedCards; int attackCost; int attackCostBackup; diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 31521b878..678a847a0 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -264,7 +264,8 @@ class Constants OPPNOMAXHAND = 142, CANTCREW = 143, HIDDENFACE = 144, - NB_BASIC_ABILITIES = 145, + ANYTYPEOFMANA = 145, + NB_BASIC_ABILITIES = 146, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 938d33628..ce412411a 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -388,7 +388,14 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card) } //Counters - if (anyCounter) + if (anyCounter == -1) + { + if (card->counters->mCount) + { + match = NULL; + } + } + else if (anyCounter) { if (!(card->counters->mCount)) { diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 2a6f6f1a4..1f9802025 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -1119,6 +1119,26 @@ void GameObserver::Affinity() ///we handle trisnisphere seperately because its a desaster. if(card->getManaCost())//make sure we check, abiliy$!/token dont have a mancost object. { + //change cost to colorless for anytypeofmana ability + if(card->has(Constants::ANYTYPEOFMANA)) + { + card->anymanareplacement = true; + int convertedC = card->getManaCost()->getConvertedCost(); + card->getManaCost()->changeCostTo( NEW ManaCost(ManaCost::parseManaCost("{0}", NULL, card)) ); + for (int jj = 0; jj < convertedC; jj++) + { + card->getManaCost()->add(Constants::MTG_COLOR_ARTIFACT, 1); + } + } + else + { + if (card->anymanareplacement) + { + card->getManaCost()->changeCostTo( card->model->data->getManaCost() ); + card->anymanareplacement = false; + } + } + if (card->has(Constants::TRINISPHERE)) { for (int jj = card->getManaCost()->getConvertedCost(); jj < 3; jj++) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 62b6a2317..43d9f3330 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -241,6 +241,7 @@ void MTGCardInstance::initMTGCI() miracle = false; hasCopiedToken = false; countTrini = 0; + anymanareplacement = false; imprintedCards.clear(); attackCost = 0; attackCostBackup = 0; diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 363f1a6e7..f9811f8e7 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -175,7 +175,8 @@ const char* Constants::MTGBasicAbilities[] = { "canblocktapped", "oppnomaxhand", "cantcrew", - "hiddenface"//test for facedown + "hiddenface",//test for facedown + "anytypeofmana" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index b65f876b0..2e72d0680 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -746,6 +746,10 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta { cd->anyCounter = 1; } + else if (attribute.find("{notany}") != string::npos) + { + cd->anyCounter = -1; + } else { size_t start = attribute.find("{"); From 5c3a064746cf2e5ac65af807b78d7d056b896f12 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 24 Jan 2017 16:10:35 +0800 Subject: [PATCH 12/22] aicode and revised legendary rule added aicode for cards that uses reveal. since reveal cancels for ai, aicode is the alternative code. use basic code only. aicode=activate dosomething... aicode - use with caution, its very basic atm and you must test each card that uses it as it can cause crash. legendary rule moved to game state based effect so it will not conflict with cards with copy effects and andability. the legendary check applies only when legendrule is found. --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 38 +++++++++++++++- projects/mtg/include/AllAbilities.h | 1 + projects/mtg/include/CardPrimitive.h | 3 ++ projects/mtg/include/GameObserver.h | 2 + projects/mtg/src/AllAbilities.cpp | 15 ++++++ projects/mtg/src/CardPrimitive.cpp | 11 +++++ projects/mtg/src/GameObserver.cpp | 48 +++++++++++++++++++- projects/mtg/src/MTGAbility.cpp | 25 +++++++++- projects/mtg/src/MTGCardInstance.cpp | 1 + projects/mtg/src/MTGDeck.cpp | 7 ++- 10 files changed, 145 insertions(+), 6 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index de29caf15..26ce93b85 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2832,6 +2832,7 @@ type=Instant [card] name=Amnesia target=player +aicode=activate choice reject all(*[-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) transforms((,newability[moveto(ownerhand) and!( reject )! all(*[-land]|reveal)])) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand and discards all nonland cards. mana={3}{U}{U}{U} @@ -4273,6 +4274,7 @@ toughness=1 [card] name=Appetite for Brains target=opponent +aicode=activate moveto(exile) notatarget(*[manacost>=4]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[manacost>=4]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a card from it with converted mana cost 4 or greater and exile that card. mana={B} @@ -10547,6 +10549,7 @@ toughness=1 [card] name=Blackmail target=player +aicode=activate reject notatarget(*[-land]|targetedpersonshand) auto=reveal:3 revealzone(targetedpersonshand) optionone name(Put in graveyard) target(<1>*|reveal) moveto(ownergraveyard) optiononeend optiontwo name(put Back) all(*|reveal) moveto(ownerhand) optiontwoend revealend text=Target player reveals three cards from his or her hand and you choose one of them. That player discards that card. mana={B} @@ -13710,6 +13713,7 @@ type=Artifact [/card] [card] name=Brain Maggot +aicode=activate hand(blink)forsrc notatarget(*[-land]|targetedpersonshand) auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone hand(blink)forsrc notatarget(*[-land]|reveal) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=When Brain Maggot enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card until Brain Maggot leaves the battlefield. mana={1}{B} @@ -13732,6 +13736,7 @@ toughness=1 [card] name=Brainbite target=opponent +aicode=activate reject notatarget(*[-land]|targetedpersonshand) and!( draw:1 controller )! auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[draw:1 controller])) oneshot afterrevealedend revealend text=Target opponent reveals his or her hand. You choose a card from it. That player discards that card. -- Draw a card. mana={2}{U}{B} @@ -16597,6 +16602,7 @@ subtype=Aura [card] name=Castigate target=opponent +aicode=activate moveto(exile) notatarget(*[-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[-land]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a nonland card from it and exile that card. mana={W}{B} @@ -20412,6 +20418,7 @@ type=Sorcery [card] name=Coercion target=opponent +aicode=activate reject notatarget(*|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a card from it. That player discards that card. mana={2}{B} @@ -27604,6 +27611,7 @@ toughness=2 [card] name=Despise target=opponent +aicode=activate reject notatarget(*[creature;planeswalker]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[creature;planeswalker]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a creature or planeswalker card from it. That player discards that card. mana={B} @@ -28300,6 +28308,7 @@ toughness=4 [card] name=Diplomacy of the Wastes target=opponent +aicode=activate reject notatarget(*[-land]|targetedpersonshand) and!( if type(warrior|mybattlefield)~morethan~0 then life:-2 targetedplayer )! auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[if type(*[warrior]|mybattlefield)~morethan~0 then life:-2 opponent])) oneshot afterrevealedend revealend text=Target opponent reveals his or her hand. You choose a nonland card from it. That player discards that card. If you control a Warrior, that player loses 2 life. mana={2}{B} @@ -28932,6 +28941,7 @@ type=Sorcery [card] name=Distress target=player +aicode=activate reject notatarget(*[-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. mana={B}{B} @@ -31540,6 +31550,7 @@ toughness=* [card] name=Duress target=opponent +aicode=activate reject notatarget(*[-creature;-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-creature;-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mana={B} @@ -34310,6 +34321,7 @@ toughness=2 [card] name=Encroach target=player +aicode=activate reject notatarget(*[-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-basic]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonbasic land card from it. That player discards that card. mana={B} @@ -34878,7 +34890,8 @@ toughness=2 [/card] [card] name=Entomber Exarch -auto=choice moveTo(myhand) target(creature|mygraveyard) +auto=aslongas(creature|mygraveyard) choice moveTo(myhand) target(creature|mygraveyard) +aicode=activate reject notatarget(*[-creature]|targetedpersonshand) auto=choice target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-creature]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=When Entomber Exarch enters the battlefield, choose one - Return target creature card from your graveyard to your hand; or target opponent reveals his or her hand, you choose a noncreature card from it, then that player discards that card. mana={2}{B}{B} @@ -55988,6 +56001,7 @@ type=Sorcery [card] name=Inquisition of Kozilek target=player +aicode=activate reject notatarget(*[-land;manacost<=3]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land;manacost<=3]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card from it with converted mana cost 3 or less. That player discards that card. mana={B} @@ -64117,6 +64131,7 @@ type=Artifact [card] name=Lifebane Zombie abilities=intimidate +aicode=activate moveto(exile) notatarget(creature[green;white]|targetedpersonshand) auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(creature[green;white]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Intimidate. -- When Lifebane Zombie enters the battlefield, target opponent reveals his or her hand. You choose a green or white creature card from it and exile that card. mana={1}{B}{B} @@ -65272,6 +65287,7 @@ toughness=4 [card] name=Lobotomy target=player +aicode=activate notatarget(*[-basic]|targetedpersonshand) transforms((,newability[all(*[share!name!]|myhand) moveto(exile)],newability[all(*[share!name!]|mylibrary) moveto(exile) and!( shuffle )!],newability[all(*[share!name!]|mygraveyard) moveto(exile)])) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(*[-basic]|reveal) moveto(exile) and!( transforms((,newability[all(*[share!name!]|mylibrary) moveto(exile) and!(shuffle)!],newability[all(*[share!name!]|mygraveyard) moveto(exile)],newability[all(*[share!name!]|myhand) moveto(exile)])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand, then you choose a card other than a basic land card from it. Search that player's graveyard, hand, and library for all cards with the same name as the chosen card and exile them. Then that player shuffles his or her library. mana={2}{U}{B} @@ -70180,6 +70196,7 @@ toughness=1 [/card] [card] name=Mesmeric Fiend +aicode=activate hand(blink)forsrc notatarget(*[-land]|targetedpersonshand) auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone hand(blink)forsrc notatarget(*[-land]|reveal) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=When Mesmeric Fiend enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card. -- When Mesmeric Fiend leaves the battlefield, return the exiled card to its owner's hand. mana={1}{B} @@ -76466,6 +76483,7 @@ type=Enchantment [card] name=Night Terrors target=player +aicode=activate moveto(exile) notatarget(*[-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone target(*[-land]|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card from it. Exile that card. mana={2}{B} @@ -76573,6 +76591,7 @@ subtype=Equipment [card] name=Nightmare Void target=player +aicode=activate reject notatarget(*|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend dredge=dredge(2) text=Target player reveals his or her hand. You choose a card from it. That player discards that card. -- Dredge 2 (If you would draw a card, instead you may put exactly two cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.) @@ -76683,7 +76702,7 @@ toughness=1 [card] name=Nightsnare target=opponent -auto=Reveal:type:*:opponenthand revealzone(opponenthand) revealtype(*|opponenthand) optionone choice name(Discard Land) target(land|reveal) transforms((,newability[reject],newability[all(*|reveal) moveto(ownerhand)])) oneshot optiononeend optiontwo name(Give Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)],newability[ability$!target(<2>*|myhand) reject!$ controller])) ueot optiontwoend revealend +auto=Reveal:type:*:opponenthand revealzone(opponenthand) revealtype(*|opponenthand) optionone choice name(Discard Nonland) target(*[-land]|reveal) transforms((,newability[reject],newability[all(*|reveal) moveto(ownerhand)])) oneshot optiononeend optiontwo name(Give Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)],newability[ability$!target(<2>*|myhand) reject!$ controller])) ueot optiontwoend revealend text=Target opponent reveals his or her hand. You may choose a nonland card from it. If you do, that player discards that card. If you don't, that player discards two cards. mana={3}{B} type=Sorcery @@ -80163,6 +80182,7 @@ toughness=2 [card] name=Ostracize target=opponent +aicode=activate reject notatarget(creature|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(creature|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a creature card from it. That player discards that card. mana={B} @@ -81997,6 +82017,7 @@ toughness=4 [card] name=Perish the Thought target=opponent +aicode=activate notatarget(*|targetedpersonshand) transforms((,newability[moveto(ownerlibrary)],newability[shuffle])) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone target(*|reveal) moveto(ownerlibrary) and!( shuffle )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a card from it. That player shuffles that card into his or her library. mana={2}{B} @@ -85892,6 +85913,7 @@ subtype=Aura [card] name=Psychic Spear target=player +aicode=activate reject notatarget(*[spirit;arcane]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[spirit;arcane]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a Spirit or Arcane card from it. That player discards that card. mana={B} @@ -99459,6 +99481,7 @@ type=Sorcery [card] name=Shattered Dreams target=opponent +aicode=activate reject notatarget(artifact|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) notatarget(artifact|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose an artifact card from it. That player discards that card. mana={B} @@ -112875,6 +112898,7 @@ toughness=3 [card] name=Talara's Bane target=opponent +aicode=activate dynamicability reject notatarget(creature[green;white]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(creature[green;white]|reveal) moveto(ownerhand) and!( dynamicability reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal that creature card's toughness, then that player discards that card. mana={1}{B} @@ -115372,6 +115396,7 @@ toughness=3 [card] name=Thieving Sprite abilities=flying +aicode=activate reject notatarget(*|targetedpersonshand) auto=target(player) Reveal:type:faerie:mybattlefield revealzone(targetedpersonshand) optionone choice name(choose Discards) target(<1>*|reveal) moveto(ownerhand) and!(reject)! optiononeend optiontwo all(*|reveal) moveto(ownerhand) optiontwoend revealend text=Flying -- When Thieving Sprite enters the battlefield, target player reveals X cards from his or her hand, where X is the number of Faeries you control. You choose one of those cards. That player discards that card. mana={2}{B} @@ -115894,6 +115919,7 @@ type=Sorcery [card] name=Thoughtseize target=player +aicode=activate reject notatarget(*[-land]|targetedpersonshand) and!( life:-2 controller )! auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*|reveal) moveto(ownerhand)])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life. mana={B} @@ -116791,6 +116817,7 @@ toughness=1 [/card] [card] name=Tidehollow Sculler +aicode=activate hand(blink)forsrc notatarget(*[-land]|targetedpersonshand) auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone hand(blink)forsrc notatarget(*[-land]|reveal) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=When Tidehollow Sculler enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card. -- When Tidehollow Sculler leaves the battlefield, return the exiled card to its owner's hand. mana={W}{B} @@ -118598,6 +118625,7 @@ toughness=3 [card] name=Transgress the Mind target=player +aicode=activate moveto(exile) notatarget(*[manacost>=3]|targetedpersonshand) auto=Reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) revealtype(*|targetedpersonshand) optionone name(choose discard) notatarget(*[manacost>=3]|reveal) moveto(ownerexile) optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend text=Devoid (This card has no color.) -- Target player reveals his or her hand. You choose a card from it with converted mana cost 3 or greater and exile that card. mana={1}{B} @@ -118667,6 +118695,7 @@ type=Instant [card] name=Trapfinder's Trick target=player +aicode=activate choice reject all(*[trap]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[trap]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*[trap]|reveal) moveto(ownerhand) and!(reject)!])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand and discards all Trap cards. mana={1}{U} @@ -118790,6 +118819,7 @@ toughness=3 [card] name=Treacherous Urge target=opponent +aicode=activate notatarget(creature|targetedpersonshand) moveto(mybattlefield) and!( transforms((,newability[phaseaction[endofturn] sacrifice all(this)],newability[haste all(this)])) ueot )! auto=Reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) revealtype(*|targetedpersonshand) optionone name(Get Creature) notatarget(creature|reveal) transforms((,newability[moveto(opponentbattlefield)],newability[phaseaction[endofturn] sacrifice all(this)],newability[haste all(this)])) ueot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend text=Target opponent reveals his or her hand. You may put a creature card from it onto the battlefield under your control. That creature gains haste. Sacrifice it at the beginning of the next end step. mana={4}{B} @@ -121242,6 +121272,7 @@ type=Instant [card] name=Unmask target=player +aicode=activate reject notatarget(*[-land]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend other={E(other *[black]|myhand)} name(Exile a Black Card from Hand) text=You may exile a black card from your hand rather than pay Unmask's mana cost. -- Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. @@ -122895,6 +122926,7 @@ type=Land [card] name=Venarian Glimmer target=player +aicode=activate reject notatarget(*[-land;manacost<=castx]|targetedpersonshand) auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land;manacost<=castx]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card with converted mana cost X or less from it. That player discards that card. mana={X}{U} @@ -122912,6 +122944,7 @@ type=Instant [card] name=Vendilion Clique abilities=flash,flying +aicode=activate name(bottom of library) notatarget(*[-land]|targetedpersonshand) bottomoflibrary and!( draw:1 targetedplayer )! auto=name(target player) target(player) Reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[-land]|reveal) transforms((,newability[bottomoflibrary],newability[draw:1],newability[all(*|reveal) moveto(ownerhand)])) oneshot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Flash -- Flying -- When Vendilion Clique enters the battlefield, look at target player's hand. You may choose a nonland card from it. If you do, that player reveals the chosen card, puts it on the bottom of his or her library, then draws a card. mana={1}{U}{U} @@ -129710,6 +129743,7 @@ type=Instant [card] name=Withering Gaze target=opponent +aicode=draw:type:*[forest;green]:targetedpersonshand auto=Reveal:type:*:opponenthand revealzone(opponenthand) revealtype(*|opponenthand) optionone choice name(Get Bonus) foreach(forest|reveal) draw:1 && foreach(*[green]|reveal) draw:1 optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend text=Target opponent reveals his or her hand. You draw a card for each Forest and green card in it. mana={2}{U} diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index a1f684c96..1c60abfbe 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2045,6 +2045,7 @@ class AALibraryBottom: public ActivatedAbility { public: AALibraryBottom(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL); + MTGAbility * andAbility; int resolve(); const string getMenuText(); AALibraryBottom * clone() const; diff --git a/projects/mtg/include/CardPrimitive.h b/projects/mtg/include/CardPrimitive.h index 15fec378f..ec32b4c0f 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -71,6 +71,9 @@ public: string doubleFaced; void setdoubleFaced(const string& value); const string& getdoubleFaced() const; + string AICustomCode; + void setAICustomCode(const string& value); + const string& getAICustomCode() const; vectortypes; CardPrimitive(); diff --git a/projects/mtg/include/GameObserver.h b/projects/mtg/include/GameObserver.h index 2f520043c..48ae903e4 100644 --- a/projects/mtg/include/GameObserver.h +++ b/projects/mtg/include/GameObserver.h @@ -125,6 +125,8 @@ class GameObserver{ void enchantmentStatus(); void Affinity(); bool AffinityNeedsUpdate; + bool foundlegendrule; + void checkLegendary(MTGCardInstance * card); void addObserver(MTGAbility * observer); bool removeObserver(ActionElement * observer); void startGame(GameType, Rules * rules); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 9f1e66df8..934574e54 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1484,6 +1484,7 @@ AALibraryBottom::AALibraryBottom(GameObserver* observer, int _id, MTGCardInstanc ActivatedAbility(observer, _id, _source, _cost, 0) { target = _target; + andAbility = NULL; } int AALibraryBottom::resolve() @@ -1503,6 +1504,20 @@ int AALibraryBottom::resolve() newOrder.push_back(rearranged); } library->cards = newOrder; + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = _target; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } return 1; } return 0; diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 3e399bf66..d2491a240 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -57,6 +57,7 @@ CardPrimitive::CardPrimitive(CardPrimitive * source) setName(source->name); setdoubleFaced(source->doubleFaced); + setAICustomCode(source->AICustomCode); power = source->power; toughness = source->toughness; restrictions = source->restrictions ? source->restrictions->clone() : NULL; @@ -341,6 +342,16 @@ const string& CardPrimitive::getdoubleFaced() const return doubleFaced; } +void CardPrimitive::setAICustomCode(const string& value) +{ + std::transform(AICustomCode.begin(), AICustomCode.end(), AICustomCode.begin(), ::tolower); + AICustomCode = value; +} + +const string& CardPrimitive::getAICustomCode() const +{ + return AICustomCode; +} void CardPrimitive::setName(const string& value) { diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 1f9802025..faa755e69 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -110,6 +110,7 @@ GameObserver::GameObserver(WResourceManager *output, JGE* input) mLayers = NULL; mTrash = new Trash(); mDeckManager = new DeckManager(); + foundlegendrule = false; } GamePhase GameObserver::getCurrentGamePhase() @@ -880,6 +881,7 @@ void GameObserver::gameStateBasedEffects() if(card->life < 1 && !card->has(Constants::INDESTRUCTIBLE)) card->destroy();//manor gargoyle... recheck } + checkLegendary(card); //legendary rule as state based effect } if(card->childrenCards.size()) @@ -935,7 +937,6 @@ void GameObserver::gameStateBasedEffects() p->nomaxhandsize = true; else p->nomaxhandsize = false; - ///////////////////////////////////////////////// //handle end of turn effects while we're at it.// ///////////////////////////////////////////////// @@ -1055,6 +1056,51 @@ void GameObserver::gameStateBasedEffects() } } +void GameObserver::checkLegendary(MTGCardInstance * card) +{ + if(!foundlegendrule) + return; + if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasAbility(Constants::NOLEGENDRULE)||card->controller()->inPlay()->hasAbility(Constants::NOLEGENDRULE)) + return; + int destroy = 0; + vectoroldCards; + + MTGGameZone * z = card->controller()->game->inPlay; + int nbcards = z->nb_cards-1; + + for (int r = 0; r < nbcards; r++) + { + MTGCardInstance * comparison = z->cards[r]; + if (comparison != card && comparison->hasType("legendary") && !(comparison->getName().compare(card->getName()))) + { + oldCards.push_back(comparison); + destroy = 1; + } + } + + if(destroy) + { + vectorselection; + MultiAbility * multi = NEW MultiAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card, NULL); + for(unsigned int i = 0;i < oldCards.size();i++) + { + AAMover *a = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); + a->oneShot = true; + multi->Add(a); + } + multi->oneShot = 1; + MTGAbility * a1 = multi; + selection.push_back(a1); + AAMover *b = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old"); + b->oneShot = true; + MTGAbility * b1 = b; + selection.push_back(b1); + MTGAbility * menuChoice = NEW MenuAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule"); + menuChoice->addToGame(); + } + return; +} + void GameObserver::enchantmentStatus() { for (int i = 0; i < 2; i++) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 6db798db9..be533d78a 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1386,7 +1386,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG found = s.find("legendrule"); if(found != string::npos) { - observer->addObserver(NEW MTGLegendRule(observer, -1)); + //I replaced this rule since it broke cards with copy effects and with andability and other + //complex cards. So I moved it to gameobserver state based effects, if there are no more + //abilities that needs resolving then trigger this legend check... example bug: + //cast Phantasmal Image, then copy Vendilion Clique in play, after you choose target player + //there will be infinite menu for legendary rule that conflicts with Phantasmal andAbility + //observer->addObserver(NEW MTGLegendRule(observer, -1)); + observer->foundlegendrule = true; return NULL; } //this handles the planeswalker named legend rule which is dramatically different from above. @@ -2733,6 +2739,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { MTGAbility * a = NEW AALibraryBottom(observer, id, card, target); a->oneShot = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((AALibraryBottom*)a)->andAbility = parseMagicLine(stored, id, spell, card); + } return a; } @@ -3553,7 +3566,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG a->oneShot = 1; a->canBeInterrupted = false; a->named = newName; - return a; + if(card->getAICustomCode().size() && card->controller()->isAI()) + { + MTGAbility * a3 = parseMagicLine(card->getAICustomCode(), id, spell, card); + a3->oneShot = 1; + a3->canBeInterrupted = false; + return a3; + } + else + return a; } //scry:x (activate aility) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 43d9f3330..687a74dcd 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -130,6 +130,7 @@ void MTGCardInstance::copy(MTGCardInstance * card) alias = data->alias; copiedID = card->copiedID; doubleFaced = data->doubleFaced; + AICustomCode = data->AICustomCode; origpower = card->origpower;//for flip origtoughness = card->origtoughness;//for flip diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index 45d71c69d..ce63bd070 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -58,7 +58,12 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi switch (key[0]) { case 'a': - if (key == "auto") + if (key == "aicode")//replacement code for AI. for reveal:number basic version only + { + if (!primitive) primitive = NEW CardPrimitive(); + primitive->setAICustomCode(val); + } + else if (key == "auto") { if (!primitive) primitive = NEW CardPrimitive(); primitive->addMagicText(val); From 60f6c683a39d00f488afcf2e608ea78c9c03fd57 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 25 Jan 2017 18:29:27 +0800 Subject: [PATCH 13/22] test fix equipment also added some primitive fixes, added macro for fabricate --- .../mtg/bin/Res/sets/primitives/_macros.txt | 3 +++ projects/mtg/bin/Res/sets/primitives/mtg.txt | 24 ++++++++++--------- projects/mtg/bin/Res/test/Living_Death.txt | 10 ++++---- projects/mtg/bin/Res/test/haunting_echoes.txt | 2 ++ projects/mtg/src/AllAbilities.cpp | 2 +- projects/mtg/src/GameObserver.cpp | 13 +++++++--- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/_macros.txt b/projects/mtg/bin/Res/sets/primitives/_macros.txt index ec9a18def..19458678a 100644 --- a/projects/mtg/bin/Res/sets/primitives/_macros.txt +++ b/projects/mtg/bin/Res/sets/primitives/_macros.txt @@ -12,3 +12,6 @@ # Basic Landcycling #AUTO_DEFINE __BASIC_LANDCYCLING__($cost) $cost{cycle}:name(basic landcycling) moveTo(myhand) target(land[basic]|mylibrary) +# Fabricate +#AUTO_DEFINE _FABRICATE_($c) transforms((,newability[choice counter(1/1.$c)],newability[choice makecardt(Servo:Artifact Creature Servo:1/1)*$c])) ueot + diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 26ce93b85..4fd835989 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -8530,8 +8530,7 @@ toughness=1 [/card] [card] name=Barbarian Outcast -auto=aslongas(swamp|myBattlefield) moveTo(mygraveyard) <1 -auto=@movedTo(swamp|graveyard,exile,library,hand) from(myBattlefield):aslongas(swamp|myBattlefield) moveTo(mygraveyard) <1 +auto=aslongas(swamp|myBattlefield) all(this) sacrifice while <1 text=When you control no Swamps, sacrifice Barbarian Outcast. mana={1}{R} type=Creature @@ -22178,7 +22177,7 @@ toughness=2 [card] name=Covetous Dragon abilities=flying -auto=aslongas(artifact|myBattlefield) sacrifice <1 +auto=aslongas(artifact|myBattlefield) all(this) sacrifice while <1 text=Flying -- When you control no artifacts, sacrifice Covetous Dragon. mana={4}{R} type=Creature @@ -50629,8 +50628,9 @@ toughness=2 [/card] [card] name=Haunting Echoes -auto=all(*[-basic]|opponentgraveyard) transforms((,newability[moveTo(exile) all(*[share!name!]|mylibrary)])) ueot -auto=moveTo(exile) all(*[-basic]|opponentgraveyard) +target=player +auto=all(*[-basic]|targetedpersonsgraveyard) transforms((,newability[moveTo(exile) all(*[share!name!]|mylibrary)])) ueot +auto=moveTo(exile) all(*[-basic]|targetedpersonsgraveyard) text=Exile all cards from target player's graveyard other than basic land cards. For each card exiled this way, search that player's library for all cards with the same name as that card and exile them. Then that player shuffles his or her library. mana={3}{B}{B} type=Sorcery @@ -66368,7 +66368,7 @@ type=Instant [/card] [card] name=Lurebound Scarecrow -auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) sacrifice <1 chooseend +auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) all(this) sacrifice while <1 chooseend text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. mana={3} type=Artifact Creature @@ -82327,7 +82327,8 @@ toughness=1 [/card] [card] name=Phantasmal Image -auto=may copy NotATarget(creature) and!( transforms((Illusion,newability[@targeted(this):sacrifice])) forever )! +auto=may copy NotATarget(creature) and!( transforms((Illusion)) forever )! +auto=@targeted(this):sacrifice text=You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it." mana={1}{U} type=Creature @@ -98380,7 +98381,8 @@ type=Land [card] name=Serendib Djinn abilities=flying -auto=@each my upkeep:transforms((,newability[target(land|myBattlefield) sacrifice],newability[@sacrificed(island|mybattlefield) restriction{myUpkeepOnly}:damage:3 controller])) ueot +auto=@each my upkeep:notatarget(land|mybattlefield) sacrifice and!(if cantargetcard(island|nonbattlezone) then damage:3 controller)! +auto=aslongas(land|myBattlefield) all(this) sacrifice while <1 text=Flying -- At the beginning of your upkeep, sacrifice a land. If you sacrifice an Island this way, Serendib Djinn deals 3 damage to you. -- When you control no lands, sacrifice Serendib Djinn. mana={2}{U}{U} type=Creature @@ -112387,7 +112389,7 @@ type=Instant [card] name=Sylvan Primordial abilities=reach -auto=name(destroy) target(*[-creature]|opponentbattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):ability$!notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))!!$ opponent],newability[destroy])) +auto=target(*[-creature]|opponentbattlefield) destroy and!(if cantargetcard(*[-creature]|nonbattlezone) then choice notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))! )! text=Reach -- When Sylvan Primordial enters the battlefield, for each opponent, destroy target noncreature permanent that player controls. For each permanent destroyed this way, search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. mana={5}{G}{G} type=Creature @@ -125411,7 +125413,7 @@ toughness=2 [card] name=Voodoo Doll auto=@each my upkeep:counter(0/0,1,Pin) -auto=@each my endofturn sourcenottap:thisforeach(counter{0/0.1.Pin}) damage:1 controller +auto=this(counter{0/0.1.Pin}>0) transforms((,newability[@each my endofturn sourcenottap:damage:counter{0%0.1.Pin} controller && destroy all(this)])) auto=this(counter{0/0.1.Pin}<1) {0}{T}:damage:0 target(creature,player) auto=this(counter{0/0.1.Pin}=) {2}{T}:damage:1 target(creature,player) auto=this(counter{0/0.2.Pin}=) {4}{T}:damage:2 target(creature,player) @@ -128009,7 +128011,7 @@ toughness=* [/card] [card] name=Werewolf Ransacker -auto=target(artifact) transforms((,newability[destroy],newability[damage:3 controller])) forever +auto=may target(artifact) destroy and!(if cantargetcard(artifact|nonbattlezone) then damage:3 targetcontroller)! auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Afflicted Deserter) text=Whenever this creature transforms into Werewolf Ransacker, you may destroy target artifact. If that artifact is put into a graveyard this way, Werewolf Ransacker deals 3 damage to that artifact's controller. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Werewolf Ransacker. type=Creature diff --git a/projects/mtg/bin/Res/test/Living_Death.txt b/projects/mtg/bin/Res/test/Living_Death.txt index 3b9e017e0..08df0f185 100644 --- a/projects/mtg/bin/Res/test/Living_Death.txt +++ b/projects/mtg/bin/Res/test/Living_Death.txt @@ -2,7 +2,7 @@ [INIT] FIRSTMAIN [PLAYER1] -graveyard:Krosan Cloudscraper, Dragonlord Kolaghan, Clone +graveyard:109684, Dragonlord Kolaghan, 370622 hand:Living Death manapool:{2}{B}{B}{B} [PLAYER2] @@ -15,8 +15,8 @@ choice 0 next #attack next -Clone -Krosan Cloudscraper +370622 +109684 #block next #damage @@ -26,8 +26,8 @@ eot [ASSERT] UNTAP [PLAYER1] -inplay:Krosan Cloudscraper, Clone +inplay:109684, 370622 graveyard:Dragonlord Kolaghan, Living Death [PLAYER2] life:1 -[END] +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/haunting_echoes.txt b/projects/mtg/bin/Res/test/haunting_echoes.txt index 20974ef6b..eb60d60e1 100644 --- a/projects/mtg/bin/Res/test/haunting_echoes.txt +++ b/projects/mtg/bin/Res/test/haunting_echoes.txt @@ -10,6 +10,8 @@ graveyard:White Knight,Glorious Anthem library:White Knight,Glorious Anthem,Grizzly Bears [DO] Haunting Echoes +choice 0 +p2 next goto firstmain [ASSERT] diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 934574e54..01a99c442 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -7795,7 +7795,7 @@ const string AEquip::getMenuText() int AEquip::testDestroy() { if (source->target && !game->isInPlay(source->target)) - unequip(); + //unequip();//testfix for equipment when the card it equip moves to other battlefield if (!game->connectRule) { if (source->target && TargetAbility::tc && !TargetAbility::tc->canTarget((Targetable *)source->target,true)) diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index faa755e69..6c987a84e 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -773,9 +773,9 @@ void GameObserver::gameStateBasedEffects() //////////////////////////////////////////////////// //Unattach Equipments that dont have valid targets// //////////////////////////////////////////////////// - if ((card->target) && card->hasType(Subtypes::TYPE_EQUIPMENT)) + if (!card->isCreature() && card->hasType(Subtypes::TYPE_EQUIPMENT)) { - if(card->target && isInPlay(card->target) && (card->target)->protectedAgainst(card))//protection from quality + if(isInPlay(card)) { for (size_t i = 1; i < mLayers->actionLayer()->mObjects.size(); i++) { @@ -783,7 +783,14 @@ void GameObserver::gameStateBasedEffects() AEquip * eq = dynamic_cast (a); if (eq && eq->source == card) { - ((AEquip*)a)->unequip(); + if(card->target)//unattach equipments from cards that has protection from quality ex. protection from artifacts + { + if((card->target)->protectedAgainst(card)) + ((AEquip*)a)->unequip(); + } + if(card->controller()) + ((AEquip*)a)->getActionTc()->Owner = card->controller(); + //fix for equip ability when the equipment changed controller... } } } From de2d6639689f1972b5ccec09f350fbd1c3bed80e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 02:12:02 +0800 Subject: [PATCH 14/22] unattach animated equipment another bug found is when the equipment becomes a creature, its ability is granted to itself... --- projects/mtg/include/MTGRules.h | 6 ++++-- projects/mtg/src/GameObserver.cpp | 4 ++-- projects/mtg/src/MTGRules.cpp | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/projects/mtg/include/MTGRules.h b/projects/mtg/include/MTGRules.h index 92eacfc07..bc4e44d98 100644 --- a/projects/mtg/include/MTGRules.h +++ b/projects/mtg/include/MTGRules.h @@ -73,6 +73,8 @@ public: class MTGPutInPlayRule: public PermanentAbility { +protected: + string defaultPlayName; public: int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL); int reactToClick(MTGCardInstance * card); @@ -80,8 +82,8 @@ public: MTGPutInPlayRule(GameObserver* observer, int _id); const string getMenuText() { - if(game && game->gameType() == GAME_TYPE_MOMIR) - return "Play Land"; + if(defaultPlayName.size()) + return defaultPlayName.c_str(); return "Cast Card Normally"; } virtual MTGPutInPlayRule * clone() const; diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 6c987a84e..ba614275a 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -773,7 +773,7 @@ void GameObserver::gameStateBasedEffects() //////////////////////////////////////////////////// //Unattach Equipments that dont have valid targets// //////////////////////////////////////////////////// - if (!card->isCreature() && card->hasType(Subtypes::TYPE_EQUIPMENT)) + if (card->hasType(Subtypes::TYPE_EQUIPMENT)) { if(isInPlay(card)) { @@ -785,7 +785,7 @@ void GameObserver::gameStateBasedEffects() { if(card->target)//unattach equipments from cards that has protection from quality ex. protection from artifacts { - if((card->target)->protectedAgainst(card)) + if((card->target)->protectedAgainst(card)||card->isCreature()) ((AEquip*)a)->unequip(); } if(card->controller()) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index f33f2ea25..750d4883c 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -296,11 +296,13 @@ MTGPutInPlayRule::MTGPutInPlayRule(GameObserver* observer, int _id) : PermanentAbility(observer, _id) { aType = MTGAbility::PUT_INTO_PLAY; + defaultPlayName = ""; } int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) { int cardsinhand = game->players[0]->game->hand->nb_cards; + defaultPlayName = card->isLand()?"Play Land":"Cast Card Normally"; Player * player = game->currentlyActing(); if (!player->game->hand->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card)) return 0; @@ -753,6 +755,8 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * if(!allowedToAltCast(card,player)) return 0; + + alternativeName = "Pay Alternative Cost"; if(card->has(Constants::CANPLAYFROMGRAVEYARD)) alternativeName = "Alternate Cast From Graveyard"; @@ -763,6 +767,8 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * if (card->isLand()) { + alternativeName = "Play Land"; + if (game->currentActionPlayer->game->playRestrictions->canPutIntoZone(card, game->currentActionPlayer->game->inPlay) == PlayRestriction::CANT_PLAY) return 0; if (card->StackIsEmptyandSorcerySpeed()) From adcf6fb86da0ba0519106ef5e2bbfb114d47295e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 09:45:18 +0800 Subject: [PATCH 15/22] refactor some equipments --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 346 +++++++++---------- 1 file changed, 169 insertions(+), 177 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 4fd835989..cd641fcf2 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -574,8 +574,8 @@ toughness=1 [card] name=Accorder's Shield auto={3}:equip -auto=0/3 -auto=vigilance +auto=teach(creature) 0/3 +auto=teach(creature) vigilance text=Equipped creature gets +0/+3 and vigilance. -- Equip {3} mana={0} type=Artifact @@ -906,7 +906,7 @@ type=Instant [card] name=Adventuring Gear auto={1}:equip -auto=@movedTo(land|myBattlefield):2/2 ueot +auto=teach(creature) transforms((,newability[@movedTo(land|myBattlefield):2/2])) text=Landfall - Whenever a land enters the battlefield under your control, equipped creature gets +2/+2 until end of turn. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -3530,8 +3530,8 @@ toughness=6 [card] name=Angelic Armaments auto={4}:equip -auto=2/2 -auto=flying +auto=teach(creature) 2/2 +auto=teach(creature) flying auto=teach(creature) becomes(Angel,newcolors[white]) text=Equipped creature gets +2/+2, has flying, and is a white Angel in addition to its other colors and types. -- Equip {4} mana={3} @@ -5227,8 +5227,8 @@ toughness=3 [/card] [card] name=Argentum Armor -auto=6/6 -auto=@combat(attacking) source(mytgt) :destroy target(*) +auto=teach(creature) 6/6 +auto=@combat(attacking) source(mytgt):destroy target(*) auto={6}:equip text=Equipped creature gets +6/+6. -- Whenever equipped creature attacks, destroy target permanent. -- Equip {6} mana={6} @@ -8566,7 +8566,7 @@ toughness=2 [card] name=Barbed Battlegear auto={2}:equip -auto=4/-1 +auto=teach(creature) 4/-1 text=Equipped creature gets +4/-1. -- Equip {2} mana={3} type=Artifact @@ -8967,8 +8967,8 @@ toughness=2 [card] name=Basilisk Collar auto={2}:equip -auto=deathtouch -auto=lifelink +auto=teach(creature) deathtouch +auto=teach(creature) lifelink text=Equipped creature has deathtouch and lifelink. -- Equip {2} mana={1} type=Artifact @@ -9094,7 +9094,7 @@ toughness=3 name=Batterskull auto={5}:equip auto={3}:moveTo(ownerhand) -auto=4/4 +auto=teach(creature) 4/4 auto=teach(creature) vigilance auto=teach(creature) lifelink auto=livingweapontoken(Germ,Creature Germ,0/0,black) @@ -9697,9 +9697,9 @@ toughness=1 [card] name=Behemoth Sledge auto={3}:equip -auto=2/2 -auto=lifelink -auto=trample +auto=teach(creature) 2/2 +auto=teach(creature) lifelink +auto=teach(creature) trample text=Equipped creature gets +2/+2 and has lifelink and trample. -- Equip {3} mana={1}{G}{W} type=Artifact @@ -10595,7 +10595,7 @@ toughness=1 [card] name=Bladed Bracers auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=teach(human,angel) vigilance text=Equipped creature gets +1/+1. -- As long as equipped creature is a Human or an Angel, it has vigilance. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={1} @@ -10605,8 +10605,8 @@ subtype=Equipment [card] name=Bladed Pinions auto={2}:equip -auto=flying -auto=first strike +auto=teach(creature) flying +auto=teach(creature) first strike text=Equipped creature has flying and first strike. -- Equip {2} mana={2} type=Artifact @@ -10979,8 +10979,8 @@ toughness=1 [card] name=Blight Sickle auto={2}:equip -auto=wither -auto=1/0 +auto=teach(creature) wither +auto=teach(creature) 1/0 text=Equipped creature gets +1/+0 and has wither. (It deals damage to creatures in the form of -1/-1 counters.) -- Equip {2} mana={2} type=Artifact @@ -12980,7 +12980,7 @@ type=Instant [card] name=Bone Saw auto={1}:equip -auto=1/0 +auto=teach(creature) 1/0 text=Equipped creature gets +1/+0. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={0} type=Artifact @@ -13025,7 +13025,7 @@ toughness=4 [card] name=Bonehoard auto={2}:equip -auto=foreach(creature|graveyard) 1/1 +auto=teach(creature) type:creature:graveyard/type:creature:graveyard nonstatic auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +X/+X, where X is the number of creature cards in all graveyards. -- Equip {2} mana={4} @@ -13079,7 +13079,7 @@ toughness=2 [card] name=Bonesplitter auto={1}:equip -auto=2/0 +auto=teach(creature) 2/0 text=Equipped creature gets +2/+0. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={1} type=Artifact @@ -15323,7 +15323,7 @@ toughness=4 [card] name=Butcher's Cleaver auto={3}:equip -auto=3/0 +auto=teach(creature) 3/0 auto=teach(human) lifelink text=Equipped creature gets +3/+0. -- As long as equipped creature is a Human, it has lifelink. -- Equip {3} mana={3} @@ -17888,7 +17888,7 @@ toughness=1 [card] name=Champion's Helm auto={1}:equip -auto=2/2 +auto=teach(creature) 2/2 auto=teach(creature[legendary]) opponentshroud text=Equipped creature gets +2/+2. -- As long as equipped creature is legendary, it has hexproof. (It can't be the target of spells or abilities your opponents control.) -- Equip {1} mana={3} @@ -18287,9 +18287,9 @@ type=Artifact [card] name=Chariot of Victory auto={1}:equip -auto=first strike -auto=trample -auto=haste +auto=teach(creature) first strike +auto=teach(creature) trample +auto=teach(creature) haste text=Equipped creature has first strike, trample, and haste. mana={3} type=Artifact @@ -18645,7 +18645,7 @@ toughness=2 [card] name=Chitinous Cloak auto={3}:equip -auto=2/2 +auto=teach(creature) 2/2 auto=teach(creature) menace text=Equipped creature gets +2/+2 and has menace. (It can't be blocked except by two or more creatures.) -- Equip {3} mana={3} @@ -20381,7 +20381,7 @@ toughness=2 [card] name=Cobbled Wings auto={1}:equip -auto=flying +auto=teach(creature) flying text=Equipped creature has flying. -- Equip {1} mana={2} type=Artifact @@ -21489,8 +21489,8 @@ type=Instant [card] name=Copper Carapace auto={3}:equip -auto=2/2 -auto=cantblock +auto=teach(creature) 2/2 +auto=teach(creature) cantblock text=Equipped creature gets +2/+2 and can't block. -- Equip {3} mana={1} type=Artifact @@ -22337,7 +22337,7 @@ type=Artifact [/card] [card] name=Cranial Plating -auto=foreach(artifact|mybattlefield) 1/0 +auto=teach(creature) type:artifact:mybattlefield/0 nonstatic auto={B}{B}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature gets +1/+0 for each artifact you control. -- {B}{B}: Attach Cranial Plating to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) @@ -24874,7 +24874,7 @@ type=Land name=Darksteel Axe abilities=indestructible auto={2}:equip -auto=2/0 +auto=teach(creature) 2/0 text=Darksteel Axe is indestructible. -- Equipped creature gets +2/+0. -- Equip {2} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={1} type=Artifact @@ -24977,7 +24977,7 @@ type=Artifact name=Darksteel Plate abilities=indestructible auto={2}:equip -auto=indestructible +auto=teach(creature) indestructible text=Darksteel Plate is indestructible. -- Equipped creature is indestructible. -- Equip {2} mana={3} type=Artifact @@ -26182,7 +26182,7 @@ type=Enchantment [/card] [card] name=Deathrender -auto=+2/+2 +auto=teach(creature) 2/2 auto=@movedto(mytgt|graveyard):may moveto(mybattlefield) target(creature|myhand) and!(rehook)! auto={2}:equip text=Equipped creature gets +2/+2. -- Whenever equipped creature is put into a graveyard, you may put a creature card from your hand onto the battlefield and attach Deathrender to it. -- Equip {2} @@ -27160,7 +27160,7 @@ toughness=4 [card] name=Demonmail Hauberk auto={S(creature|myBattlefield)}:equip -auto=4/2 +auto=teach(creature) 4/2 text=Equipped creature gets +4/+2. -- Equip - Sacrifice a creature mana={4} type=Artifact @@ -32754,7 +32754,7 @@ type=Enchantment [card] name=Elbrus, the Binding Blade auto={1}:equip -auto=1/0 +auto=teach(creature) 1/0 auto=@combatdamaged(player) from(mytgt):all(this) moveto(mybattlefield) and!(flip(Withengar Unbound))! text=Equipped creature gets +1/+0. -- Whenever equipped creature deals combat damage to a player, transform Elbrus, the Binding Blade. -- Equip {1} mana={7} @@ -34181,7 +34181,7 @@ subtype=Aura [card] name=Empyrial Plate auto={2}:equip -auto=foreach(*|myhand) 1/1 +auto=teach(creature) type:*:myhand/type:*:myhand nonstatic text=Equipped creature gets +1/+1 for each card in your hand. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={2} type=Artifact @@ -36146,7 +36146,7 @@ type=Artifact [card] name=Executioner's Hood auto={2}:equip -auto=intimidate +auto=teach(creature) intimidate text=Equipped creature has intimidate. -- Equip {2} mana={2} type=Artifact @@ -39224,7 +39224,7 @@ toughness=2 [card] name=Fireshrieker auto={2}:equip -auto=double strike +auto=teach(creature) double strike text=Equipped creature has double strike. (It deals both first-strike and regular combat damage.) -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={3} type=Artifact @@ -39816,7 +39816,7 @@ toughness=1 [card] name=Flayer Husk auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +1/+1. -- Equip {2} mana={1} @@ -47064,8 +47064,8 @@ toughness=5 [card] name=Gorgon Flail auto={2}:equip -auto=1/1 -auto=deathtouch +auto=teach(creature) 1/1 +auto=teach(creature) deathtouch text=Equipped creature gets +1/+1 and has deathtouch. (Creatures dealt damage by this creature are destroyed. You can divide its combat damage among any of the creatures blocking or blocked by it.) -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -47985,7 +47985,7 @@ toughness=5 [card] name=Greatsword auto={3}:equip -auto=3/0 +auto=teach(creature) 3/0 text=Equipped creature gets +3/+0. -- Equip {3} mana={3} type=Artifact @@ -48227,7 +48227,7 @@ toughness=3 name=Grifter's Blade abilities=flash auto={1}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=aslongas(parents) rehook target(creature|mybattlefield) <1 text=Flash -- As Grifter's Blade enters the battlefield, choose a creature you control it could be attached to. If you do, it enters the battlefield attached to that creature. -- Equipped creature gets +1/+1. -- Equip {1} mana={3} @@ -49926,7 +49926,7 @@ type=Legendary Enchantment Artifact [card] name=Hammer of Ruin auto={2}:equip -auto=2/0 +auto=teach(creature) 2/0 auto=teach(creature) transforms((,newability[@combatdamageof(player) from(this):may destroy target(equipment|myBattlefield)])) auto=teach(creature) transforms((,newability[@combatdamagefoeof(player) from(this):may destroy target(equipment|opponentBattlefield)])) text=Equipped creature gets +2/+0. -- Whenever equipped creature deals combat damage to a player, you may destroy target Equipment that player controls. -- Equip {2} @@ -50598,7 +50598,7 @@ toughness=1 [card] name=Haunted Plate Mail auto={4}:equip -auto=4/4 +auto=teach(creature) 4/4 auto={0}:all(this) loseabilities ueot && becomes(Spirit Artifact Creature,4/4) ueot restriction{type(creature|mybattlefield)~lessthan~1} text=Equipped creature gets +4/+4. -- {0}: Until end of turn, Haunted Plate Mail becomes a 4/4 Spirit artifact creature that's no longer an Equipment. Activate this ability only if you control no creatures. mana={4} @@ -50881,7 +50881,7 @@ toughness=3 [card] name=Healer's Headdress auto={1}:equip -auto=0/2 +auto=teach(creature) 0/2 auto=teach(creature) {T}:prevent:1 target(creature,player) auto={W}{W}:name(attach) rehook target(creature|mybattlefield) text=Equipped creature gets +0/+2 and has "{T}: Prevent the next 1 damage that would be dealt to target creature or player this turn." -- {W}{W}: Attach Healer's Headdress to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) @@ -51093,7 +51093,7 @@ toughness=2 [card] name=Heart-Piercer Bow auto={1}:equip -auto=@combat(attacking) source(mytgt) :damage:1 target(creature|opponentbattlefield) +auto=@combat(attacking) source(mytgt):damage:1 target(creature|opponentbattlefield) text=Whenever equipped creature attacks, Heart-Piercer Bow deals 1 damage to target creature defending player controls. mana={2} type=Artifact @@ -51102,7 +51102,7 @@ subtype=Equipment [card] name=Heartseeker auto={5}:equip -auto=2/1 +auto=teach(creature) 2/1 auto=teach(creature) {unattach}{t}:destroy target(creature) text=Equipped creature gets +2/+1 and has "{T}, Unattach Heartseeker: Destroy target creature." -- Equip {5} ({5}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={4} @@ -51212,7 +51212,7 @@ type=Instant [card] name=Heavy Arbalest auto={4}:equip -auto=doesnotuntap +auto=teach(creature) doesnotuntap auto=teach(creature) {T}:damage:2 target(creature,player) text=Equipped creature doesn't untap during its controller's untap step. -- Equipped creature has "{T}: This creature deals 2 damage to target creature or player." -- Equip {4} mana={3} @@ -51250,7 +51250,7 @@ toughness=4 [card] name=Heavy Mattock auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=teach(human) 1/1 text=Equipped creature gets +1/+1. -- As long as equipped creature is a Human, it gets an additional +1/+1.. -- Equip {2} mana={3} @@ -51335,7 +51335,7 @@ toughness=1 [/card] [card] name=Hedron Matrix -auto=manacost/manacost +auto=teach(creature) transforms((,newability[manacost/manacost])) auto={4}:equip text=Equipped creature gets +X/+X, where X is its converted mana cost. -- Equip {4} mana={4} @@ -51718,9 +51718,9 @@ type=Artifact [/card] [card] name=Helm of Kaldra -auto=first strike -auto=trample -auto=haste +auto=teach(creature) first strike +auto=teach(creature) trample +auto=teach(creature) haste auto={2}:equip auto={1}:aslongas(Sword of Kaldra|mybattlefield)aslongas(Shield of Kaldra|mybattlefield)aslongas(Helm of Kaldra|mybattlefield) token(-47449) text=Equipped creature has first strike, trample, and haste. -- {1}: If you control Equipment named Helm of Kaldra, Sword of Kaldra, and Shield of Kaldra, put a legendary 4/4 colorless Avatar creature token named Kaldra onto the battlefield and attach those Equipment to it. -- Equip {2} @@ -52046,7 +52046,7 @@ toughness=3 [card] name=Hero's Blade auto={4}:equip -auto=3/2 +auto=teach(creature) 3/2 auto=@movedto(creature[legendary]|mybattlefield):may all(trigger[to]) rehook text=Equipped creature gets +3/+2. -- Whenever a legendary creature enters the battlefield under your control, you may attach Hero's Blade to it. mana={2} @@ -53250,8 +53250,8 @@ toughness=2 [/card] [card] name=Horned Helm -auto=1/1 -auto=trample +auto=teach(creature) 1/1 +auto=teach(creature) trample auto={G}{G}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature gets +1/+1 and has trample. -- {G}{G}: Attach Horned Helm to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) @@ -60589,7 +60589,7 @@ toughness=2 [card] name=Kite Shield auto={3}:equip -auto=0/3 +auto=teach(creature) 0/3 text=Equipped creature gets +0/+3. -- Equip {3} mana={0} type=Artifact @@ -60619,8 +60619,8 @@ toughness=1 [card] name=Kitesail auto={2}:equip -auto=1/0 -auto=flying +auto=teach(creature) 1/0 +auto=teach(creature) flying text=Equipped creature gets +1/+0 and has flying. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -63004,7 +63004,7 @@ toughness=4 [card] name=Lashwrithe auto={p(B)}{p(B)}:equip -auto=foreach(swamp|mybattlefield) 1/1 +auto=teach(creature) type:swamp:mybattlefield/type:swamp:mybattlefield nonstatic auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equip {p(B)}{p(B)} ({p(B)} may be paid for with either {B} or 2 life.) -- Equipped creature gets +1/+1 for each Swamp you control. mana={4} @@ -63590,7 +63590,7 @@ subtype=Swamp [card] name=Leering Emblem auto={2}:equip -auto=@movedTo(*|mystack):2/2 ueot +auto=teach(creature) transforms((,newability[@movedTo(*|mystack):2/2])) text=Whenever you cast a spell, equipped creature gets +2/+2 until end of turn. -- Equip {2} mana={2} type=Artifact @@ -63770,7 +63770,7 @@ toughness=2 [card] name=Leonin Scimitar auto={1}:equip -auto=1/1 +auto=teach(creature) 1/1 text=Equipped creature gets +1/+1. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -64449,7 +64449,7 @@ toughness=1 name=Lightning Greaves auto={0}:equip auto=teach(creature) shroud -auto=haste +auto=teach(creature) haste text=Equipped creature has haste and shroud. (It can't be the target of spells or abilities.) -- Equip {0} ({0}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={2} type=Artifact @@ -65980,9 +65980,9 @@ toughness=3 [card] name=Loxodon Warhammer auto={3}:equip -auto=3/0 -auto=lifelink -auto=trample +auto=teach(creature) 3/0 +auto=teach(creature) lifelink +auto=teach(creature) trample text=Equipped creature gets +3/+0 and has trample and lifelink. (If the creature would deal enough damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player or planeswalker. Damage dealt by the creature also causes its controller to gain that much life.) -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) mana={3} type=Artifact @@ -66727,8 +66727,8 @@ subtype=Equipment [card] name=Magebane Armor auto={2}:equip -auto=-flying -auto=2/4 +auto=teach(creature) -flying +auto=teach(creature) 2/4 auto=teach(creature) preventAllNoncombatDamage to(this) text=Equipped creature gets +2/+4 and loses flying. -- Prevent all noncombat damage that would be dealt to equipped creature. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={3} @@ -67705,11 +67705,11 @@ subtype=Aura [card] name=Manaforce Mace auto={3}:equip -auto=aslongas(forest|myBattlefield) 1/1 -auto=aslongas(mountain|myBattlefield) 1/1 -auto=aslongas(plains|myBattlefield) 1/1 -auto=aslongas(swamp|myBattlefield) 1/1 -auto=aslongas(island|myBattlefield) 1/1 +auto=teach(creature) transforms((,newability[aslongas(forest|myBattlefield) 1/1])) +auto=teach(creature) transforms((,newability[aslongas(mountain|myBattlefield) 1/1])) +auto=teach(creature) transforms((,newability[aslongas(plains|myBattlefield) 1/1])) +auto=teach(creature) transforms((,newability[aslongas(island|myBattlefield) 1/1])) +auto=teach(creature) transforms((,newability[aslongas(swamp|myBattlefield) 1/1])) text=Domain - Equipped creature gets +1/+1 for each basic land type among lands you control. -- Equip {3} mana={4} type=Artifact @@ -67904,7 +67904,7 @@ toughness=2 [card] name=Manriki-Gusari auto={1}:equip -auto=1/2 +auto=teach(creature) 1/2 auto=teach(creature) {T}:destroy target(equipment) text=Equipped creature gets +1/+2 and has "{T}: Destroy target Equipment." -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -68760,8 +68760,8 @@ toughness=1 [card] name=Mask of Avacyn auto={3}:equip -auto=opponentshroud -auto=1/2 +auto=teach(creature) opponentshroud +auto=teach(creature) 1/2 text=Equipped creature gets +1/+2 and has hexproof. -- Equip {3} mana={2} type=Artifact @@ -68807,7 +68807,7 @@ subtype=Equipment [card] name=Mask of Riddles auto={2}:equip -auto=fear +auto=teach(creature) fear auto=@combatdamaged(player) from(mytgt):may draw:1 controller text=Equipped creature has fear. (It can't be blocked except by artifact creatures and/or black creatures.) -- Whenever equipped creature deals combat damage to a player, you may draw a card. -- Equip {2} mana={U}{B} @@ -73107,7 +73107,7 @@ toughness=2 [card] name=Moonsilver Spear auto={4}:equip -auto=first strike +auto=teach(creature) first strike auto=@combat(attacking) source(mytgt):token(Angel,Angel Creature,4/4,white,flying) text=Equipped creature has first strike. -- Whenever equipped creature attacks, put a 4/4 white Angel creature token with flying onto the battlefield. -- Equip {4} mana={4} @@ -73461,7 +73461,7 @@ type=Instant [card] name=Mortarpod auto={2}:equip -auto=0/1 +auto=teach(creature) 0/1 auto=teach(creature) {S}:damage:1 target(creature,player) auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +0/+1 and has "Sacrifice this creature: This creature deals 1 damage to target creature or player." -- Equip {2} @@ -74083,7 +74083,7 @@ toughness=4 [card] name=Murderer's Axe auto={D(*|myhand)}:equip -auto=2/2 +auto=teach(creature) 2/2 text=Equipped creature gets +2/+2. -- Equip—Discard a card. mana={4} type=Artifact @@ -75688,8 +75688,8 @@ toughness=1 [card] name=Necropouncer auto={2}:equip -auto=3/1 -auto=haste +auto=teach(creature) 3/1 +auto=teach(creature) haste auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +3/+1 and has haste. -- Equip {2} mana={6} @@ -75888,7 +75888,7 @@ toughness=5 [card] name=Nemesis Mask auto={3}:equip -auto=lure +auto=teach(creature) lure text=All creatures able to block equipped creature do so. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={3} type=Artifact @@ -76159,7 +76159,7 @@ toughness=1 [card] name=Neurok Hoversail auto={2}:equip -auto=flying +auto=teach(creature) flying text=Equipped creature has flying. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={1} type=Artifact @@ -76582,7 +76582,7 @@ type=Sorcery [card] name=Nightmare Lash auto={L:3}:equip -auto=foreach(swamp|myBattlefield) 1/1 +auto=teach(creature) type:swamp:mybattlefield/type:swamp:mybattlefield nonstatic text=Equipped creature gets +1/+1 for each Swamp you control. -- Equip - Pay 3 life. (Pay 3 life: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={4} type=Artifact @@ -77298,8 +77298,8 @@ type=Instant [card] name=No-Dachi auto={3}:equip -auto=2/0 -auto=first strike +auto=teach(creature) 2/0 +auto=teach(creature) first strike text=Equipped creature gets +2/+0 and has first strike. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -78699,7 +78699,7 @@ toughness=3 [card] name=Ogre's Cleaver auto={5}:equip -auto=5/0 +auto=teach(creature) 5/0 text=Equipped creature gets +5/+0. -- Equip {5} mana={2} type=Artifact @@ -78936,7 +78936,7 @@ type=Enchantment [/card] [card] name=O-Naginata -auto={2}:equip target(creature[power >=3]|mybattlefield) +auto={2}:equip target(creature[power>=3]|mybattlefield) auto=teach(creature) 3/0 auto=teach(creature) trample text=O-Naginata can be attached only to a creature with 3 or more power. -- Equipped creature gets +3/+0 and has trample. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) @@ -81797,7 +81797,7 @@ type=Enchantment [card] name=Pennon Blade auto={4}:equip -auto=foreach(creature|mybattlefield) 1/1 +auto=teach(creature) type:creature:mybattlefield/type:creature:mybattlefield nonstatic text=Equipped creature gets +1/+1 for each creature you control. -- Equip {4} mana={3} type=Artifact @@ -81944,9 +81944,9 @@ toughness=4 [card] name=Peregrine Mask auto={2}:equip -auto=defender -auto=first strike -auto=flying +auto=teach(creature) defender +auto=teach(creature) first strike +auto=teach(creature) flying text=Equipped creature has defender, flying, and first strike. -- Equip {2} mana={1} type=Artifact @@ -91575,7 +91575,7 @@ toughness=2 name=Ring of Evos Isle auto={1}:equip autoskill={2}:opponentshroud ueot -auto=@each my upkeep:if cantargetcard(creature[blue]) then counter(1/1,1) +auto=teach(creature[blue]) transforms((,newability[@each my upkeep:counter(1/1.1)])) text={2}: Equipped creature gains hexproof until end of turn. (It can't be the target of spells or abilities your opponents control.) -- At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's blue. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -91592,8 +91592,8 @@ type=Artifact [card] name=Ring of Kalonia auto={1}:equip -auto=trample -auto=@each my upkeep:if cantargetcard(creature[green]) then counter(1/1,1) +auto=teach(creature) trample +auto=teach(creature[green]) transforms((,newability[@each my upkeep:counter(1/1.1)])) text=Equipped creature has trample. (If it would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.) -- At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's green. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -91617,8 +91617,8 @@ type=Artifact [card] name=Ring of Thune auto={1}:equip -auto=vigilance -auto=@each my upkeep:if cantargetcard(creature[white]) then counter(1/1,1) +auto=teach(creature) vigilance +auto=teach(creature[white]) transforms((,newability[@each my upkeep:counter(1/1.1)])) text=Equipped creature has vigilance. (Attacking doesn't cause it to tap.) -- At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's white. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -91627,8 +91627,8 @@ subtype=Equipment [card] name=Ring of Valkas auto={1}:equip -auto=haste -auto=@each my upkeep:if cantargetcard(creature[red]) then counter(1/1,1) +auto=teach(creature) haste +auto=teach(creature[red]) transforms((,newability[@each my upkeep:counter(1/1.1)])) text=Equipped creature has haste. (It can attack and {T} no matter when it came under your control.) -- At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's red. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -91638,7 +91638,7 @@ subtype=Equipment name=Ring of Xathrid auto={1}:equip autoskill={2}:regenerate -auto=@each my upkeep:if cantargetcard(creature[black]) then counter(1/1,1) +auto=teach(creature[black]) transforms((,newability[@each my upkeep:counter(1/1.1)])) text={2}: Regenerate equipped creature. (The next time that creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) -- At the beginning of your upkeep, put a +1/+1 counter on equipped creature if it's black. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -91674,7 +91674,7 @@ toughness=3 [card] name=Riot Gear auto={2}:equip -auto=1/2 +auto=teach(creature) 1/2 text=Equipped creature gets +1/+2. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -92647,7 +92647,7 @@ toughness=2 [card] name=Ronin Warclub auto=@movedto(creature|myBattlefield):all(trigger[to]) rehook -auto=+2/+1 +auto=teach(creature) 2/1 text=Equipped creature gets +2/+1. -- Whenever a creature enters the battlefield under your control, attach Ronin Warclub to that creature. -- Equip {5} ({5}: Attach to target creature you control. Equip only as a sorcery.) mana={3} auto={5}:equip @@ -93496,7 +93496,7 @@ toughness=2 [card] name=Runechanter's Pike auto={2}:equip -auto=first strike +auto=teach(creature) first strike auto=teach(creature) type:*[instant]:mygraveyard/0 nonstatic auto=teach(creature) type:*[sorcery]:mygraveyard/0 nonstatic text=Equipped creature has first strike and gets +X/+0 where X is the number of instant and sorcery cards in your graveyard. -- Equip {2} @@ -94412,7 +94412,7 @@ toughness=6 [card] name=Sai of the Shinobi auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=@movedto(creature|mybattlefield):may all(trigger[to]) rehook text=Equipped creature gets +1/+1. -- Whenever a creature enters the battlefield under your control, you may attach Sai of the Shinobi to it. -- Equip {2} mana={1} @@ -96775,7 +96775,7 @@ toughness=3 [card] name=Scrounged Scythe auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=teach(human) menace text=Equipped creature gets +1/+1. -- As long as equipped creature is a Human, it has menace. (It can't be blocked except by two or more creatures.) -- Equip {2} type=Artifact @@ -99378,7 +99378,7 @@ toughness=3 [card] name=Shard of Broken Glass auto={1}:equip -auto=1/0 +auto=teach(creature) 1/0 auto=@combat(attacking) source(mytgt):may deplete:2 controller text=Equipped creature gets +1/+0. -- Whenever equipped creature attacks, you may put the top two cards of your library into your graveyard. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={1} @@ -99442,7 +99442,7 @@ type=Enchantment [card] name=Sharpened Pitchfork auto={1}:equip -auto=first strike +auto=teach(creature) first strike auto=teach(human) 1/1 text=Equipped creature has first strike. -- As long as equipped creature is a Human, it gets +1/+1. -- Equip {1} mana={2} @@ -99759,8 +99759,8 @@ subtype=Aura [card] name=Shield of the Righteous auto={2}:equip -auto=0/2 -auto=vigilance +auto=teach(creature) 0/2 +auto=teach(creature) vigilance auto=@combat(blocking) source(mytgt) from(creature):all(trigger[from]) frozen text=Equipped creature gets +0/+2 and has vigilance. -- Whenever equipped creature blocks a creature, that creature doesn't untap during its controller's next untap step. -- Equip {2} mana={W}{U} @@ -100710,7 +100710,7 @@ toughness=2 [card] name=Shuko auto={0}:equip -auto=1/0 +auto=teach(creature) 1/0 text=Equipped creature gets +1/+0. -- Equip {0} ({0}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -100810,7 +100810,7 @@ toughness=1 [card] name=Sickleslicer auto={4}:equip -auto=2/2 +auto=teach(creature) 2/2 auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +2/+2. -- Equip {4} mana={3} @@ -101621,7 +101621,7 @@ toughness=1 [card] name=Silver-Inlaid Dagger auto={2}:equip -auto=2/0 +auto=teach(creature) 2/0 auto=teach(human) 1/0 text=Equipped creature gets +2/+0 -- As long as equipped creature is a Human, it gets and additional +1/+0. -- Equip {2} mana={1} @@ -101642,7 +101642,7 @@ toughness=5 [card] name=Silverskin Armor auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=teach(creature) transforms((artifact)) text=Equipped creature gets +1/+1 and is an artifact in addition to its other types. -- Equip {2} mana={2} @@ -102350,8 +102350,8 @@ toughness=1 [card] name=Skinwing auto={4}:equip -auto=2/2 -auto=flying +auto=teach(creature) 2/2 +auto=teach(creature) flying auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +2/+2 and has flying. -- Equip {4} mana={4} @@ -102703,7 +102703,7 @@ type=Artifact [/card] [card] name=Skullclamp -auto=1/-1 +auto=teach(creature) 1/-1 auto=@movedto(graveyard) from(mytgt|battlefield):draw:2 controller auto={1}:equip text=Equipped creature gets +1/-1. -- When equipped creature is put into a graveyard, draw two cards. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) @@ -102852,8 +102852,8 @@ type=Enchantment [card] name=Skyblinder Staff auto={3}:equip -auto=1/0 -auto=cantbeblockedby(creature[flying]) +auto=teach(creature) 1/0 +auto=teach(creature) cantbeblockedby(creature[flying]) text=Equipped creature gets +1/+0 and can't be blocked by creatures with flying. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -103384,7 +103384,7 @@ type=Sorcery [card] name=Slagwurm Armor auto={3}:equip -auto=0/6 +auto=teach(creature) 0/6 text=Equipped creature gets +0/+6. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={1} type=Artifact @@ -103522,8 +103522,8 @@ toughness=2 [card] name=Slayer's Plate auto={3}:equip -auto=4/2 -auto=@movedto(mytgt[human]|mygraveyard):token(Spirit,creature Spirit,1/1,white,flying) +auto=teach(creature) 4/2 +auto=teach(human) transforms((,newability[@movedTo(this|graveyard) from(battlefield):makecardt(Spirit:Creature Spirit:1/1:white:flying)])) text=Equipped creature gets +4/+2. -- Whenever equipped creature dies, if it was a Human, put a 1/1 white Spirit creature token with flying onto the battlefield. -- Equip {3} mana={3} type=Artifact @@ -105908,7 +105908,7 @@ toughness=3 [/card] [card] name=Sparring Collar -auto=first strike +auto=teach(creature) first strike auto={R}{R}:name(attach) rehook target(creature|mybattlefield) auto={1}:equip text=Equipped creature has first strike. -- {R}{R}: Attach Sparring Collar to target creature you control. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) @@ -106076,7 +106076,7 @@ toughness=6 [card] name=Specter's Shroud auto={1}:equip -auto=1/0 +auto=teach(creature) 1/0 auto=@combatdamaged(player) from(mytgt):ability$!name(discard) target(*|myhand) reject!$ opponent text=Equipped creature gets +1/+0. -- Whenever equipped creature deals combat damage to a player, that player discards a card. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={2} @@ -106568,8 +106568,8 @@ type=Enchantment [card] name=Spidersilk Net auto={2}:equip -auto=reach -auto=0/2 +auto=teach(creature) reach +auto=teach(creature) 0/2 text=Equipped creature gets +0/+2 and has reach. (It can block creatures with flying.) -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={0} type=Artifact @@ -109146,14 +109146,6 @@ power=1 toughness=2 [/card] [card] -name=Stitcher's Graft -auto={2}:equip -text=Equipped creature gets +3/+3. -- Whenever equipped creature attacks, it doesn't untap during its controller's next untap step. -- Whenever Stitcher's Graft becomes unattached from a permanent, sacrifice that permanent. -- Equip {2} -mana={1} -type=Artifact -subtype=Equipment -[/card] -[card] name=Stitchwing Skaab abilities=flying auto={1}{U}{D(*|myhand)}{D(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! @@ -109805,7 +109797,7 @@ toughness=3 [card] name=Stormrider Rig auto={2}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=@movedto(creature|mybattlefield):may all(trigger[to]) rehook text=Equipped creature gets +1/+1. -- Whenever a creature enters the battlefield under your control, you may attach Stormrider Rig to it. -- Equip {2} mana={2} @@ -109924,8 +109916,8 @@ subtype=Aura [card] name=Strandwalker auto={4}:equip -auto=2/4 -auto=reach +auto=teach(creature) 2/4 +auto=teach(creature) reach auto=livingweapontoken(Germ,Creature Germ,0/0,black) text=Living weapon (When this Equipment enters the battlefield, put a 0/0 black Germ creature token onto the battlefield, then attach this to it.) -- Equipped creature gets +2/+4 and has reach. -- Equip {4} mana={5} @@ -110201,8 +110193,8 @@ subtype=Aura [card] name=Strider Harness auto={1}:equip -auto=1/1 -auto=haste +auto=teach(creature) 1/1 +auto=teach(creature) haste text=Equipped creature gets +1/+1 and has haste. -- Equip {1} mana={3} type=Artifact @@ -111160,7 +111152,7 @@ toughness=1 [card] name=Sunforger auto={3}:equip -auto=4/0 +auto=teach(creature) 4/0 auto=teach(creature) {unattach}{R}{W}:castcard(restricted) notatarget(instant[red;white;manacost<=4]|mylibrary) text=Equipped creature gets +4/+0. -- {R}{W}, Unattach Sunforger: Search your library for a red or white instant card with converted mana cost 4 or less and cast that card without paying its mana cost. Then shuffle your library. -- Equip {3} mana={3} @@ -112136,7 +112128,7 @@ name=Sword of Body and Mind auto={2}:equip auto=teach(creature) protection from green auto=teach(creature) protection from blue -auto=2/2 +auto=teach(creature) 2/2 auto=@combatdamaged(player) from(mytgt):token(Wolf,Creature Wolf,2/2,green) auto=@combatdamaged(player) from(mytgt):deplete:10 opponent text=Equipped creature gets +2/+2 and has protection from green and from blue. -- Whenever equipped creature deals combat damage to a player, you put a 2/2 green Wolf creature token onto the battlefield and that player puts the top ten cards of his or her library into his or her graveyard. -- Equip {2} @@ -112146,7 +112138,7 @@ subtype=Equipment [/card] [card] name=Sword of Feast and Famine -auto=2/2 +auto=teach(creature) 2/2 auto=teach(creature) protection from black auto=teach(creature) protection from green auto=@combatdamaged(player) from(mytgt):ability$!name(discard) target(*|myhand) reject!$ opponent @@ -112162,7 +112154,7 @@ name=Sword of Fire and Ice auto={2}:equip auto=teach(creature) protection from red auto=teach(creature) protection from blue -auto=2/2 +auto=teach(creature) 2/2 auto=@combatdamaged(player) from(mytgt):draw:1 controller auto=@combatdamaged(player) from(mytgt):damage:2 target(creature,player) text=Equipped creature gets +2/+2 and has protection from red and from blue. -- Whenever equipped creature deals combat damage to a player, Sword of Fire and Ice deals 2 damage to target creature or player and you draw a card. -- Equip {2} @@ -112173,7 +112165,7 @@ subtype=Equipment [card] name=Sword of Kaldra auto={4}:equip -auto=5/5 +auto=teach(creature) 5/5 auto=@damaged(creature) from(mytgt):all(trigger[to]) moveto(exile) text=Equipped creature gets +5/+5. -- Whenever equipped creature deals damage to a creature, exile that creature. -- Equip {4} ({4}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={4} @@ -112185,7 +112177,7 @@ name=Sword of Light and Shadow auto={2}:equip auto=teach(creature) protection from white auto=teach(creature) protection from black -auto=2/2 +auto=teach(creature) 2/2 auto=@combatdamaged(player) from(mytgt):life:3 auto=@combatdamaged(player) from(mytgt):may moveTo(myhand) target(creature|mygraveyard) text=Equipped creature gets +2/+2 and has protection from white and from black. -- Whenever equipped creature deals combat damage to a player, you gain 3 life and you may return up to one target creature card from your graveyard to your hand. -- Equip {2} @@ -112213,7 +112205,7 @@ type=Legendary Artifact [card] name=Sword of the Meek auto={2}:equip -auto=1/2 +auto=teach(creature) 1/2 autograveyard=@movedto(creature[power=1;toughness=1]|mybattlefield):may all(trigger[to]) rehook text=Equipped creature gets +1/+2. -- Equip {2} -- Whenever a 1/1 creature enters the battlefield under your control, you may return Sword of the Meek from your graveyard to the battlefield, then attach it to that creature. mana={2} @@ -112235,11 +112227,11 @@ subtype=Equipment [card] name=Sword of Vengeance auto={3}:equip -auto=2/0 -auto=first strike -auto=vigilance -auto=trample -auto=haste +auto=teach(creature) 2/0 +auto=teach(creature) first strike +auto=teach(creature) vigilance +auto=teach(creature) trample +auto=teach(creature) haste text=Equipped creature gets +2/+0 and has first strike, vigilance, trample, and haste. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) mana={3} type=Artifact @@ -112250,7 +112242,7 @@ name=Sword of War and Peace auto={2}:equip auto=teach(creature) protection from red auto=teach(creature) protection from white -auto=2/2 +auto=teach(creature) 2/2 auto=@combatdamaged(player) from(mytgt):damage:ohandcount opponent auto=@combatdamaged(player) from(mytgt):life:phandcount controller text=Equipped creature gets +2/+2 and has protection from red and from white. -- Whenever equipped creature deals combat damage to a player, Sword of War and Peace deals damage to that player equal to the number of cards in his or her hand and you gain 1 life for each card in your hand. -- Equip {2} @@ -112457,7 +112449,7 @@ toughness=1 [/card] [card] name=Sylvok Lifestaff -auto=1/0 +auto=teach(creature) 1/0 auto=@movedTo(mytgt|graveyard) from(battlefield):all(trigger[to]) life:3 controller text=Equipped creature gets +1/+0. -- Whenever equipped creature is put into a graveyard, you gain 3 life. -- Equip {1} mana={1} @@ -113485,7 +113477,7 @@ type=Sorcery [card] name=Tatsumasa, the Dragon's Fang auto={3}:equip -auto=5/5 +auto=teach(creature) 5/5 auto={6}:token(Dragon Spirit,Creature Dragon Spirit,5/5,flying,blue) && all(this) becomes(expelled) ueot && all(Dragon Spirit[token]) transforms((,newability[(blink)forsrc all(expelled|mybattlefield)])) forever text=Equipped creature gets +5/+5. -- {6}: Remove Tatsumasa, the Dragon's Fang from the game: Put a 5/5 blue Dragon Spirit token with flying into play. -- Return Tatsumasa, the Dragon's Fang to play under its owner's control when that token is put into a graveyard. mana={6} @@ -114441,7 +114433,7 @@ toughness=4 [card] name=Tenza, Godo's Maul auto={1}:equip -auto=1/1 +auto=teach(creature) 1/1 auto=teach(creature[legendary]) 2/2 auto=teach(creature[red]) trample text=Equipped creature gets +1/+1. As long as it's legendary, it gets an additional +2/+2. As long as it's red, it has trample. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) @@ -117849,8 +117841,8 @@ toughness=2 [card] name=Tormentor's Trident auto={3}:equip -auto=3/0 -auto=mustattack +auto=teach(creature) 3/0 +auto=teach(creature) mustattack text=Equipped creature gets +3/+0 and attacks each turn if able. -- Equip {3} mana={2} type=Artifact @@ -119745,8 +119737,8 @@ type=Enchantment [card] name=True-Faith Censer auto={2}:equip -auto=1/1 -auto=vigilance +auto=teach(creature) 1/1 +auto=teach(creature) vigilance auto=teach(human) 1/0 text=Equipped creature gets +1/+1 and has vigilance. -- As long as equipped creature is a Human, it gets an additional +1/+0. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={2} @@ -119797,7 +119789,7 @@ toughness=2 [card] name=Trusty Machete auto={2}:equip -auto=2/1 +auto=teach(creature) 2/1 text=Equipped creature gets +2/+1. -- Equip {2} mana={1} type=Artifact @@ -121370,8 +121362,8 @@ toughness=1 [card] name=Unscythe, Killer of Kings auto={2}:equip -auto=3/3 -auto=first strike +auto=teach(creature) 3/3 +auto=teach(creature) first strike auto=@vampired(creature) from(mytgt):may all(trigger[to]) moveTo(exile) && token(Zombie,Creature Zombie,2/2,black) text=Equipped creature gets +3/+3 and has first strike. -- Whenever a creature dealt damage by equipped creature this turn is put into a graveyard, you may exile that card. If you do, put a 2/2 black Zombie creature token onto the battlefield. -- Equip {2} mana={U}{B}{B}{R} @@ -124369,8 +124361,8 @@ toughness=1 [card] name=Viridian Claw auto={1}:equip -auto=1/0 -auto=first strike +auto=teach(creature) 1/0 +auto=teach(creature) first strike text=Equipped creature gets +1/+0 and has first strike. -- Equip {2} mana={2} type=Artifact @@ -125512,8 +125504,8 @@ toughness=6 [card] name=Vorrac Battlehorns auto={1}:equip -auto=trample -auto=oneblocker +auto=teach(creature) trample +auto=teach(creature) oneblocker text=Equipped creature has trample and can't be blocked by more than one creature. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={2} type=Artifact @@ -125676,7 +125668,7 @@ toughness=5 [card] name=Vulshok Battlegear auto={3}:equip -auto=3/3 +auto=teach(creature) 3/3 text=Equipped creature gets +3/+3. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={3} type=Artifact @@ -125706,8 +125698,8 @@ toughness=2 [card] name=Vulshok Gauntlets auto={3}:equip -auto=4/2 -auto=doesnotuntap +auto=teach(creature) 4/2 +auto=teach(creature) doesnotuntap text=Equipped creature gets +4/+2 and doesn't untap during its controller's untap step. -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) mana={2} type=Artifact @@ -125726,7 +125718,7 @@ toughness=2 [card] name=Vulshok Morningstar auto={2}:equip -auto=2/2 +auto=teach(creature) 2/2 text=Equipped creature gets +2/+2. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={2} type=Artifact @@ -126956,7 +126948,7 @@ type=Instant [card] name=Warlord's Axe auto={4}:equip -auto=3/1 +auto=teach(creature) 3/1 text=Equipped creature gets +3/+1. mana={3} type=Artifact @@ -126987,7 +126979,7 @@ toughness=5 [card] name=Warmonger's Chariot auto={3}:equip -auto=2/2 +auto=teach(creature) 2/2 auto=teach(creature[defender]) canattack text=Equipped creature gets +2/+2. -- As long as equipped creature has defender, it can attack as though it didn't have defender. -- Equip {3} mana={2} @@ -128402,7 +128394,7 @@ type=Instant [card] name=Whispersilk Cloak auto={2}:equip -auto=unblockable +auto=teach(creature) unblockable auto=teach(creature) shroud text=Equipped creature is unblockable. -- Equipped creature has shroud. (It can't be the target of spells or abilities.) -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery.) mana={3} @@ -130126,7 +130118,7 @@ type=Artifact [/card] [card] name=Wooden Stake -auto=1/0 +auto=teach(creature) 1/0 auto=@combat(blocking,blocked) source(mytgt) from(vampire):all(trigger[from]) bury auto={1}:equip text=Equipped creature gets +1/+0. -- Whenever equipped creature blocks or becomes blocked by a Vampire, destroy that creature. It can't be regenerated. -- Equip {1} From 1428eeba0662b8a0f1f5ee3f6d637de78dec9737 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 15:32:17 +0800 Subject: [PATCH 16/22] fix copier token image --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 4 +- projects/mtg/include/MTGCardInstance.h | 1 + projects/mtg/include/WResourceManager.h | 1 + projects/mtg/include/WResourceManagerImpl.h | 1 + projects/mtg/src/CardGui.cpp | 11 ++++++ projects/mtg/src/Damage.cpp | 1 + projects/mtg/src/GameObserver.cpp | 1 + projects/mtg/src/MTGAbility.cpp | 7 ++++ projects/mtg/src/MTGCardInstance.cpp | 1 + projects/mtg/src/WResourceManager.cpp | 40 ++++++++++++++++++++ 10 files changed, 66 insertions(+), 2 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index cd641fcf2..ce6dd5d65 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -906,7 +906,7 @@ type=Instant [card] name=Adventuring Gear auto={1}:equip -auto=teach(creature) transforms((,newability[@movedTo(land|myBattlefield):2/2])) +auto=teach(creature) transforms((,newability[@movedTo(land|myBattlefield):2/2 ueot])) text=Landfall - Whenever a land enters the battlefield under your control, equipped creature gets +2/+2 until end of turn. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -63590,7 +63590,7 @@ subtype=Swamp [card] name=Leering Emblem auto={2}:equip -auto=teach(creature) transforms((,newability[@movedTo(*|mystack):2/2])) +auto=teach(creature) transforms((,newability[@movedTo(*|mystack):2/2 ueot])) text=Whenever you cast a spell, equipped creature gets +2/+2 until end of turn. -- Equip {2} mana={2} type=Artifact diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 5fe7d6016..6d278cbf3 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -64,6 +64,7 @@ public: int equipment; int auras; bool wasDealtDamage; + bool combatdamageToOpponent; bool damageToOpponent; bool damageToController; bool damageToCreature; diff --git a/projects/mtg/include/WResourceManager.h b/projects/mtg/include/WResourceManager.h index 4abe05ed9..d7f44c2a0 100644 --- a/projects/mtg/include/WResourceManager.h +++ b/projects/mtg/include/WResourceManager.h @@ -80,6 +80,7 @@ public: } }; virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 0; + virtual JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0) = 0; virtual JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL, int id = 0) = 0; diff --git a/projects/mtg/include/WResourceManagerImpl.h b/projects/mtg/include/WResourceManagerImpl.h index d759f943f..05b18617c 100644 --- a/projects/mtg/include/WResourceManagerImpl.h +++ b/projects/mtg/include/WResourceManagerImpl.h @@ -141,6 +141,7 @@ public: bool IsThreaded(); JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL); + JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0); JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_LOCK, int submode = CACHE_NORMAL, int id = 0); diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index bd5cb850b..2859f7afc 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -148,6 +148,11 @@ void CardGui::Render() MTGCard * fcard = MTGCollection()->getCardByName(card->name); quad = game->getResourceManager()->RetrieveCard(fcard, CACHE_THUMB); } + if (game && card->hasCopiedToken && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(card->copiedID)); + quad = game->getResourceManager()->RetrieveCardToken(tcard, CACHE_THUMB, 1, abs(card->copiedID)); + } if (quad.get()) alternate = false; else @@ -1144,6 +1149,12 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); quad = WResourceManager::Instance()->RetrieveCard(fcard); } + if (kcard->getObserver() && kcard->hasCopiedToken && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); + quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) + : WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID)); + } if (quad.get()) { if (quad->mHeight < quad->mWidth) diff --git a/projects/mtg/src/Damage.cpp b/projects/mtg/src/Damage.cpp index 50b2b3f5d..597f746c9 100644 --- a/projects/mtg/src/Damage.cpp +++ b/projects/mtg/src/Damage.cpp @@ -261,6 +261,7 @@ int Damage::resolve() if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. { source->controller()->dealsdamagebycombat = 1; // for restriction check + ((MTGCardInstance*)source)->combatdamageToOpponent = true; //check vector values = MTGAllCards::getCreatureValuesById();//getting a weird crash here. rarely. for (size_t i = 0; i < values.size(); ++i) { diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index ba614275a..4a53fe34e 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -968,6 +968,7 @@ void GameObserver::gameStateBasedEffects() c->wasDealtDamage = false; c->damageToController = false; c->damageToOpponent = false; + c->combatdamageToOpponent = false; c->damageToCreature = false; c->isAttacking = NULL; } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index be533d78a..b12327e52 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -577,6 +577,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe if(card->didattacked) return 0; } + + check = restriction[i].find("didcombatdamagetofoe"); + if(check != string::npos) + { + if(!card->combatdamageToOpponent) + return 0; + } check = restriction[i].find("ownerscontrol"); if(check != string::npos) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 687a74dcd..4a061163b 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -218,6 +218,7 @@ void MTGCardInstance::initMTGCI() sunburst = 0; equipment = 0; auras = 0; + combatdamageToOpponent = false; damageToOpponent = false; damageToController = false; damageToCreature = false; diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index 46c51df68..3557e0dec 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -263,6 +263,46 @@ JQuadPtr ResourceManagerImpl::RetrieveCard(MTGCard * card, int style, int submod return JQuadPtr(); } +JQuadPtr ResourceManagerImpl::RetrieveCardToken(MTGCard * card, int style, int submode, int tId) +{ + //Cards are never, ever resource managed, so just check cache. + if (!card || options[Options::DISABLECARDS].number) return JQuadPtr(); + + submode = submode | TEXTURE_SUB_CARD; + + //static std::ostringstream filename; + //filename.str(""); + string filename; + filename.reserve(4096); + //filename << setlist[card->setId] << "/" << card->getImageName(); + filename.append(setlist[card->setId]); + filename.append("/"); + int id = -card->getMTGId(); + if(tId) + id = -tId; + ostringstream imagename; + imagename << "-" << id << "t.jpg"; + filename.append(imagename.str()); + + //Aliases. + if (style == RETRIEVE_THUMB) + { + submode = submode | TEXTURE_SUB_THUMB; + style = RETRIEVE_NORMAL; + } + + JQuadPtr jq = RetrieveQuad(filename, 0, 0, 0, 0, "", style, submode | TEXTURE_SUB_5551, id); + + lastError = textureWCache.mError; + if (jq) + { + jq->SetHotSpot(static_cast (jq->mTex->mWidth / 2), static_cast (jq->mTex->mHeight / 2)); + return jq; + } + + return JQuadPtr(); +} + int ResourceManagerImpl::AddQuadToManaged(const WManagedQuad& inQuad) { int id = mIDLookupMap.size(); From e239dc039bdd764165999838f1d4a998d7a22d3e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 18:33:04 +0800 Subject: [PATCH 17/22] fix phaseinfo/fakebar graphics it should look nice now.. :) --- projects/mtg/src/GuiPhaseBar.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/projects/mtg/src/GuiPhaseBar.cpp b/projects/mtg/src/GuiPhaseBar.cpp index 214001815..e7a34f3bb 100644 --- a/projects/mtg/src/GuiPhaseBar.cpp +++ b/projects/mtg/src/GuiPhaseBar.cpp @@ -151,12 +151,10 @@ void GuiPhaseBar::Render() sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str()); #if !defined (PSP) if(phaseinfo.get()) - { - - phaseinfo->mWidth = font->GetStringWidth(buf)+12.f; - phaseinfo->SetHotSpot(phaseinfo->mWidth -4, 0); - //phaseinfo->mHeight = font->GetHeight()+5.f; - JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),SCREEN_WIDTH_F,0,0,2.2f, SCREEN_HEIGHT_F / phaseinfo->mHeight); + {//fix phaseinfo graphics... should look nice now... + float testW = ((font->GetStringWidth(buf))*2) - SCREEN_WIDTH_F; + phaseinfo->SetHotSpot(testW+40.f, 0); + JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),0,0,0,SCREEN_WIDTH_F / phaseinfo->mWidth, SCREEN_HEIGHT_F / phaseinfo->mHeight); } #endif font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT); From 4f7901b946894842fe520ef80c272b7db240b8d0 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 21:01:45 +0800 Subject: [PATCH 18/22] minor refactor --- projects/mtg/src/GameObserver.cpp | 17 +++++++++-------- projects/mtg/src/MTGCardInstance.cpp | 8 ++++++-- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 4a53fe34e..c9a4d8978 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -714,19 +714,20 @@ void GameObserver::gameStateBasedEffects() ///set basic land mana objects canproduce for (size_t gg = 0; gg < mLayers->actionLayer()->manaObjects.size(); gg++) { - if (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])) && - (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->source->isLand() && - (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->source == card) + MTGAbility * aa = ((MTGAbility *) mLayers->actionLayer()->manaObjects[gg]); + //AManaProducer * amp = dynamic_cast (aa); + + if (dynamic_cast (aa) && (dynamic_cast (aa))->source->isLand() && (dynamic_cast (aa))->source == card) { - if (card->hasType("forest") && (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_GREEN)) + if (card->hasType("forest") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_GREEN)) card->canproduceG = 1; - if (card->hasType("island") && (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_BLUE)) + if (card->hasType("island") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_BLUE)) card->canproduceU = 1; - if (card->hasType("mountain") && (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_RED)) + if (card->hasType("mountain") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_RED)) card->canproduceR = 1; - if (card->hasType("swamp") && (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_BLACK)) + if (card->hasType("swamp") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_BLACK)) card->canproduceB = 1; - if (card->hasType("plains") && (dynamic_cast (((MTGAbility *) mLayers->actionLayer()->manaObjects[gg])))->output->hasColor(Constants::MTG_COLOR_WHITE)) + if (card->hasType("plains") && ((AManaProducer*)aa)->output->hasColor(Constants::MTG_COLOR_WHITE)) card->canproduceW = 1; } } diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 4a061163b..e3226c544 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -809,14 +809,18 @@ void MTGCardInstance::switchPT(bool apply) int MTGCardInstance::getCurrentPower() { - if(!isInPlay(observer)) + if(observer && !isCreature()) + return 0; + if(observer && !isInPlay(observer)) return LKIpower; return power; } int MTGCardInstance::getCurrentToughness() { - if(!isInPlay(observer)) + if(observer && !isCreature()) + return 0; + if(observer && !isInPlay(observer)) return LKItoughness; return toughness; } From 8507c0138d13897e94512cd2874780d1d1cd23ca Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 21:02:12 +0800 Subject: [PATCH 19/22] crash fix when loading collection and shop --- projects/mtg/src/CardGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 2859f7afc..08bb48643 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1149,7 +1149,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); quad = WResourceManager::Instance()->RetrieveCard(fcard); } - if (kcard->getObserver() && kcard->hasCopiedToken && !quad.get()) + if (kcard && kcard->hasCopiedToken) { MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) From 0159e0e41e43c8c5cd1f6288bf6f69463c1d6495 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 22:34:07 +0800 Subject: [PATCH 20/22] added some fixes --- .../bin/Res/sets/primitives/borderline.txt | 132 ++++++++++++++++++ projects/mtg/bin/Res/sets/primitives/mtg.txt | 34 +++-- projects/mtg/bin/Res/test/Living_Death.txt | 11 +- 3 files changed, 162 insertions(+), 15 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 20c5a30b4..618ce1ebb 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -1,5 +1,17 @@ grade=borderline [card] +name=Akiri, Line-Slinger +abilities=first strike,vigilance +auto=type:artifact:mybattlefield/0 nonstatic +#wagic don't support commander atm +text=First strike, vigilance -- Akiri, Line-Slinger gets +1/+0 for each artifact you control. -- Partner (You can have two commanders if both have partner.) +mana={R}{W} +type=Legendary Creature +subtype=Kor Soldier Ally +power=0 +toughness=3 +[/card] +[card] name=Angelic Field Marshal abilities=flying #wagic doesnt have commander zone @@ -68,6 +80,18 @@ mana={3}{U} type=Instant [/card] [card] +name=Bruse Tarl, Boorish Herder +#wagic don't support commander atm +auto=name(double strike & lifelink) target(creature|mybattlefield) transforms((,newability[double strike],newability[lifelink])) ueot +auto=@combat(attacking) source(this):name(double strike & lifelink) target(creature|mybattlefield) transforms((,newability[double strike],newability[lifelink])) ueot +text=Whenever Bruse Tarl, Boorish Herder enters the battlefield or attacks, target creature you control gains double strike and lifelink until end of turn. -- Partner (You can have two commanders if both have partner.) +mana={2}{R}{W} +type=Legendary Creature +subtype=Human Ally +power=3 +toughness=3 +[/card] +[card] name=Cemetery Puca text=Whenever a creature is put into a graveyard from the battlefield, you may pay {1}. If you do, Cemetery Puca becomes a copy of that creature and gains this ability. auto=@movedto(creature|graveyard) from(battlefield):all(trigger[from]) pay[[{1}]] copy @@ -266,6 +290,18 @@ text=Suspend 3 type=Sorcery [/card] [card] +name=Ikra Shidiqi, the Usurper +abilities=menace +#wagic don't support commander atm +auto=@combatdamaged(player) from(creature|mybattlefield):all(trigger[from]) dynamicability +text=Menace -- Whenever a creature you control deals combat damage to a player, you gain life equal to that creature's toughness. -- Partner (You can have two commanders if both have partner.) +mana={3}{B}{G} +type=Legendary Creature +subtype=Naga Wizard +power=3 +toughness=7 +[/card] +[card] name=Intellectual Offering #wagic only supports single opponent auto=draw:3 all(player) @@ -275,6 +311,18 @@ mana={4}{U} type=Instant [/card] [card] +name=Ishai, Ojutai Dragonspeaker +abilities=flying +#wagic don't support commander atm +auto=@movedto(*|opponentstack):counter(1/1,1) +text=Flying -- Whenever an opponent casts a spell, put a +1/+1 counter on Ishai, Ojutai Dragonspeaker. -- Partner (You can have two commanders if both have partner.) +mana={2}{W}{U} +type=Legendary Creature +subtype=Bird Monk +power=1 +toughness=1 +[/card] +[card] name=Ivy Seer auto={2}{G}{T}:foreach(*[green]|myhand) 1/1 target(creature) text={2}{G}, {T}: Reveal any number of green cards in your hand. Target creature gets +X/+X until end of turn, where X is the number of cards revealed this way. @@ -295,6 +343,41 @@ power=1 toughness=1 [/card] [card] +name=Kraum, Ludevic's Opus +abilities=flying,haste +#wagic don't support commander atm +auto=@movedto(*|opponentstack) restriction{thisturn(*|opponentstack)~equalto~1}:draw:1 controller +text=Flying, haste -- Whenever an opponent casts his or her second spell each turn, draw a card. -- Partner (You can have two commanders if both have partner.) +mana={3}{U}{R} +type=Legendary Creature +subtype=Zombie Horror +power=4 +toughness=4 +[/card] +[card] +name=Kydele, Chosen of Kruphix +#wagic don't support commander atm +auto={T}:thisforeach(variable{pdrewcount}>0) add{C} +text={T}: Add {C} to your mana pool for each card you've drawn this turn. -- Partner (You can have two commanders if both have partner.) +mana={2}{G}{U} +type=Legendary Creature +subtype=Human Wizard +power=2 +toughness=3 +[/card] +[card] +name=Ludevic, Necro-Alchemist +#wagic don't support commander atm +auto=@each my end restriction{compare(oplifelost)~morethan~0}:may draw:1 controller +auto=@each opponent end restriction{compare(oplifelost)~morethan~0}:may draw:1 controller +text=At the beginning of each player's end step, that player may draw a card if a player other than you lost life this turn. -- Partner (You can have two commanders if both have partner.) +mana={1}{U}{R} +type=Legendary Creature +subtype=Human Wizard +power=1 +toughness=4 +[/card] +[card] name=Maralen of the Mornsong auto=replacedraw ability$!name(skip draw) donothing!$ controller auto=opponentreplacedraw ability$!name(skip draw) donothing!$ opponent @@ -423,6 +506,19 @@ power=2 toughness=6 [/card] [card] +name=Ravos, Soultender +abilities=flying +#wagic don't support commander atm +auto=lord(other creature|mybattlefield) 1/1 +auto=@each my upkeep restriction{type(creature|mygraveyard)~morethan~0}:may target(creature|mygraveyard) moveto(myhand) +text=Flying -- Other creatures you control get +1/+1. -- At the beginning of your upkeep, you may return target creature card from your graveyard to your hand. -- Partner (You can have two commanders if both have partner.) +mana={3}{W}{B} +type=Legendary Creature +subtype=Human Cleric +power=2 +toughness=2 +[/card] +[card] name=Rayne, Academy Chancellor #missing parser for player/controller/opponent auto=this(auras >= 1) transforms((,newability[@targeted(*|mybattlefield) from(*|opponentzones):draw:2])) @@ -534,6 +630,30 @@ mana={3}{G} type=Sorcery [/card] [card] +name=Sidar Kondo of Jamuraa +abilities=flanking +#wagic don't support commander atm +auto=lord(creature[-flying;-reach]|opponentbattlefield) cantbeblockerof(creature[power<=2]) +text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- Creatures your opponents control without flying or reach can't block creatures with power 2 or less. -- Partner (You can have two commanders if both have partner.) +mana={2}{G}{W} +type=Legendary Creature +subtype=Human Knight +power=2 +toughness=5 +[/card] +[card] +name=Silas Renn, Seeker Adept +abilities=deathtouch +#wagic don't support commander atm +auto=@combatdamaged(player) from(this):target(artifact|mygraveyard) canplayfromgraveyard ueot +text=Deathtouch -- Whenever Silas Renn, Seeker Adept deals combat damage to a player, choose target artifact card in your graveyard. You may cast that card this turn. -- Partner (You can have two commanders if both have partner.) +mana={1}{U}{B} +type=Legendary Artifact Creature +subtype=Human +power=2 +toughness=2 +[/card] +[card] name=Silvergill Adept otherrestriction=type(*[merfolk]|myhand)~lessthan~2 other={4}{U} @@ -618,6 +738,18 @@ mana={X}{G} type=Sorcery [/card] [card] +name=Tana, the Bloodsower +abilities=trample +#wagic don't support commander atm +auto=@combatdamaged(player) from(this):makecardt(Saproling:Creature Saproling:1/1:green)*thatmuch +text=Trample -- Whenever Tana, the Bloodsower deals combat damage to a player, create that many 1/1 green Saproling creature tokens. -- Partner (You can have two commanders if both have partner.) +mana={2}{R}{G} +type=Legendary Creature +subtype=Elf Druid +power=2 +toughness=2 +[/card] +[card] name=Teferi, Mage of Zhalfir abilities=flash auto=lord(creature|mycastingzone) flash diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index ce6dd5d65..7e8ff0733 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -1,6 +1,6 @@ #Primitives Pack for Wagic the Homebrew. #Please keep these card alphabetized, and try to have the "name=" line at the top of each card -#I sorted this programatically so the other comments are removed except for AUTO_DEFINE - kevlahnota 9-5-2016 +#I sorted this programatically so the other comments are removed except for AUTO_DEFINE - kevlahnota 1-26-2017 [card] name=Abandon Reason target=creature @@ -12681,6 +12681,7 @@ toughness=1 [/card] [card] name=Boggart Harbinger +aicode=activate name(put on top) notatarget(goblin|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(goblin|mylibrary) optionone name(choose card) target(goblin|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Boggart Harbinger enters the battlefield, you may search your library for a Goblin card, reveal it, then shuffle your library and put that card on top of it. mana={2}{B} @@ -29916,7 +29917,7 @@ toughness=7 [card] name=Dragonlord Kolaghan abilities=flying,haste -auto=emblem transforms((,newability[aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot +auto=aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste >0 auto=@movedto(*[creature;planeswalker]|opponentstack):all(trigger[to]) transforms((,newability[if type(*[share!name!]|mygraveyard)~morethan~0 then life:-10 controller])) oneshot text=Flying, haste -- Other creatures you control have haste. -- Whenever an opponent casts a creature or planeswalker spell with the same name as a card in his or her graveyard, that player loses 10 life. mana={4}{B}{R} @@ -29928,7 +29929,7 @@ toughness=5 [card] name=Dragonlord Ojutai abilities=flying -auto=this(attacking) opponentshroud +auto=this(untapped) opponentshroud auto=@combatdamaged(player) from(this):name(look) reveal:3 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend text=Flying -- Dragonlord Ojutai has hexproof as long as it's untapped. -- Whenever Dragonlord Ojutai deals combat damage to a player, look at the top three cards of your library. Put one of them into your hand and the rest on the bottom of your library in any order. mana={3}{W}{U} @@ -33559,6 +33560,7 @@ toughness=1 [/card] [card] name=Elvish Harbinger +aicode=activate name(put on top) notatarget(elf|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(elf|mylibrary) optionone name(choose card) target(elf|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend auto={T}:Add{G} auto={T}:Add{W} @@ -34708,6 +34710,7 @@ toughness=2 [/card] [card] name=Enlightened Tutor +aicode=activate name(put on top) notatarget(*[artifact;enchantment]|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[artifact;enchantment]|mylibrary) optionone name(choose card) target(*[artifact;enchantment]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Search your library for an artifact or enchantment card and reveal that card. Shuffle your library, then put the card on top of it. mana={W} @@ -36837,6 +36840,7 @@ type=Land [card] name=Faerie Harbinger abilities=flash,flying +aicode=activate name(put on top) notatarget(faerie|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(faerie|mylibrary) optionone name(choose card) target(faerie|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Flash -- Flying -- When Faerie Harbinger enters the battlefield, you may search your library for a Faerie card, reveal it, then shuffle your library and put that card on top of it. mana={3}{U} @@ -39562,6 +39566,7 @@ toughness=2 [/card] [card] name=Flamekin Harbinger +aicode=activate name(put on top) notatarget(elemental|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(elemental|mylibrary) optionone name(choose card) target(elemental|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Flamekin Harbinger enters the battlefield, you may search your library for an Elemental card, reveal it, then shuffle your library and put that card on top of it. mana={R} @@ -44247,6 +44252,7 @@ type=Instant [/card] [card] name=Giant Harbinger +aicode=activate name(put on top) notatarget(giant|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(giant|mylibrary) optionone name(choose card) target(giant|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Giant Harbinger enters the battlefield, you may search your library for a Giant card, reveal it, then shuffle your library and put that card on top of it. mana={4}{R} @@ -60649,6 +60655,7 @@ toughness=1 [/card] [card] name=Kithkin Harbinger +aicode=activate name(put on top) notatarget(kithkin|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(kithkin|mylibrary) optionone name(choose card) target(kithkin|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Kithkin Harbinger enters the battlefield, you may search your library for a Kithkin card, reveal it, then shuffle your library and put that card on top of it. mana={2}{W} @@ -62351,7 +62358,7 @@ toughness=5 [card] name=Kuldotha Phoenix abilities=flying,haste -autograveyard=@each my upkeep:aslongas(artifact|mybattlefield) {4}:moveTo(myBattlefield) myUpkeepOnly >2 +autograveyard={4}:moveTo(myBattlefield) restriction{type(artifact|mybattlefield)~morethan~2,myupkeeponly} text=Flying, haste -- Metalcraft {4}: Return Kuldotha Phoenix from your graveyard to the battlefield. Activate this ability only during your upkeep and only if you control three or more artifacts. mana={2}{R}{R}{R} type=Creature @@ -65236,6 +65243,7 @@ toughness=2 [/card] [card] name=Loam Larva +aicode=activate name(put on top) notatarget(land[basic]|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(land[basic]|mylibrary) optionone name(choose card) target(land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Loam Larva enters the battlefield, you may search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. mana={1}{G} @@ -70123,6 +70131,7 @@ toughness=2 [card] name=Merrow Harbinger abilities=islandwalk +aicode=activate name(put on top) notatarget(merfolk|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[merfolk]|mylibrary) optionone name(choose card) target(*[merfolk]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Islandwalk -- When Merrow Harbinger enters the battlefield, you may search your library for a Merfolk card, reveal it, then shuffle your library and put that card on top of it. mana={3}{U} @@ -70980,7 +70989,7 @@ toughness=1 [/card] [card] name=Mindclaw Shaman -auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[instant;sorcery]|reveal) moveto(myexile) and!( becomes(tobecast) )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed all(tobecast|myexile) moveto(myexile) and!( activate castcard(normal) )! afterrevealedend revealend +auto=target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[instant;sorcery]|reveal) moveto(myexile) and!( becomes(tobecast) )! optiononeend optiontwo name(put in hand) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed all(tobecast|myexile) moveto(myexile) and!( activate castcard(normal) )! afterrevealedend revealend text=When Mindclaw Shaman enters the battlefield, target opponent reveals his or her hand. You may cast an instant or sorcery card from it without paying its mana cost. mana={4}{R} type=Creature @@ -74808,8 +74817,7 @@ toughness=4 [/card] [card] name=Mystical Teachings -auto=choice name(instant card) moveTo(myhand) target(instant|myLibrary) -auto=choice name(card with flash) moveTo(myhand) target(*[flash]|myLibrary) +auto=moveTo(myhand) notatarget(*[instant;flash]|myLibrary) flashback={5}{B} text=Search your library for an instant card or a card with flash, reveal it, and put it into your hand. Then shuffle your library. -- Flashback {5}{B} (You may cast this card from your graveyard for its flashback cost. Then exile it.) mana={3}{U} @@ -74817,6 +74825,7 @@ type=Instant [/card] [card] name=Mystical Tutor +aicode=activate name(put on top) notatarget(*[instant;sorcery]|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[instant;sorcery]|mylibrary) optionone name(choose card) target(*[instant;sorcery]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it. mana={U} @@ -79318,8 +79327,8 @@ toughness=2 [/card] [card] name=Open the Armory -target=aura,equipment|mylibrary -auto=moveto(myhand) +aicode=activate notatarget(*[aura;equipment]|mylibrary) moveTo(ownerhand) +auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[aura;equipment]|mylibrary) optionone name(choose card) target(*[aura;equipment]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend revealend text=Search your library for an Aura or Equipment card, reveal it, and put it into your hand. Then shuffle your library. mana={1}{W} type=Sorcery @@ -82104,6 +82113,7 @@ type=Enchantment [/card] [card] name=Personal Tutor +aicode=activate name(put on top) notatarget(sorcery|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(sorcery|mylibrary) optionone name(choose card) target(sorcery|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Search your library for a sorcery card and reveal that card. Shuffle your library, then put the card on top of it. mana={U} @@ -108908,6 +108918,7 @@ toughness=1 [card] name=Sterling Grove auto=lord(other enchantment|mybattlefield) shroud +aicode=activate name(put on top) notatarget(enchantment|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto={1}{S}:name(search enchantment) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(enchantment|mylibrary) optionone name(choose card) target(enchantment|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Other enchantments you control have shroud. (They can't be the targets of spells or abilities.) -- {1}, Sacrifice Sterling Grove: Search your library for an enchantment card and reveal that card. Shuffle your library, then put the card on top of it. mana={G}{W} @@ -112418,6 +112429,7 @@ type=Sorcery [/card] [card] name=Sylvan Tutor +aicode=activate name(put on top) notatarget(creature|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature|mylibrary) optionone name(choose card) target(creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it. mana={G} @@ -118974,6 +118986,7 @@ type=Artifact Land [/card] [card] name=Treefolk Harbinger +aicode=activate name(put on top) notatarget(*[treefolk;forest]|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[treefolk;forest]|mylibrary) optionone name(choose card) target(*[treefolk;forest]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Treefolk Harbinger enters the battlefield, you may search your library for a Treefolk or Forest card, reveal it, then shuffle your library and put that card on top of it. mana={G} @@ -129737,7 +129750,7 @@ type=Instant [card] name=Withering Gaze target=opponent -aicode=draw:type:*[forest;green]:targetedpersonshand +aicode=activate draw:type:*[forest;green]:targetedpersonshand auto=Reveal:type:*:opponenthand revealzone(opponenthand) revealtype(*|opponenthand) optionone choice name(Get Bonus) foreach(forest|reveal) draw:1 && foreach(*[green]|reveal) draw:1 optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend text=Target opponent reveals his or her hand. You draw a card for each Forest and green card in it. mana={2}{U} @@ -130421,6 +130434,7 @@ type=Instant [/card] [card] name=Worldly Tutor +aicode=activate name(put on top) notatarget(creature|mylibrary) moveTo(ownerexile) and!(moveto(ownerlibrary))! auto=Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(creature|mylibrary) optionone name(choose card) target(creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=Search your library for a creature card and reveal that card. Shuffle your library, then put the revealed card back on top of it. mana={G} diff --git a/projects/mtg/bin/Res/test/Living_Death.txt b/projects/mtg/bin/Res/test/Living_Death.txt index 08df0f185..b30a0612d 100644 --- a/projects/mtg/bin/Res/test/Living_Death.txt +++ b/projects/mtg/bin/Res/test/Living_Death.txt @@ -2,7 +2,8 @@ [INIT] FIRSTMAIN [PLAYER1] -graveyard:109684, Dragonlord Kolaghan, 370622 +inplay:Mirror Gallery +graveyard:Krosan Cloudscraper, Dragonlord Kolaghan, Clone hand:Living Death manapool:{2}{B}{B}{B} [PLAYER2] @@ -15,8 +16,8 @@ choice 0 next #attack next -370622 -109684 +Clone +Krosan Cloudscraper #block next #damage @@ -26,8 +27,8 @@ eot [ASSERT] UNTAP [PLAYER1] -inplay:109684, 370622 -graveyard:Dragonlord Kolaghan, Living Death +inplay:Krosan Cloudscraper, Dragonlord Kolaghan, Clone, Mirror Gallery +graveyard:Living Death [PLAYER2] life:1 [END] \ No newline at end of file From ad6c48688d6483e8076ab6a465038b12ccb59815 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 23:18:34 +0800 Subject: [PATCH 21/22] Added C16 set --- projects/mtg/bin/Res/sets/C16/_cards.dat | 1761 ++++++++++++++++++++++ 1 file changed, 1761 insertions(+) create mode 100644 projects/mtg/bin/Res/sets/C16/_cards.dat diff --git a/projects/mtg/bin/Res/sets/C16/_cards.dat b/projects/mtg/bin/Res/sets/C16/_cards.dat new file mode 100644 index 000000000..ccbd65bd1 --- /dev/null +++ b/projects/mtg/bin/Res/sets/C16/_cards.dat @@ -0,0 +1,1761 @@ +[meta] +author=Wagic Team +name=Commander 2016 +year=2016 +total=351 +[/meta] +[card] +primitive=Abzan Charm +id=420794 +rarity=U +[/card] +[card] +primitive=Abzan Falconer +id=420674 +rarity=U +[/card] +[card] +primitive=Academy Elite +id=420698 +rarity=R +[/card] +[card] +primitive=Aeon Chronicler +id=420699 +rarity=R +[/card] +[card] +primitive=Akiri, Line-Slinger +id=420643 +rarity=R +[/card] +[card] +primitive=Akroan Horse +id=420858 +rarity=R +[/card] +[card] +primitive=Alesha, Who Smiles at Death +id=420736 +rarity=R +[/card] +[card] +primitive=Ancient Excavation +id=420644 +rarity=U +[/card] +[card] +primitive=Ankle Shanker +id=420795 +rarity=R +[/card] +[card] +primitive=Arcane Denial +id=420700 +rarity=C +[/card] +[card] +primitive=Arcane Sanctum +id=420898 +rarity=U +[/card] +[card] +primitive=Armory Automaton +id=420668 +rarity=R +[/card] +[card] +primitive=Army of the Damned +id=420722 +rarity=M +[/card] +[card] +primitive=Artifact Mutation +id=420796 +rarity=R +[/card] +[card] +primitive=Ash Barrens +id=420673 +rarity=C +[/card] +[card] +primitive=Assault Suit +id=420859 +rarity=U +[/card] +[card] +primitive=Astral Cornucopia +id=420860 +rarity=R +[/card] +[card] +primitive=Atraxa, Praetors' Voice +id=420645 +rarity=M +[/card] +[card] +primitive=Aura Mutation +id=420797 +rarity=R +[/card] +[card] +primitive=Azorius Chancery +id=420899 +rarity=U +[/card] +[card] +primitive=Baleful Strix +id=420798 +rarity=U +[/card] +[card] +primitive=Bane of the Living +id=420723 +rarity=R +[/card] +[card] +primitive=Beacon of Unrest +id=420724 +rarity=R +[/card] +[card] +primitive=Beast Within +id=420758 +rarity=U +[/card] +[card] +primitive=Beastmaster Ascension +id=420759 +rarity=R +[/card] +[card] +primitive=Benefactor's Draught +id=420638 +rarity=R +[/card] +[card] +primitive=Bituminous Blast +id=420799 +rarity=U +[/card] +[card] +primitive=Blasphemous Act +id=420737 +rarity=R +[/card] +[card] +primitive=Blazing Archon +id=420675 +rarity=R +[/card] +[card] +primitive=Blind Obedience +id=420676 +rarity=R +[/card] +[card] +primitive=Blinkmoth Urn +id=420861 +rarity=R +[/card] +[card] +primitive=Blood Tyrant +id=420800 +rarity=R +[/card] +[card] +primitive=Bloodbraid Elf +id=420801 +rarity=U +[/card] +[card] +primitive=Bonehoard +id=420862 +rarity=R +[/card] +[card] +primitive=Boompile +id=420669 +rarity=R +[/card] +[card] +primitive=Boros Charm +id=420802 +rarity=U +[/card] +[card] +primitive=Boros Garrison +id=420900 +rarity=U +[/card] +[card] +primitive=Brave the Sands +id=420677 +rarity=U +[/card] +[card] +primitive=Breath of Fury +id=420738 +rarity=R +[/card] +[card] +primitive=Bred for the Hunt +id=420803 +rarity=U +[/card] +[card] +primitive=Breya, Etherium Shaper +id=420646 +rarity=M +[/card] +[card] +primitive=Bruse Tarl, Boorish Herder +id=420647 +rarity=M +[/card] +[card] +primitive=Brutal Hordechief +id=420725 +rarity=M +[/card] +[card] +primitive=Burgeoning +id=420760 +rarity=R +[/card] +[card] +primitive=Buried Ruin +id=420901 +rarity=U +[/card] +[card] +primitive=Cathars' Crusade +id=420678 +rarity=R +[/card] +[card] +primitive=Cauldron of Souls +id=420863 +rarity=R +[/card] +[card] +primitive=Caves of Koilos +id=420902 +rarity=R +[/card] +[card] +primitive=Chain of Vapor +id=420701 +rarity=U +[/card] +[card] +primitive=Champion of Lambholt +id=420761 +rarity=R +[/card] +[card] +primitive=Chaos Warp +id=420739 +rarity=R +[/card] +[card] +primitive=Charging Cinderhorn +id=420633 +rarity=R +[/card] +[card] +primitive=Chasm Skulker +id=420702 +rarity=R +[/card] +[card] +primitive=Chief Engineer +id=420703 +rarity=R +[/card] +[card] +primitive=Chromatic Lantern +id=420864 +rarity=R +[/card] +[card] +primitive=Citadel Siege +id=420679 +rarity=R +[/card] +[card] +primitive=Clan Defiance +id=420804 +rarity=R +[/card] +[card] +primitive=Coastal Breach +id=420623 +rarity=R +[/card] +[card] +primitive=Coiling Oracle +id=420805 +rarity=C +[/card] +[card] +primitive=Collective Voyage +id=420762 +rarity=R +[/card] +[card] +primitive=Command Tower +id=420903 +rarity=C +[/card] +[card] +primitive=Commander's Sphere +id=420865 +rarity=C +[/card] +[card] +primitive=Conqueror's Flail +id=420670 +rarity=R +[/card] +[card] +primitive=Consuming Aberration +id=420806 +rarity=R +[/card] +[card] +primitive=Corpsejack Menace +id=420807 +rarity=R +[/card] +[card] +primitive=Crackling Doom +id=420808 +rarity=R +[/card] +[card] +primitive=Cranial Plating +id=420866 +rarity=U +[/card] +[card] +primitive=Cruel Entertainment +id=420628 +rarity=R +[/card] +[card] +primitive=Crumbling Necropolis +id=420904 +rarity=U +[/card] +[card] +primitive=Crystalline Crawler +id=420671 +rarity=R +[/card] +[card] +primitive=Cultivate +id=420763 +rarity=C +[/card] +[card] +primitive=Curse of Vengeance +id=420629 +rarity=R +[/card] +[card] +primitive=Curtains' Call +id=420630 +rarity=R +[/card] +[card] +primitive=Custodi Soulbinders +id=420680 +rarity=R +[/card] +[card] +primitive=Daretti, Scrap Savant +id=420740 +rarity=M +[/card] +[card] +primitive=Darksteel Citadel +id=420905 +rarity=U +[/card] +[card] +primitive=Darksteel Ingot +id=420867 +rarity=U +[/card] +[card] +primitive=Darkwater Catacombs +id=420906 +rarity=R +[/card] +[card] +primitive=Dauntless Escort +id=420809 +rarity=R +[/card] +[card] +primitive=Decimate +id=420810 +rarity=R +[/card] +[card] +primitive=Deepglow Skate +id=420624 +rarity=R +[/card] +[card] +primitive=Den Protector +id=420764 +rarity=R +[/card] +[card] +primitive=Devastation Tide +id=420704 +rarity=R +[/card] +[card] +primitive=Dimir Aqueduct +id=420907 +rarity=U +[/card] +[card] +primitive=Disdainful Stroke +id=420705 +rarity=C +[/card] +[card] +primitive=Dismal Backwater +id=420908 +rarity=C +[/card] +[card] +primitive=Dispeller's Capsule +id=420681 +rarity=C +[/card] +[card] +primitive=Divergent Transformations +id=420634 +rarity=R +[/card] +[card] +primitive=Dragon Mage +id=420741 +rarity=R +[/card] +[card] +primitive=Dragonskull Summit +id=420909 +rarity=R +[/card] +[card] +primitive=Dreadship Reef +id=420910 +rarity=U +[/card] +[card] +primitive=Duelist's Heritage +id=420618 +rarity=R +[/card] +[card] +primitive=Duneblast +id=420811 +rarity=R +[/card] +[card] +primitive=Edric, Spymaster of Trest +id=420812 +rarity=R +[/card] +[card] +primitive=Elite Scaleguard +id=420682 +rarity=U +[/card] +[card] +primitive=Empyrial Plate +id=420868 +rarity=R +[/card] +[card] +primitive=Enduring Scalelord +id=420813 +rarity=U +[/card] +[card] +primitive=Entrapment Maneuver +id=420619 +rarity=R +[/card] +[card] +primitive=Etched Oracle +id=420869 +rarity=U +[/card] +[card] +primitive=Etherium Sculptor +id=420706 +rarity=C +[/card] +[card] +primitive=Etherium-Horn Sorcerer +id=420814 +rarity=R +[/card] +[card] +primitive=Ethersworn Adjudicator +id=420707 +rarity=M +[/card] +[card] +primitive=Evacuation +id=420708 +rarity=R +[/card] +[card] +primitive=Everflowing Chalice +id=420870 +rarity=U +[/card] +[card] +primitive=Everlasting Torment +id=420850 +rarity=R +[/card] +[card] +primitive=Evolutionary Escalation +id=420639 +rarity=U +[/card] +[card] +primitive=Evolving Wilds +id=420911 +rarity=C +[/card] +[card] +primitive=Executioner's Capsule +id=420726 +rarity=C +[/card] +[card] +primitive=Exotic Orchard +id=420912 +rarity=R +[/card] +[card] +primitive=Faerie Artisans +id=420625 +rarity=R +[/card] +[card] +primitive=Far Wanderings +id=420765 +rarity=C +[/card] +[card] +primitive=Farseek +id=420766 +rarity=C +[/card] +[card] +primitive=Fathom Mage +id=420815 +rarity=R +[/card] +[card] +primitive=Fellwar Stone +id=420871 +rarity=U +[/card] +[card] +primitive=Festercreep +id=420727 +rarity=C +[/card] +[card] +primitive=Filigree Angel +id=420816 +rarity=R +[/card] +[card] +primitive=Forbidden Orchard +id=420913 +rarity=R +[/card] +[card] +primitive=Forest +id=420966 +rarity=L +[/card] +[card] +primitive=Forest +id=420967 +rarity=L +[/card] +[card] +primitive=Forest +id=420968 +rarity=L +[/card] +[card] +primitive=Forgotten Ancient +id=420767 +rarity=R +[/card] +[card] +primitive=Frenzied Fugue +id=420635 +rarity=U +[/card] +[card] +primitive=Frontier Bivouac +id=420914 +rarity=U +[/card] +[card] +primitive=Gamekeeper +id=420768 +rarity=U +[/card] +[card] +primitive=Ghastly Conscription +id=420728 +rarity=M +[/card] +[card] +primitive=Ghave, Guru of Spores +id=420817 +rarity=M +[/card] +[card] +primitive=Ghostly Prison +id=420683 +rarity=U +[/card] +[card] +primitive=Glint-Eye Nephilim +id=420818 +rarity=R +[/card] +[card] +primitive=Goblin Spymaster +id=420636 +rarity=R +[/card] +[card] +primitive=Godo, Bandit Warlord +id=420742 +rarity=R +[/card] +[card] +primitive=Golgari Rot Farm +id=420915 +rarity=U +[/card] +[card] +primitive=Golgari Signet +id=420872 +rarity=C +[/card] +[card] +primitive=Grab the Reins +id=420743 +rarity=U +[/card] +[card] +primitive=Grand Coliseum +id=420916 +rarity=R +[/card] +[card] +primitive=Grave Upheaval +id=420648 +rarity=U +[/card] +[card] +primitive=Grip of Phyresis +id=420626 +rarity=U +[/card] +[card] +primitive=Gruul Signet +id=420873 +rarity=C +[/card] +[card] +primitive=Gruul Turf +id=420917 +rarity=U +[/card] +[card] +primitive=Guiltfeeder +id=420729 +rarity=R +[/card] +[card] +primitive=Gwafa Hazid, Profiteer +id=420819 +rarity=R +[/card] +[card] +primitive=Hanna, Ship's Navigator +id=420820 +rarity=R +[/card] +[card] +primitive=Hardened Scales +id=420769 +rarity=R +[/card] +[card] +primitive=Hellkite Igniter +id=420744 +rarity=R +[/card] +[card] +primitive=Hellkite Tyrant +id=420745 +rarity=M +[/card] +[card] +primitive=Homeward Path +id=420918 +rarity=R +[/card] +[card] +primitive=Hoofprints of the Stag +id=420684 +rarity=R +[/card] +[card] +primitive=Horizon Chimera +id=420821 +rarity=U +[/card] +[card] +primitive=Howling Mine +id=420874 +rarity=R +[/card] +[card] +primitive=Humble Defector +id=420746 +rarity=U +[/card] +[card] +primitive=Hushwing Gryff +id=420685 +rarity=R +[/card] +[card] +primitive=Ichor Wellspring +id=420875 +rarity=C +[/card] +[card] +primitive=Ikra Shidiqi, the Usurper +id=420649 +rarity=M +[/card] +[card] +primitive=In Garruk's Wake +id=420730 +rarity=R +[/card] +[card] +primitive=Inspiring Call +id=420770 +rarity=U +[/card] +[card] +primitive=Iroas, God of Victory +id=420822 +rarity=M +[/card] +[card] +primitive=Ishai, Ojutai Dragonspeaker +id=420650 +rarity=M +[/card] +[card] +primitive=Island +id=420957 +rarity=L +[/card] +[card] +primitive=Island +id=420958 +rarity=L +[/card] +[card] +primitive=Island +id=420959 +rarity=L +[/card] +[card] +primitive=Izzet Boilerworks +id=420919 +rarity=U +[/card] +[card] +primitive=Jor Kadeen, the Prevailer +id=420823 +rarity=R +[/card] +[card] +primitive=Jungle Hollow +id=420920 +rarity=C +[/card] +[card] +primitive=Jungle Shrine +id=420921 +rarity=U +[/card] +[card] +primitive=Juniper Order Ranger +id=420824 +rarity=U +[/card] +[card] +primitive=Kalonian Hydra +id=420771 +rarity=M +[/card] +[card] +primitive=Karplusan Forest +id=420922 +rarity=R +[/card] +[card] +primitive=Kazuul, Tyrant of the Cliffs +id=420747 +rarity=R +[/card] +[card] +primitive=Keening Stone +id=420876 +rarity=R +[/card] +[card] +primitive=Kodama's Reach +id=420772 +rarity=C +[/card] +[card] +primitive=Korozda Guildmage +id=420825 +rarity=U +[/card] +[card] +primitive=Kraum, Ludevic's Opus +id=420651 +rarity=R +[/card] +[card] +primitive=Krosan Verge +id=420923 +rarity=U +[/card] +[card] +primitive=Kydele, Chosen of Kruphix +id=420652 +rarity=M +[/card] +[card] +primitive=Kynaios and Tiro of Meletis +id=420653 +rarity=M +[/card] +[card] +primitive=Languish +id=420731 +rarity=R +[/card] +[card] +primitive=Lavalanche +id=420826 +rarity=R +[/card] +[card] +primitive=Lightning Greaves +id=420877 +rarity=U +[/card] +[card] +primitive=Loxodon Warhammer +id=420878 +rarity=U +[/card] +[card] +primitive=Ludevic, Necro-Alchemist +id=420654 +rarity=M +[/card] +[card] +primitive=Lurking Predators +id=420773 +rarity=R +[/card] +[card] +primitive=Magus of the Will +id=420631 +rarity=R +[/card] +[card] +primitive=Managorger Hydra +id=420774 +rarity=R +[/card] +[card] +primitive=Manifold Insights +id=420627 +rarity=R +[/card] +[card] +primitive=Master Biomancer +id=420827 +rarity=M +[/card] +[card] +primitive=Master of Etherium +id=420709 +rarity=R +[/card] +[card] +primitive=Mentor of the Meek +id=420686 +rarity=R +[/card] +[card] +primitive=Merciless Eviction +id=420828 +rarity=R +[/card] +[card] +primitive=Migratory Route +id=420655 +rarity=U +[/card] +[card] +primitive=Minds Aglow +id=420710 +rarity=R +[/card] +[card] +primitive=Mirror Entity +id=420687 +rarity=R +[/card] +[card] +primitive=Mirrorweave +id=420851 +rarity=R +[/card] +[card] +primitive=Mortify +id=420829 +rarity=U +[/card] +[card] +primitive=Mosswort Bridge +id=420924 +rarity=R +[/card] +[card] +primitive=Mountain +id=420963 +rarity=L +[/card] +[card] +primitive=Mountain +id=420964 +rarity=L +[/card] +[card] +primitive=Mountain +id=420965 +rarity=L +[/card] +[card] +primitive=Murmuring Bosk +id=420925 +rarity=R +[/card] +[card] +primitive=Mycoloth +id=420775 +rarity=R +[/card] +[card] +primitive=Mycosynth Wellspring +id=420879 +rarity=C +[/card] +[card] +primitive=Myr Battlesphere +id=420880 +rarity=R +[/card] +[card] +primitive=Myr Retriever +id=420881 +rarity=U +[/card] +[card] +primitive=Myriad Landscape +id=420926 +rarity=U +[/card] +[card] +primitive=Mystic Monastery +id=420927 +rarity=U +[/card] +[card] +primitive=Nath of the Gilt-Leaf +id=420830 +rarity=R +[/card] +[card] +primitive=Naya Charm +id=420831 +rarity=U +[/card] +[card] +primitive=Necrogenesis +id=420832 +rarity=U +[/card] +[card] +primitive=Necroplasm +id=420732 +rarity=R +[/card] +[card] +primitive=Nevinyrral's Disk +id=420882 +rarity=R +[/card] +[card] +primitive=Nomad Outpost +id=420928 +rarity=U +[/card] +[card] +primitive=Oath of Druids +id=420776 +rarity=R +[/card] +[card] +primitive=Oblation +id=420688 +rarity=R +[/card] +[card] +primitive=Opal Palace +id=420929 +rarity=C +[/card] +[card] +primitive=Open the Vaults +id=420689 +rarity=R +[/card] +[card] +primitive=Opulent Palace +id=420930 +rarity=U +[/card] +[card] +primitive=Order // Chaos +id=420857 +rarity=U // U +[/card] +[card] +primitive=Orzhov Advokist +id=420620 +rarity=U +[/card] +[card] +primitive=Orzhov Basilica +id=420931 +rarity=U +[/card] +[card] +primitive=Orzhov Signet +id=420883 +rarity=C +[/card] +[card] +primitive=Parting Thoughts +id=420632 +rarity=U +[/card] +[card] +primitive=Past in Flames +id=420748 +rarity=M +[/card] +[card] +primitive=Phyrexian Rebirth +id=420690 +rarity=R +[/card] +[card] +primitive=Plains +id=420954 +rarity=L +[/card] +[card] +primitive=Plains +id=420955 +rarity=L +[/card] +[card] +primitive=Plains +id=420956 +rarity=L +[/card] +[card] +primitive=Primeval Protector +id=420640 +rarity=R +[/card] +[card] +primitive=Prismatic Geoscope +id=420672 +rarity=R +[/card] +[card] +primitive=Progenitor Mimic +id=420833 +rarity=M +[/card] +[card] +primitive=Propaganda +id=420711 +rarity=U +[/card] +[card] +primitive=Psychosis Crawler +id=420884 +rarity=R +[/card] +[card] +primitive=Putrefy +id=420834 +rarity=U +[/card] +[card] +primitive=Quirion Explorer +id=420777 +rarity=C +[/card] +[card] +primitive=Rakdos Carnarium +id=420932 +rarity=U +[/card] +[card] +primitive=Rakdos Charm +id=420835 +rarity=U +[/card] +[card] +primitive=Rakdos Signet +id=420885 +rarity=C +[/card] +[card] +primitive=Rampant Growth +id=420778 +rarity=C +[/card] +[card] +primitive=Ravos, Soultender +id=420656 +rarity=M +[/card] +[card] +primitive=Read the Runes +id=420712 +rarity=R +[/card] +[card] +primitive=Realm Seekers +id=420779 +rarity=R +[/card] +[card] +primitive=Reforge the Soul +id=420749 +rarity=R +[/card] +[card] +primitive=Reins of Power +id=420713 +rarity=R +[/card] +[card] +primitive=Reliquary Tower +id=420933 +rarity=U +[/card] +[card] +primitive=Reveillark +id=420691 +rarity=R +[/card] +[card] +primitive=Reverse the Sands +id=420692 +rarity=R +[/card] +[card] +primitive=Reyhan, Last of the Abzan +id=420657 +rarity=R +[/card] +[card] +primitive=Rites of Flourishing +id=420780 +rarity=R +[/card] +[card] +primitive=Rootbound Crag +id=420934 +rarity=R +[/card] +[card] +primitive=Rubblehulk +id=420836 +rarity=R +[/card] +[card] +primitive=Rugged Highlands +id=420935 +rarity=C +[/card] +[card] +primitive=Runehorn Hellkite +id=420637 +rarity=R +[/card] +[card] +primitive=Rupture Spire +id=420936 +rarity=C +[/card] +[card] +primitive=Sakura-Tribe Elder +id=420781 +rarity=C +[/card] +[card] +primitive=Sanctum Gargoyle +id=420693 +rarity=C +[/card] +[card] +primitive=Sandsteppe Citadel +id=420937 +rarity=U +[/card] +[card] +primitive=Sangromancer +id=420733 +rarity=R +[/card] +[card] +primitive=Saskia the Unyielding +id=420658 +rarity=M +[/card] +[card] +primitive=Satyr Wayfinder +id=420782 +rarity=C +[/card] +[card] +primitive=Savage Lands +id=420938 +rarity=U +[/card] +[card] +primitive=Scavenging Ooze +id=420783 +rarity=R +[/card] +[card] +primitive=Seaside Citadel +id=420939 +rarity=U +[/card] +[card] +primitive=Seat of the Synod +id=420940 +rarity=C +[/card] +[card] +primitive=Seeds of Renewal +id=420641 +rarity=R +[/card] +[card] +primitive=Selesnya Guildmage +id=420852 +rarity=U +[/card] +[card] +primitive=Selesnya Sanctuary +id=420941 +rarity=U +[/card] +[card] +primitive=Selfless Squire +id=420621 +rarity=R +[/card] +[card] +primitive=Selvala, Explorer Returned +id=420837 +rarity=R +[/card] +[card] +primitive=Shadowblood Ridge +id=420942 +rarity=R +[/card] +[card] +primitive=Shamanic Revelation +id=420784 +rarity=R +[/card] +[card] +primitive=Sharuum the Hegemon +id=420838 +rarity=M +[/card] +[card] +primitive=Shimmer Myr +id=420886 +rarity=R +[/card] +[card] +primitive=Sidar Kondo of Jamuraa +id=420659 +rarity=M +[/card] +[card] +primitive=Silas Renn, Seeker Adept +id=420660 +rarity=M +[/card] +[card] +primitive=Simic Growth Chamber +id=420943 +rarity=U +[/card] +[card] +primitive=Simic Signet +id=420887 +rarity=C +[/card] +[card] +primitive=Skullclamp +id=420888 +rarity=U +[/card] +[card] +primitive=Slobad, Goblin Tinkerer +id=420750 +rarity=R +[/card] +[card] +primitive=Sol Ring +id=420889 +rarity=U +[/card] +[card] +primitive=Solemn Simulacrum +id=420890 +rarity=R +[/card] +[card] +primitive=Solidarity of Heroes +id=420785 +rarity=U +[/card] +[card] +primitive=Soul of New Phyrexia +id=420891 +rarity=M +[/card] +[card] +primitive=Spellheart Chimera +id=420839 +rarity=U +[/card] +[card] +primitive=Spelltwine +id=420714 +rarity=R +[/card] +[card] +primitive=Sphere of Safety +id=420694 +rarity=U +[/card] +[card] +primitive=Sphinx Summoner +id=420840 +rarity=R +[/card] +[card] +primitive=Spinerock Knoll +id=420944 +rarity=R +[/card] +[card] +primitive=Spitting Image +id=420853 +rarity=R +[/card] +[card] +primitive=Stalking Vengeance +id=420751 +rarity=R +[/card] +[card] +primitive=Stonehoof Chieftain +id=420642 +rarity=R +[/card] +[card] +primitive=Sublime Exhalation +id=420622 +rarity=R +[/card] +[card] +primitive=Sunforger +id=420892 +rarity=R +[/card] +[card] +primitive=Sungrass Prairie +id=420945 +rarity=R +[/card] +[card] +primitive=Sunpetal Grove +id=420946 +rarity=R +[/card] +[card] +primitive=Swamp +id=420960 +rarity=L +[/card] +[card] +primitive=Swamp +id=420961 +rarity=L +[/card] +[card] +primitive=Swamp +id=420962 +rarity=L +[/card] +[card] +primitive=Swan Song +id=420715 +rarity=R +[/card] +[card] +primitive=Swiftfoot Boots +id=420893 +rarity=U +[/card] +[card] +primitive=Swiftwater Cliffs +id=420947 +rarity=C +[/card] +[card] +primitive=Swords to Plowshares +id=420695 +rarity=U +[/card] +[card] +primitive=Sydri, Galvanic Genius +id=420841 +rarity=M +[/card] +[card] +primitive=Sylvan Reclamation +id=420661 +rarity=U +[/card] +[card] +primitive=Sylvok Explorer +id=420786 +rarity=C +[/card] +[card] +primitive=Tana, the Bloodsower +id=420662 +rarity=M +[/card] +[card] +primitive=Taurean Mauler +id=420752 +rarity=R +[/card] +[card] +primitive=Temple Bell +id=420894 +rarity=R +[/card] +[card] +primitive=Temple of the False God +id=420948 +rarity=U +[/card] +[card] +primitive=Tempt with Discovery +id=420787 +rarity=R +[/card] +[card] +primitive=Terminate +id=420842 +rarity=C +[/card] +[card] +primitive=Terramorphic Expanse +id=420949 +rarity=C +[/card] +[card] +primitive=Tezzeret's Gambit +id=420716 +rarity=U +[/card] +[card] +primitive=Thelonite Hermit +id=420788 +rarity=R +[/card] +[card] +primitive=Thopter Foundry +id=420854 +rarity=U +[/card] +[card] +primitive=Thornwood Falls +id=420950 +rarity=C +[/card] +[card] +primitive=Thrasios, Triton Hero +id=420663 +rarity=R +[/card] +[card] +primitive=Thrummingbird +id=420717 +rarity=U +[/card] +[card] +primitive=Thunderfoot Baloth +id=420789 +rarity=R +[/card] +[card] +primitive=Trading Post +id=420895 +rarity=R +[/card] +[card] +primitive=Transguild Promenade +id=420951 +rarity=C +[/card] +[card] +primitive=Trash for Treasure +id=420753 +rarity=R +[/card] +[card] +primitive=Treacherous Terrain +id=420664 +rarity=U +[/card] +[card] +primitive=Treasure Cruise +id=420718 +rarity=C +[/card] +[card] +primitive=Trial // Error +id=420856 +rarity=U // U +[/card] +[card] +primitive=Trinket Mage +id=420719 +rarity=C +[/card] +[card] +primitive=Tuskguard Captain +id=420790 +rarity=U +[/card] +[card] +primitive=Tymna the Weaver +id=420665 +rarity=R +[/card] +[card] +primitive=Underground River +id=420952 +rarity=R +[/card] +[card] +primitive=Utter End +id=420843 +rarity=R +[/card] +[card] +primitive=Vedalken Engineer +id=420720 +rarity=C +[/card] +[card] +primitive=Venser's Journal +id=420896 +rarity=R +[/card] +[card] +primitive=Veteran Explorer +id=420791 +rarity=U +[/card] +[card] +primitive=Vial Smasher the Fierce +id=420666 +rarity=M +[/card] +[card] +primitive=Volcanic Vision +id=420754 +rarity=R +[/card] +[card] +primitive=Vorel of the Hull Clade +id=420844 +rarity=R +[/card] +[card] +primitive=Vulturous Zombie +id=420845 +rarity=R +[/card] +[card] +primitive=Wall of Blossoms +id=420792 +rarity=U +[/card] +[card] +primitive=Waste Not +id=420734 +rarity=R +[/card] +[card] +primitive=Wave of Reckoning +id=420696 +rarity=R +[/card] +[card] +primitive=Wheel of Fate +id=420755 +rarity=R +[/card] +[card] +primitive=Whims of the Fates +id=420756 +rarity=R +[/card] +[card] +primitive=Whipflare +id=420757 +rarity=U +[/card] +[card] +primitive=Whispering Madness +id=420846 +rarity=R +[/card] +[card] +primitive=Whispersilk Cloak +id=420897 +rarity=U +[/card] +[card] +primitive=Wight of Precinct Six +id=420735 +rarity=U +[/card] +[card] +primitive=Wild Beastmaster +id=420793 +rarity=R +[/card] +[card] +primitive=Wilderness Elemental +id=420847 +rarity=U +[/card] +[card] +primitive=Windborn Muse +id=420697 +rarity=R +[/card] +[card] +primitive=Windbrisk Heights +id=420953 +rarity=R +[/card] +[card] +primitive=Windfall +id=420721 +rarity=U +[/card] +[card] +primitive=Worm Harvest +id=420855 +rarity=R +[/card] +[card] +primitive=Yidris, Maelstrom Wielder +id=420667 +rarity=M +[/card] +[card] +primitive=Zedruu the Greathearted +id=420848 +rarity=M +[/card] +[card] +primitive=Zhur-Taa Druid +id=420849 +rarity=C +[/card] From 2da1957c708a8b608bf8bf32ebde5f7ca37437b5 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 26 Jan 2017 23:18:37 +0800 Subject: [PATCH 22/22] Added C16 primitives --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 297 ++++++++++++++++++- 1 file changed, 295 insertions(+), 2 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 7e8ff0733..ab9813bd1 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -5614,6 +5614,17 @@ power=1 toughness=1 [/card] [card] +name=Armory Automaton +auto=may target(equipment|battlefield) newhook +auto=@combat(attacking) source(this):may target(equipment|battlefield) newhook +text=Whenever Armory Automaton enters the battlefield or attacks, you may attach any number of target Equipment to it. (Control of the Equipment doesn't change.) +mana={3} +type=Artifact Creature +subtype=Construct +power=2 +toughness=2 +[/card] +[card] name=Armory Guard auto=aslongas(land[gate]|mybattlefield) vigilance text=Armory Guard has vigilance as long as you control a Gate. @@ -5874,6 +5885,13 @@ mana={3}{G}{G} type=Enchantment [/card] [card] +name=Ash Barrens +auto={t}:add{c} +autohand=__BASIC_LANDCYCLING__({1}) +text={T}: Add {C} to your mana pool. -- Basic landcycling {1} ({1}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.) +type=Land +[/card] +[card] name=Ash Zealot auto=@movedTo(*|mystack) from(graveyard):damage:3 controller auto=@movedTo(*|opponentstack) from(graveyard):damage:3 opponent @@ -6401,6 +6419,17 @@ power=1 toughness=2 [/card] [card] +name=Atraxa, Praetors' Voice +abilities=flying,vigilance,deathtouch,lifelink +auto=@each my end:target(proliferation) proliferate +text=Flying, vigilance, deathtouch, lifelink -- At the beginning of your end step, proliferate. (You choose any number of permanents and/or players with counters on them, then give each another counter of a kind already there.) +mana={G}{W}{U}{B} +type=Legendary Creature +subtype=Angel Horror +power=4 +toughness=4 +[/card] +[card] name=Attended Knight auto=token(Soldier,Creature Soldier,1/1,white) abilities=first strike @@ -9965,6 +9994,15 @@ power=1 toughness=1 [/card] [card] +name=Benefactor's Draught +auto=untap all(creature) +auto=emblem transforms((,newability[@combat(blocking) source(creature|opponentbattlefield):draw:1])) ueot +auto=draw:1 +text=Untap all creatures. Until end of turn, whenever a creature an opponent controls blocks, draw a card. -- Draw a card. +mana={1}{G} +type=Instant +[/card] +[card] name=Benevolent Ancestor abilities=defender auto={T}:prevent:1 target(creature,player) @@ -13112,6 +13150,13 @@ mana={U}{U} type=Instant [/card] [card] +name=Boompile +auto={t}:flipacoin winability destroy all(*[-land]) winabilityend flipend +text={T}: Flip a coin. If you win the flip, destroy all nonland permanents. +mana={4} +type=Artifact +[/card] +[card] name=Boon of Emrakul target=creature auto=teach(creature) +3/-3 @@ -14184,6 +14229,19 @@ power=4 toughness=4 [/card] [card] +name=Breya, Etherium Shaper +auto=makecardt(Thopter:Artifact Creature Thopter:1/1:blue:flying)*2 +auto={2}{S(artifact|mybattlefield)}{S(artifact|mybattlefield)}:damage:3 target(player) +auto={2}{S(artifact|mybattlefield)}{S(artifact|mybattlefield)}:-4/-4 target(creature) +auto={2}{S(artifact|mybattlefield)}{S(artifact|mybattlefield)}:life:5 controller +text=When Breya, Etherium Shaper enters the battlefield, create two 1/1 blue Thopter artifact creature tokens with flying. -- {2}, Sacrifice two artifacts: Choose one — -- • Breya deals 3 damage to target player. -- • Target creature gets -4/-4 until end of turn. -- • You gain 5 life. +mana={W}{U}{B}{R} +type=Legendary Artifact Creature +subtype=Human +power=4 +toughness=4 +[/card] +[card] name=Briar Patch auto=lord(creature[attacking]|opponentBattlefield) -1/0 text=Whenever a creature attacks you, it gets -1/-0 until end of turn. @@ -20298,6 +20356,14 @@ power=1 toughness=1 [/card] [card] +name=Coastal Breach +anyzone=changecost(colorless:-1) forcedalive +auto=moveto(ownerhand) all(*[-land]) +text=Undaunted (This spell costs {1} less to cast for each opponent.) -- Return all nonland permanents to their owners' hands. +mana={6}{U} +type=Sorcery +[/card] +[card] name=Coastal Discovery auto=draw:2 controller other={5}{U} name(Awaken) @@ -23602,6 +23668,22 @@ text={T}: Add {1} to your mana pool. -- {T}, Sacrifice Crystal Vein: Add {2} to type=Land [/card] [card] +name=Crystalline Crawler +auto=counter(1/1,converge) +auto={C(1/1,-1)}:Add{G} +auto={C(1/1,-1)}:Add{R} +auto={C(1/1,-1)}:Add{U} +auto={C(1/1,-1)}:Add{B} +auto={C(1/1,-1)}:Add{W} +auto={T}:counter(1/1,1) +text=Converge — Crystalline Crawler enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. -- Remove a +1/+1 counter from Crystalline Crawler: Add one mana of any color to your mana pool. -- {T}: Put a +1/+1 counter on Crystalline Crawler. +mana={4} +type=Artifact Creature +subtype=Construct +power=1 +toughness=1 +[/card] +[card] name=Crystalline Nautilus auto=bestow transforms((,newability[@targeted(this):all(trigger[to]) sacrifice])) forever auto=@targeted(this):all(trigger[to]) sacrifice @@ -24019,6 +24101,15 @@ mana={2} type=Artifact [/card] [card] +name=Curtains' Call +anyzone=changecost(colorless:-1) forcedalive +target=<2>creature +auto=destroy +text=Undaunted (This spell costs {1} less to cast for each opponent.) -- Destroy two target creatures. +mana={5}{B} +type=Instant +[/card] +[card] name=Custodi Soulbinders auto=foreach(other creature|battlefield) counter(1/1,1) auto={2}{w}{C(1/1,-1)}:token(Spirit,Creature Spirit,1/1,white flying) @@ -29917,7 +30008,7 @@ toughness=7 [card] name=Dragonlord Kolaghan abilities=flying,haste -auto=aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste >0 +auto=emblem transforms((,newability[aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste])) forever dontremove auto=@movedto(*[creature;planeswalker]|opponentstack):all(trigger[to]) transforms((,newability[if type(*[share!name!]|mygraveyard)~morethan~0 then life:-10 controller])) oneshot text=Flying, haste -- Other creatures you control have haste. -- Whenever an opponent casts a creature or planeswalker spell with the same name as a card in his or her graveyard, that player loses 10 life. mana={4}{B}{R} @@ -31444,6 +31535,13 @@ mana={1}{G}{W} type=Enchantment [/card] [card] +name=Duelist's Heritage +auto=@each blockers:may target(creature[attacking]) double strike ueot +text=Whenever one or more creatures attack, you may have target attacking creature gain double strike until end of turn. +mana={2}{W} +type=Enchantment +[/card] +[card] name=Duergar Assailant auto={S}:damage:1 target(creature[attacking;blocking]) text=Sacrifice Duergar Assailant: Duergar Assailant deals 1 damage to target attacking or blocking creature. @@ -36056,6 +36154,13 @@ mana={3} type=Artifact [/card] [card] +name=Evolutionary Escalation +auto=@each my upkeep restriction{compare(cantargetmycre)~morethan~0,compare(cantargetoppocre)~morethan~0}:choice counter(1/1,3) target(creature|mybattlefield) && activate counter(1/1,3) target(creature|opponentbattlefield) +text=At the beginning of your upkeep, put three +1/+1 counters on target creature you control and three +1/+1 counters on target creature an opponent controls. +mana={1}{G} +type=Enchantment +[/card] +[card] name=Evolutionary Leap auto={g}{s(creature|mybattlefield)}:Reveal:1 revealzone(mylibrary) revealuntil(creature|mylibrary) optionone choice name(Get Card) target(creature|reveal) moveto(myhand) optiononeend optiontwo choice name(put on bottom) all(*|reveal) bottomoflibrary optiontwoend revealend text={G}, Sacrifice a creature: Reveal cards from the top of your library until you reveal a creature card. Put that card into your hand and the rest on the bottom of your library in a random order. @@ -41658,6 +41763,16 @@ power=2 toughness=2 [/card] [card] +name=Frenzied Fugue +target=* +auto=transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield) oneshot],newability[untap],newability[haste])) ueot +auto=@each my upkeep:transforms((,newability[moveTo(opponentbattlefield)],newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],newability[haste])) ueot +text=Enchant permanent -- When Frenzied Fugue enters the battlefield or at the beginning of your upkeep, gain control of enchanted permanent until end of turn. Untap that permanent. It gains haste until end of turn. +mana={3}{R} +type=Enchantment +subtype=Aura +[/card] +[card] name=Frenzied Goblin auto=@combat(attacking) source(this):pay({R}) target(creature) cantblock ueot text=Whenever Frenzied Goblin attacks, you may pay {R}. If you do, target creature can't block this turn. @@ -46376,6 +46491,17 @@ power=2 toughness=2 [/card] [card] +name=Goblin Spymaster +abilities=first strike +auto=@each opponent end:makecardt(Goblin:Creature Goblin:1/1:red) and!( transforms((,newability[lord(creature|mybattlefield) mustattack])) forever )! opponent +text=First strike -- At the beginning of each opponent's end step, that player creates a 1/1 red Goblin creature token with "Creatures you control attack each combat if able." +mana={2}{R} +type=Creature +subtype=Goblin Rogue +power=2 +toughness=1 +[/card] +[card] name=Goblin Striker abilities=first strike,haste text=First strike, haste @@ -47536,6 +47662,15 @@ power=6 toughness=6 [/card] [card] +name=Grave Upheaval +target=creature|graveyard +auto=moveto(mybattlefield) and!(haste)! +autohand=__BASIC_LANDCYCLING__({2}) +text=Put target creature card from a graveyard onto the battlefield under your control. It gains haste. -- Basic landcycling {2} ({2}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.) +mana={4}{B}{R} +type=Sorcery +[/card] +[card] name=Gravebane Zombie abilities=librarydeath text=If Gravebane Zombie would be put into a graveyard from the battlefield, put Gravebane Zombie on top of its owner's library instead. @@ -48470,6 +48605,14 @@ abilities=devoid type=Instant [/card] [card] +name=Grip of Phyresis +target=equipment +auto=moveto(mybattlefield) and!( transforms((,newability[makecardt(Germ:Creature Germ:0/0:black) livingweapon])) oneshot )! +text=Gain control of target Equipment, then create a 0/0 black Germ creature token and attach that Equipment to it. +mana={2}{U} +type=Instant +[/card] +[card] name=Grip of the Roil auto=draw:1 controller auto=target(creature) freeze @@ -62480,6 +62623,16 @@ type=Artifact subtype=Equipment [/card] [card] +name=Kynaios and Tiro of Meletis +auto=@each my end:draw:1 && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ controller && ability$!choice draw:1 _ if type(land|myhand)~morethan~0 then choice moveto(mybattlefield) notatarget(land|myhand)!$ opponent +text=At the beginning of your end step, draw a card. Each player may put a land card from his or her hand onto the battlefield, then each opponent who didn't draws a card. +mana={R}{G}{W}{U} +type=Legendary Creature +subtype=Human Soldier +power=2 +toughness=8 +[/card] +[card] name=Kyoki, Sanity's Eclipse auto=@movedTo(spirit,arcane|mystack):target(opponent) ability$!name(exile card from hand) choice notatarget(*|myhand) moveTo(exile) !$ targetedplayer text=Whenever you cast a Spirit or Arcane spell, target opponent exiles a card from his or her hand. @@ -67252,6 +67405,16 @@ power=3 toughness=3 [/card] [card] +name=Magus of the Will +auto={2}{B}{T}{E}:name(Can play from graveyard) emblem transforms((,newability[lord(*|mygraveyard) canPlayFromGraveyard],newability[@movedTo(*|mygraveyard):all(trigger[to]) moveTo(exile)])) ueot +text={2}{B}, {T}, Exile Magus of the Will: Until end of turn, you may play cards from your graveyard. If a card would be put into your graveyard from anywhere this turn, exile that card instead. +mana={2}{B} +type=Creature +subtype=Human Wizard +power=3 +toughness=3 +[/card] +[card] name=Mahamoti Djinn abilities=flying text=Flying (This creature can't be blocked except by creatures with flying or reach.) @@ -70624,6 +70787,14 @@ mana={1}{W} type=Instant [/card] [card] +name=Migratory Route +auto=makecardt(Bird:Creature Bird:1/1:white:flying)*4 +autohand=__BASIC_LANDCYCLING__({2}) +text=Create four 1/1 white Bird creature tokens with flying. -- Basic landcycling {2} ({2}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.) +mana={3}{W}{U} +type=Sorcery +[/card] +[card] name=Mijae Djinn auto=@combat(attacking,turnlimited) source(this):flipacoin loseability name(untap it and remove it from combat) tap && removefromcombat loseabilityend flipend text=Whenever Mijae Djinn attacks, flip a coin. If you lose the flip, remove Mijae Djinn from combat and tap it. @@ -71595,7 +71766,7 @@ toughness=1 [/card] [card] name=Mirror Gallery -auto=lord(*|battlefield) legendruleremove +abilities=legendruleremove text=The "legend rule" doesn't apply. mana={5} type=Artifact @@ -74572,6 +74743,18 @@ mana={5} type=Artifact [/card] [card] +name=Myriad Landscape +auto=tap(noevent) +auto={T}:add{C} +auto={2}{T}{S}:name(search plains) target(plains[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +auto={2}{T}{S}:name(search island) target(island[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +auto={2}{T}{S}:name(search swamp) target(swamp[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +auto={2}{T}{S}:name(search mountain) target(mountain[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +auto={2}{T}{S}:name(search forest) target(forest[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +text=Myriad Landscape enters the battlefield tapped. -- {T}: Add {C} to your mana pool. -- {2}, {T}, Sacrifice Myriad Landscape: Search your library for up to two basic land cards that share a land type, put them onto the battlefield tapped, then shuffle your library. +type=Land +[/card] +[card] name=Myrsmith auto=@movedto(artifact|mystack):pay({1}) token(Myr,Artifact Creature Myr,1/1) mana={1}{W} @@ -85194,6 +85377,17 @@ mana={3}{G} type=Sorcery [/card] [card] +name=Primeval Protector +anyzone=foreach(creature|opponentbattlefield) changecost(colorless:-1) forcedalive +auto=counter(1/1,1) all(other creature|mybattlefield) +text=Primeval Protector costs {1} less to cast for each creature your opponents control. -- When Primeval Protector enters the battlefield, put a +1/+1 counter on each other creature you control. +mana={10}{G} +type=Creature +subtype=Avatar +power=10 +toughness=10 +[/card] +[card] name=Primeval Shambler auto={B}:1/1 text={B}: Primeval Shambler gets +1/+1 until end of turn. @@ -85287,6 +85481,14 @@ mana={X}{W}{U} type=Instant [/card] [card] +name=Prismatic Geoscope +auto=tap(noevent) +auto={T}:name(add mana) thisforeach(variable{pbasiclandtypes}>0) ability$! choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W} !$ controller +text=Prismatic Geoscope enters the battlefield tapped. -- Domain — {T}: Add X mana in any combination of colors to your mana pool, where X is the number of basic land types among lands you control. +mana={5} +type=Artifact +[/card] +[card] name=Prismatic Lace target=* auto=choice name(white) becomes(,white) forever @@ -93578,6 +93780,17 @@ type=Instant subtype=Trap [/card] [card] +name=Runehorn Hellkite +abilities=flying +autograveyard={5}{R}{E}:reject all(*|hand) && draw:7 all(player) +text=Flying -- {5}{R}, Exile Runehorn Hellkite from your graveyard: Each player discards his or her hand, then draws seven cards. +mana={5}{R} +type=Creature +subtype=Dragon +power=5 +toughness=5 +[/card] +[card] name=Runes of the Deus target=creature auto=teach(creature[red]) 1/1 @@ -95327,6 +95540,18 @@ power=2 toughness=4 [/card] [card] +name=Saskia the Unyielding +abilities=vigilance,haste +auto=choice name(you) transforms((,newability[@combatdamaged(player) from(creature|mybattlefield):all(trigger[from]) damage:thatmuch controller])) forever +auto=choice name(opponent) transforms((,newability[@combatdamaged(player) from(creature|mybattlefield):all(trigger[from]) damage:thatmuch opponent])) forever +text=Vigilance, haste -- As Saskia the Unyielding enters the battlefield, choose a player. -- Whenever a creature you control deals combat damage to a player, it deals that much damage to the chosen player. +mana={B}{R}{G}{W} +type=Legendary Creature +subtype=Human Soldier +power=3 +toughness=4 +[/card] +[card] name=Satyr Firedancer auto=@damagefoeof(player) from(instant|mystack):damage:thatmuch target(creature|opponentbattlefield) auto=@damagefoeof(player) from(sorcery|mystack):damage:thatmuch target(creature|opponentbattlefield) @@ -97689,6 +97914,16 @@ mana={1}{G}{G} type=Sorcery [/card] [card] +name=Seeds of Renewal +target=<2>*|mygraveyard +auto=moveTo(myhand) +auto=moveto(exile) all(this) +anyzone=changecost(colorless:-1) forcedalive +text=Undaunted (This spell costs {1} less to cast for each opponent.) -- Return up to two target cards from your graveyard to your hand. Exile Seeds of Renewal. +mana={6}{G} +type=Sorcery +[/card] +[card] name=Seedtime restriction=during my turn auto=if casted(*[blue]|opponentstack) then turns:+1 controller @@ -109434,6 +109669,17 @@ power=4 toughness=4 [/card] [card] +name=Stonehoof Chieftain +abilities=trample,indestructible +auto=lord(other creature|mybattlefield) transforms((,newability[this(attacking) indestructible],newability[this(attacking) trample])) +text=Trample, indestructible -- Whenever another creature you control attacks, it gains trample and indestructible until end of turn. +mana={7}{G} +type=Creature +subtype=Centaur Warrior +power=8 +toughness=8 +[/card] +[card] name=Stonehorn Chanter auto={5}{W}:vigilance ueot && lifelink ueot text={5}{W}:Stonehorn Chanter gains vigilance and lifelink until end of turn. @@ -110610,6 +110856,14 @@ power=4 toughness=3 [/card] [card] +name=Sublime Exhalation +anyzone=changecost(colorless:-1) forcedalive +auto=destroy all(creature) +text=Undaunted (This spell costs {1} less to cast for each opponent.) -- Destroy all creatures. +mana={6}{W} +type=Sorcery +[/card] +[card] name=Submerged Boneyard auto={t}:add{b} auto={t}:add{u} @@ -112279,6 +112533,17 @@ power=3 toughness=2 [/card] [card] +name=Sydri, Galvanic Genius +auto={U}:name(animate noncreature artifact) target(artifact[-creature]) dynamicability transforms((creature,setpower=0,settoughness=0)) ueot +auto={W}{B}:name(deathtouch & lifelink) target(artifact[creature]) transforms((,newability[deathtouch],newability[lifelink])) ueot +text={U}: Target noncreature artifact becomes an artifact creature with power and toughness each equal to its converted mana cost until end of turn. -- {W}{B}: Target artifact creature gains deathtouch and lifelink until end of turn. +mana={W}{U}{B} +type=Legendary Creature +subtype=Human Artificer +power=2 +toughness=2 +[/card] +[card] name=Sygg, River Cutthroat auto=@each endofturn foelost(3):may draw:1 controller text=At the beginning of each end step, if an opponent lost 3 or more life this turn, you may draw a card. (Damage causes loss of life.) @@ -112411,6 +112676,15 @@ power=1 toughness=1 [/card] [card] +name=Sylvan Reclamation +target=*[artifact;enchantment] +auto=moveto(exile) +autohand=__BASIC_LANDCYCLING__({2}) +text=Exile up to two target artifacts and/or enchantments. -- Basic landcycling {2} ({2}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.) +mana={3}{G}{W} +type=Instant +[/card] +[card] name=Sylvan Safekeeper auto={S(land|myBattlefield)}:shroud target(creature) text=Sacrifice a land: Target creature you control gains shroud until end of turn. (It can't be the target of spells or abilities.) @@ -118823,6 +119097,14 @@ power=4 toughness=3 [/card] [card] +name=Treacherous Terrain +auto=damage:type:land:opponentbattlefield opponent +autohand=__BASIC_LANDCYCLING__({2}) +text=Treacherous Terrain deals damage to each opponent equal to the number of lands that player controls. -- Basic landcycling {2} ({2}, Discard this card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library.) +mana={6}{R}{G} +type=Sorcery +[/card] +[card] name=Treacherous Urge target=opponent aicode=activate notatarget(creature|targetedpersonshand) moveto(mybattlefield) and!( transforms((,newability[phaseaction[endofturn] sacrifice all(this)],newability[haste all(this)])) ueot )! @@ -131322,6 +131604,17 @@ power=3 toughness=3 [/card] [card] +name=Yidris, Maelstrom Wielder +abilities=trample +auto=@movedto(*|mystack) restriction{didcombatdamagetofoe}:all(trigger[to]) transforms((,newability[cascade:plibrarycount])) ueot +text=Trample -- Whenever Yidris, Maelstrom Wielder deals combat damage to a player, as you cast spells from your hand this turn, they gain cascade. (When you cast the spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom of your library in a random order.) +mana={U}{B}{R}{G} +type=Legendary Creature +subtype=Ogre Wizard +power=5 +toughness=4 +[/card] +[card] name=Yisan, the Wanderer Bard auto={2}{G}{T}{C(0/0,1,Verse)}:name(search creature) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[creature]|mylibrary) optionone target(creature[manacost=counter{0%0.1.Verse}]|reveal) moveto(mybattlefield) and!( all(*|reveal) moveto(mylibrary) )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(mylibrary) and!( all(*|reveal) moveto(mylibrary) )! optiontwoend afterrevealed shuffle afterrevealedend revealend text={2}{G}, {T}, Put a verse counter on Yisan, the Wanderer Bard: Search your library for a creature card with converted mana cost equal to the number of verse counters on Yisan, put it onto the battlefield, then shuffle your library.