diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 2acbce30e..ae3e8c973 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -25289,6 +25289,17 @@ power=3 toughness=3 [/card] [card] +name=Jodah, Archmage Eternal +abilities=flying +auto={W}{U}{B}{R}{G}:target(*|myrestrictedcastingzone) activate castcard(normal) +text=Flying -- You may pay {W}{U}{B}{R}{G} rather than pay the mana cost for spells that you cast. +mana={1}{U}{R}{W} +type=Legendary Creature +subtype=Human Wizard +power=4 +toughness=3 +[/card] +[card] name=Johnny, Combo Player auto={4}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={4}: Search your library for a card and put that card into your hand. Then shuffle your library. @@ -50106,8 +50117,9 @@ subtype=Saga [card] name=The Ur-Dragon abilities=flying -auto=lord(dragon|mycastingzone) altercost( colorless,-1) -auto=@combat(attacking[dragon]|myBattlefield):draw:type:creature(dragon[attacking]):mybattlefield controller && moveTo(myBattlefield) target(*|myhand) +auto=lord(dragon|mycastingzone) altercost(colorless,-1) +autocommandzone=lord(dragon|mycastingzone) altercost(colorless,-1) +auto=@combat(attacking) source(dragon|myBattlefield):draw:1 && transforms((,newability[moveTo(myBattlefield) target(*[-sorcery;-instant]|myhand)])) forever text=Eminence — As long as The Ur-Dragon is in the command zone or on the battlefield, other Dragon spells you cast cost {1} less to cast. -- Flying -- Whenever one or more Dragons you control attack, draw that many cards, then you may put a permanent card from your hand onto the battlefield. mana={4}{W}{U}{B}{R}{G} type=Legendary Creature diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 634f9284f..8e6bf672c 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -6249,16 +6249,6 @@ power=1 toughness=2 [/card] [card] -name=Jodah, Archmage Eternal -abilities=flying -text=Flying -- You may pay {W}{U}{B}{R}{G} rather than pay the mana cost for spells that you cast. -mana={1}{U}{R}{W} -type=Legendary Creature -subtype=Human Wizard -power=4 -toughness=3 -[/card] -[card] name=Jotun Grunt text=Cumulative upkeep—Put two cards from a single graveyard on the bottom of their owner's library. (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.) mana={1}{W} diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index 0164c201f..209922ea6 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -3429,7 +3429,7 @@ int AIPlayerBaka::computeActions() CardDescriptor cd; if (game->hand->hasAbility(Constants::PAYZERO)) { - //Attempt to put free cards into play + //Attempt to put free cards into play from hand cd.init(); cd.SetExclusionColor(Constants::MTG_COLOR_LAND); MTGCardInstance *freecard = cd.match(game->hand); @@ -3444,7 +3444,7 @@ int AIPlayerBaka::computeActions() } if (game->graveyard->hasAbility(Constants::PAYZERO) && game->graveyard->hasAbility(Constants::CANPLAYFROMGRAVEYARD)) { - //Attempt to put free cards into play + //Attempt to put free cards into play from graveyard cd.init(); cd.SetExclusionColor(Constants::MTG_COLOR_LAND); MTGCardInstance *freecard = cd.match(game->graveyard); @@ -3459,7 +3459,7 @@ int AIPlayerBaka::computeActions() } if (game->exile->hasAbility(Constants::PAYZERO) && game->exile->hasAbility(Constants::CANPLAYFROMEXILE)) { - //Attempt to put free cards into play + //Attempt to put free cards into play from exile cd.init(); cd.SetExclusionColor(Constants::MTG_COLOR_LAND); MTGCardInstance *freecard = cd.match(game->exile); @@ -3472,6 +3472,21 @@ int AIPlayerBaka::computeActions() break; } } + if (game->commandzone->hasAbility(Constants::PAYZERO)) + { + //Attempt to put free cards into play from commandzone + cd.init(); + cd.SetExclusionColor(Constants::MTG_COLOR_LAND); + MTGCardInstance *freecard = cd.match(game->commandzone); + int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay); + if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (!freecard->isCDA)) + { + MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST); + AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action + clickstream.push(aa); + break; + } + } }//end } diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 02733b455..6bb460cc7 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -1511,9 +1511,8 @@ int MTGPayZeroRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) if (!card->has(Constants::PAYZERO)) return 0; Player * player = game->currentlyActing(); - if (card->isLand() || (!player->game->library->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card))) + if (card->isLand() || (!player->game->library->hasCard(card) && !player->game->graveyard->hasCard(card) && !player->game->exile->hasCard(card) && !player->game->hand->hasCard(card) && !player->game->commandzone->hasCard(card))) { - //only allowed to pay zero for cards in library??? above is "if you dont have it in hand, grave, or exile" return 0; } if ((!card->canPlayFromLibrary() && player->game->library->hasCard(card))||(!card->has(Constants::CANPLAYFROMGRAVEYARD) && player->game->graveyard->hasCard(card)) || (!card->has(Constants::CANPLAYFROMEXILE) && player->game->exile->hasCard(card)))