|
|
@ -426,30 +426,13 @@ public class WpakPowerManager { |
|
|
|
|
|
|
|
|
|
|
|
if (EnumSet.of(mbEnums.CompoundCurveType.DefaultFlat, mbEnums.CompoundCurveType.DefaultSlope, |
|
|
|
if (EnumSet.of(mbEnums.CompoundCurveType.DefaultFlat, mbEnums.CompoundCurveType.DefaultSlope, |
|
|
|
mbEnums.CompoundCurveType.DefaultSlopeDown).contains(curve)) |
|
|
|
mbEnums.CompoundCurveType.DefaultSlopeDown).contains(curve)) |
|
|
|
scaledValue = curve.getValue() + (value * rank); |
|
|
|
scaledValue = value + (curve.getValue() * rank); |
|
|
|
else |
|
|
|
else |
|
|
|
scaledValue = curve.getValue() * (1 + (value * rank)); |
|
|
|
scaledValue = value * (1 + (curve.getValue() * rank)); |
|
|
|
|
|
|
|
|
|
|
|
scaledValue = scaledValue * 0.01f; |
|
|
|
scaledValue = scaledValue * 0.01f; |
|
|
|
|
|
|
|
|
|
|
|
return scaledValue; |
|
|
|
return scaledValue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static float applyCurveToModifier(PowerAction powerAction, ModifierEntry modifierEntry, int rank) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float scaledValue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Method scales by either integer or float values driven by the curve type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (EnumSet.of(mbEnums.CompoundCurveType.DefaultFlat, mbEnums.CompoundCurveType.DefaultSlope, |
|
|
|
|
|
|
|
mbEnums.CompoundCurveType.DefaultSlopeDown).contains(powerAction.levelCapCurve)) |
|
|
|
|
|
|
|
scaledValue = powerAction.levelCapCurve.getValue() + (modifierEntry.compoundCurveType.getValue() * rank); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
scaledValue = powerAction.levelCapCurve.getValue() * (1 + (modifierEntry.compoundCurveType.getValue() * rank)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scaledValue = scaledValue * 0.01f; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return scaledValue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|