Files
wagic/projects/mtg/include/GameApp.h
omegablast2002@yahoo.com 0727343ebe first moved the def of handsize for a game into the rules.txt as discussed with wololo...
this update requires you to update your rules folder files!!!

2nd
added 2 new vanguard game modes.
Stone Hewer Basic - when ever a creature enters play, a random equipment with a converted mana cost less than or equal to that creature is put into play and attached to it.
this mode is unlockable, requirement = win a match where 10 or more equipment were in the battlefeild at the moment you won.

Hermit Druid basic- in this game mode, during each of the players upkeeps, a random land card from their deck is placed into the battlefield, these do not count against your 1 land per turn limit.
to unlock this, win any match with less then 10 lands.
2011-05-23 11:46:04 +00:00

109 lines
2.0 KiB
C++

/*
* Wagic, The Homebrew ?! is licensed under the BSD license
* See LICENSE in the Folder's root
* http://wololo.net/wagic/
*/
#ifndef _GAMEAPP_H_
#define _GAMEAPP_H_
#include <JApp.h>
#include <JGE.h>
#include <JSprite.h>
#include <JLBFont.h>
#include <hge/hgeparticle.h>
#include "WResourceManager.h"
#include "GameState.h"
#include "MTGDeck.h"
#include "MTGCard.h"
#include "MTGGameZones.h"
#include "CardEffect.h"
#ifdef NETWORK_SUPPORT
#include "JNetwork.h"
#endif //NETWORK_SUPPORT
class Rules;
enum
{
PLAYER_TYPE_CPU = 0,
PLAYER_TYPE_HUMAN=1,
PLAYER_TYPE_TESTSUITE=2,
#ifdef NETWORK_SUPPORT
PLAYER_TYPE_REMOTE=3
#endif //NETWORK_SUPPORT
};
enum
{
GAME_TYPE_CLASSIC,
GAME_TYPE_MOMIR,
GAME_TYPE_RANDOM1,
GAME_TYPE_RANDOM2,
GAME_TYPE_STORY,
GAME_TYPE_DEMO,
GAME_TYPE_STONEHEWER,
GAME_TYPE_HERMIT,
#ifdef NETWORK_SUPPORT
GAME_TYPE_SLAVE,
#endif //NETWORK_SUPPORT
};
class MTGAllCards;
class TransitionBase;
class GameApp: public JApp
{
private:
#ifdef DEBUG
int nbUpdates;
float totalFPS;
#endif
bool mShowDebugInfo;
int mScreenShotCount;
GameState* mCurrentState;
GameState* mNextState;
GameState* mGameStates[GAME_STATE_MAX];
public:
int gameType;
Rules * rules;
CardEffect *effect;
#ifdef NETWORK_SUPPORT
JNetwork* mpNetwork;
#endif //NETWORK_SUPPORT
GameApp();
virtual ~GameApp();
virtual void Create();
virtual void Destroy();
virtual void Update();
virtual void Render();
virtual void Pause();
virtual void Resume();
void LoadGameStates();
void SetNextState(int state);
void DoTransition(int trans, int tostate, float dur = -1, bool animonly = false);
void DoAnimation(int trans, float dur = -1);
static hgeParticleSystem * Particles[6];
static int HasMusic;
static string systemError;
static JMusic* music;
static string currentMusicFile;
static void playMusic(string filename, bool loop = true);
static int players[2];
};
extern JQuadPtr manaIcons[7];
#endif