#ifndef _AIHINTS_H_ #define _AIHINTS_H_ #include #include using std::string; using std::vector; #include "AIPlayerBaka.h" #include "AllAbilities.h" class ManaCost; class MTGAbility; namespace AI { class AIHint { public: string mCondition; string mAction; string mCombatAttackTip; string mCombatBlockTip; string mCombatAlwaysBlockTip; string mCombatAlwaysAttackTip; string mCardEffGood; string mCardEffBad; vectorcastOrder; vectorcombos; //for preformance we disect the combo on first run. vectorpartOfCombo; vectorhold; vectoruntil; vectorrestrict; vectorcasting; mapcardTargets; string manaNeeded; int mSourceId; AIHint(string line); }; class AIHints { protected: AIPlayerBaka * mPlayer; vector hints; AIHint * getByCondition (string condition); AIAction * findAbilityRecursive(AIHint * hint, ManaCost * potentialMana); vector findAbilities(AIHint * hint); RankingContainer findActions(AIHint * hint); string constraintsNotFulfilled(AIAction * a, AIHint * hint, ManaCost * potentialMana); bool findSource(int sourceId); bool abilityMatches(MTGAbility * a, AIHint * hint); public: AIHints (AIPlayerBaka * player); AIAction * suggestAbility(ManaCost * potentialMana); bool HintSaysDontAttack(GameObserver* observer,MTGCardInstance * card = NULL); bool HintSaysAlwaysAttack(GameObserver* observer,MTGCardInstance * card = NULL); bool HintSaysDontBlock(GameObserver* observer,MTGCardInstance * card = NULL); bool HintSaysAlwaysBlock(GameObserver* observer,MTGCardInstance * card = NULL); bool HintSaysCardIsGood(GameObserver* observer,MTGCardInstance * card); bool HintSaysCardIsBad(GameObserver* observer,MTGCardInstance * card); bool HintSaysItsForCombo(GameObserver* observer,MTGCardInstance * card = NULL); bool canWeCombo(GameObserver* observer,MTGCardInstance * card = NULL,AIPlayerBaka * Ai = NULL); vector mCastOrder(); void add(string line); ~AIHints(); }; }; #endif