From c10a2e11337d4711ebf46f9b22416e68697edf2b Mon Sep 17 00:00:00 2001 From: Agetian Date: Mon, 16 Oct 2017 08:33:37 +0000 Subject: [PATCH] - Minor improvement in Volrath's Shapeshifter AI logic. --- forge-ai/src/main/java/forge/ai/SpecialCardAi.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/forge-ai/src/main/java/forge/ai/SpecialCardAi.java b/forge-ai/src/main/java/forge/ai/SpecialCardAi.java index 98c81ed6884..2a8748678e4 100644 --- a/forge-ai/src/main/java/forge/ai/SpecialCardAi.java +++ b/forge-ai/src/main/java/forge/ai/SpecialCardAi.java @@ -1136,6 +1136,13 @@ public class SpecialCardAi { // Volrath's Shapeshifter public static class VolrathsShapeshifter { public static boolean consider(final Player ai, final SpellAbility sa) { + PhaseHandler ph = ai.getGame().getPhaseHandler(); + if (ph.getPhase().isBefore(PhaseType.COMBAT_BEGIN)) { + // try not to do this too early to at least attempt to avoid situations where the AI + // would cast a spell which would ruin the shapeshifting + return false; + } + CardCollectionView aiGY = ai.getCardsIn(ZoneType.Graveyard); Card topGY = null; Card creatHand = ComputerUtilCard.getBestCreatureAI(ai.getCardsIn(ZoneType.Hand));