From d87e63c9a778d6deca8bcc4d97539f1435445674 Mon Sep 17 00:00:00 2001 From: Agetian Date: Sun, 16 Sep 2018 19:03:24 +0300 Subject: [PATCH] - Fixed the AI not putting the Najeela trigger on stack if it doesn't want to use it. --- forge-ai/src/main/java/forge/ai/ability/TokenAi.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/forge-ai/src/main/java/forge/ai/ability/TokenAi.java b/forge-ai/src/main/java/forge/ai/ability/TokenAi.java index 289888009d0..56d88681c72 100644 --- a/forge-ai/src/main/java/forge/ai/ability/TokenAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/TokenAi.java @@ -311,6 +311,12 @@ public class TokenAi extends SpellAbilityAi { } } + if (mandatory) { + // Necessary because the AI goes into this method twice, first to set up targets (with mandatory=true) + // and then the second time to confirm the trigger (where mandatory may be set to false). + return true; + } + if ("OnlyOnAlliedAttack".equals(sa.getParam("AILogic"))) { Combat combat = ai.getGame().getCombat(); return combat != null && combat.getAttackingPlayer() != null