Overload Cards

the alias is for the Overload Check and Alternate Cost Restriction...
???Bestow???
This commit is contained in:
Anthony Calosa
2015-11-09 19:04:31 +08:00
parent c6e76d78a2
commit 406f68ac5b
13 changed files with 259 additions and 80 deletions

View File

@@ -214,6 +214,8 @@ public:
PUT_INTO_PLAY_WITH_KICKER = 31,
STANDARD_FIZZLER = 32,
PAYZERO_COST = 33,
OVERLOAD_COST = 34,
BESTOW_COST = 35,
};
};

View File

@@ -55,7 +55,7 @@ public:
Pos* view;
int X;
int castX;
int alternateCostPaid[ManaCost::MANA_PAID_WITH_SUSPEND + 1];
int alternateCostPaid[ManaCost::MANA_PAID_WITH_BESTOW + 1];
int paymenttype;
int castMethod; /* Tells if the card reached its current zone by being cast or not (brought into the zone by an effect). non 0 == cast, 0 == not cast */
int frozen;

View File

@@ -101,7 +101,7 @@ class MTGAlternativeCostRule: public PermanentAbility
{
protected:
int isReactingToClick(MTGCardInstance * card, ManaCost * mana, ManaCost *alternateManaCost);
int reactToClick(MTGCardInstance * card, ManaCost * alternateManaCost, int paymentType = ManaCost::MANA_PAID);
int reactToClick(MTGCardInstance * card, ManaCost * alternateManaCost, int paymentType = ManaCost::MANA_PAID, bool overload = false);
string alternativeName;
public:
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
@@ -192,6 +192,19 @@ public:
virtual MTGPayZeroRule * clone() const;
};
class MTGOverloadRule: public MTGAlternativeCostRule
{
public:
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
int reactToClick(MTGCardInstance * card);
virtual ostream& toString(ostream& out) const;
MTGOverloadRule(GameObserver* observer, int _id);
const string getMenuText()
{
return "Overload";
}
virtual MTGOverloadRule * clone() const;
};
class MTGSuspendRule: public MTGAlternativeCostRule
{

View File

@@ -48,7 +48,9 @@ public:
MANA_PAID_WITH_RETRACE = 6,
MANA_PAID_WITH_MORPH = 7,
MANA_PAID_WITH_SUSPEND = 8,
MANA_PAID_WITH_OTHERCOST = 9
MANA_PAID_WITH_OVERLOAD = 9,
MANA_PAID_WITH_BESTOW = 10,
MANA_PAID_WITH_OTHERCOST = 11
};
ExtraCosts * extraCosts;