- Prevent a ClassCastException when the AI is trying to retrieve the priority reduction for storm spells.

This commit is contained in:
Agetian
2017-02-02 07:50:53 +00:00
parent a3efc6f6a2
commit 10da4a9433

View File

@@ -796,7 +796,7 @@ public class AiController {
} }
// if the profile specifies it, deprioritize Storm spells in an attempt to build up storm count // 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)); p -= (((PlayerControllerAi)ai.getController()).getAi().getIntProperty(AiProps.PRIORITY_REDUCTION_FOR_STORM_SPELLS));
} }