first moved regenerate lower on the parser, 2nd fixed an unforeseen bug with the newability subkeyword and the parser, i now store the string value of the transforms ability and remove it from the main string until transforms is parsed, if I leave it during the whole parsing any ability listed above transforms will not work correctly when granted with this ability.

also noticed issues with transforms parsing which i was able to easily correct by making it parse transforms in double brackets, transforms((effects))...updated primitive in next revision.
test suite passes, and varified that the fix doesn't effect how "&&" ability works with transforms.
This commit is contained in:
omegablast2002@yahoo.com
2011-03-29 20:28:03 +00:00
parent 827360d226
commit f0d104363f
2 changed files with 37 additions and 21 deletions

View File

@@ -368,7 +368,8 @@ class GenericTriggeredAbility:public TriggeredAbility, public NestedAbility{
/* Ability Factory */
class AbilityFactory{
private:
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
string storedString;
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
TriggeredAbility * parseTrigger(string s, string magicText, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
int parseRestriction(string s);
MTGAbility * getAlternateCost( string s, int id, Spell *spell, MTGCardInstance *card );