Erwan
- Moved "extraPayment" cancel verification into ActionLayer (was in GuiLayers) - added "HUDDisplay" MTGAbility (displays damage/graveyard info) - Added option to NOT interrupt own's spells and abilities. Allows smoother gameplay. We should add a "quick options" menu ingame to change those options on the fly
This commit is contained in:
@@ -53,6 +53,7 @@ class Interruptible: public PlayGuiObject, public Targetable{
|
||||
virtual void Render(){};
|
||||
int typeAsTarget(){return TARGET_STACKACTION;};
|
||||
Interruptible(int id,bool hasFocus = false):PlayGuiObject(id,40,x,y,hasFocus){state=NOT_RESOLVED;display=0;source=NULL;};
|
||||
virtual const char *getDisplayName(){return "stack object";};
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
virtual void Dump();
|
||||
#endif
|
||||
@@ -76,6 +77,7 @@ class Spell: public Interruptible, public TargetsList {
|
||||
~Spell();
|
||||
int resolve();
|
||||
void Render();
|
||||
const char *getDisplayName();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
};
|
||||
|
||||
@@ -122,6 +124,14 @@ class ActionStack :public GuiLayer{
|
||||
void unpackDamageStack(DamageStack * ds);
|
||||
void repackDamageStacks();
|
||||
public:
|
||||
|
||||
enum{
|
||||
NOT_DECIDED = 0,
|
||||
INTERRUPT = -1,
|
||||
DONT_INTERRUPT = 1,
|
||||
DONT_INTERRUPT_ALL = 2,
|
||||
};
|
||||
|
||||
int setIsInterrupting(Player * player);
|
||||
int count( int type = 0 , int state = 0 , int display = -1);
|
||||
Interruptible * getPrevious(Interruptible * next, int type = 0, int state = 0 , int display = -1);
|
||||
|
||||
@@ -13,6 +13,8 @@ using std::string;
|
||||
#define OPTIONS_DIFFICULTY "difficulty"
|
||||
#define OPTIONS_CACHESIZE "cacheSize"
|
||||
#define OPTIONS_PLASMAEFFECT "plasmaEffect"
|
||||
#define OPTIONS_INTERRUPTMYSPELLS "interruptMySpells"
|
||||
#define OPTIONS_INTERRUPTMYABILITIES "interruptMyAbilities"
|
||||
|
||||
// WALDORF - added
|
||||
#define OPTIONS_INTERRUPT_SECONDS "interruptSeconds"
|
||||
|
||||
@@ -56,6 +56,7 @@ class MTGCardInstance: public MTGCard, public Damageable {
|
||||
Player * owner;
|
||||
Counters * counters;
|
||||
int typeAsTarget(){return TARGET_CARD;}
|
||||
const char * getDisplayName();
|
||||
MTGCardInstance * target;
|
||||
void addType(int type);
|
||||
|
||||
|
||||
@@ -180,4 +180,33 @@ class MTGLifelinkRule:public MTGAbility{
|
||||
};
|
||||
|
||||
|
||||
/* HUD Display */
|
||||
|
||||
class HUDString {
|
||||
public:
|
||||
string value;
|
||||
int timestamp;
|
||||
int quantity;
|
||||
HUDString(string s, int ts):value(s),timestamp(ts){quantity = 1;};
|
||||
};
|
||||
|
||||
class HUDDisplay:public MTGAbility{
|
||||
private:
|
||||
list<HUDString *> events;
|
||||
float timestamp;
|
||||
float popdelay;
|
||||
JLBFont * f;
|
||||
float maxWidth;
|
||||
int addEvent(string s);
|
||||
public:
|
||||
int testDestroy();
|
||||
int receiveEvent(WEvent * event);
|
||||
void Update(float dt);
|
||||
void Render();
|
||||
HUDDisplay(int _id);
|
||||
~HUDDisplay();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,7 @@ class Player: public Damageable{
|
||||
public:
|
||||
virtual void End();
|
||||
int typeAsTarget(){return TARGET_PLAYER;}
|
||||
const char * getDisplayName();
|
||||
virtual int displayStack(){return 1;}
|
||||
JTexture * mAvatarTex;
|
||||
JQuad * mAvatar;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
class Targetable{
|
||||
public:
|
||||
virtual int typeAsTarget() = 0;
|
||||
virtual const char * getDisplayName() =0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user