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:
omegablast2002@yahoo.com
2010-08-30 18:45:38 +00:00
parent e6769fcfe9
commit 0b4dde558b
20 changed files with 347 additions and 13 deletions
+1
View File
@@ -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);
+2
View File
@@ -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"){
+26
View File
@@ -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:
+2
View File
@@ -49,6 +49,8 @@ class MTGAbility: public ActionElement{
int oneShot;
int forceDestroy;
ManaCost * cost;
ManaCost * alternative;
Targetable * target;
int aType;
MTGCardInstance * source;
+2
View File
@@ -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;
+5 -1
View File
@@ -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
+2
View File
@@ -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);
};
+3 -1
View File
@@ -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();