|
|
|
@ -49,6 +49,23 @@ public class EffectsParser {
@@ -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; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|