Fixed primitives, added new ability "hasaftermath" to implement Aftermath cost with Flashback and refactored all cards with Aftermath cost (now they use a special version of Flashback but they don't count as flashback spell), added a new ability "spellmover" to implement all cards that have to target a spell on stack to move to some other zone (they are not real counters so they don't care about "nofizzle" or "nofizzlealternative" abilites of their target), fixed all primitives with "spellmover" ability, added a new keyword "storedname" to target card with a specifc previously stored name, improved "fizzleto" ability in order to allow to move the fizzled card on second place from the top or to exile and imprint the target name.

This commit is contained in:
Vittorio Alfieri
2021-10-13 23:42:45 +02:00
parent fbcb1feb88
commit 9c2eee7d7e
13 changed files with 246 additions and 120 deletions

View File

@@ -2968,9 +2968,11 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
// Fizzle (counterspell...) and put to zone
// Fizzle (counterspell...) and put to zone or Move spell to zone
// This should always be above "fizzle" section
vector<string> splitFizzle = parseBetween(s, "fizzleto(", ")");
vector<string> splitFizzle = parseBetween(s, "spellmover(", ")");
if (!splitFizzle.size())
splitFizzle = parseBetween(s, "fizzleto(", ")");
if (splitFizzle.size())
{
// currently only hand, exile and library are supported
@@ -2982,9 +2984,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
} else if (zone == "exile")
{
fizzleMode = ActionStack::PUT_IN_EXILE;
} else if (zone == "exileimp")
{
fizzleMode = ActionStack::PUT_IN_EXILE_IMPRINT;
} else if (zone == "librarytop")
{
fizzleMode = ActionStack::PUT_IN_LIBRARY_TOP;
} else if (zone == "librarysecond")
{
fizzleMode = ActionStack::PUT_IN_LIBRARY_SECOND;
} else if (zone == "librarybottom")
{
fizzleMode = ActionStack::PUT_IN_LIBRARY_BOTTOM;
@@ -2994,6 +3002,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
starget = spell->getNextSpellTarget();
AAFizzler * a = NEW AAFizzler(observer, id, card, starget);
a->fizzleMode = fizzleMode;
a->spellMover = (s.find("spellmover(") != string::npos);
a->oneShot = 1;
return a;
}