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 {
matcher = CONDITIONS_REGEX.matcher(effectData); matcher = CONDITIONS_REGEX.matcher(effectData);
while (matcher.find()) { while (matcher.find()) {
String[] condition = matcher.group().trim().split(" "); String[] conditions = matcher.group().trim().split("\n");
effectEntry.conditions.put(condition[0].trim(), Float.parseFloat(condition[1]));
for (String condition : conditions) {
String[] parameters = condition.trim().split(" ");
effectEntry.conditions.put(parameters[0], Float.parseFloat(parameters[1]));
}
} }

Loading…
Cancel
Save