Update to helper method

This commit is contained in:
2025-02-26 11:56:43 -05:00
parent 7bcd75719c
commit a5cb785587
+13 -5
View File
@@ -423,18 +423,26 @@ public class WpakPowerManager {
Pair<Float, Float> outData = new Pair<>(0f, 0f);
// Only a subset of these ModTypes used for percents
// are multiplicative. Everything else is additive.
// are multiplicative. These have compound curves
// with "SIVL" as a prefix. (Suggests interpolation)
if (modifierEntry.percentage != 0f) {
outData.first = modifierEntry.percentage + (modifierEntry.compoundCurveType.getValue() * rank);
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
modifierEntry.percentage * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
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 pai in linear moder
// As there is a min/max we return both as a pair
outData.first = modifierEntry.min + (modifierEntry.compoundCurveType.getValue() * rank);
outData.second = modifierEntry.max + (modifierEntry.compoundCurveType.getValue() * rank);
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
modifierEntry.min * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
modifierEntry.min + (modifierEntry.compoundCurveType.getValue() * rank);
outData.second = modifierEntry.compoundCurveType.name().contains("SIVL") ?
modifierEntry.max * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
modifierEntry.max + (modifierEntry.compoundCurveType.getValue() * rank);
return outData;
}