From afd73082f395cd43e5c3e9105852d160c4fd6675 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 20 Aug 2024 12:05:03 -0400 Subject: [PATCH] PowerActionEntry parsing work. --- src/engine/wpak/PowerActionParser.java | 9 +++++++++ src/engine/wpak/data/PowerActionEntry.java | 1 + 2 files changed, 10 insertions(+) diff --git a/src/engine/wpak/PowerActionParser.java b/src/engine/wpak/PowerActionParser.java index a2e55654..0a3858ac 100644 --- a/src/engine/wpak/PowerActionParser.java +++ b/src/engine/wpak/PowerActionParser.java @@ -103,6 +103,12 @@ public class PowerActionParser { for (String bodyPart : arguments) powerActionEntry.bodyparts.add(Integer.parseInt(bodyPart)); break; + case "FEMALEBODYPARTS": + arguments = lineValues[1].trim().split("\\s+"); + + for (String bodyPart : arguments) + powerActionEntry.femaleBodyParts.add(Integer.parseInt(bodyPart)); + break; case "ISRESISTABLE": powerActionEntry.isResistable = Boolean.parseBoolean(lineValues[1].trim()); break; @@ -130,6 +136,9 @@ public class PowerActionParser { for (String bodyPart : arguments) powerActionEntry.attackAnimations.add(Integer.parseInt(bodyPart)); break; + case "WEAROFFEFFECTOTHER": // Keys not parsed go here. + case "WEAROFFEFFECTSELF": + break; default: Logger.error("Unhandled variable type:" + key + " for powerAction: " + powerActionEntry.action_id); } diff --git a/src/engine/wpak/data/PowerActionEntry.java b/src/engine/wpak/data/PowerActionEntry.java index 0b84cd52..b88e50e6 100644 --- a/src/engine/wpak/data/PowerActionEntry.java +++ b/src/engine/wpak/data/PowerActionEntry.java @@ -21,6 +21,7 @@ public class PowerActionEntry { // Additional variables after header go here. public ArrayList bodyparts = new ArrayList<>(); + public ArrayList femaleBodyParts = new ArrayList<>(); public boolean shouldShowWeapons = false; public boolean shouldShowArmor = false; public boolean bladeTrails = false;