|
|
@ -141,28 +141,28 @@ public class PowersParser { |
|
|
|
String lineValue = iterator.next(); |
|
|
|
String lineValue = iterator.next(); |
|
|
|
String[] lineValues = lineValue.split("="); |
|
|
|
String[] lineValues = lineValue.split("="); |
|
|
|
String key = lineValues[0].trim(); |
|
|
|
String key = lineValues[0].trim(); |
|
|
|
PowerAction powerAction; |
|
|
|
ActionEntry actionEntry; |
|
|
|
String[] arguments; |
|
|
|
String[] arguments; |
|
|
|
Matcher matcher1; |
|
|
|
Matcher matcher1; |
|
|
|
ArrayList<String> args; |
|
|
|
ArrayList<String> args; |
|
|
|
|
|
|
|
|
|
|
|
switch (key) { |
|
|
|
switch (key) { |
|
|
|
case "ACTION": |
|
|
|
case "ACTION": |
|
|
|
powerAction = new PowerAction(); |
|
|
|
actionEntry = new ActionEntry(); |
|
|
|
arguments = lineValues[1].trim().split("\\s+"); |
|
|
|
arguments = lineValues[1].trim().split("\\s+"); |
|
|
|
|
|
|
|
|
|
|
|
if (powerEntry.power_id.equals("HNT-050")) |
|
|
|
if (powerEntry.power_id.equals("HNT-050")) |
|
|
|
Logger.error("debug"); |
|
|
|
Logger.error("debug"); |
|
|
|
|
|
|
|
|
|
|
|
powerAction.effect_id = arguments[0]; |
|
|
|
actionEntry.effect_id = arguments[0]; |
|
|
|
powerAction.minTrains = Integer.parseInt(arguments[1]); |
|
|
|
actionEntry.minTrains = Integer.parseInt(arguments[1]); |
|
|
|
powerAction.maxTrains = Integer.parseInt(arguments[2]); |
|
|
|
actionEntry.maxTrains = Integer.parseInt(arguments[2]); |
|
|
|
powerAction.duration = Float.parseFloat(arguments[3]); |
|
|
|
actionEntry.duration = Float.parseFloat(arguments[3]); |
|
|
|
powerAction.curve = mbEnums.CompoundCurveType.valueOf(arguments[4]); |
|
|
|
actionEntry.curve = mbEnums.CompoundCurveType.valueOf(arguments[4]); |
|
|
|
powerAction.stackingCategory = arguments[5]; |
|
|
|
actionEntry.stackingCategory = arguments[5]; |
|
|
|
powerAction.stackingPriority = Integer.parseInt(arguments[6]); |
|
|
|
actionEntry.stackingPriority = Integer.parseInt(arguments[6]); |
|
|
|
powerAction.categoryToPower = mbEnums.CategoryToPowerType.valueOf(arguments[7]); |
|
|
|
actionEntry.categoryToPower = mbEnums.CategoryToPowerType.valueOf(arguments[7]); |
|
|
|
powerEntry.actions.add(powerAction); |
|
|
|
powerEntry.actionEntries.add(actionEntry); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "MaxLevel": |
|
|
|
case "MaxLevel": |
|
|
|
powerEntry.maxLevel = Integer.parseInt(lineValues[1].trim()); |
|
|
|
powerEntry.maxLevel = Integer.parseInt(lineValues[1].trim()); |
|
|
|