diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java b/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java index 29920d40736..ec4ade1a03c 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageAiBase.java @@ -44,6 +44,11 @@ public abstract class DamageAiBase extends SpellAbilityAi { } protected boolean shouldTgtP(final Player comp, final SpellAbility sa, final int d, final boolean noPrevention) { + // TODO: once the "planeswalker redirection" rule is removed completely, just remove this code and + // remove the "burn Planeswalkers" code in the called method. + return shouldTgtP(comp, sa, d, noPrevention, false); + } + protected boolean shouldTgtP(final Player comp, final SpellAbility sa, final int d, final boolean noPrevention, final boolean noPlaneswalkerRedirection) { int restDamage = d; final Game game = comp.getGame(); Player enemy = ComputerUtil.getOpponentFor(comp); @@ -78,8 +83,10 @@ public abstract class DamageAiBase extends SpellAbilityAi { } // burn Planeswalkers - if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) { - return true; + if (!noPlaneswalkerRedirection) { + if (Iterables.any(enemy.getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.PLANESWALKERS)) { + return true; + } } if (avoidTargetP(comp, sa)) { diff --git a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java index 65aab027ede..c918723848b 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java @@ -533,7 +533,7 @@ public class DamageDealAi extends DamageAiBase { if (tgt.canTgtPlaneswalker()) { // We can damage planeswalkers with this, consider targeting. Card c = this.dealDamageChooseTgtPW(ai, sa, dmg, noPrevention, enemy, false); - if (c != null) { + if (c != null && !this.shouldTgtP(ai, sa, dmg, noPrevention, true)) { tcs.add(c); if (divided) { final int assignedDamage = ComputerUtilCombat.getEnoughDamageToKill(c, dmg, source, false, noPrevention);