add andAbility support for AACopier

the granted ability must exists only if you copy a card, if you don't
copy any card, the source doesn't have any granted abillities.
This commit is contained in:
Anthony Calosa
2016-08-07 10:15:11 +08:00
parent dfd0761506
commit 807874ce5d
5 changed files with 33 additions and 14 deletions

View File

@@ -2518,6 +2518,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{
MTGAbility * a = NEW AACopier(observer, id, card, target);
a->oneShot = 1;
a->canBeInterrupted = false;
//andability
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AACopier*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a;
}