Browse Source

Parsing conditions

feature-config-parsing2
MagicBot 5 months ago
parent
commit
0591b9d41f
  1. 8
      src/engine/ConfigParsing/EffectsParser.java

8
src/engine/ConfigParsing/EffectsParser.java

@ -113,8 +113,12 @@ public class EffectsParser { @@ -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]));
}
}

Loading…
Cancel
Save