From 3af6cab92ef27907f3fb6ff92fe03828c75a0607 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 26 Feb 2025 14:12:04 -0500 Subject: [PATCH] Bugfix in enum usage --- src/engine/wpakpowers/WpakPowerManager.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/engine/wpakpowers/WpakPowerManager.java b/src/engine/wpakpowers/WpakPowerManager.java index cb1442c3..77309473 100644 --- a/src/engine/wpakpowers/WpakPowerManager.java +++ b/src/engine/wpakpowers/WpakPowerManager.java @@ -399,23 +399,13 @@ public class WpakPowerManager { } public static boolean allowedInCombat(Power power) { - switch (power.castingMode.name()) { - case "NONE": - case "BOTH": - case "COMBAT": - return true; - } - return false; + return power.castingMode.equals(mbEnums.CastingModeType.NONCOMBAT) == false; } public static boolean allowedOutOfCombat(Power power) { - switch (power.castingMode.name()) { - case "NONE": - case "BOTH": - case "NONCOMBAT": - return true; - } - return false; + + return power.castingMode.equals(mbEnums.CastingModeType.COMBAT) == false; + } public static Pair getModifierValues(ModifierEntry modifierEntry, int rank) {