persist/undying fix
persist/undying wont trigger when there is a replacement effect for cards that goes to graveyard like leyline of the void. support for anafenza the foremost.
This commit is contained in:
@@ -2744,8 +2744,8 @@ toughness=2
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Anafenza, the Foremost
|
name=Anafenza, the Foremost
|
||||||
|
abilities=oppgcreatureexiler
|
||||||
auto=@combat(attacking) source(this):counter(1/1,1) target(other creature[tapped]|mybattlefield)
|
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.
|
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}
|
mana={W}{B}{G}
|
||||||
type=Legendary Creature
|
type=Legendary Creature
|
||||||
|
|||||||
@@ -232,7 +232,9 @@ class Constants
|
|||||||
AURAWARD = 114,
|
AURAWARD = 114,
|
||||||
MADNESS = 115,
|
MADNESS = 115,
|
||||||
PROTECTIONFROMCOLOREDSPELLS = 116,
|
PROTECTIONFROMCOLOREDSPELLS = 116,
|
||||||
NB_BASIC_ABILITIES = 117,
|
MYGCREATUREEXILER = 117,
|
||||||
|
OPPGCREATUREEXILER = 118,
|
||||||
|
NB_BASIC_ABILITIES = 119,
|
||||||
|
|
||||||
|
|
||||||
RARITY_S = 'S', //Special Rarity
|
RARITY_S = 'S', //Special Rarity
|
||||||
|
|||||||
@@ -145,7 +145,9 @@ const char* Constants::MTGBasicAbilities[] = {
|
|||||||
"nolifegainopponent",
|
"nolifegainopponent",
|
||||||
"auraward",
|
"auraward",
|
||||||
"madness",
|
"madness",
|
||||||
"protectionfromcoloredspells"
|
"protectionfromcoloredspells",
|
||||||
|
"mygcreatureexiler",
|
||||||
|
"oppgcreatureexiler"
|
||||||
};
|
};
|
||||||
|
|
||||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||||
|
|||||||
@@ -349,6 +349,8 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
|||||||
for(int i = 0; i < 2; ++i)
|
for(int i = 0; i < 2; ++i)
|
||||||
{
|
{
|
||||||
if ((to == g->players[i]->game->graveyard) && (
|
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]->game->battlefield->hasAbility(Constants::MYGRAVEEXILER) ||
|
||||||
g->players[i]->opponent()->game->battlefield->hasAbility(Constants::OPPGRAVEEXILER)))
|
g->players[i]->opponent()->game->battlefield->hasAbility(Constants::OPPGRAVEEXILER)))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2276,6 +2276,8 @@ int MTGPersistRule::receiveEvent(WEvent * event)
|
|||||||
if (e->from == p->game->inPlay)
|
if (e->from == p->game->inPlay)
|
||||||
ok = 1;
|
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)
|
if (!ok)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user