diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 77548df4c..442522f77 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2744,8 +2744,8 @@ toughness=2 [/card] [card] name=Anafenza, the Foremost +abilities=oppgcreatureexiler auto=@combat(attacking) source(this):counter(1/1,1) target(other creature[tapped]|mybattlefield) -auto=@movedTo(creature|opponentGraveyard):all(trigger[to]) moveTo(exile) text=When Anafenza, the Foremost attacks, put a +1/+1 counter on another target tapped creature you control. -- If a creature card would be put into an opponent's graveyard from anywhere, exile it instead. mana={W}{B}{G} type=Legendary Creature diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 385dcc69b..6a0d398fe 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -232,7 +232,9 @@ class Constants AURAWARD = 114, MADNESS = 115, PROTECTIONFROMCOLOREDSPELLS = 116, - NB_BASIC_ABILITIES = 117, + MYGCREATUREEXILER = 117, + OPPGCREATUREEXILER = 118, + NB_BASIC_ABILITIES = 119, RARITY_S = 'S', //Special Rarity diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 51ffc01d2..0dd76ef59 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -145,7 +145,9 @@ const char* Constants::MTGBasicAbilities[] = { "nolifegainopponent", "auraward", "madness", - "protectionfromcoloredspells" + "protectionfromcoloredspells", + "mygcreatureexiler", + "oppgcreatureexiler" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 2f0b7027c..4cea41c66 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -349,6 +349,8 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone for(int i = 0; i < 2; ++i) { if ((to == g->players[i]->game->graveyard) && ( + (g->players[i]->game->battlefield->hasAbility(Constants::MYGCREATUREEXILER) && card->isCreature()) || + (g->players[i]->opponent()->game->battlefield->hasAbility(Constants::OPPGCREATUREEXILER) && card->isCreature())|| g->players[i]->game->battlefield->hasAbility(Constants::MYGRAVEEXILER) || g->players[i]->opponent()->game->battlefield->hasAbility(Constants::OPPGRAVEEXILER))) { diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index d9628cf8b..362963ad0 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -2276,6 +2276,8 @@ int MTGPersistRule::receiveEvent(WEvent * event) if (e->from == p->game->inPlay) ok = 1; } + if ((card->owner->game->battlefield->hasAbility(Constants::MYGRAVEEXILER)||card->owner->opponent()->game->battlefield->hasAbility(Constants::OPPGRAVEEXILER)) || ((card->owner->game->battlefield->hasAbility(Constants::MYGCREATUREEXILER)||card->owner->opponent()->game->battlefield->hasAbility(Constants::OPPGCREATUREEXILER) && card->isCreature()))) + ok = 0; if (!ok) return 0;