More generalized curve helper

This commit is contained in:
2025-02-22 15:23:15 -05:00
parent 1a64272801
commit 5277fbbe56
6 changed files with 29 additions and 13 deletions
+4 -6
View File
@@ -20,25 +20,23 @@ public class Behaviours {
public static Object Flag(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
boolean modValue = true;
return modValue;
return true;
}
public static Object MapIntToInts(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
return powerAction.attackAnimations.clone();
}
public static Object Standard(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
return WpakPowerManager.applyCurveToValue(powerAction.compoundCurve, modifierEntry.compoundCurveType.getValue(), rank);
}
public static Object FPSubTypeAttr(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
return WpakPowerManager.applyCurveToValue(powerAction.compoundCurve, modifierEntry.compoundCurveType.getValue(), rank);
}
public static Object SubTypeSourceType(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
@@ -60,7 +58,7 @@ public class Behaviours {
public static Object FPSubTypeDmg(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
String key = modifierEntry.arg1;
float value = WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
float value = WpakPowerManager.applyCurveToValue(powerAction.compoundCurve, modifierEntry.compoundCurveType.getValue(), rank);
return new Pair<>(key,value);
}