still tweaking ai interrupt slightly...think i finally got it how i wanted it...if it can interrupt OR if its ALREADY interrupting...

added some extra checks to how Ai determines if it should cast a "all(" or other lord...it was only taking the amount of cards it had into account and not looking at what the suggestion was for the nestedability...meaning it treated "destroy all" the same way it treated "all creature +10/+10" it would only check if it had more cards effected...completely ignore the effects....
This commit is contained in:
omegablast2002@yahoo.com
2011-02-24 14:08:19 +00:00
parent 590655ac80
commit ffa13c8983
2 changed files with 2 additions and 2 deletions

View File

@@ -1317,7 +1317,7 @@ int AIPlayerBaka::computeActions()
{//is already looking kick me out of this function!
return 0;
}
if (p != this && interruptIfICan()&& g->isInterrupting == this && g->mLayers->stackLayer()->count(0, NOT_RESOLVED) == 1)
if ((interruptIfICan() || g->isInterrupting == this) && p != this && g->mLayers->stackLayer()->count(0, NOT_RESOLVED) == 1)
{
findingCard = true;
CardDescriptor cd;

View File

@@ -2787,7 +2787,7 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
int myCards = countCards(abi->tc, p);
int theirCards = countCards(abi->tc, p->opponent());
int efficiency = abilityEfficiency(abi->ability, p, mode, tc);
if (myCards > theirCards)
if ( ((myCards < theirCards) && efficiency == BAKA_EFFECT_GOOD) || ((myCards > theirCards) && efficiency == BAKA_EFFECT_BAD) )
return efficiency;
return -efficiency;
}