forked from MagicBane/Server
Curve is a float.
Begin filling out first behaviour
This commit is contained in:
@@ -37,8 +37,21 @@ public class Behaviour {
|
||||
|
||||
public static Object Standard(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
||||
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
||||
System.out.println("Behavior method called");
|
||||
return null;
|
||||
boolean useAdditiveCurve = true;
|
||||
float curveValue = modifierEntry.compoundCurveType.getValue();
|
||||
float modValue = 0.0f;
|
||||
|
||||
if (curveValue > 0 && curveValue < .1 &&
|
||||
modifierEntry.min != 0 && modifierEntry.max != 0)
|
||||
useAdditiveCurve = false;
|
||||
|
||||
if (useAdditiveCurve)
|
||||
modValue = this.percentMod + (curveValue * rank);
|
||||
else
|
||||
modValue = this.percentMod * (1 + (curveValue * rank));
|
||||
modValue = modValue * 0.01f;
|
||||
|
||||
return modValue;
|
||||
}
|
||||
|
||||
public static Object FPSubTypeAttr(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
||||
|
||||
Reference in New Issue
Block a user