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 e3959fbcf1e..9c4f48cfd5b 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DamageDealAi.java @@ -749,8 +749,22 @@ public class DamageDealAi extends DamageAiBase { } // fell through all the choices, no targets left? - if (tcs.size() < tgt.getMinTargets(source, sa) || tcs.size() == 0) { + int minTgts = tgt.getMinTargets(source, sa); + if (tcs.size() < minTgts || tcs.size() == 0) { if (mandatory) { + // Sanity check: if there are any legal non-owned targets after the check (which may happen for complex cards like Searing Blaze), + // choose a random opponent's target before forcing targeting of own stuff + List allTgtEntities = sa.getTargetRestrictions().getAllCandidates(sa, true); + for (GameEntity ent : allTgtEntities) { + if ((ent instanceof Player && ((Player)ent).isOpponentOf(ai)) + || (ent instanceof Card && ((Card)ent).getController().isOpponentOf(ai))) { + tcs.add(ent); + } + if (tcs.size() == minTgts) { + return true; + } + } + // If the trigger is mandatory, gotta choose my own stuff now return damageChooseRequiredTargets(ai, sa, tgt, dmg); }