Browse Source

More PowerEntry parsing work.

feature-config-parsing2
MagicBot 4 months ago
parent
commit
e719d13c8c
  1. 5
      src/engine/wpak/PowersParser.java
  2. 2
      src/engine/wpak/data/PowerEntry.java

5
src/engine/wpak/PowersParser.java

@ -234,6 +234,11 @@ public class PowersParser {
case "WEAROFFEFFECTOTHER": case "WEAROFFEFFECTOTHER":
case "WEAROFFEFFECTSELF": case "WEAROFFEFFECTSELF":
break; break;
case "MONSTERRESTRICTS":
arguments = lineValues[1].trim().split("\\s+");
for (String restriction : arguments)
powerEntry.monsterRestricts.add(mbEnums.MonsterType.valueOf(restriction.trim()));
break;
default: default:
Logger.error("Unhandled variable type:" + key + " for power: " + powerEntry.power_id); Logger.error("Unhandled variable type:" + key + " for power: " + powerEntry.power_id);
} }

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

@ -11,6 +11,7 @@ package engine.wpak.data;
import engine.mbEnums; import engine.mbEnums;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.EnumSet;
public class PowerEntry { public class PowerEntry {
public String power_id; public String power_id;
@ -49,4 +50,5 @@ public class PowerEntry {
public boolean canCastWhileMoving = false; public boolean canCastWhileMoving = false;
public boolean bladeTrails = false; public boolean bladeTrails = false;
public EquipmentPreReq equipmentPreReq; public EquipmentPreReq equipmentPreReq;
public EnumSet<mbEnums.MonsterType> monsterRestricts;
} }

Loading…
Cancel
Save