forked from MagicBane/Server
Update to helper method
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user