- fixed issue 595 (MaxCast not working). Root cause was the stupidest typo ever in the code (maxCost instead of maxCast...)
- fixed an issue with Storm mentioned by zethfox (was counting only spells played by current player)
- Moved "max lands per turn" rule outside of the code (yay!) Please be sure to update your Rules folder!
This commit is contained in:
wagic.the.homebrew@gmail.com
2011-02-15 14:17:34 +00:00
parent fa18c60a44
commit 8dd6856453
13 changed files with 260 additions and 108 deletions
+4 -9
View File
@@ -10,11 +10,6 @@ class PlayRestriction
{
public:
enum
{
LANDS_RULE_ID,
UNDEF_ID
};
enum
{
@@ -23,12 +18,11 @@ public:
NO_OPINION
};
unsigned int id;
TargetChooser * tc;
virtual int canPutIntoZone(MTGCardInstance * card, MTGGameZone * destZone) = 0;
PlayRestriction(unsigned int id, TargetChooser * tc);
PlayRestriction(TargetChooser * tc);
~PlayRestriction();
};
@@ -41,7 +35,7 @@ public:
};
int maxPerTurn;
MTGGameZone * zone;
MaxPerTurnRestriction(unsigned int id, TargetChooser * tc, int maxPerTurn, MTGGameZone * zone);
MaxPerTurnRestriction(TargetChooser * tc, int maxPerTurn, MTGGameZone * zone);
int canPutIntoZone(MTGCardInstance * card, MTGGameZone * destZone);
};
@@ -51,7 +45,8 @@ class PlayRestrictions
protected:
vector<PlayRestriction *>restrictions;
public:
PlayRestriction * getRestrictionById(unsigned int id);
MaxPerTurnRestriction * getMaxPerTurnRestrictionByTargetChooser(TargetChooser * tc);
void addRestriction(PlayRestriction * restriction);
void removeRestriction(PlayRestriction * restriction);
int canPutIntoZone(MTGCardInstance * card, MTGGameZone * destZone);