From 74d5ab7feafeae38be91b2f2dc21b16e1db20729 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 26 Feb 2024 04:24:35 -0500 Subject: [PATCH] Removed string override --- src/engine/powers/EffectsBase.java | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/engine/powers/EffectsBase.java b/src/engine/powers/EffectsBase.java index 3760db76..025a2d13 100644 --- a/src/engine/powers/EffectsBase.java +++ b/src/engine/powers/EffectsBase.java @@ -221,29 +221,9 @@ public class EffectsBase { if (damageType1.isEmpty() && damageType2.isEmpty() && damageType3.isEmpty()) break; - if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken())) { + if (!EffectsBase.EffectDamageTypes.containsKey(eb.getToken())) EffectsBase.EffectDamageTypes.put(eb.getToken(), new HashSet<>()); - } - if (damageType1.equalsIgnoreCase("Crushing")) - damageType1 = "Crush"; - if (damageType1.equalsIgnoreCase("Piercing")) - damageType1 = "Pierce"; - if (damageType1.equalsIgnoreCase("Slashing")) - damageType1 = "Slash"; - - if (damageType2.equalsIgnoreCase("Crushing")) - damageType2 = "Crush"; - if (damageType2.equalsIgnoreCase("Piercing")) - damageType2 = "Pierce"; - if (damageType2.equalsIgnoreCase("Slashing")) - damageType2 = "Slash"; - - if (damageType3.equalsIgnoreCase("Crushing")) - damageType3 = "Crush"; - if (damageType3.equalsIgnoreCase("Piercing")) - damageType3 = "Pierce"; - if (damageType3.equalsIgnoreCase("Slashing")) - damageType3 = "Slash"; + Enum.SourceType dt = getDamageType(damageType1); if (dt != null) EffectsBase.EffectDamageTypes.get(eb.token).add(dt);