AIPlayer minor tweaks:

- In order to clarify getEfficiency, started creating "getEfficiency" functions specific to each type of ability (see example with Damager). This won't reduce the file size but should make things bit clearer
- Minor cleanup of getEfficiency
- bug fixes in getEfficiency
This commit is contained in:
wagic.the.homebrew
2011-09-21 15:10:06 +00:00
parent 11095f3339
commit 15f0143a8f
10 changed files with 413 additions and 2489 deletions

View File

@@ -1,17 +1,18 @@
#include "config.h"
#ifdef AI_CHANGE_TESTING
#ifndef _AI_PLAYER_BAKA_B_H_
#include "config.h"
#ifdef AI_CHANGE_TESTING
#ifndef _AI_PLAYER_BAKA_B_H_
#define _AI_PLAYER_BAKA_B_H_
#include "AIPlayerBaka.h"
#include "AllAbilities.h"
class AIStats;
class AIHints;
class AIPlayerBakaB: public AIPlayerBaka{
private:
protected:
int orderBlockers();
int combatDamages();
int interruptIfICan();
@@ -36,16 +37,16 @@ private:
AIStats * getStats();
protected:
MTGCardInstance * FindCardToPlay(ManaCost * potentialMana, const char * type);
//used by MomirPlayer, hence protected instead of private
virtual int getEfficiency(OrderedAIAction * action);
bool payTheManaCost(ManaCost * cost, MTGCardInstance * card = NULL,vector<MTGAbility*> gotPayment = vector<MTGAbility*>());
int getCreaturesInfo(Player * player, int neededInfo = INFO_NBCREATURES , int untapMode = 0, int canAttack = 0);
ManaCost * getPotentialMana(MTGCardInstance * card = NULL);
int selectAbility();
//used by MomirPlayer, hence protected instead of private
virtual int getEfficiency(OrderedAIAction * action);
public:
AIPlayerBakaB(string deckFile, string deckfileSmall, string avatarFile, MTGDeck * deck = NULL);
@@ -62,7 +63,7 @@ private:
//used by AIHInts, therefore public instead of private :/
int createAbilityTargets(MTGAbility * a, MTGCardInstance * c, RankingContainer& ranking);
};
#endif
#endif
#endif