refactored how manaredux coding works

replaced literals with constants in some places.
migrated some abilities out of headers and into implementation files.
This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-01 13:04:06 +00:00
parent f0d3072091
commit a458da051d
11 changed files with 617 additions and 451 deletions
+6 -2
View File
@@ -280,13 +280,17 @@ class GenericTriggeredAbility:public TriggeredAbility, public NestedAbility{
class AbilityFactory{
private:
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
TriggeredAbility * parseTrigger(string s, string magicText, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
int parseRestriction(string s);
public:
MTGAbility * getAlternateCost( string s, int id, Spell *spell, MTGCardInstance *card );
MTGAbility * getManaReduxAbility(string s, int id, Spell *spell, MTGCardInstance *card, MTGCardInstance *target);
public:
Counter * parseCounter(string s, MTGCardInstance * target, Spell * spell = NULL);
int parsePowerToughness(string s, int *power, int *toughness);
int getAbilities(vector<MTGAbility *> * v, Spell * spell, MTGCardInstance * card = NULL, int id = 0,MTGGameZone * dest = NULL);
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0, int forceUEOT = 0,int oneShot = 0,int forceForever = 0, MTGGameZone * dest = NULL);
int abilityEfficiency(MTGAbility * a, Player * p, int mode = MODE_ABILITY, TargetChooser * tc = NULL);
int magicText(int id, Spell * spell, MTGCardInstance * card = NULL, int mode = MODE_PUTINTOPLAY, TargetChooser * tc = NULL, MTGGameZone * dest = NULL);
static int computeX(Spell * spell, MTGCardInstance * card);