Browse Source

Update to helper method

feature-config-usage
MagicBot 2 days ago
parent
commit
16dffee0e3
  1. 15
      src/engine/wpakpowers/WpakPowerManager.java

15
src/engine/wpakpowers/WpakPowerManager.java

@ -422,19 +422,18 @@ public class WpakPowerManager { @@ -422,19 +422,18 @@ public class WpakPowerManager {
Pair<Float, Float> outData = new Pair<>(0f, 0f);
// Only a subset of these ModTypes used for percents
// are multiplicative. These have compound curves
// with "SIVL" as a prefix. (Suggests interpolation)
if (modifierEntry.percentage != 0f) {
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
modifierEntry.percentage * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
modifierEntry.percentage + (modifierEntry.compoundCurveType.getValue() * rank);
outData.first = modifierEntry.percentage + (modifierEntry.compoundCurveType.getValue() * rank);
outData.first = outData.first * 0.01f;
return outData;
}
// As there is a min/max we return both as a pair
// As there is a min/max we return both as a pair.
// MB Dev Note:
// A subset of health/mana/stam modifiers are additive.
// These all have "SIVL" in the curve name suggesting
// that SB interpolates between min max.
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
modifierEntry.min * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :

Loading…
Cancel
Save