diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index 88cb1f50..1aa09114 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -49,6 +49,23 @@ public class EffectsParser { effectData.replaceAll("(?m)^.*#.*$", ""); + // Parse effect entry description + + String firstLine = effectData.substring(0, effectData.indexOf('\n')); + String[] effectDescription = firstLine.split(" "); + + effectEntry.id = effectDescription[0]; + effectEntry.name = effectDescription[1]; + effectEntry.icon = Integer.parseInt(effectDescription[2]); + + // Parse source entries + + Matcher matcher = SOURCE_REGEX.matcher(effectData); + + while (matcher.find()) + effectEntry.sources.add(matcher.group(1).trim()); + + return effectEntry; }