andAbility on ATokenCreator, Extend AAFlip,

This commit is contained in:
Anthony Calosa
2016-08-03 16:10:53 +08:00
parent d7fec7d10a
commit 4753f7bb51
16 changed files with 173 additions and 779 deletions

View File

@@ -2381,6 +2381,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
ATokenCreator * tok = NEW ATokenCreator(observer, id, card,target, NULL, tokenId, starfound, multiplier, who);
tok->oneShot = 1;
//andability
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card);
}
return tok;
}
@@ -2395,6 +2402,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{
ATokenCreator * tok = NEW ATokenCreator(observer, id, card, target, NULL, cardName, starfound, multiplier, who);
tok->oneShot = 1;
//andability
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card);
}
return tok;
}
}
@@ -2431,6 +2445,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
tok->oneShot = 1;
if(aLivingWeapon)
tok->forceDestroy = 1;
//andability
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card);
}
return tok;
}