fixed a reported bug with blood chief accession, the cause was a goof up in logic, in the refactor to this section, foelost( parsing was changed to be its bool for lifelost....however since it was changed and we now didn't declare that "foelost(" was "found"...found was a null variable when we tried to atoi it....

This commit is contained in:
omegablast2002@yahoo.com
2011-05-19 12:35:35 +00:00
parent 426cc68950
commit 24049d3da4

View File

@@ -423,9 +423,8 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string magicText, int
bool limitOnceATurn = (s.find("turnlimited") != string::npos);
bool isSuspended = (s.find("suspended") != string::npos);
bool opponentPoisoned = (s.find("opponentpoisoned") != string::npos);
bool lifelost = (s.find("foelost(") != string::npos);
int lifeamount = lifelost ? atoi(s.substr(found + 8,')').c_str()) : 0 ;
bool lifelost = (s.find("foelost(") != string::npos);
int lifeamount = lifelost ? atoi(s.substr(s.find("foelost(") + 8,')').c_str()) : 0;
//Card Changed Zone
found = s.find("movedto(");