From 3d4a9e18d04da4d06528b135d3fc23adb9305834 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 24 Feb 2025 08:46:31 -0500 Subject: [PATCH] Tweak to modifierentry --- src/engine/powers/effectmodifiers/AbstractEffectModifier.java | 3 +-- src/engine/wpak/EffectsParser.java | 4 ++-- src/engine/wpak/data/ModifierEntry.java | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/powers/effectmodifiers/AbstractEffectModifier.java b/src/engine/powers/effectmodifiers/AbstractEffectModifier.java index 18cf392d..ab9ef93d 100644 --- a/src/engine/powers/effectmodifiers/AbstractEffectModifier.java +++ b/src/engine/powers/effectmodifiers/AbstractEffectModifier.java @@ -20,7 +20,6 @@ import engine.powers.EffectsBase; import engine.wpak.data.ModifierEntry; import java.sql.ResultSet; -import java.sql.SQLException; public abstract class AbstractEffectModifier { @@ -52,7 +51,7 @@ public abstract class AbstractEffectModifier { this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", "")); this.minMod = mod.min; this.maxMod = mod.max; - this.percentMod = mod.value; + this.percentMod = mod.percentage; this.ramp = (float)mod.compoundCurveType.getValue(); this.useRampAdd = (float)mod.compoundCurveType.getValue() != 0; diff --git a/src/engine/wpak/EffectsParser.java b/src/engine/wpak/EffectsParser.java index f3671870..d60ed33d 100644 --- a/src/engine/wpak/EffectsParser.java +++ b/src/engine/wpak/EffectsParser.java @@ -181,8 +181,8 @@ public class EffectsParser { case Stamina: modifierEntry.min = Float.parseFloat(modValues.get(1).trim()); modifierEntry.max = Float.parseFloat(modValues.get(2).trim()); - modifierEntry.value = Float.parseFloat(modValues.get(3).trim()); - // Parameter 4 is always 0. + modifierEntry.percentage = Float.parseFloat(modValues.get(3).trim()); + modifierEntry.value = Float.parseFloat(modValues.get(4).trim()); modifierEntry.compoundCurveType = mbEnums.CompoundCurveType.valueOf(modValues.get(5).trim()); modifierEntry.arg1 = modValues.get(6).trim(); break; diff --git a/src/engine/wpak/data/ModifierEntry.java b/src/engine/wpak/data/ModifierEntry.java index d67d8a00..890cb6a6 100644 --- a/src/engine/wpak/data/ModifierEntry.java +++ b/src/engine/wpak/data/ModifierEntry.java @@ -14,6 +14,7 @@ public class ModifierEntry { public mbEnums.ModType type; public float min; public float max; + public float percentage; public float value; public mbEnums.CompoundCurveType compoundCurveType; public String arg1; // ItemName "Masterwork" ""