removed the changes I made to selectAbility and created a new function which handles sending an ability and card to have AI do the ability of that card.

found a selectability call after blockers that was the cause of a race condition debug assert, but most importantly, the reason AI would sometimes block a creature, then immediately decide not to block. causing it to sometimes take preventable damage, and sometime cause AI to stack a ton of blockers on a single card even tho it did not have a chance to actually kill the creature.
this is still a thing, but wont happen so grossly incorrect now.
This commit is contained in:
zethfoxster
2016-07-19 20:16:22 -04:00
parent 6f649bd680
commit 7c163592b5
2 changed files with 154 additions and 65 deletions

View File

@@ -107,7 +107,8 @@ class AIPlayerBaka: public AIPlayer{
virtual bool payTheManaCost(ManaCost * cost, MTGCardInstance * card = NULL,vector<MTGAbility*> gotPayment = vector<MTGAbility*>());
virtual int getCreaturesInfo(Player * player, int neededInfo = INFO_NBCREATURES , int untapMode = 0, int canAttack = 0);
virtual ManaCost * getPotentialMana(MTGCardInstance * card = NULL);
virtual int selectAbility(MTGAbility * Specific = NULL);
virtual int selectAbility();
virtual int doAbility(MTGAbility * Specific = NULL, MTGCardInstance * withCard = NULL);
public:
enum {