added current AI deck name to "start" menu while dueling

This commit is contained in:
techdragon.nguyen@gmail.com
2010-10-13 15:24:52 +00:00
parent bb6267bbe4
commit 5005f69a69
12 changed files with 61 additions and 41 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
class AIMomirPlayer:public AIPlayerBaka{
public:
AIMomirPlayer(MTGPlayerCards * deck, string file, string fileSmall, string avatarFile);
AIMomirPlayer(MTGDeck * deck, string file, string fileSmall, string avatarFile);
int getEfficiency(AIAction * action);
int momir();
int computeActions();
+2 -2
View File
@@ -71,7 +71,7 @@ class AIPlayer: public Player{
void Render();
AIStats * stats;
ManaCost * getPotentialMana(MTGCardInstance * card = NULL);
AIPlayer(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
AIPlayer(MTGDeck * deck, string deckFile, string deckFileSmall);
virtual ~AIPlayer();
virtual MTGCardInstance * chooseCard(TargetChooser * tc, MTGCardInstance * source, int random = 0);
virtual int chooseTarget(TargetChooser * tc = NULL, Player * forceTarget =NULL);
@@ -94,7 +94,7 @@ class AIPlayerBaka: public AIPlayer{
MTGCardInstance * FindCardToPlay(ManaCost * potentialMana, const char * type);
public:
int deckId;
AIPlayerBaka(MTGPlayerCards * deck, string deckFile, string deckfileSmall, string avatarFile);
AIPlayerBaka(MTGDeck * deck, string deckFile, string deckfileSmall, string avatarFile);
virtual int Act(float dt);
void initTimer();
virtual int computeActions();
+2
View File
@@ -374,6 +374,8 @@ public:
int resolve(){
vector<int>::size_type sz = abilities.size();
for (unsigned int i = 0; i < sz; i++){
if (abilities[i] == NULL)
continue;
Targetable * backup = abilities[i]->target;
if (target && target!= source && abilities[i]->target == abilities[i]->source) abilities[i]->target = target;
abilities[i]->resolve();
+2 -1
View File
@@ -60,7 +60,8 @@ class GameStateDuel: public GameState, public JGuiListener
MENUITEM_RANDOM_PLAYER = -11,
MENUITEM_RANDOM_AI = -12,
MENUITEM_MAIN_MENU = -13,
MENUITEM_EVIL_TWIN = -14
MENUITEM_EVIL_TWIN = -14,
MENUITEM_MULLIGAN = -15
};
};
+4 -2
View File
@@ -6,6 +6,7 @@
#include "Damage.h"
#include "Targetable.h"
class MTGDeck;
class MTGPlayerCards;
class MTGInPlay;
class ManaPool;
@@ -45,7 +46,7 @@ class Player: public Damageable{
int poisoned();
int damaged();
int prevented();
Player(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
Player(MTGDeck * deck, string deckFile, string deckFileSmall);
virtual ~Player();
void unTapPhase();
MTGInPlay * inPlay();
@@ -58,6 +59,7 @@ class Player: public Damageable{
JQuad * getIcon();
string deckFile;
string deckFileSmall;
string deckName;
virtual int receiveEvent(WEvent * event){return 0;};
virtual void Render(){};
@@ -66,7 +68,7 @@ class Player: public Damageable{
class HumanPlayer: public Player{
public:
HumanPlayer(MTGPlayerCards * deck, string deckFile, string deckFileSmall);
HumanPlayer(MTGDeck * deck, string deckFile, string deckFileSmall);
HumanPlayer(string deckFile);
};