ifthen ability sometimes wasn't grabbing the right target, i now pass it through MTGAbility creations target.

also, i see now why targeted counter cost were left broken for so long. i think this way fixes it in all cases. what a pain.
This commit is contained in:
omegablast2002@yahoo.com
2011-09-15 11:50:04 +00:00
parent d04b4eca38
commit a6c458d0cb
4 changed files with 17 additions and 11 deletions

View File

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