- 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 -4
View File
@@ -1469,7 +1469,7 @@ public:
abilitygranted = ability;
nbTargets = 0;
tc = _tc;
if (!tc) tc = NEW CreatureTargetChooser(_source);
if (!tc) tc = NEW TypeTargetChooser("creature",_source);
}
void Update(float dt)
@@ -4738,7 +4738,7 @@ public:
counter = NEW TypeTargetChooser("land");
landsPlayedThisTurn = source->controller()->game->inPlay->seenThisTurn(counter);
PlayRestrictions * restrictions = source->controller()->game->playRestrictions;
landsRestriction = (MaxPerTurnRestriction *) (restrictions->getRestrictionById(PlayRestriction::LANDS_RULE_ID));
landsRestriction = restrictions->getMaxPerTurnRestrictionByTargetChooser(counter);
restrictions->removeRestriction(landsRestriction);
}
@@ -4773,7 +4773,7 @@ public:
int destroy()
{
PlayRestrictions * restrictions = source->controller()->game->playRestrictions;
if(restrictions->getRestrictionById(PlayRestriction::LANDS_RULE_ID))
if(restrictions->getMaxPerTurnRestrictionByTargetChooser(counter))
return 1;
restrictions->addRestriction(landsRestriction);
@@ -5590,7 +5590,7 @@ class AMinionofLeshrac: public TargetAbility
public:
int paidThisTurn;
AMinionofLeshrac(int _id, MTGCardInstance * source) :
TargetAbility(_id, source, NEW CreatureTargetChooser(), 0, 1, 0)
TargetAbility(_id, source, NEW TypeTargetChooser("creature"), 0, 1, 0)
{
paidThisTurn = 1;
}