- minor cleanup of MTGRules.cpp based on my comments in r3084. I visually verified that I didn't break the fix in r3084. Also ran the test suite.
-- in case somebody wonders about some of the tests I deleted, most of these tests are useless because all callers make sure alternateCost is not null (in isReactingToClick) and that the manapool can afford the cost, before doing the call to reacttoclick. Proving it by adding an assert, and also making the function protected, to be sure it is only called by the authorized children.
This commit is contained in:
wagic.the.homebrew@gmail.com
2011-02-09 14:33:09 +00:00
parent 4cbf3ddeb5
commit 7f4c001a1d
2 changed files with 33 additions and 46 deletions
+4 -4
View File
@@ -35,12 +35,12 @@ public:
class MTGAlternativeCostRule: public MTGAbility
{
public:
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
protected:
int isReactingToClick(MTGCardInstance * card, ManaCost * mana, ManaCost *alternateManaCost);
int reactToClick(MTGCardInstance * card, ManaCost * alternateManaCost, int paymentType = ManaCost::MANA_PAID);
public:
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
int reactToClick(MTGCardInstance * card);
int testDestroy();