- The AI can now use May Abilities
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-07-25 11:43:36 +00:00
parent 760910709a
commit 8cc2fc9d52
9 changed files with 83 additions and 58 deletions

View File

@@ -71,6 +71,7 @@ class AIPlayer: public Player{
virtual int chooseTarget(TargetChooser * tc = NULL);
virtual int Act(float dt);
int isAI(){return 1;};
int canHandleCost(MTGAbility * ability);
int selectAbility();
int createAbilityTargets(MTGAbility * a, MTGCardInstance * c, map<AIAction *, int,CmpAbilities> * ranking);
int useAbility();

View File

@@ -27,7 +27,8 @@ class ActionLayer: public GuiLayer, public JGuiListener{
bool CheckUserInput(u32 key);
ActionLayer(int id, GameObserver* _game):GuiLayer(id, _game){ menuObject = NULL; abilitiesMenu = NULL; stuffHappened = 0;};
~ActionLayer();
int isWaitingForAnswer();
int cancelCurrentAction();
ActionElement * isWaitingForAnswer();
int isReactingToTargetClick(Targetable * card);
int receiveEvent(WEvent * event);
int reactToTargetClick(Targetable * card);

View File

@@ -140,6 +140,7 @@ public:
if (!triggered){
triggered = 1;
game->mLayers->actionLayer()->setMenuObject(source);
game->mLayers->stackLayer()->setIsInterrupting(source->controller());
OutputDebugString("SetMenuObject!\n");
}
}