Fizzle unless pay x (thanks to excessum)

- saves source card in storedSourceCard for ATransform
- adds support for WParsedInt in pay as "pay[[{value:WParsedInt}]]":

name=Spell Rupture
target=*|stack
auto=if cantargetcard(*|opponentstack) then transforms((,newability[pay[[{value:power:highest:creature:opponentbattlefield}]] name(pay {value} mana) donothing?fizzle])) forever
text=Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control.
mana={1}{U}
type=Instant

- adds support for {x} in *some* “pay” abilities (Syncopate):

name=Syncopate
target=*|stack
auto=transforms((,newability[pay[[{x}]] name(pay {value} mana) donothing?fizzleto(exile)])) forever
text=Counter target spell unless its controller pays {X}. If that spell is countered this way, exile it instead of putting it into  its owner's graveyard.
mana={X}{U}
type=Instant

- support of "name(pay {value} mana)" in pay abilities to show actual number to pay (see example above)
This commit is contained in:
Dmitry Panin
2013-10-22 20:29:06 +04:00
parent b8b6153cc5
commit cf50b7d403
5 changed files with 72 additions and 25 deletions

View File

@@ -1961,9 +1961,10 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
a->canBeInterrupted = false;
return a;
}
//may pay ability
//may pay ability
vector<string> splitMayPaysub = parseBetween(s, "pay[[","]]", true);
if(splitMayPaysub.size())
if (splitMayPaysub.size())
{
GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPaysub[1],storedPayString);
a->oneShot = 1;