some changes

change keyword "makecardt" alternative token creator to "create" keyword
add lifeleech - gain life lost with target
This commit is contained in:
Anthony Calosa
2017-02-07 21:22:49 +08:00
parent 75e372ac9b
commit bac69f95d8
6 changed files with 103 additions and 98 deletions

View File

@@ -2653,7 +2653,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
//Alternative Token creator. Name, type, p/t, abilities - uses ":" as delimeter
vector<string> makeToken = parseBetween(s, "makecardt(", ")");
vector<string> makeToken = parseBetween(s, "create(", ")");
if (makeToken.size())
{
WParsedInt * multiplier = NULL;
@@ -3147,7 +3147,17 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
if (splitLife.size())
{
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AALifer(observer, id, card, t, splitLife[1], NULL, who);
MTGAbility * a = NEW AALifer(observer, id, card, t, splitLife[1], false, NULL, who);
a->oneShot = 1;
return a;
}
//siphon life - gain life lost this way
vector<string> splitSiphonLife = parseBetween(s, "lifeleech:", " ", false);
if (splitSiphonLife.size())
{
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AALifer(observer, id, card, t, splitSiphonLife[1], true, NULL, who);
a->oneShot = 1;
return a;
}