added support for alternative casting cost, evoke, added support for phantom cycle,hydras, added support for exile/bounce as casting cost
This commit is contained in:
@@ -88,6 +88,7 @@ class Spell: public Interruptible {
|
||||
int resolve();
|
||||
void Render();
|
||||
bool kickerWasPaid();
|
||||
bool AlternativeWasPaid();
|
||||
const string getDisplayName() const;
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
MTGCardInstance * getNextCardTarget(MTGCardInstance * previous = 0);
|
||||
|
||||
@@ -53,6 +53,8 @@ public:
|
||||
intValue = target->getManaCost()->getConvertedCost();
|
||||
}else if (s == "lifetotal"){
|
||||
intValue = target->controller()->life;
|
||||
}else if (s == "sunburst"){
|
||||
intValue = target->costAmount;
|
||||
}else if (s == "odcount"){
|
||||
intValue = target->controller()->opponent()->damageCount;
|
||||
}else if (s == "opponentlifetotal"){
|
||||
|
||||
@@ -82,6 +82,32 @@ public:
|
||||
virtual int setSource(MTGCardInstance * _source);
|
||||
virtual TapTargetCost * clone() const;
|
||||
};
|
||||
//exile as cost
|
||||
class ExileTargetCost: public ExtraCost{
|
||||
public:
|
||||
MTGCardInstance * target;
|
||||
ExileTargetCost(TargetChooser *_tc = NULL);
|
||||
virtual int setPayment(MTGCardInstance * card);
|
||||
virtual int isPaymentSet();
|
||||
virtual int canPay();
|
||||
virtual int doPay();
|
||||
virtual void Render();
|
||||
virtual int setSource(MTGCardInstance * _source);
|
||||
virtual ExileTargetCost * clone() const;
|
||||
};
|
||||
//bounce cost
|
||||
class BounceTargetCost: public ExtraCost{
|
||||
public:
|
||||
MTGCardInstance * target;
|
||||
BounceTargetCost(TargetChooser *_tc = NULL);
|
||||
virtual int setPayment(MTGCardInstance * card);
|
||||
virtual int isPaymentSet();
|
||||
virtual int canPay();
|
||||
virtual int doPay();
|
||||
virtual void Render();
|
||||
virtual int setSource(MTGCardInstance * _source);
|
||||
virtual BounceTargetCost * clone() const;
|
||||
};
|
||||
|
||||
class CounterCost: public ExtraCost{
|
||||
public:
|
||||
|
||||
@@ -49,6 +49,8 @@ class MTGAbility: public ActionElement{
|
||||
int oneShot;
|
||||
int forceDestroy;
|
||||
ManaCost * cost;
|
||||
ManaCost * alternative;
|
||||
|
||||
Targetable * target;
|
||||
int aType;
|
||||
MTGCardInstance * source;
|
||||
|
||||
@@ -44,9 +44,11 @@ class MTGCardInstance: public CardPrimitive, public MTGCard, public Damageable {
|
||||
MTGGameZone * currentZone;
|
||||
Pos* view;
|
||||
int X;
|
||||
int costAmount;
|
||||
int regenerateTokens;
|
||||
int isToken;
|
||||
int stillInUse();
|
||||
int getCostAmount();
|
||||
Player * lastController;
|
||||
MTGGameZone * getCurrentZone();
|
||||
MTGGameZone * previousZone;
|
||||
|
||||
@@ -107,8 +107,12 @@ class Constants
|
||||
POISONDAMAGE = 49,
|
||||
POISONTWODAMAGE = 50,
|
||||
POISONTHREEDAMAGE = 51,
|
||||
PHANTOM = 52,
|
||||
COUNTERASDAMAGE = 53,
|
||||
VIGOR = 54,
|
||||
CHANGELING = 55,
|
||||
|
||||
NB_BASIC_ABILITIES = 52,
|
||||
NB_BASIC_ABILITIES = 56,
|
||||
|
||||
|
||||
RARITY_S = 'S', //Special Rarity
|
||||
|
||||
@@ -160,6 +160,8 @@ class MTGPlayerCards {
|
||||
void resetLibrary();
|
||||
void initDeck(MTGDeck * deck);
|
||||
MTGCardInstance * putInGraveyard(MTGCardInstance * card);
|
||||
MTGCardInstance * putInExile(MTGCardInstance * card);
|
||||
MTGCardInstance * putInHand(MTGCardInstance * card);
|
||||
MTGCardInstance * putInZone(MTGCardInstance * card, MTGGameZone * from, MTGGameZone * to);
|
||||
int isInPlay(MTGCardInstance * card);
|
||||
};
|
||||
|
||||
@@ -22,10 +22,12 @@ class ManaCost{
|
||||
public:
|
||||
enum{
|
||||
MANA_PAID = 1,
|
||||
MANA_PAID_WITH_KICKER = 2
|
||||
MANA_PAID_WITH_KICKER = 2,
|
||||
MANA_PAID_WITH_ALTERNATIVE = 3
|
||||
};
|
||||
ExtraCosts * extraCosts;
|
||||
ManaCost * kicker;
|
||||
ManaCost * alternative;
|
||||
static ManaCost * parseManaCost(string value, ManaCost * _manacost = NULL, MTGCardInstance * c = NULL);
|
||||
virtual void init();
|
||||
void x();
|
||||
|
||||
Reference in New Issue
Block a user