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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user