diff --git a/forge-ai/src/main/java/forge/ai/AiBlockController.java b/forge-ai/src/main/java/forge/ai/AiBlockController.java index 55002b3aa92..5bbddc9b873 100644 --- a/forge-ai/src/main/java/forge/ai/AiBlockController.java +++ b/forge-ai/src/main/java/forge/ai/AiBlockController.java @@ -285,7 +285,7 @@ public class AiBlockController { // Try to block an attacker without first strike with a gang of first strikers for (final Card attacker : attackersLeft) { - if (!attacker.hasKeyword("First Strike") && !attacker.hasKeyword("Double Strike")) { + if (!ComputerUtilCombat.dealsFirstStrikeDamage(attacker, false)) { blockers = getPossibleBlockers(combat, attacker, blockersLeft, false); final List firstStrikeBlockers = new ArrayList(); final List blockGang = new ArrayList(); @@ -341,8 +341,8 @@ public class AiBlockController { usableBlockers = CardLists.filter(blockers, new Predicate() { @Override public boolean apply(final Card c) { - if ((attacker.hasKeyword("First Strike") || attacker.hasKeyword("Double Strike")) - && !(c.hasKeyword("First Strike") || c.hasKeyword("Double Strike"))) { + if (ComputerUtilCombat.dealsFirstStrikeDamage(attacker, false) + && !ComputerUtilCombat.dealsFirstStrikeDamage(c, false)) { return false; } return lifeInDanger || (ComputerUtilCard.evaluateCreature(c) + diff) < ComputerUtilCard.evaluateCreature(attacker); @@ -591,7 +591,7 @@ public class AiBlockController { // than the attacker // Don't use blockers without First Strike or Double Strike if // attacker has it - if (attacker.hasKeyword("First Strike") || attacker.hasKeyword("Double Strike")) { + if (ComputerUtilCombat.dealsFirstStrikeDamage(attacker, false)) { safeBlockers = CardLists.getKeyword(blockers, "First Strike"); safeBlockers.addAll(CardLists.getKeyword(blockers, "Double Strike")); } else { diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java b/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java index 1dce58e3fab..848ae759c30 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java @@ -744,7 +744,7 @@ public class ComputerUtilCombat { // if the attacker has first strike and wither the blocker will deal // less damage than expected - if ((attacker.hasKeyword("First Strike") || attacker.hasKeyword("Double Strike")) + if (ComputerUtilCombat.dealsFirstStrikeDamage(attacker, withoutAbilities) && (attacker.hasKeyword("Wither") || attacker.hasKeyword("Infect")) && !(blocker.hasKeyword("First Strike") || blocker.hasKeyword("Double Strike") || blocker .hasKeyword("CARDNAME can't have counters placed on it."))) { @@ -1063,7 +1063,7 @@ public class ComputerUtilCombat { // if the defender has first strike and wither the attacker will deal // less damage than expected if (null != blocker) { - if ((blocker.hasKeyword("First Strike") || blocker.hasKeyword("Double Strike")) + if (ComputerUtilCombat.dealsFirstStrikeDamage(blocker, withoutAbilities) && (blocker.hasKeyword("Wither") || blocker.hasKeyword("Infect")) && !(attacker.hasKeyword("First Strike") || attacker.hasKeyword("Double Strike") || attacker .hasKeyword("CARDNAME can't have counters placed on it."))) {