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:
@@ -7,6 +7,7 @@
|
||||
#include "Player.h"
|
||||
#include "WEvent.h"
|
||||
#include "MTGAbility.h"
|
||||
#include "AllAbilities.h"
|
||||
#include "iterator"
|
||||
|
||||
SUPPORT_OBJECT_ANALYTICS(ManaCost)
|
||||
@@ -119,6 +120,14 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
if (value.find("value:") != string::npos) {
|
||||
vector<string> splitParsedVar = parseBetween(value, "value:", " ", false);
|
||||
WParsedInt* res = NEW WParsedInt(splitParsedVar[1], NULL, c);
|
||||
manaCost->add(Constants::MTG_COLOR_ARTIFACT, res->getValue());
|
||||
SAFE_DELETE(res);
|
||||
}
|
||||
break;
|
||||
case 't': //Tap
|
||||
if (value == "t")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user