From 7723ac8830aff3dc321696826a41bcf0d890208c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 20 Aug 2024 16:49:51 -0400 Subject: [PATCH] More poweraction parsing work. --- src/engine/wpak/PowerActionParser.java | 7 +++++++ src/engine/wpak/data/EffectDescription.java | 1 + 2 files changed, 8 insertions(+) diff --git a/src/engine/wpak/PowerActionParser.java b/src/engine/wpak/PowerActionParser.java index 88543096..bf54fabe 100644 --- a/src/engine/wpak/PowerActionParser.java +++ b/src/engine/wpak/PowerActionParser.java @@ -139,6 +139,13 @@ public class PowerActionParser { statTransfer.tranfer_ticks = Integer.parseInt(headerIterator.next()); powerActionEntry.statTransfer = statTransfer; break; + case "CHARM": + effectDescription = new EffectDescription(); + effectDescription.effect_id = headerIterator.next(); + effectDescription.level = Integer.parseInt(headerIterator.next()); + effectDescription.type = headerIterator.next(); + powerActionEntry.effects.add(effectDescription); + break; case "Teleport":// No arguments for these tags case "TreeChoke": break; diff --git a/src/engine/wpak/data/EffectDescription.java b/src/engine/wpak/data/EffectDescription.java index 1dadc45b..c3c778f2 100644 --- a/src/engine/wpak/data/EffectDescription.java +++ b/src/engine/wpak/data/EffectDescription.java @@ -10,6 +10,7 @@ package engine.wpak.data; public class EffectDescription { public String effect_id; + public String type; public int level; public String message; public int cycleDuration;