From e8582e14137b43e05e51ad300d7d1793bb46f567 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sat, 4 Dec 2010 20:01:22 +0000 Subject: [PATCH] told Ai not to block its own attacking creatures(?), hopefully this is whats happening in issue 547. its been discovered and maybe even known that Ai can do alot of illegal actions as if the rules we set inplace for the player don't apply to it. --- projects/mtg/src/AIPlayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index 75792cd60..d102fa569 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -150,7 +150,7 @@ ManaCost * AIPlayer::getPotentialMana(MTGCardInstance * target) //adding the current manapool if any, to the potential mana Ai can use. result->add(this->getManaPool()); } - return result; + return result; } int AIPlayer::getEfficiency(AIAction * action) @@ -933,7 +933,7 @@ int AIPlayer::chooseBlockers() { MTGCardInstance * attacker = card->defenser; if (opponentsToughness[attacker] <= 0 || (card->toughness <= attacker->power && opponentForce * 2 < life - && !canFirstStrikeKill(card, attacker)) || attacker->nbOpponents() > 1) + && !canFirstStrikeKill(card, attacker)) || attacker->nbOpponents() > 1 || attacker->controller()->isAI()) { g->mLayers->actionLayer()->reactToClick(a, card); }