Files
wagic/projects/mtg/include/PlayGuiObject.h
solo81@web.de 897114af70 Added the new zone "OPPONENTHAND" (by Zethfox).
Zethfox: "Opponenthand gui access, cards that target(*|opponenthand) can now be coded as such, target chooser will activate allowing you to click the new icon under the avatar of the opponent and open the opponents hand Gui so you may select the target card."

Cards in opponents hand are only viewable when target choosing would allow you to enter that zone! ;)


- Added the new keyword "NAME". (by Zethfox). 
When used in an autoline it replaces an autoline's "ability" text with a custom ability name. 
The basic phrase is: "auto=name(whatever you want) &&".

Example card:
[card]
name=Order of the Stars
abilities=defender
auto=choice name(white) && counter(0/0,1,White) all(this)
auto=choice name(blue) && counter(0/0,1,Blue) all(this)
auto=choice name(black) && counter(0/0,1,Black) all(this)
auto=choice name(red) && counter(0/0,1,Red) all(this)
auto=choice name(green) && counter(0/0,1,Green) all(this)
auto=this(counter{0/0.1.White}) protection from white
auto=this(counter{0/0.1.Blue}) protection from blue
auto=this(counter{0/0.1.Black}) protection from black
auto=this(counter{0/0.1.Red}) protection from red
auto=this(counter{0/0.1.Green}) protection from green
text=Defender (This creature can't attack.) -- As Order of the Stars enters the battlefield, choose a color. -- Order of the Stars has protection from the chosen color.
mana={W}
type=Creature
subtype=Human Cleric
power=0
toughness=1
[/card]

The popup window for this card will now contain a list with 

"white,"blue","black","red" and "green" 
instead of 
"ability","ability","ability","ability","ability".

This will make a lot of cards much easier to handle!


- Added 42 successfully test using one (or both) new keywords.
Card list --> First comment


Note that we did not add tests for both new keywords:
It is simply not possible to write them yet! They will follow as soon as they are possible. We guarantee that everything we submitted in this revision has been tested excessively!
2010-08-13 00:38:56 +00:00

42 lines
1.1 KiB
C++

/*
A class for all interactive objects in the play area (cards, avatars, etc...)
*/
#ifndef _PLAYGUIOBJECT_H_
#define _PLAYGUIOBJECT_H_
#define GUI_AVATAR 1
#define GUI_CARD 2
#define GUI_GRAVEYARD 3
#define GUI_LIBRARY 4
#define GUI_OPPONENTHAND 5
#include <JGui.h>
#include "Effects.h"
#include "WEvent.h"
#include "Pos.h"
class PlayGuiObject: public JGuiObject, public JGuiListener, public Pos{
protected:
public:
int wave;
float mHeight;
float defaultHeight;
bool mHasFocus;
int type;
virtual void Entering(){mHasFocus = true; zoom = 1.4f;};
virtual bool Leaving(JButton key){mHasFocus = false; zoom = 1.0; return true;};
virtual bool CheckUserInput(JButton key) {return false;};
virtual bool ButtonPressed(){return true;};
virtual void Render();
virtual void Update(float dt);
PlayGuiObject(float desiredHeight, float x, float y, bool hasFocus);
PlayGuiObject(float desiredHeight, const Pos& ref, bool hasFocus);
virtual void ButtonPressed(int controllerId, int controlId){};
virtual ~PlayGuiObject(){};
vector<Effect*> effects;
};
#endif