Minor simplification of MTGRules.cpp
This commit is contained in:
@@ -10,16 +10,22 @@
|
|||||||
#include "CardSelector.h"
|
#include "CardSelector.h"
|
||||||
#include "ManaCost.h"
|
#include "ManaCost.h"
|
||||||
|
|
||||||
class OtherAbilitiesEventReceiver: public MTGAbility
|
class PermanentAbility: public MTGAbility
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int testDestroy() {return 0;};
|
||||||
|
PermanentAbility(GameObserver* observer, int _id);
|
||||||
|
};
|
||||||
|
|
||||||
|
class OtherAbilitiesEventReceiver: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int testDestroy();
|
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
OtherAbilitiesEventReceiver(GameObserver* observer, int _id);
|
OtherAbilitiesEventReceiver(GameObserver* observer, int _id);
|
||||||
OtherAbilitiesEventReceiver * clone() const;
|
OtherAbilitiesEventReceiver * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGEventBonus: public MTGAbility
|
class MTGEventBonus: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int textAlpha;
|
int textAlpha;
|
||||||
@@ -55,19 +61,17 @@ public:
|
|||||||
|
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
void grantAward(string awardName,int amount);
|
void grantAward(string awardName,int amount);
|
||||||
int testDestroy();
|
|
||||||
void Update(float dt);
|
void Update(float dt);
|
||||||
void Render();
|
void Render();
|
||||||
MTGEventBonus(GameObserver* observer, int _id);
|
MTGEventBonus(GameObserver* observer, int _id);
|
||||||
virtual MTGEventBonus * clone() const;
|
virtual MTGEventBonus * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGPutInPlayRule: public MTGAbility
|
class MTGPutInPlayRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGPutInPlayRule(GameObserver* observer, int _id);
|
MTGPutInPlayRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -82,7 +86,6 @@ class MTGKickerRule: public MTGPutInPlayRule
|
|||||||
public:
|
public:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGKickerRule(GameObserver* observer, int _id);
|
MTGKickerRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -92,7 +95,7 @@ public:
|
|||||||
virtual MTGKickerRule * clone() const;
|
virtual MTGKickerRule * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGAlternativeCostRule: public MTGAbility
|
class MTGAlternativeCostRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana, ManaCost *alternateManaCost);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana, ManaCost *alternateManaCost);
|
||||||
@@ -101,8 +104,6 @@ protected:
|
|||||||
public:
|
public:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
|
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGAlternativeCostRule(GameObserver* observer, int _id);
|
MTGAlternativeCostRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -119,7 +120,6 @@ class MTGBuyBackRule: public MTGAlternativeCostRule
|
|||||||
public:
|
public:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGBuyBackRule(GameObserver* observer, int _id);
|
MTGBuyBackRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -135,7 +135,6 @@ public:
|
|||||||
|
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGFlashBackRule(GameObserver* observer, int _id);
|
MTGFlashBackRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -150,7 +149,6 @@ class MTGRetraceRule: public MTGAlternativeCostRule
|
|||||||
public:
|
public:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGRetraceRule(GameObserver* observer, int _id);
|
MTGRetraceRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -160,13 +158,12 @@ public:
|
|||||||
virtual MTGRetraceRule * clone() const;
|
virtual MTGRetraceRule * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGMorphCostRule: public MTGAbility
|
class MTGMorphCostRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGMorphCostRule(GameObserver* observer, int _id);
|
MTGMorphCostRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -182,7 +179,6 @@ public:
|
|||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int receiveEvent(WEvent *e);
|
int receiveEvent(WEvent *e);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
string suspendmenu;
|
string suspendmenu;
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGSuspendRule(GameObserver* observer, int _id);
|
MTGSuspendRule(GameObserver* observer, int _id);
|
||||||
@@ -198,7 +194,7 @@ public:
|
|||||||
virtual MTGSuspendRule * clone() const;
|
virtual MTGSuspendRule * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGAttackRule: public MTGAbility, public Limitor
|
class MTGAttackRule: public PermanentAbility, public Limitor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -206,7 +202,6 @@ public:
|
|||||||
virtual bool greyout(Target*);
|
virtual bool greyout(Target*);
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGAttackRule(GameObserver* observer, int _id);
|
MTGAttackRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -218,22 +213,20 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* handles combat trigger send recieve events*/
|
/* handles combat trigger send recieve events*/
|
||||||
class MTGCombatTriggersRule: public MTGAbility
|
class MTGCombatTriggersRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MTGCombatTriggersRule(GameObserver* observer, int _id);
|
MTGCombatTriggersRule(GameObserver* observer, int _id);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
int testDestroy();
|
|
||||||
virtual MTGCombatTriggersRule * clone() const;
|
virtual MTGCombatTriggersRule * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGBlockRule: public MTGAbility
|
class MTGBlockRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||||
int reactToClick(MTGCardInstance * card);
|
int reactToClick(MTGCardInstance * card);
|
||||||
int testDestroy();
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
MTGBlockRule(GameObserver* observer, int _id);
|
MTGBlockRule(GameObserver* observer, int _id);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -244,43 +237,39 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Persist Rule */
|
/* Persist Rule */
|
||||||
class MTGPersistRule: public MTGAbility
|
class MTGPersistRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MTGPersistRule(GameObserver* observer, int _id);
|
MTGPersistRule(GameObserver* observer, int _id);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
int testDestroy();
|
|
||||||
virtual MTGPersistRule * clone() const;
|
virtual MTGPersistRule * clone() const;
|
||||||
};
|
};
|
||||||
/* vampire Rule */
|
/* vampire Rule */
|
||||||
class MTGVampireRule: public MTGAbility
|
class MTGVampireRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MTGVampireRule(GameObserver* observer, int _id);
|
MTGVampireRule(GameObserver* observer, int _id);
|
||||||
map<MTGCardInstance*,vector<MTGCardInstance*> > victems;
|
map<MTGCardInstance*,vector<MTGCardInstance*> > victems;
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
int testDestroy();
|
|
||||||
virtual MTGVampireRule * clone() const;
|
virtual MTGVampireRule * clone() const;
|
||||||
};
|
};
|
||||||
//unearths destruction if leaves play effect
|
//unearths destruction if leaves play effect
|
||||||
class MTGUnearthRule: public MTGAbility
|
class MTGUnearthRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MTGUnearthRule(GameObserver* observer, int _id);
|
MTGUnearthRule(GameObserver* observer, int _id);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
int testDestroy();
|
|
||||||
virtual MTGUnearthRule * clone() const;
|
virtual MTGUnearthRule * clone() const;
|
||||||
};
|
};
|
||||||
class MTGTokensCleanup: public MTGAbility
|
class MTGTokensCleanup: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vector<MTGCardInstance *> list;
|
vector<MTGCardInstance *> list;
|
||||||
MTGTokensCleanup(GameObserver* observer, int _id);
|
MTGTokensCleanup(GameObserver* observer, int _id);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
int testDestroy();
|
|
||||||
virtual MTGTokensCleanup * clone() const;
|
virtual MTGTokensCleanup * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -313,7 +302,7 @@ public:
|
|||||||
virtual MTGPlaneWalkerRule * clone() const;
|
virtual MTGPlaneWalkerRule * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MTGMomirRule: public MTGAbility
|
class MTGMomirRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int genRandomCreatureId(int convertedCost);
|
int genRandomCreatureId(int convertedCost);
|
||||||
@@ -327,7 +316,6 @@ public:
|
|||||||
int alreadyplayed;
|
int alreadyplayed;
|
||||||
MTGAllCards * collection;
|
MTGAllCards * collection;
|
||||||
MTGCardInstance * genCreature(int id);
|
MTGCardInstance * genCreature(int id);
|
||||||
int testDestroy();
|
|
||||||
void Update(float dt);
|
void Update(float dt);
|
||||||
void Render();
|
void Render();
|
||||||
MTGMomirRule(GameObserver* observer, int _id, MTGAllCards * _collection);
|
MTGMomirRule(GameObserver* observer, int _id, MTGAllCards * _collection);
|
||||||
@@ -343,7 +331,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//stone hewer gaint avatar mode
|
//stone hewer gaint avatar mode
|
||||||
class MTGStoneHewerRule: public MTGAbility
|
class MTGStoneHewerRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int genRandomEquipId(int convertedCost);
|
int genRandomEquipId(int convertedCost);
|
||||||
@@ -352,7 +340,6 @@ private:
|
|||||||
public:
|
public:
|
||||||
MTGAllCards * collection;
|
MTGAllCards * collection;
|
||||||
MTGCardInstance * genEquip(int id);
|
MTGCardInstance * genEquip(int id);
|
||||||
int testDestroy();
|
|
||||||
MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCards * _collection);
|
MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCards * _collection);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -363,10 +350,9 @@ public:
|
|||||||
virtual MTGStoneHewerRule * clone() const;
|
virtual MTGStoneHewerRule * clone() const;
|
||||||
};
|
};
|
||||||
//Hermit Druid avatar mode
|
//Hermit Druid avatar mode
|
||||||
class MTGHermitRule: public MTGAbility
|
class MTGHermitRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int testDestroy();
|
|
||||||
MTGHermitRule(GameObserver* observer, int _id);
|
MTGHermitRule(GameObserver* observer, int _id);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
@@ -377,29 +363,26 @@ public:
|
|||||||
};
|
};
|
||||||
//
|
//
|
||||||
/* LifeLink */
|
/* LifeLink */
|
||||||
class MTGLifelinkRule: public MTGAbility
|
class MTGLifelinkRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MTGLifelinkRule(GameObserver* observer, int _id);
|
MTGLifelinkRule(GameObserver* observer, int _id);
|
||||||
|
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
|
|
||||||
int testDestroy();
|
|
||||||
|
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
|
|
||||||
virtual MTGLifelinkRule * clone() const;
|
virtual MTGLifelinkRule * clone() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Deathtouch */
|
/* Deathtouch */
|
||||||
class MTGDeathtouchRule: public MTGAbility
|
class MTGDeathtouchRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MTGDeathtouchRule(GameObserver* observer, int _id);
|
MTGDeathtouchRule(GameObserver* observer, int _id);
|
||||||
|
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
|
|
||||||
int testDestroy();
|
|
||||||
const char * getMenuText()
|
const char * getMenuText()
|
||||||
{
|
{
|
||||||
return "Deathtouch";
|
return "Deathtouch";
|
||||||
@@ -409,13 +392,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* handling parentchild */
|
/* handling parentchild */
|
||||||
class ParentChildRule: public MTGAbility
|
class ParentChildRule: public PermanentAbility
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ParentChildRule(GameObserver* observer, int _id);
|
ParentChildRule(GameObserver* observer, int _id);
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
virtual ostream& toString(ostream& out) const;
|
virtual ostream& toString(ostream& out) const;
|
||||||
int testDestroy();
|
|
||||||
virtual ParentChildRule * clone() const;
|
virtual ParentChildRule * clone() const;
|
||||||
};
|
};
|
||||||
/* HUD Display */
|
/* HUD Display */
|
||||||
@@ -434,7 +416,7 @@ public:
|
|||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HUDDisplay: public MTGAbility
|
class HUDDisplay: public PermanentAbility
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
list<HUDString *> events;
|
list<HUDString *> events;
|
||||||
@@ -444,7 +426,6 @@ private:
|
|||||||
float maxWidth;
|
float maxWidth;
|
||||||
int addEvent(string s);
|
int addEvent(string s);
|
||||||
public:
|
public:
|
||||||
int testDestroy();
|
|
||||||
int receiveEvent(WEvent * event);
|
int receiveEvent(WEvent * event);
|
||||||
void Update(float dt);
|
void Update(float dt);
|
||||||
void Render();
|
void Render();
|
||||||
|
|||||||
+27
-150
@@ -7,8 +7,12 @@
|
|||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
#include "AllAbilities.h"
|
#include "AllAbilities.h"
|
||||||
|
|
||||||
|
PermanentAbility::PermanentAbility(GameObserver* observer, int _id) : MTGAbility(observer, _id,NULL)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
MTGEventBonus::MTGEventBonus(GameObserver* observer, int _id) :
|
MTGEventBonus::MTGEventBonus(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id,NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
textAlpha = 0;
|
textAlpha = 0;
|
||||||
text = "";
|
text = "";
|
||||||
@@ -245,11 +249,6 @@ void MTGEventBonus::grantAward(string awardName,int amount)
|
|||||||
Credits::addCreditBonus(amount);
|
Credits::addCreditBonus(amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
int MTGEventBonus::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MTGEventBonus::Update(float dt)
|
void MTGEventBonus::Update(float dt)
|
||||||
{
|
{
|
||||||
if (textAlpha)
|
if (textAlpha)
|
||||||
@@ -278,7 +277,7 @@ MTGEventBonus * MTGEventBonus::clone() const
|
|||||||
|
|
||||||
//
|
//
|
||||||
MTGPutInPlayRule::MTGPutInPlayRule(GameObserver* observer, int _id) :
|
MTGPutInPlayRule::MTGPutInPlayRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
aType = MTGAbility::PUT_INTO_PLAY;
|
aType = MTGAbility::PUT_INTO_PLAY;
|
||||||
}
|
}
|
||||||
@@ -459,12 +458,6 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The Put into play rule is never destroyed
|
|
||||||
int MTGPutInPlayRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGPutInPlayRule::toString(ostream& out) const
|
ostream& MTGPutInPlayRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGPutInPlayRule ::: (";
|
out << "MTGPutInPlayRule ::: (";
|
||||||
@@ -597,11 +590,6 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MTGKickerRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGKickerRule::toString(ostream& out) const
|
ostream& MTGKickerRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGKickerRule ::: (";
|
out << "MTGKickerRule ::: (";
|
||||||
@@ -625,7 +613,7 @@ MTGKickerRule * MTGKickerRule::clone() const
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
MTGAlternativeCostRule::MTGAlternativeCostRule(GameObserver* observer, int _id) :
|
MTGAlternativeCostRule::MTGAlternativeCostRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
aType = MTGAbility::ALTERNATIVE_COST;
|
aType = MTGAbility::ALTERNATIVE_COST;
|
||||||
}
|
}
|
||||||
@@ -757,13 +745,6 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alter
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//The Put into play rule is never destroyed
|
|
||||||
int MTGAlternativeCostRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGAlternativeCostRule::toString(ostream& out) const
|
ostream& MTGAlternativeCostRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGAlternativeCostRule ::: (";
|
out << "MTGAlternativeCostRule ::: (";
|
||||||
@@ -810,12 +791,6 @@ int MTGBuyBackRule::reactToClick(MTGCardInstance * card)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//The Put into play rule is never destroyed
|
|
||||||
int MTGBuyBackRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGBuyBackRule::toString(ostream& out) const
|
ostream& MTGBuyBackRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGBuyBackRule ::: (";
|
out << "MTGBuyBackRule ::: (";
|
||||||
@@ -858,12 +833,6 @@ int MTGFlashBackRule::reactToClick(MTGCardInstance * card)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//The Put into play rule is never destroyed
|
|
||||||
int MTGFlashBackRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGFlashBackRule::toString(ostream& out) const
|
ostream& MTGFlashBackRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGFlashBackRule ::: (";
|
out << "MTGFlashBackRule ::: (";
|
||||||
@@ -910,13 +879,6 @@ int MTGRetraceRule::reactToClick(MTGCardInstance * card)
|
|||||||
return MTGAlternativeCostRule::reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_RETRACE);
|
return MTGAlternativeCostRule::reactToClick(card, alternateCost, ManaCost::MANA_PAID_WITH_RETRACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//The Put into play rule is never destroyed
|
|
||||||
int MTGRetraceRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGRetraceRule::toString(ostream& out) const
|
ostream& MTGRetraceRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGRetraceRule ::: (";
|
out << "MTGRetraceRule ::: (";
|
||||||
@@ -1027,13 +989,6 @@ int MTGSuspendRule::reactToClick(MTGCardInstance * card)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//The Put into play rule is never destroyed
|
|
||||||
int MTGSuspendRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGSuspendRule::toString(ostream& out) const
|
ostream& MTGSuspendRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGSuspendRule ::: (";
|
out << "MTGSuspendRule ::: (";
|
||||||
@@ -1052,7 +1007,7 @@ MTGSuspendRule * MTGSuspendRule::clone() const
|
|||||||
|
|
||||||
|
|
||||||
MTGMorphCostRule::MTGMorphCostRule(GameObserver* observer, int _id) :
|
MTGMorphCostRule::MTGMorphCostRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
aType = MTGAbility::MORPH_COST;
|
aType = MTGAbility::MORPH_COST;
|
||||||
}
|
}
|
||||||
@@ -1155,12 +1110,6 @@ int MTGMorphCostRule::reactToClick(MTGCardInstance * card)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The morph rule is never destroyed
|
|
||||||
int MTGMorphCostRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGMorphCostRule::toString(ostream& out) const
|
ostream& MTGMorphCostRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGMorphCostRule ::: (";
|
out << "MTGMorphCostRule ::: (";
|
||||||
@@ -1196,7 +1145,7 @@ bool MTGAttackRule::greyout(Target* t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MTGAttackRule::MTGAttackRule(GameObserver* observer, int _id) :
|
MTGAttackRule::MTGAttackRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
aType = MTGAbility::MTG_ATTACK_RULE;
|
aType = MTGAbility::MTG_ATTACK_RULE;
|
||||||
}
|
}
|
||||||
@@ -1258,12 +1207,6 @@ int MTGAttackRule::reactToClick(MTGCardInstance * card)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The Attack rule is never destroyed
|
|
||||||
int MTGAttackRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGAttackRule::toString(ostream& out) const
|
ostream& MTGAttackRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGAttackRule ::: (";
|
out << "MTGAttackRule ::: (";
|
||||||
@@ -1277,7 +1220,7 @@ MTGAttackRule * MTGAttackRule::clone() const
|
|||||||
|
|
||||||
//this rules handles returning cards to combat triggers for activations.
|
//this rules handles returning cards to combat triggers for activations.
|
||||||
MTGCombatTriggersRule::MTGCombatTriggersRule(GameObserver* observer, int _id) :
|
MTGCombatTriggersRule::MTGCombatTriggersRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
aType = MTGAbility::MTG_COMBATTRIGGERS_RULE;
|
aType = MTGAbility::MTG_COMBATTRIGGERS_RULE;
|
||||||
}
|
}
|
||||||
@@ -1376,12 +1319,6 @@ int MTGCombatTriggersRule::receiveEvent(WEvent *e)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//trigger rules are never distroyed
|
|
||||||
int MTGCombatTriggersRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGCombatTriggersRule::toString(ostream& out) const
|
ostream& MTGCombatTriggersRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGCombatTriggersRule ::: (";
|
out << "MTGCombatTriggersRule ::: (";
|
||||||
@@ -1395,7 +1332,7 @@ MTGCombatTriggersRule * MTGCombatTriggersRule::clone() const
|
|||||||
///------------
|
///------------
|
||||||
|
|
||||||
OtherAbilitiesEventReceiver::OtherAbilitiesEventReceiver(GameObserver* observer, int _id) :
|
OtherAbilitiesEventReceiver::OtherAbilitiesEventReceiver(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1418,18 +1355,13 @@ int OtherAbilitiesEventReceiver::receiveEvent(WEvent *e)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int OtherAbilitiesEventReceiver::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
OtherAbilitiesEventReceiver * OtherAbilitiesEventReceiver::clone() const
|
OtherAbilitiesEventReceiver * OtherAbilitiesEventReceiver::clone() const
|
||||||
{
|
{
|
||||||
return NEW OtherAbilitiesEventReceiver(*this);
|
return NEW OtherAbilitiesEventReceiver(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
MTGBlockRule::MTGBlockRule(GameObserver* observer, int _id) :
|
MTGBlockRule::MTGBlockRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
aType = MTGAbility::MTG_BLOCK_RULE;
|
aType = MTGAbility::MTG_BLOCK_RULE;
|
||||||
}
|
}
|
||||||
@@ -1466,12 +1398,6 @@ int MTGBlockRule::reactToClick(MTGCardInstance * card)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The Block rule is never destroyed
|
|
||||||
int MTGBlockRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGBlockRule::toString(ostream& out) const
|
ostream& MTGBlockRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGBlockRule ::: (";
|
out << "MTGBlockRule ::: (";
|
||||||
@@ -1494,7 +1420,7 @@ int MTGMomirRule::initialized = 0;
|
|||||||
vector<int> MTGMomirRule::pool[20];
|
vector<int> MTGMomirRule::pool[20];
|
||||||
|
|
||||||
MTGMomirRule::MTGMomirRule(GameObserver* observer, int _id, MTGAllCards * _collection) :
|
MTGMomirRule::MTGMomirRule(GameObserver* observer, int _id, MTGAllCards * _collection) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
collection = _collection;
|
collection = _collection;
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
@@ -1595,12 +1521,6 @@ int MTGMomirRule::genRandomCreatureId(int convertedCost)
|
|||||||
return pool[convertedCost][start];
|
return pool[convertedCost][start];
|
||||||
}
|
}
|
||||||
|
|
||||||
//The Momir rule is never destroyed
|
|
||||||
int MTGMomirRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MTGMomirRule::Update(float dt)
|
void MTGMomirRule::Update(float dt)
|
||||||
{
|
{
|
||||||
if (newPhase != currentPhase && newPhase == Constants::MTG_PHASE_UNTAP)
|
if (newPhase != currentPhase && newPhase == Constants::MTG_PHASE_UNTAP)
|
||||||
@@ -1649,7 +1569,7 @@ int MTGStoneHewerRule::initialized = 0;
|
|||||||
vector<int> MTGStoneHewerRule::pool[20];
|
vector<int> MTGStoneHewerRule::pool[20];
|
||||||
|
|
||||||
MTGStoneHewerRule::MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCards * _collection) :
|
MTGStoneHewerRule::MTGStoneHewerRule(GameObserver* observer, int _id, MTGAllCards * _collection) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
collection = _collection;
|
collection = _collection;
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
@@ -1728,12 +1648,6 @@ int MTGStoneHewerRule::genRandomEquipId(int convertedCost)
|
|||||||
return pool[convertedCost][start];
|
return pool[convertedCost][start];
|
||||||
}
|
}
|
||||||
|
|
||||||
//The StoneHewer is never destroyed
|
|
||||||
int MTGStoneHewerRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGStoneHewerRule::toString(ostream& out) const
|
ostream& MTGStoneHewerRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGStoneHewerRule ::: pool : " << pool << " ; initialized : " << initialized
|
out << "MTGStoneHewerRule ::: pool : " << pool << " ; initialized : " << initialized
|
||||||
@@ -1749,7 +1663,7 @@ MTGStoneHewerRule * MTGStoneHewerRule::clone() const
|
|||||||
//------------------
|
//------------------
|
||||||
//Hermit druid mode places a random land from your deck into play during each of your upkeeps
|
//Hermit druid mode places a random land from your deck into play during each of your upkeeps
|
||||||
MTGHermitRule::MTGHermitRule(GameObserver* observer, int _id) :
|
MTGHermitRule::MTGHermitRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1780,12 +1694,6 @@ int MTGHermitRule::receiveEvent(WEvent * event)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The hermit is never destroyed
|
|
||||||
int MTGHermitRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
MTGHermitRule * MTGHermitRule::clone() const
|
MTGHermitRule * MTGHermitRule::clone() const
|
||||||
{
|
{
|
||||||
return NEW MTGHermitRule(*this);
|
return NEW MTGHermitRule(*this);
|
||||||
@@ -1793,10 +1701,6 @@ MTGHermitRule * MTGHermitRule::clone() const
|
|||||||
//--------------------
|
//--------------------
|
||||||
|
|
||||||
//HUDDisplay
|
//HUDDisplay
|
||||||
int HUDDisplay::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HUDDisplay::Update(float dt)
|
void HUDDisplay::Update(float dt)
|
||||||
{
|
{
|
||||||
@@ -1886,7 +1790,7 @@ void HUDDisplay::Render()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HUDDisplay::HUDDisplay(GameObserver* observer, int _id) :
|
HUDDisplay::HUDDisplay(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
timestamp = 0;
|
timestamp = 0;
|
||||||
popdelay = 2;
|
popdelay = 2;
|
||||||
@@ -1912,7 +1816,7 @@ HUDDisplay * HUDDisplay::clone() const
|
|||||||
|
|
||||||
/* Persist */
|
/* Persist */
|
||||||
MTGPersistRule::MTGPersistRule(GameObserver* observer, int _id) :
|
MTGPersistRule::MTGPersistRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -1962,10 +1866,7 @@ ostream& MTGPersistRule::toString(ostream& out) const
|
|||||||
out << "MTGPersistRule ::: (";
|
out << "MTGPersistRule ::: (";
|
||||||
return MTGAbility::toString(out) << ")";
|
return MTGAbility::toString(out) << ")";
|
||||||
}
|
}
|
||||||
int MTGPersistRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
MTGPersistRule * MTGPersistRule::clone() const
|
MTGPersistRule * MTGPersistRule::clone() const
|
||||||
{
|
{
|
||||||
return NEW MTGPersistRule(*this);
|
return NEW MTGPersistRule(*this);
|
||||||
@@ -1975,7 +1876,7 @@ MTGPersistRule * MTGPersistRule::clone() const
|
|||||||
//handled seperately as a rule since we only want one object to send out events that a card was "vampired".
|
//handled seperately as a rule since we only want one object to send out events that a card was "vampired".
|
||||||
//otherwise vampire event is sent per instance of @vampired on the battlefield, multipling the results.
|
//otherwise vampire event is sent per instance of @vampired on the battlefield, multipling the results.
|
||||||
MTGVampireRule::MTGVampireRule(GameObserver* observer, int _id) :
|
MTGVampireRule::MTGVampireRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -2038,10 +1939,7 @@ ostream& MTGVampireRule::toString(ostream& out) const
|
|||||||
out << "MTGVampireRule ::: (";
|
out << "MTGVampireRule ::: (";
|
||||||
return MTGAbility::toString(out) << ")";
|
return MTGAbility::toString(out) << ")";
|
||||||
}
|
}
|
||||||
int MTGVampireRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
MTGVampireRule * MTGVampireRule::clone() const
|
MTGVampireRule * MTGVampireRule::clone() const
|
||||||
{
|
{
|
||||||
return NEW MTGVampireRule(*this);
|
return NEW MTGVampireRule(*this);
|
||||||
@@ -2050,7 +1948,7 @@ MTGVampireRule * MTGVampireRule::clone() const
|
|||||||
//unearth rule----------------------------------
|
//unearth rule----------------------------------
|
||||||
//if the card leaves play, exile it instead.
|
//if the card leaves play, exile it instead.
|
||||||
MTGUnearthRule::MTGUnearthRule(GameObserver* observer, int _id) :
|
MTGUnearthRule::MTGUnearthRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -2100,17 +1998,14 @@ ostream& MTGUnearthRule::toString(ostream& out) const
|
|||||||
out << "MTGUnearthRule ::: (";
|
out << "MTGUnearthRule ::: (";
|
||||||
return MTGAbility::toString(out) << ")";
|
return MTGAbility::toString(out) << ")";
|
||||||
}
|
}
|
||||||
int MTGUnearthRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
MTGUnearthRule * MTGUnearthRule::clone() const
|
MTGUnearthRule * MTGUnearthRule::clone() const
|
||||||
{
|
{
|
||||||
return NEW MTGUnearthRule(*this);
|
return NEW MTGUnearthRule(*this);
|
||||||
}
|
}
|
||||||
//token clean up
|
//token clean up
|
||||||
MTGTokensCleanup::MTGTokensCleanup(GameObserver* observer, int _id) :
|
MTGTokensCleanup::MTGTokensCleanup(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2131,11 +2026,6 @@ int MTGTokensCleanup::receiveEvent(WEvent * e)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MTGTokensCleanup::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
MTGTokensCleanup * MTGTokensCleanup::clone() const
|
MTGTokensCleanup * MTGTokensCleanup::clone() const
|
||||||
{
|
{
|
||||||
return NEW MTGTokensCleanup(*this);
|
return NEW MTGTokensCleanup(*this);
|
||||||
@@ -2257,7 +2147,7 @@ MTGPlaneWalkerRule * MTGPlaneWalkerRule::clone() const
|
|||||||
|
|
||||||
/* Lifelink */
|
/* Lifelink */
|
||||||
MTGLifelinkRule::MTGLifelinkRule(GameObserver* observer, int _id) :
|
MTGLifelinkRule::MTGLifelinkRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -2278,11 +2168,6 @@ int MTGLifelinkRule::receiveEvent(WEvent * event)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MTGLifelinkRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ostream& MTGLifelinkRule::toString(ostream& out) const
|
ostream& MTGLifelinkRule::toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "MTGLifelinkRule ::: (";
|
out << "MTGLifelinkRule ::: (";
|
||||||
@@ -2295,7 +2180,7 @@ MTGLifelinkRule * MTGLifelinkRule::clone() const
|
|||||||
|
|
||||||
/* Deathtouch */
|
/* Deathtouch */
|
||||||
MTGDeathtouchRule::MTGDeathtouchRule(GameObserver* observer, int _id) :
|
MTGDeathtouchRule::MTGDeathtouchRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -2327,11 +2212,6 @@ int MTGDeathtouchRule::receiveEvent(WEvent * event)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MTGDeathtouchRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
MTGDeathtouchRule * MTGDeathtouchRule::clone() const
|
MTGDeathtouchRule * MTGDeathtouchRule::clone() const
|
||||||
{
|
{
|
||||||
return NEW MTGDeathtouchRule(*this);
|
return NEW MTGDeathtouchRule(*this);
|
||||||
@@ -2339,7 +2219,7 @@ MTGDeathtouchRule * MTGDeathtouchRule::clone() const
|
|||||||
//
|
//
|
||||||
//kai mod
|
//kai mod
|
||||||
ParentChildRule::ParentChildRule(GameObserver* observer, int _id) :
|
ParentChildRule::ParentChildRule(GameObserver* observer, int _id) :
|
||||||
MTGAbility(observer, _id, NULL)
|
PermanentAbility(observer, _id)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@@ -2398,10 +2278,7 @@ ostream& ParentChildRule::toString(ostream& out) const
|
|||||||
out << "ParentChildRule ::: (";
|
out << "ParentChildRule ::: (";
|
||||||
return MTGAbility::toString(out) << ")";
|
return MTGAbility::toString(out) << ")";
|
||||||
}
|
}
|
||||||
int ParentChildRule::testDestroy()
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
ParentChildRule * ParentChildRule::clone() const
|
ParentChildRule * ParentChildRule::clone() const
|
||||||
{
|
{
|
||||||
return NEW ParentChildRule(*this);
|
return NEW ParentChildRule(*this);
|
||||||
|
|||||||
Reference in New Issue
Block a user