forked from MagicBane/Server
old method removed
This commit is contained in:
@@ -426,30 +426,13 @@ public class WpakPowerManager {
|
||||
|
||||
if (EnumSet.of(mbEnums.CompoundCurveType.DefaultFlat, mbEnums.CompoundCurveType.DefaultSlope,
|
||||
mbEnums.CompoundCurveType.DefaultSlopeDown).contains(curve))
|
||||
scaledValue = curve.getValue() + (value * rank);
|
||||
scaledValue = value + (curve.getValue() * rank);
|
||||
else
|
||||
scaledValue = curve.getValue() * (1 + (value * rank));
|
||||
scaledValue = value * (1 + (curve.getValue() * rank));
|
||||
|
||||
scaledValue = scaledValue * 0.01f;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user