From cfca585ab5e6cb3f2080c7534094ebfb4a60cbe7 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 20 Jan 2025 16:46:51 -0500 Subject: [PATCH] Trailing bow can sometimes be missing the bool. --- src/engine/wpak/PowersParser.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index a32a0316..025a5d5f 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -153,10 +153,6 @@ public class PowersParser { ActionEntry actionEntry; List arguments; Matcher argumentMatcher; - int blah = 0; - - if (powerEntry.power_id.equals("ASS-BACKSTAB")) - blah = 1; switch (key) { case "ACTION": @@ -213,7 +209,12 @@ public class PowersParser { EquipmentPreReq equipmentPreReq = new EquipmentPreReq(); equipmentPreReq.slot = mbEnums.EquipSlotType.valueOf(argumentIterator.next()); equipmentPreReq.skill = argumentIterator.next().replaceAll("\"", ""); - equipmentPreReq.required = Integer.parseInt(argumentIterator.next()); + + if (argumentIterator.hasNext()) + equipmentPreReq.required = Integer.parseInt(argumentIterator.next()); + else + equipmentPreReq.required = 0; + powerEntry.equipmentPreReq.add(equipmentPreReq); } break;