No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted. some extra things I added: * Any empty virtual declarations were kept to one line. * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include "Damage.h"
|
||||
#include "Targetable.h"
|
||||
|
||||
|
||||
class MTGCardInstance;
|
||||
class MTGPlayerCards;
|
||||
class MTGAbility;
|
||||
@@ -24,149 +23,150 @@ struct Pos;
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
class MTGCardInstance: public CardPrimitive, public MTGCard, public Damageable {
|
||||
protected:
|
||||
int untapping;
|
||||
int nb_damages;
|
||||
string sample;
|
||||
int tapped;
|
||||
class MTGCardInstance: public CardPrimitive, public MTGCard, public Damageable
|
||||
{
|
||||
protected:
|
||||
int untapping;
|
||||
int nb_damages;
|
||||
string sample;
|
||||
int tapped;
|
||||
|
||||
int lifeOrig;
|
||||
MTGPlayerCards * belongs_to;
|
||||
MTGCardInstance * getNextPartner();
|
||||
void initMTGCI();
|
||||
int setDefenser(MTGCardInstance * c);
|
||||
int addBlocker(MTGCardInstance * c);
|
||||
int removeBlocker(MTGCardInstance * c);
|
||||
int init();
|
||||
public:
|
||||
int setAttacker(int value);
|
||||
MTGGameZone * currentZone;
|
||||
Pos* view;
|
||||
int X;
|
||||
int XX;
|
||||
int alternateCostPaid[ManaCost::MANA_PAID_WITH_RETRACE + 1];
|
||||
int paymenttype;
|
||||
int frozen;
|
||||
int sunburst;
|
||||
int equipment;
|
||||
int reduxamount;
|
||||
int flanked;
|
||||
int regenerateTokens;
|
||||
int isToken;
|
||||
int stillInUse();
|
||||
int didattacked;
|
||||
int didblocked;
|
||||
int notblocked;
|
||||
int fresh;
|
||||
int MaxLevelUp;
|
||||
Player * lastController;
|
||||
MTGGameZone * getCurrentZone();
|
||||
MTGGameZone * previousZone;
|
||||
MTGCardInstance * previous;
|
||||
MTGCardInstance * next;
|
||||
int doDamageTest;
|
||||
int summoningSickness;
|
||||
// The recommended method to test for summoning Sickness !
|
||||
int hasSummoningSickness();
|
||||
MTGCardInstance * changeController(Player * newcontroller);
|
||||
Player * owner;
|
||||
Counters * counters;
|
||||
int typeAsTarget(){return TARGET_CARD;}
|
||||
const string getDisplayName() const;
|
||||
MTGCardInstance * target;
|
||||
int lifeOrig;
|
||||
MTGPlayerCards * belongs_to;
|
||||
MTGCardInstance * getNextPartner();
|
||||
void initMTGCI();
|
||||
int setDefenser(MTGCardInstance * c);
|
||||
int addBlocker(MTGCardInstance * c);
|
||||
int removeBlocker(MTGCardInstance * c);
|
||||
int init();
|
||||
public:
|
||||
int setAttacker(int value);
|
||||
MTGGameZone * currentZone;
|
||||
Pos* view;
|
||||
int X;
|
||||
int XX;
|
||||
int alternateCostPaid[ManaCost::MANA_PAID_WITH_RETRACE + 1];
|
||||
int paymenttype;
|
||||
int frozen;
|
||||
int sunburst;
|
||||
int equipment;
|
||||
int reduxamount;
|
||||
int flanked;
|
||||
int regenerateTokens;
|
||||
int isToken;
|
||||
int stillInUse();
|
||||
int didattacked;
|
||||
int didblocked;
|
||||
int notblocked;
|
||||
int fresh;
|
||||
int MaxLevelUp;
|
||||
Player * lastController;
|
||||
MTGGameZone * getCurrentZone();
|
||||
MTGGameZone * previousZone;
|
||||
MTGCardInstance * previous;
|
||||
MTGCardInstance * next;
|
||||
int doDamageTest;
|
||||
int summoningSickness;
|
||||
// The recommended method to test for summoning Sickness !
|
||||
int hasSummoningSickness();
|
||||
MTGCardInstance * changeController(Player * newcontroller);
|
||||
Player * owner;
|
||||
Counters * counters;
|
||||
int typeAsTarget()
|
||||
{
|
||||
return TARGET_CARD;
|
||||
}
|
||||
const string getDisplayName() const;
|
||||
MTGCardInstance * target;
|
||||
|
||||
//types
|
||||
void addType(char * type_text);
|
||||
virtual void addType(int id);
|
||||
void setType(const char * type_text);
|
||||
void setSubtype(string value);
|
||||
int removeType(string value, int removeAll = 0);
|
||||
int removeType(int value, int removeAll = 0);
|
||||
|
||||
//types
|
||||
void addType(char * type_text);
|
||||
virtual void addType(int id);
|
||||
void setType(const char * type_text);
|
||||
void setSubtype( string value);
|
||||
int removeType(string value, int removeAll = 0);
|
||||
int removeType(int value, int removeAll = 0);
|
||||
//dangerranking is a hint to Ai which creatures are the ones it should be targetting for effects.
|
||||
int DangerRanking();
|
||||
//Combat
|
||||
bool blocked; //Blocked this turn or not?
|
||||
MTGCardInstance * defenser;
|
||||
list<MTGCardInstance *> blockers;
|
||||
int attacker;
|
||||
int toggleDefenser(MTGCardInstance * opponent);
|
||||
int raiseBlockerRankOrder(MTGCardInstance * blocker);
|
||||
|
||||
//dangerranking is a hint to Ai which creatures are the ones it should be targetting for effects.
|
||||
int DangerRanking();
|
||||
//Combat
|
||||
bool blocked; //Blocked this turn or not?
|
||||
MTGCardInstance * defenser;
|
||||
list<MTGCardInstance *>blockers;
|
||||
int attacker;
|
||||
int toggleDefenser(MTGCardInstance * opponent);
|
||||
int raiseBlockerRankOrder(MTGCardInstance * blocker);
|
||||
//Returns rank of the card in blockers if it is a blocker of this (starting at 1), 0 otherwise
|
||||
int getDefenserRank(MTGCardInstance * blocker);
|
||||
int toggleAttacker();
|
||||
MTGCardInstance * banding; // If belongs to a band when attacking
|
||||
int canBlock();
|
||||
int canBlock(MTGCardInstance * opponent);
|
||||
int canAttack();
|
||||
int isAttacker();
|
||||
MTGCardInstance * isDefenser();
|
||||
int initAttackersDefensers();
|
||||
MTGCardInstance * getNextOpponent(MTGCardInstance * previous = NULL);
|
||||
int nbOpponents();
|
||||
int stepPower(CombatStep step);
|
||||
int afterDamage();
|
||||
int has(int ability);
|
||||
int cleanup();
|
||||
|
||||
//Returns rank of the card in blockers if it is a blocker of this (starting at 1), 0 otherwise
|
||||
int getDefenserRank(MTGCardInstance * blocker);
|
||||
int toggleAttacker();
|
||||
MTGCardInstance * banding; // If belongs to a band when attacking
|
||||
int canBlock();
|
||||
int canBlock(MTGCardInstance * opponent);
|
||||
int canAttack();
|
||||
int isAttacker();
|
||||
MTGCardInstance * isDefenser();
|
||||
int initAttackersDefensers();
|
||||
MTGCardInstance * getNextOpponent(MTGCardInstance * previous=NULL);
|
||||
int nbOpponents();
|
||||
int stepPower(CombatStep step);
|
||||
int afterDamage();
|
||||
int has(int ability);
|
||||
int cleanup();
|
||||
MTGCard * model;
|
||||
MTGCardInstance();
|
||||
MTGCardInstance(MTGCard * card, MTGPlayerCards * _belongs_to);
|
||||
int regenerate();
|
||||
int triggerRegenerate();
|
||||
Player * controller();
|
||||
|
||||
MTGCard * model;
|
||||
MTGCardInstance();
|
||||
MTGCardInstance(MTGCard * card, MTGPlayerCards * _belongs_to);
|
||||
int regenerate();
|
||||
int triggerRegenerate();
|
||||
Player * controller();
|
||||
virtual ~MTGCardInstance();
|
||||
int bury();
|
||||
int destroy();
|
||||
|
||||
virtual ~MTGCardInstance();
|
||||
int bury();
|
||||
int destroy();
|
||||
int addToToughness(int value);
|
||||
int setToughness(int value);
|
||||
|
||||
vector<TargetChooser *> protections;
|
||||
int addProtection(TargetChooser * tc);
|
||||
int removeProtection(TargetChooser *tc, int erase = 0);
|
||||
int protectedAgainst(MTGCardInstance * card);
|
||||
|
||||
int addToToughness(int value);
|
||||
int setToughness(int value);
|
||||
vector<TargetChooser *> cantBeBlockedBys;
|
||||
int addCantBeBlockedBy(TargetChooser * tc);
|
||||
int removeCantBeBlockedBy(TargetChooser *tc, int erase = 0);
|
||||
int cantBeBlockedBy(MTGCardInstance * card);
|
||||
|
||||
vector<TargetChooser *>protections;
|
||||
int addProtection(TargetChooser * tc);
|
||||
int removeProtection(TargetChooser *tc, int erase = 0);
|
||||
int protectedAgainst(MTGCardInstance * card);
|
||||
void copy(MTGCardInstance * card);
|
||||
|
||||
vector<TargetChooser *>cantBeBlockedBys;
|
||||
int addCantBeBlockedBy(TargetChooser * tc);
|
||||
int removeCantBeBlockedBy(TargetChooser *tc, int erase = 0);
|
||||
int cantBeBlockedBy(MTGCardInstance * card);
|
||||
void setUntapping();
|
||||
int isUntapping();
|
||||
int isTapped();
|
||||
void untap();
|
||||
void tap();
|
||||
void attemptUntap();
|
||||
|
||||
void copy(MTGCardInstance * card);
|
||||
void eventattacked();
|
||||
void eventattackedAlone();
|
||||
void eventattackednotblocked();
|
||||
void eventattackedblocked();
|
||||
void eventblocked();
|
||||
|
||||
void setUntapping();
|
||||
int isUntapping();
|
||||
int isTapped();
|
||||
void untap();
|
||||
void tap();
|
||||
void attemptUntap();
|
||||
int isInPlay();
|
||||
JSample * getSample();
|
||||
|
||||
void eventattacked();
|
||||
void eventattackedAlone();
|
||||
void eventattackednotblocked();
|
||||
void eventattackedblocked();
|
||||
void eventblocked();
|
||||
JQuad * getIcon();
|
||||
|
||||
int isInPlay();
|
||||
JSample * getSample();
|
||||
ostream& toString(ostream&) const;
|
||||
|
||||
JQuad * getIcon();
|
||||
static MTGCardInstance AnyCard;
|
||||
static MTGCardInstance NoCard;
|
||||
|
||||
ostream& toString(ostream&) const;
|
||||
|
||||
static MTGCardInstance AnyCard;
|
||||
static MTGCardInstance NoCard;
|
||||
|
||||
static MTGCardInstance ExtraRules[2];
|
||||
static MTGCardInstance ExtraRules[2];
|
||||
|
||||
};
|
||||
|
||||
ostream& operator<<(ostream&, const MTGCardInstance&);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user