From 1460ddb97506cfeb9c1acd070161237fbacbe1c8 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 19 Aug 2024 08:00:53 -0400 Subject: [PATCH] More PowerEntry parsing work. --- src/engine/wpak/PowersParser.java | 5 +++++ src/engine/wpak/data/PowerEntry.java | 1 + 2 files changed, 6 insertions(+) diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index b5a3d3cb..e0d13e8f 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -239,6 +239,11 @@ public class PowersParser { for (String restriction : arguments) powerEntry.monsterRestricts.add(mbEnums.MonsterType.valueOf(restriction.trim())); break; + case "MONSTERTYPEPREREQS": + arguments = lineValues[1].trim().split("\\s+"); + for (String restriction : arguments) + powerEntry.monsterPrereqs.add(mbEnums.MonsterType.valueOf(restriction.trim())); + break; case "SHOULDCHECKPATH": powerEntry.shouldCheckPath = Boolean.parseBoolean(lineValues[1].trim()); break; diff --git a/src/engine/wpak/data/PowerEntry.java b/src/engine/wpak/data/PowerEntry.java index 19f0d28d..a9c87a49 100644 --- a/src/engine/wpak/data/PowerEntry.java +++ b/src/engine/wpak/data/PowerEntry.java @@ -51,5 +51,6 @@ public class PowerEntry { public boolean bladeTrails = false; public EquipmentPreReq equipmentPreReq; public EnumSet monsterRestricts = EnumSet.noneOf(mbEnums.MonsterType.class); + public EnumSet monsterPrereqs = EnumSet.noneOf(mbEnums.MonsterType.class); public boolean shouldCheckPath = false; }