extended "vanishing" to support "fading" these 2 abilities are the same with the exception of the name of the counter the creature receive.

This commit is contained in:
omegablast2002@yahoo.com
2011-02-06 18:20:59 +00:00
parent 26b1cd2c34
commit de6e5ed7eb
3 changed files with 30 additions and 10 deletions
+19 -2
View File
@@ -2439,10 +2439,27 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{
amount = atoi(s.substr(start + 1).c_str());
}
MTGAbility * a = NEW AVanishing(id, card, NULL, doTap, restrictions,amount);
MTGAbility * a = NEW AVanishing(id, card, NULL, doTap, restrictions,amount,"time");
return a;
}
//Fading
found = s.find("fading:");
if (found != string::npos)
{
size_t start = s.find(":", found);
size_t end = s.find(" ", start);
int amount;
if (end != string::npos)
{
amount = atoi(s.substr(start + 1, end - start - 1).c_str());
}
else
{
amount = atoi(s.substr(start + 1).c_str());
}
MTGAbility * a = NEW AVanishing(id, card, NULL, doTap, restrictions,amount,"fade");
return a;
}
if (s.find("altercost(") != string::npos)
return getManaReduxAbility(s.substr(s.find("altercost(") + 10), id, spell, card, target);