Files
wagic/projects/mtg/include/Blocker.h
wagic.laurent cf35acd3f3 Laurent -
Added ability DOESNOTUNTAP , see _cards.dat from 10E (Colossus of sardia, dehydratation). Test suite OK. The ability does not work with enchant creature (as for protection from...) So Dehydratation is hardcoded (can be aliased if necessary) Small bug with dehydratation, will untap creature when cast... WHY ? Any Idea/Solution welcome...
2009-06-17 23:54:05 +00:00

55 lines
1.1 KiB
C++

#ifndef _BLOCKER_H_
#define _BLOCKER_H_
#define MAX_BLOCKERS 64 // Currently needs to be equal to MAX_GUI_OBJECTS in JGE/JGui.h.
#include "MTGAbility.h"
class ManaCost;
class GameObserver;
class MTGAbility;
class Blocker : public MTGAbility {
protected:
ManaCost * manaCost;
int currentPhase;
void init(ManaCost * _cost);
public:
virtual ManaCost * untapManaCost(){return manaCost;};
virtual int unblock(){return 1;};
Blocker(int id, MTGCardInstance * card, ManaCost * _cost);
Blocker(int id, MTGCardInstance * card);
Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target);
Blocker(int id, MTGCardInstance * card, MTGCardInstance *_target, ManaCost * _cost);
~Blocker();
virtual void Update(float dt);
virtual int destroy();
};
class Blockers {
protected:
int cursor;
int blockers[MAX_BLOCKERS];
GameObserver * game;
public:
Blockers();
~Blockers();
int Add (Blocker * ability);
int Remove (Blocker * ability);
int init();
Blocker * next();
int rewind();
int isEmpty();
};
#include "ManaCost.h"
#include "GameObserver.h"
#endif