Revision: 4878
Author: pankdm
Date: Fri Oct 18 06:34:23 2013 UTC
Log: Fixed parsing of "if(ifnot) ... then may ... "
http://code.google.com/p/wagic/source/detail?r=4878
Modified:
/trunk/projects/mtg/src/MTGAbility.cpp
=======================================
--- /trunk/projects/mtg/src/MTGAbility.cpp Tue Oct 8 23:18:42 2013 UTC
+++ /trunk/projects/mtg/src/MTGAbility.cpp Fri Oct 18 06:34:23 2013 UTC
@@ -1448,7 +1448,7 @@
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;