PowerAction not ActionEntry

This commit is contained in:
2025-02-20 14:19:10 -05:00
parent 99acc4736f
commit 3612232788
3 changed files with 42 additions and 42 deletions
+19 -19
View File
@@ -10,104 +10,104 @@ package engine.wpakpowers;
import engine.objects.AbstractCharacter;
import engine.objects.AbstractWorldObject;
import engine.wpak.data.ActionEntry;
import engine.wpak.data.Effect;
import engine.wpak.data.ModifierEntry;
import engine.wpak.data.Power;
import engine.wpak.data.PowerAction;
public class Behaviour {
public static Object Flag(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
boolean modValue = true;
return modValue;
}
public static Object MapIntToInts(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object Standard(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
return WpakPowerManager.applyCurveToModifier(actionEntry, modifierEntry, rank);
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
}
public static Object FPSubTypeAttr(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
return WpakPowerManager.applyCurveToModifier(actionEntry, modifierEntry, rank);
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
}
public static Object SubTypeSourceType(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object SubTypePowerType(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object SubTypeSkill(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object FPSubTypeDmg(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object DD(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object StringBehaviour(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object SubTypeMod(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object SubTypePower(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object SubTypeDmg(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object FPSubTypeSkill(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object FPSubTypeMonster(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
public static Object ProcInfo(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called");
return null;
}
+5 -5
View File
@@ -358,7 +358,7 @@ public class WpakPowerManager {
for (ModifierEntry modifierEntry : effect.mods) {
Object modifier = modifierEntry.type.behaviorType.apply(caster, target, power,
actionEntry, effect, modifierEntry, rank);
powerAction, effect, modifierEntry, rank);
appliedEffect.modifiers.put(modifierEntry.type, modifier);
}
@@ -433,17 +433,17 @@ public class WpakPowerManager {
return false;
}
public static float applyCurveToModifier(ActionEntry powerAction, ModifierEntry modifierEntry, int rank) {
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.curve))
scaledValue = powerAction.curve.getValue() + (modifierEntry.compoundCurveType.getValue() * rank);
mbEnums.CompoundCurveType.DefaultSlopeDown).contains(powerAction.rampCurve))
scaledValue = powerAction.rampCurve.getValue() + (modifierEntry.compoundCurveType.getValue() * rank);
else
scaledValue = powerAction.curve.getValue() * (1 + (modifierEntry.compoundCurveType.getValue() * rank));
scaledValue = powerAction.rampCurve.getValue() * (1 + (modifierEntry.compoundCurveType.getValue() * rank));
scaledValue = scaledValue * 0.01f;