also add aicode for Amplify cards
This commit is contained in:
Anthony Calosa
2017-03-09 18:37:55 +08:00
parent 650d794eec
commit b01c1455f5
11 changed files with 395 additions and 175 deletions
+30
View File
@@ -2910,6 +2910,36 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//provoke
found = s.find("provoke");
if (found != string::npos)
{
MTGAbility * a = NEW AProvoke(observer, id, card, target);
a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AProvoke*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a;
}
//setblocker
found = s.find("setblocker");
if (found != string::npos)
{
MTGAbility * a = NEW AProvoke(observer, id, card, target);
a->oneShot = 1;
((AProvoke*)a)->setblocker = true;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AProvoke*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a;
}
//clone
found = s.find("clone");
if (found != string::npos)