From 10da4a943332387ecf9e7106bb016d8e66d39d40 Mon Sep 17 00:00:00 2001 From: Agetian Date: Thu, 2 Feb 2017 07:50:53 +0000 Subject: [PATCH] - Prevent a ClassCastException when the AI is trying to retrieve the priority reduction for storm spells. --- forge-ai/src/main/java/forge/ai/AiController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/AiController.java b/forge-ai/src/main/java/forge/ai/AiController.java index 5f21f377755..7851666ee70 100644 --- a/forge-ai/src/main/java/forge/ai/AiController.java +++ b/forge-ai/src/main/java/forge/ai/AiController.java @@ -796,7 +796,7 @@ public class AiController { } // if the profile specifies it, deprioritize Storm spells in an attempt to build up storm count - if (source.hasKeyword("Storm")) { + if (source.hasKeyword("Storm") && ai.getController() instanceof PlayerControllerAi) { p -= (((PlayerControllerAi)ai.getController()).getAi().getIntProperty(AiProps.PRIORITY_REDUCTION_FOR_STORM_SPELLS)); }