From b40f460c59ce23de405e6a40308d20e99f449ad5 Mon Sep 17 00:00:00 2001 From: elliot Date: Sun, 25 Mar 2018 23:08:06 -0400 Subject: [PATCH] Simple fix for issue where the case of lifeloss for afflict creatures did not match apiType case, causing crashes --- forge-game/src/main/java/forge/game/ability/ApiType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/ApiType.java b/forge-game/src/main/java/forge/game/ability/ApiType.java index 10a2a6f2009..f3d9407a46e 100644 --- a/forge-game/src/main/java/forge/game/ability/ApiType.java +++ b/forge-game/src/main/java/forge/game/ability/ApiType.java @@ -168,7 +168,7 @@ public enum ApiType { static { for(ApiType t : ApiType.values()) { - allValues.put(t.name(), t); + allValues.put(t.name().toLowerCase(), t); } } @@ -179,7 +179,7 @@ public enum ApiType { } public static ApiType smartValueOf(String value) { - ApiType v = allValues.get(value); + ApiType v = allValues.get(value.toLowerCase()); if ( v == null ) throw new RuntimeException("Element " + value + " not found in ApiType enum"); return v;