J :
* Fix a couple warnings and a bug.
This commit is contained in:
@@ -599,7 +599,6 @@ class GameStateDeckViewer: public GameState, public JGuiListener
|
|||||||
|
|
||||||
|
|
||||||
float max_scale = 0.96;
|
float max_scale = 0.96;
|
||||||
float min_scale = 0.2;
|
|
||||||
float x_center_0 = 180;
|
float x_center_0 = 180;
|
||||||
float right_border = SCREEN_WIDTH - 20 ;
|
float right_border = SCREEN_WIDTH - 20 ;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ void AIPlayer::tapLandsForMana(ManaCost * potentialMana, ManaCost * cost){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ManaCost * diff = potentialMana->Diff(cost);
|
ManaCost * diff = potentialMana->Diff(cost);
|
||||||
int currentCost = 0;
|
|
||||||
GameObserver * gameObs = GameObserver::GetInstance();
|
GameObserver * gameObs = GameObserver::GetInstance();
|
||||||
CardDescriptor cd;
|
CardDescriptor cd;
|
||||||
cd.setColor(Constants::MTG_COLOR_LAND);
|
cd.setColor(Constants::MTG_COLOR_LAND);
|
||||||
@@ -246,9 +245,9 @@ int AIPlayer::chooseAttackers(){
|
|||||||
int AIPlayer::chooseBlockers(){
|
int AIPlayer::chooseBlockers(){
|
||||||
map<MTGCardInstance *, int> opponentsToughness;
|
map<MTGCardInstance *, int> opponentsToughness;
|
||||||
int opponentForce = getCreaturesInfo(opponent(),INFO_CREATURESPOWER);
|
int opponentForce = getCreaturesInfo(opponent(),INFO_CREATURESPOWER);
|
||||||
int opponentCreatures = getCreaturesInfo(opponent(), INFO_NBCREATURES, -1);
|
//int opponentCreatures = getCreaturesInfo(opponent(), INFO_NBCREATURES, -1);
|
||||||
int myForce = getCreaturesInfo(this,INFO_CREATURESPOWER);
|
//int myForce = getCreaturesInfo(this,INFO_CREATURESPOWER);
|
||||||
int myCreatures = getCreaturesInfo(this, INFO_NBCREATURES, -1);
|
//int myCreatures = getCreaturesInfo(this, INFO_NBCREATURES, -1);
|
||||||
CardDescriptor cd;
|
CardDescriptor cd;
|
||||||
cd.init();
|
cd.init();
|
||||||
cd.setType("Creature");
|
cd.setType("Creature");
|
||||||
@@ -307,7 +306,6 @@ int AIPlayer::chooseBlockers(){
|
|||||||
int AIPlayer::combatDamages(){
|
int AIPlayer::combatDamages(){
|
||||||
int result = 0;
|
int result = 0;
|
||||||
GameObserver * gameObs = GameObserver::GetInstance();
|
GameObserver * gameObs = GameObserver::GetInstance();
|
||||||
Player * currentPlayer = gameObs->currentPlayer;
|
|
||||||
int currentGamePhase = gameObs->getCurrentGamePhase();
|
int currentGamePhase = gameObs->getCurrentGamePhase();
|
||||||
if (currentGamePhase != Constants::MTG_PHASE_COMBATDAMAGE) return 0;
|
if (currentGamePhase != Constants::MTG_PHASE_COMBATDAMAGE) return 0;
|
||||||
DamageResolverLayer * drl = gameObs->mLayers->combatLayer();
|
DamageResolverLayer * drl = gameObs->mLayers->combatLayer();
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
|||||||
end = s.find(",",previous);
|
end = s.find(",",previous);
|
||||||
string spt = s.substr(previous,end - previous);
|
string spt = s.substr(previous,end - previous);
|
||||||
int power, toughness;
|
int power, toughness;
|
||||||
//int havePowertoughness = parsePowerToughness(spt,&power, &toughness);
|
parsePowerToughness(spt,&power, &toughness);
|
||||||
string sabilities = s.substr(end+1);
|
string sabilities = s.substr(end+1);
|
||||||
ManaCost * cost = ManaCost::parseManaCost(s);
|
ManaCost * cost = ManaCost::parseManaCost(s);
|
||||||
int multiplier = 1;
|
int multiplier = 1;
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ void MTGCard::setColor(int _color, int removeAllOthers){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int MTGCard::getColor(){
|
int MTGCard::getColor(){
|
||||||
int i = 0;
|
|
||||||
for (int i=0; i<Constants::MTG_NB_COLORS; i++){
|
for (int i=0; i<Constants::MTG_NB_COLORS; i++){
|
||||||
if (colors[i]){
|
if (colors[i]){
|
||||||
return i;
|
return i;
|
||||||
|
|||||||
@@ -252,7 +252,6 @@ void MTGGuiPlay::AddPlayersGuiInfo(){
|
|||||||
void MTGGuiPlay::Update(float dt){
|
void MTGGuiPlay::Update(float dt){
|
||||||
updateCards();
|
updateCards();
|
||||||
PlayGuiObjectController::Update(dt);
|
PlayGuiObjectController::Update(dt);
|
||||||
GameObserver * game = GameObserver::GetInstance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -269,10 +268,8 @@ bool MTGGuiPlay::CheckUserInput(u32 key){
|
|||||||
|
|
||||||
|
|
||||||
void MTGGuiPlay::RenderPlayerInfo(int playerid){
|
void MTGGuiPlay::RenderPlayerInfo(int playerid){
|
||||||
GameObserver * game = GameObserver::GetInstance();
|
|
||||||
JRenderer * r = JRenderer::GetInstance();
|
JRenderer * r = JRenderer::GetInstance();
|
||||||
Player * player = GameObserver::GetInstance()->players[playerid];
|
Player * player = GameObserver::GetInstance()->players[playerid];
|
||||||
int life = player->life;
|
|
||||||
|
|
||||||
//Avatar
|
//Avatar
|
||||||
GuiAvatar * avatar = (GuiAvatar *)mObjects[3*playerid];
|
GuiAvatar * avatar = (GuiAvatar *)mObjects[3*playerid];
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ int TestSuiteAI::Act(float dt){
|
|||||||
OutputDebugString(action.c_str());
|
OutputDebugString(action.c_str());
|
||||||
OutputDebugString("\n");
|
OutputDebugString("\n");
|
||||||
|
|
||||||
|
|
||||||
if (g->mLayers->stackLayer()->askIfWishesToInterrupt == this){
|
if (g->mLayers->stackLayer()->askIfWishesToInterrupt == this){
|
||||||
if(action.compare("no") != 0 && action.compare("yes") != 0){
|
if(action.compare("no") != 0 && action.compare("yes") != 0){
|
||||||
g->mLayers->stackLayer()->cancelInterruptOffer();
|
g->mLayers->stackLayer()->cancelInterruptOffer();
|
||||||
|
|||||||
Reference in New Issue
Block a user