Browse Source

More poweraction parsing work.

feature-config-parsing2
MagicBot 3 months ago
parent
commit
9d89f5d7f4
  1. 13
      src/engine/wpak/PowerActionParser.java
  2. 2
      src/engine/wpak/data/PowerActionEntry.java

13
src/engine/wpak/PowerActionParser.java

@ -178,8 +178,8 @@ public class PowerActionParser {
case "SCALEFACTOR": case "SCALEFACTOR":
arguments = lineValues[1].trim().split("\\s+"); arguments = lineValues[1].trim().split("\\s+");
for (String bodyPart : arguments) for (String scaleFactor : arguments)
powerActionEntry.scaleFactor.add(Float.parseFloat(bodyPart)); powerActionEntry.scaleFactor.add(Float.parseFloat(scaleFactor));
break; break;
case "ISRESISTABLE": case "ISRESISTABLE":
powerActionEntry.isResistible = Boolean.parseBoolean(lineValues[1].trim()); powerActionEntry.isResistible = Boolean.parseBoolean(lineValues[1].trim());
@ -205,8 +205,8 @@ public class PowerActionParser {
case "ATTACKANIMS": case "ATTACKANIMS":
arguments = lineValues[1].trim().split("\\s+"); arguments = lineValues[1].trim().split("\\s+");
for (String bodyPart : arguments) for (String animation : arguments)
powerActionEntry.attackAnimations.add(Integer.parseInt(bodyPart)); powerActionEntry.attackAnimations.add(Integer.parseInt(animation));
break; break;
case "REMOVEALL": case "REMOVEALL":
powerActionEntry.removeAll = Boolean.parseBoolean(lineValues[1].trim()); powerActionEntry.removeAll = Boolean.parseBoolean(lineValues[1].trim());
@ -216,6 +216,11 @@ public class PowerActionParser {
effectDescription.effect_id = lineValues[1].trim(); effectDescription.effect_id = lineValues[1].trim();
powerActionEntry.effects.add(effectDescription); powerActionEntry.effects.add(effectDescription);
break; break;
case "LEVELCAP":
arguments = lineValues[1].trim().split("\\s+");
powerActionEntry.levelCap = Integer.parseInt(arguments[0]);
powerActionEntry.levelCurve = mbEnums.CompoundCurveType.valueOf(arguments[1]);
break;
case "WEAROFFEFFECTOTHER": // Keys not parsed go here. case "WEAROFFEFFECTOTHER": // Keys not parsed go here.
case "WEAROFFEFFECTSELF": case "WEAROFFEFFECTSELF":
break; break;

2
src/engine/wpak/data/PowerActionEntry.java

@ -22,6 +22,8 @@ public class PowerActionEntry {
public int petLevel; public int petLevel;
public int petRace; public int petRace;
public StatTransfer statTransfer; public StatTransfer statTransfer;
public int levelCap;
public mbEnums.CompoundCurveType levelCurve;
// Additional variables after header go here. // Additional variables after header go here.

Loading…
Cancel
Save