Fixed parsing of "if(ifnot) ... then may ... "

This commit is contained in:
pankdm
2013-10-18 06:34:23 +00:00
parent ea217fdba1
commit 43ba9aa13d

View File

@@ -1448,7 +1448,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
string s1 = s;
MTGAbility * a1 = NULL;
if (s1.find(" then ") != string::npos)
a1 = parseMagicLine(s1.substr(s1.find(" then "+1)), id, spell, card);
a1 = parseMagicLine(s1.substr(s1.find(" then ") + 6), id, spell, card);
if(!a1) return NULL;
MTGAbility * a = NEW IfThenAbility(observer, id, a1,a2, card,(Targetable*)target,checkIf[i],cond);
a->canBeInterrupted = false;