Curve is a float.

Begin filling out first behaviour
This commit is contained in:
2025-02-18 15:07:41 -05:00
parent 3913201eed
commit 35258f6ab5
2 changed files with 318 additions and 305 deletions
+15 -2
View File
@@ -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,