From 0591b9d41fa0f0aec8092535e910ced4d75348a7 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 12 Aug 2024 11:10:52 -0400 Subject: [PATCH] Parsing conditions --- src/engine/ConfigParsing/EffectsParser.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index 2d63f143..29d1c339 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -113,8 +113,12 @@ public class EffectsParser { matcher = CONDITIONS_REGEX.matcher(effectData); while (matcher.find()) { - String[] condition = matcher.group().trim().split(" "); - effectEntry.conditions.put(condition[0].trim(), Float.parseFloat(condition[1])); + String[] conditions = matcher.group().trim().split("\n"); + + for (String condition : conditions) { + String[] parameters = condition.trim().split(" "); + effectEntry.conditions.put(parameters[0], Float.parseFloat(parameters[1])); + } }