Fixed a bug where Ai was able to do actions such as sacrifice Mogg fanatic 3 time in a row by tripping over its own clickstream, added gaurds to selectAbility() function calls to prevent Ai from running multiple instences of selectAbility before its completed running another which occurs when Ai is offered an interupt after player cast/does an action.

this also fixes the spamming of Abilities like Ai atempting to untap something more then once, or Ai uses regenerate ability multiple times on the same creature.

there will be no noticible difference in Ai game play except now it actually doesnt do the above mentioned bugs.
This commit is contained in:
omegablast2002@yahoo.com
2010-12-02 21:30:14 +00:00
parent 802937573d
commit 0f419144b5
3 changed files with 46 additions and 8 deletions

View File

@@ -59,6 +59,7 @@ protected:
//Variables used by Test suite
MTGCardInstance * nextCardToPlay;
queue<AIAction *> clickstream;
bool findingAbility;
void tapLandsForMana(ManaCost * cost, MTGCardInstance * card = NULL);
int orderBlockers();
int combatDamages();