From 3d85c7c791ad7028b4fd478d3d5f46a32118b341 Mon Sep 17 00:00:00 2001 From: Sloth Date: Thu, 18 Sep 2014 12:34:49 +0000 Subject: [PATCH] - The AI will now take "CARDNAME can't be blocked except by three or more creatures." into account when attacking. --- forge-ai/src/main/java/forge/ai/AiAttackController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/AiAttackController.java b/forge-ai/src/main/java/forge/ai/AiAttackController.java index c949951f7a7..5c8b71d865f 100644 --- a/forge-ai/src/main/java/forge/ai/AiAttackController.java +++ b/forge-ai/src/main/java/forge/ai/AiAttackController.java @@ -983,9 +983,7 @@ public class AiAttackController { numberOfPossibleBlockers += 1; if (isWorthLessThanAllKillers && ComputerUtilCombat.canDestroyAttacker(ai, attacker, defender, combat, false) && !(attacker.hasKeyword("Undying") && attacker.getCounters(CounterType.P1P1) == 0)) { - canBeKilledByOne = true; // there is a single creature on - // the battlefield that can kill - // the creature + canBeKilledByOne = true; // there is a single creature on the battlefield that can kill the creature // see if the defending creature is of higher or lower // value. We don't want to attack only to lose value if (isWorthLessThanAllKillers && !attacker.hasSVar("SacMe") @@ -1027,7 +1025,9 @@ public class AiAttackController { return true; } - if (numberOfPossibleBlockers > 1 || (numberOfPossibleBlockers == 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1, combat))) { + if (numberOfPossibleBlockers > 2 + || (numberOfPossibleBlockers >= 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1, combat)) + || (numberOfPossibleBlockers == 2 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 2, combat))) { canBeBlocked = true; } /*System.out.println(attacker + " canBeKilledByOne: " + canBeKilledByOne + " canKillAll: "