From cf8cb213cc9fab2b4a461a8a279263e9cc56e5eb Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Mon, 13 Dec 2010 18:54:41 +0000 Subject: [PATCH] pump granting needed to be a little more specific, it is not enough to simply tell the Ai if it is "good" it has to also know if its the controller of the creature. otherwise i witnessned it pump opponents creature. small change no huge impact except correcting the use of ai good effects on human player creatures. --- projects/mtg/src/AIPlayer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index d4bcff3b0..9f62dfb7b 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -375,13 +375,14 @@ int AIAction::getEfficiency() case MTGAbility::STANDARD_PUMP: { MTGCardInstance * _target = (MTGCardInstance *) (a->target); + efficiency = 0; if (!target) break; //i do not set a starting eff. on this ability, this allows Ai to sometimes randomly do it as it normally does. if (g->getCurrentGamePhase() == Constants::MTG_PHASE_COMBATBLOCKERS) { - if (BAKA_EFFECT_GOOD) - { + if (BAKA_EFFECT_GOOD && target->controller()->isAI()) + { if ((_target->defenser || _target->blockers.size()) && ((_target->power < _target->getNextOpponent()->toughness || _target->toughness < _target->getNextOpponent()->power) || (_target->has(Constants::TRAMPLE)))) { @@ -393,7 +394,12 @@ int AIAction::getEfficiency() //this means im heading directly for the player, pump this creature as much as possible. efficiency = 100; } - } + } + if (BAKA_EFFECT_BAD && !target->controller()->isAI()) + { + efficiency = 100; + } + } break; }