|
|
@ -9,6 +9,7 @@ |
|
|
|
package engine.wpak; |
|
|
|
package engine.wpak; |
|
|
|
|
|
|
|
|
|
|
|
import engine.gameManager.ConfigManager; |
|
|
|
import engine.gameManager.ConfigManager; |
|
|
|
|
|
|
|
import engine.mbEnums; |
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
@ -70,29 +71,30 @@ public class PowersParser { |
|
|
|
powerEntry.power = iterator.next().replaceAll("\"", ""); |
|
|
|
powerEntry.power = iterator.next().replaceAll("\"", ""); |
|
|
|
|
|
|
|
|
|
|
|
PowerData power = new PowerData(); |
|
|
|
PowerData power = new PowerData(); |
|
|
|
power.power_type = iterator.next(); |
|
|
|
power.power_type = mbEnums.PowerType.valueOf(iterator.next()); |
|
|
|
power.icon = Integer.parseInt(iterator.next()); |
|
|
|
power.icon = Integer.parseInt(iterator.next()); |
|
|
|
power.powerBase = iterator.next().replaceAll("\"", ""); |
|
|
|
power.powerBase = iterator.next().replaceAll("\"", ""); |
|
|
|
powerEntry.powers.add(power); |
|
|
|
powerEntry.powers.add(power); |
|
|
|
|
|
|
|
|
|
|
|
powerEntry.target_type = iterator.next(); |
|
|
|
String nextValue = iterator.next(); |
|
|
|
|
|
|
|
|
|
|
|
// Account for second definition
|
|
|
|
// Account for second definition
|
|
|
|
|
|
|
|
|
|
|
|
if (powerEntry.target_type.equals("SPELL") || powerEntry.target_type.equals("SKILL")) { |
|
|
|
if (nextValue.equals("SPELL") || nextValue.equals("SKILL")) { |
|
|
|
power = new PowerData(); |
|
|
|
power = new PowerData(); |
|
|
|
power.power_type = powerEntry.target_type; |
|
|
|
power.power_type = mbEnums.PowerType.valueOf(nextValue); |
|
|
|
power.icon = Integer.parseInt(iterator.next()); |
|
|
|
power.icon = Integer.parseInt(iterator.next()); |
|
|
|
power.powerBase = iterator.next().replaceAll("\"", ""); |
|
|
|
power.powerBase = iterator.next().replaceAll("\"", ""); |
|
|
|
powerEntry.powers.add(power); |
|
|
|
powerEntry.powers.add(power); |
|
|
|
powerEntry.target_type = iterator.next(); |
|
|
|
powerEntry.target_type = iterator.next(); |
|
|
|
} |
|
|
|
} else |
|
|
|
|
|
|
|
powerEntry.target_type = nextValue; |
|
|
|
|
|
|
|
|
|
|
|
powerEntry.range = Integer.parseInt(iterator.next()); |
|
|
|
powerEntry.range = Integer.parseInt(iterator.next()); |
|
|
|
powerEntry.areaType = iterator.next(); |
|
|
|
powerEntry.areaType = iterator.next(); |
|
|
|
powerEntry.areaRange = Integer.parseInt(iterator.next()); |
|
|
|
powerEntry.areaRange = Integer.parseInt(iterator.next()); |
|
|
|
powerEntry.excludeType = iterator.next(); |
|
|
|
powerEntry.excludeType = iterator.next(); |
|
|
|
powerEntry.costType = iterator.next(); |
|
|
|
powerEntry.costType = mbEnums.CostType.valueOf(iterator.next()); |
|
|
|
powerEntry.cost = Float.parseFloat(iterator.next()); |
|
|
|
powerEntry.cost = Float.parseFloat(iterator.next()); |
|
|
|
powerEntry.difficulty = Float.parseFloat(iterator.next()); |
|
|
|
powerEntry.difficulty = Float.parseFloat(iterator.next()); |
|
|
|
powerEntry.precision = Float.parseFloat(iterator.next()); |
|
|
|
powerEntry.precision = Float.parseFloat(iterator.next()); |
|
|
|