Files
wagic/projects/mtg/include/Damage.h
wagic.the.homebrew b89c4522de Erwan
- display the thumbnail as a "shadow" over the text version of the card if the big picture is not available
- fixed a bug with circles of protection, although graphically it is difficult to understand what's going on when using those cards
- fixed a bug with a card in Ice age
2008-12-06 12:41:23 +00:00

58 lines
1.1 KiB
C++

#ifndef _DAMAGE_H_
#define _DAMAGE_H_
#include <JGui.h>
#include "GuiLayers.h"
#include "ActionStack.h"
class GuiLayer;
class JGuiObject;
class MTGCardInstance;
class GameObserver;
#define DAMAGEABLE_MTGCARDINSTANCE 0
#define DAMAGEABLE_PLAYER 1
class Damageable {
protected:
public:
int life;
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 JQuad * getIcon(){return NULL;};
};
class Damage: public Interruptible {
protected:
void init(MTGCardInstance * _source, Damageable * _target, int _damage);
public:
Damageable * target;
int damage;
void Render();
Damage(int id, MTGCardInstance* _source, Damageable * _target);
Damage(int id, MTGCardInstance* _source, Damageable * _target, int _damage);
int resolve();
};
class DamageStack :public GuiLayer, public Interruptible{
protected:
int currentState;
public:
int resolve();
void Render();
int CombatDamages();//Deprecated ?
int CombatDamages(int strike);
DamageStack(int id, GameObserver* _game);
};
#endif