Erwan
- fix a memory leak with "Prevent All combat damages" ability - Fix issue 242 (Equip can be used outside of the main phases) - introducing "attach" keyword. Same as equip but can be used anytime. Untested - introducing "asSorcery" keyword. Can be used the same way as "myTurnOnly" on activated abilities to restrict their usage. Untested. Other similar keywords will follow, please let me know which ones would be useful
This commit is contained in:
@@ -100,9 +100,14 @@ class TriggeredAbility:public MTGAbility{
|
||||
|
||||
class ActivatedAbility:public MTGAbility{
|
||||
public:
|
||||
int playerturnonly;
|
||||
enum {
|
||||
NO_RESTRICTION = 0,
|
||||
PLAYER_TURN_ONLY = 1,
|
||||
AS_SORCERY = 2
|
||||
};
|
||||
int restrictions;
|
||||
int needsTapping;
|
||||
ActivatedAbility(int id, MTGCardInstance * card,ManaCost * _cost = NULL, int _playerturnonly = 0,int tap = 1);
|
||||
ActivatedAbility(int id, MTGCardInstance * card,ManaCost * _cost = NULL, int _restrictions = NO_RESTRICTION,int tap = 1);
|
||||
virtual int reactToClick(MTGCardInstance * card);
|
||||
virtual int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||
virtual int reactToTargetClick(Targetable * object);
|
||||
@@ -202,6 +207,7 @@ class AbilityFactory{
|
||||
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
|
||||
int parsePowerToughness(string s, int *power, int *toughness);
|
||||
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
|
||||
int parseRestriction(string s);
|
||||
public:
|
||||
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,MTGGameZone * dest = NULL);
|
||||
|
||||
Reference in New Issue
Block a user