changed a couple wParsed ints to assign the spell or NULL rather then relying in card to cast it as NULL.

This commit is contained in:
omegablast2002@yahoo.com
2011-09-20 03:13:52 +00:00
parent fbfac78b09
commit e3e0233b8a
2 changed files with 8 additions and 4 deletions

View File

@@ -168,9 +168,10 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card,Player * player
}
else if (i == 2)
{
WParsedInt * secondA = NEW WParsedInt(comparasion[2].c_str(),(Spell*)card,card);
secondAmount = secondA->getValue();
SAFE_DELETE(secondA);
Spell * spellCard = (Spell*)card;
WParsedInt * secondA = NEW WParsedInt(comparasion[2].c_str(),spellCard?spellCard:NULL,card);
secondAmount = secondA->getValue();
SAFE_DELETE(secondA);
}
}
if(firstAmount < secondAmount && !less && !more && !equal)
@@ -967,6 +968,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
}
}
//if/ifnot COND then DO EFFECT.
const string ifKeywords[] = {"if ", "ifnot "};
int checkIf[] = { 1, 2 };