* Order blocker interface.
This commit is contained in:
jean.chalard
2009-08-28 13:57:12 +00:00
parent 163d296bb5
commit 2ff279fad8
14 changed files with 299 additions and 440 deletions

View File

@@ -8,9 +8,9 @@ class Phase;
class Targetable;
class ManaPool;
class WEvent{
class WEvent {
public:
enum{
enum {
NOT_SPECIFIED = 0,
CHANGE_ZONE = 1,
DAMAGE = 2,
@@ -21,7 +21,7 @@ public:
virtual ~WEvent() {};
};
struct WEventZoneChange: public WEvent{
struct WEventZoneChange : public WEvent {
MTGCardInstance * card;
MTGGameZone * from;
MTGGameZone * to;
@@ -30,12 +30,12 @@ struct WEventZoneChange: public WEvent{
};
struct WEventDamage: public WEvent{
struct WEventDamage : public WEvent {
Damage * damage;
WEventDamage(Damage * damage);
};
struct WEventPhaseChange: public WEvent{
struct WEventPhaseChange : public WEvent {
Phase * from;
Phase * to;
WEventPhaseChange(Phase * from, Phase * to);
@@ -43,13 +43,13 @@ struct WEventPhaseChange: public WEvent{
//Abstract class of event when a card's status changes
struct WEventCardUpdate: public WEvent{
struct WEventCardUpdate : public WEvent {
MTGCardInstance * card;
WEventCardUpdate(MTGCardInstance * card);
};
//Event when a card is tapped/untapped
struct WEventCardTap: public WEventCardUpdate{
struct WEventCardTap : public WEventCardUpdate {
bool before;
bool after;
WEventCardTap(MTGCardInstance * card, bool before, bool after);
@@ -58,7 +58,7 @@ struct WEventCardTap: public WEventCardUpdate{
//Event when a card's "attacker" status changes
//before:Player/Planeswalker that card was attacking previously
//after: Player/Planeswalker that card is attacking now
struct WEventCreatureAttacker: public WEventCardUpdate{
struct WEventCreatureAttacker : public WEventCardUpdate {
Targetable * before;
Targetable * after;
WEventCreatureAttacker(MTGCardInstance * card, Targetable * from, Targetable * to);
@@ -67,7 +67,7 @@ struct WEventCreatureAttacker: public WEventCardUpdate{
//Event when a card's "defenser" status changes
//before : attacker that card was blocking previously
//after: attacker that card is blocking now
struct WEventCreatureBlocker: public WEventCardUpdate{
struct WEventCreatureBlocker : public WEventCardUpdate {
MTGCardInstance * before;
MTGCardInstance * after;
WEventCreatureBlocker(MTGCardInstance * card,MTGCardInstance * from,MTGCardInstance * to);
@@ -76,11 +76,14 @@ struct WEventCreatureBlocker: public WEventCardUpdate{
//Event when a blocker is reordered
//exchangeWith: exchange card's position with exchangeWith's position
//attacker:both card and exchangeWith *should* be in attacker's "blockers" list.
struct WEventCreatureBlockerRank: public WEventCardUpdate{
struct WEventCreatureBlockerRank : public WEventCardUpdate {
MTGCardInstance * exchangeWith;
MTGCardInstance * attacker;
WEventCreatureBlockerRank(MTGCardInstance * card,MTGCardInstance * exchangeWith, MTGCardInstance * attacker);
};
//Event when blockers are assigned and need to be reordered
struct WEventBlockersAssigned : public WEvent {
};
//Event when a mana is engaged