From f271c7a74eef1d82a4e0b9fbddd86c21a57e1822 Mon Sep 17 00:00:00 2001 From: Seravy Date: Thu, 15 Feb 2018 12:34:06 +0100 Subject: [PATCH] Now the AI properly realizes this can be played, but doesn't actually play it. Is there something that prevents it from playing things that destroy own tokens? --- forge-ai/src/main/java/forge/ai/ability/DestroyAi.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java b/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java index 2c46009acd6..4051d3bd339 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java @@ -41,16 +41,16 @@ public class DestroyAi extends SpellAbilityAi { havepact = true; } } - if ("Pactivator".equals(logic)) { + if (("Pactivator".equals(logic)) && (havepact)) { if ( (!ai.getGame().getPhaseHandler().isPlayerTurn(ai)) && ((ai.getGame().getPhaseHandler().is(PhaseType.END_OF_TURN)) || (ai.getGame().getPhaseHandler().is(PhaseType.COMBAT_DECLARE_BLOCKERS))) && (ai.getOpponents().get(0).getCreaturesInPlay().size() > 0) - && (havepact) ) { - return ai.getController().chooseTargetsFor(sa); + sa.getTargetRestrictions().setMandatory(true); + return true; //ai.getController().chooseTargetsFor(sa); } }