Browse Source

Tweak to modifierentry

feature-config-usage
MagicBot 1 month ago
parent
commit
3d4a9e18d0
  1. 3
      src/engine/powers/effectmodifiers/AbstractEffectModifier.java
  2. 4
      src/engine/wpak/EffectsParser.java
  3. 1
      src/engine/wpak/data/ModifierEntry.java

3
src/engine/powers/effectmodifiers/AbstractEffectModifier.java

@ -20,7 +20,6 @@ import engine.powers.EffectsBase;
import engine.wpak.data.ModifierEntry; import engine.wpak.data.ModifierEntry;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException;
public abstract class AbstractEffectModifier { public abstract class AbstractEffectModifier {
@ -52,7 +51,7 @@ public abstract class AbstractEffectModifier {
this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", "")); this.sourceType = SourceType.GetSourceType(this.type.replace(" ", "").replace("-", ""));
this.minMod = mod.min; this.minMod = mod.min;
this.maxMod = mod.max; this.maxMod = mod.max;
this.percentMod = mod.value; this.percentMod = mod.percentage;
this.ramp = (float)mod.compoundCurveType.getValue(); this.ramp = (float)mod.compoundCurveType.getValue();
this.useRampAdd = (float)mod.compoundCurveType.getValue() != 0; this.useRampAdd = (float)mod.compoundCurveType.getValue() != 0;

4
src/engine/wpak/EffectsParser.java

@ -181,8 +181,8 @@ public class EffectsParser {
case Stamina: case Stamina:
modifierEntry.min = Float.parseFloat(modValues.get(1).trim()); modifierEntry.min = Float.parseFloat(modValues.get(1).trim());
modifierEntry.max = Float.parseFloat(modValues.get(2).trim()); modifierEntry.max = Float.parseFloat(modValues.get(2).trim());
modifierEntry.value = Float.parseFloat(modValues.get(3).trim()); modifierEntry.percentage = Float.parseFloat(modValues.get(3).trim());
// Parameter 4 is always 0. modifierEntry.value = Float.parseFloat(modValues.get(4).trim());
modifierEntry.compoundCurveType = mbEnums.CompoundCurveType.valueOf(modValues.get(5).trim()); modifierEntry.compoundCurveType = mbEnums.CompoundCurveType.valueOf(modValues.get(5).trim());
modifierEntry.arg1 = modValues.get(6).trim(); modifierEntry.arg1 = modValues.get(6).trim();
break; break;

1
src/engine/wpak/data/ModifierEntry.java

@ -14,6 +14,7 @@ public class ModifierEntry {
public mbEnums.ModType type; public mbEnums.ModType type;
public float min; public float min;
public float max; public float max;
public float percentage;
public float value; public float value;
public mbEnums.CompoundCurveType compoundCurveType; public mbEnums.CompoundCurveType compoundCurveType;
public String arg1; // ItemName "Masterwork" "" public String arg1; // ItemName "Masterwork" ""

Loading…
Cancel
Save