|
|
|
@ -9,8 +9,10 @@
@@ -9,8 +9,10 @@
|
|
|
|
|
package engine.wpak; |
|
|
|
|
|
|
|
|
|
import engine.gameManager.ConfigManager; |
|
|
|
|
import engine.mbEnums; |
|
|
|
|
import engine.wpak.data.EffectDescription; |
|
|
|
|
import engine.wpak.data.PowerActionEntry; |
|
|
|
|
import engine.wpak.data.StatTransfer; |
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
@ -56,6 +58,7 @@ public class PowerActionParser {
@@ -56,6 +58,7 @@ public class PowerActionParser {
|
|
|
|
|
|
|
|
|
|
PowerActionEntry powerActionEntry = new PowerActionEntry(); |
|
|
|
|
EffectDescription effectDescription; |
|
|
|
|
StatTransfer statTransfer; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
// Remove all lines that contain a # and leading/trailing blank lines
|
|
|
|
@ -110,8 +113,32 @@ public class PowerActionParser {
@@ -110,8 +113,32 @@ public class PowerActionParser {
|
|
|
|
|
powerActionEntry.effects.add(effectDescription); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case "Teleport": |
|
|
|
|
case "TreeChoke":// No arguments
|
|
|
|
|
case "TransferStat": |
|
|
|
|
statTransfer = new StatTransfer(); |
|
|
|
|
statTransfer.fromStat = mbEnums.CostType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.toStat = mbEnums.CostType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.fromStatValue = Integer.parseInt(headerIterator.next()); |
|
|
|
|
statTransfer.fromCurve = mbEnums.CompoundCurveType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.toStatValue = Integer.parseInt(headerIterator.next()); |
|
|
|
|
statTransfer.toCurve = mbEnums.CompoundCurveType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.fromStatBool = Boolean.parseBoolean(headerIterator.next()); |
|
|
|
|
statTransfer.toStatBool = Boolean.parseBoolean(headerIterator.next()); |
|
|
|
|
break; |
|
|
|
|
case "TransferStatOT": |
|
|
|
|
statTransfer = new StatTransfer(); |
|
|
|
|
statTransfer.fromStat = mbEnums.CostType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.toStat = mbEnums.CostType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.fromStatValue = Integer.parseInt(headerIterator.next()); |
|
|
|
|
statTransfer.fromCurve = mbEnums.CompoundCurveType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.toStatValue = Integer.parseInt(headerIterator.next()); |
|
|
|
|
statTransfer.toCurve = mbEnums.CompoundCurveType.valueOf(headerIterator.next()); |
|
|
|
|
statTransfer.fromStatBool = Boolean.parseBoolean(headerIterator.next()); |
|
|
|
|
statTransfer.toStatBool = Boolean.parseBoolean(headerIterator.next()); |
|
|
|
|
statTransfer.transfer_action = headerIterator.next(); |
|
|
|
|
statTransfer.tranfer_ticks = Integer.parseInt(headerIterator.next()); |
|
|
|
|
break; |
|
|
|
|
case "Teleport":// No arguments for these tags
|
|
|
|
|
case "TreeChoke": |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
Logger.error("Unhandled type " + powerActionEntry.action_type + " for Pow4erAction: " + powerActionEntry.action_id); |
|
|
|
|