Fix: Mana Producers don't use the stack (there already was a partial fix I believe, this one fixes issues with triggered abilities)
This commit is contained in:
@@ -684,6 +684,9 @@ MTGAbility * AbilityFactory::getCoreAbility(MTGAbility * a)
|
|||||||
if (MultiAbility * abi = dynamic_cast<MultiAbility*>(a))
|
if (MultiAbility * abi = dynamic_cast<MultiAbility*>(a))
|
||||||
return getCoreAbility(abi->abilities[0]);
|
return getCoreAbility(abi->abilities[0]);
|
||||||
|
|
||||||
|
if (NestedAbility * na = dynamic_cast<NestedAbility*> (a))
|
||||||
|
return getCoreAbility(na->ability);
|
||||||
|
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2568,6 +2571,11 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card, int
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Anything involving Mana Producing abilities cannot be interrupted
|
||||||
|
MTGAbility * core = getCoreAbility(a);
|
||||||
|
if (AManaProducer * amp = dynamic_cast<AManaProducer*> (core))
|
||||||
|
a->canBeInterrupted = false;
|
||||||
|
|
||||||
a->addToGame();
|
a->addToGame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user