64a234ef44
exsample [INIT] mode=mtg [PLAYERS] life:2000 poisoncount:4 customphasering:untap,firstmain,firstmain,draw,firstmain,upkeep,draw auto=shuffle auto=draw:7 auto=@each my draw:draw:1 auto=maxPlay(land)1 by default every turn will have normal order we've always been use to however before begins --required added automatically anything you want in any order anything you want in any order anything you want in any order anything you want in any order anything you want in any order anything you want in any order anything you want in any order anything you want in any order cleanup---required added automatically after end of turn---required added automatically svntax customphasering:blah,blah,blah listed in the order you want it to go. you can repeat a phase as often as you want, you can omit phases. please note, this was not designed with MTG in mind..some of the rules require certain phases to work...this is for CUSTOM game building...i repeat NOT DESIGNED FOR MTG...tho it can be used with most(almost all, with the exception of those which require certain phases to work, exsample, ninjitsu will only work in a phasering which contains blockers and attackers) enjoy.....
110 lines
1.9 KiB
C++
110 lines
1.9 KiB
C++
#ifndef _PLAYER_H_
|
|
#define _PLAYER_H_
|
|
|
|
#include "JGE.h"
|
|
#include "MTGGameZones.h"
|
|
#include "Damage.h"
|
|
#include "Targetable.h"
|
|
|
|
class MTGDeck;
|
|
class MTGPlayerCards;
|
|
class MTGInPlay;
|
|
class ManaPool;
|
|
|
|
class Player: public Damageable
|
|
{
|
|
protected:
|
|
ManaPool * manaPool;
|
|
|
|
public:
|
|
enum ENUM_PLAY_MODE
|
|
{
|
|
MODE_TEST_SUITE,
|
|
MODE_HUMAN,
|
|
MODE_AI
|
|
};
|
|
|
|
JTexture * mAvatarTex;
|
|
JQuadPtr mAvatar;
|
|
int playMode;
|
|
bool nomaxhandsize;
|
|
bool isPoisoned;
|
|
MTGPlayerCards * game;
|
|
string deckFile;
|
|
string deckFileSmall;
|
|
string deckName;
|
|
string phaseRing;
|
|
|
|
Player(MTGDeck * deck, string deckFile, string deckFileSmall);
|
|
virtual ~Player();
|
|
|
|
virtual void End();
|
|
virtual int displayStack()
|
|
{
|
|
return 1;
|
|
}
|
|
const string getDisplayName() const;
|
|
int typeAsTarget()
|
|
{
|
|
return TARGET_PLAYER;
|
|
}
|
|
|
|
int afterDamage();
|
|
|
|
int gainLife(int value);
|
|
int loseLife(int value);
|
|
int gainOrLoseLife(int value);
|
|
|
|
int poisoned();
|
|
int damaged();
|
|
int prevented();
|
|
void unTapPhase();
|
|
MTGInPlay * inPlay();
|
|
ManaPool * getManaPool();
|
|
void takeMulligan();
|
|
|
|
void cleanupPhase();
|
|
virtual int Act(float dt)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
virtual int isAI()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
Player * opponent();
|
|
int getId();
|
|
JQuadPtr getIcon();
|
|
|
|
virtual int receiveEvent(WEvent * event)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
virtual void Render()
|
|
{
|
|
}
|
|
|
|
void loadAvatar(string file);
|
|
|
|
/**
|
|
** Returns the path to the stats file of currently selected deck.
|
|
*/
|
|
std::string GetCurrentDeckStatsFile();
|
|
};
|
|
|
|
class HumanPlayer: public Player
|
|
{
|
|
public:
|
|
HumanPlayer(MTGDeck * deck, string deckFile, string deckFileSmall);
|
|
HumanPlayer(string deckFile);
|
|
|
|
};
|
|
|
|
ostream& operator<<(ostream&, const Player&);
|
|
istream& operator>>(istream& in, Player& p);
|
|
|
|
#endif
|