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:
@@ -17,49 +17,77 @@ class GameObserver;
|
||||
#define DAMAGE_COMBAT 1
|
||||
#define DAMAGE_OTHER 2
|
||||
|
||||
class Damageable:public Targetable {
|
||||
protected:
|
||||
public:
|
||||
int life;
|
||||
int poisonCount;
|
||||
int damageCount;
|
||||
int preventable;
|
||||
int type_as_damageable;
|
||||
Damageable(int _life){life=_life;};
|
||||
int getLife(){return life;};
|
||||
virtual int dealDamage(int damage){life-=damage;return life;};
|
||||
virtual int afterDamage(){return 0;}
|
||||
virtual int poisoned(){return 0;}
|
||||
virtual int prevented(){return 0;}
|
||||
virtual JQuad * getIcon(){return NULL;};
|
||||
class Damageable: public Targetable
|
||||
{
|
||||
protected:
|
||||
public:
|
||||
int life;
|
||||
int poisonCount;
|
||||
int damageCount;
|
||||
int preventable;
|
||||
int type_as_damageable;
|
||||
Damageable(int _life)
|
||||
{
|
||||
life = _life;
|
||||
}
|
||||
;
|
||||
int getLife()
|
||||
{
|
||||
return life;
|
||||
}
|
||||
;
|
||||
virtual int dealDamage(int damage)
|
||||
{
|
||||
life -= damage;
|
||||
return life;
|
||||
}
|
||||
;
|
||||
virtual int afterDamage()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual int poisoned()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual int prevented()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual JQuad * getIcon()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
class Damage: public Interruptible {
|
||||
protected:
|
||||
void init(MTGCardInstance * source, Damageable * target, int damage, int typeOfDamage);
|
||||
public:
|
||||
Damageable * target;
|
||||
int typeOfDamage;
|
||||
int damage;
|
||||
void Render();
|
||||
Damage(MTGCardInstance* source, Damageable * target);
|
||||
Damage(MTGCardInstance* source, Damageable * target, int damage, int typeOfDamage = DAMAGE_OTHER);
|
||||
int resolve();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
class Damage: public Interruptible
|
||||
{
|
||||
protected:
|
||||
void init(MTGCardInstance * source, Damageable * target, int damage, int typeOfDamage);
|
||||
public:
|
||||
Damageable * target;
|
||||
int typeOfDamage;
|
||||
int damage;
|
||||
void Render();
|
||||
Damage(MTGCardInstance* source, Damageable * target);
|
||||
Damage(MTGCardInstance* source, Damageable * target, int damage, int typeOfDamage = DAMAGE_OTHER);
|
||||
int resolve();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
class DamageStack: public GuiLayer, public Interruptible
|
||||
{
|
||||
protected:
|
||||
int currentState;
|
||||
GameObserver* game;
|
||||
|
||||
class DamageStack : public GuiLayer, public Interruptible{
|
||||
protected:
|
||||
int currentState;
|
||||
GameObserver* game;
|
||||
|
||||
public:
|
||||
int receiveEvent(WEvent * event);
|
||||
int resolve();
|
||||
void Render();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
DamageStack();
|
||||
public:
|
||||
int receiveEvent(WEvent * event);
|
||||
int resolve();
|
||||
void Render();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
DamageStack();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user