From ffa13c89838959889a7f945042302f76445605d8 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Thu, 24 Feb 2011 14:08:19 +0000 Subject: [PATCH] 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.... --- projects/mtg/src/AIPlayer.cpp | 2 +- projects/mtg/src/MTGAbility.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index a33719eb3..bca5ca116 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -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; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index b01fa8ec1..37d6762c1 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -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; }