forked from MagicBane/Server
Unified signature: caster/power/rank/target
This commit is contained in:
@@ -1338,8 +1338,8 @@ public class mbEnums {
|
|||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface ModBehaviorFunction {
|
public interface ModBehaviorFunction {
|
||||||
Object apply(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
Object apply(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank);
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ModBehaviorType {
|
public enum ModBehaviorType {
|
||||||
@@ -1367,9 +1367,9 @@ public class mbEnums {
|
|||||||
this.function = function;
|
this.function = function;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object apply(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public Object apply(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
return function.apply(caster, target, power, powerAction, effect, modifierEntry, rank);
|
return function.apply(caster, power, rank, target, powerAction, effect, modifierEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ public class Actions {
|
|||||||
// based on the needs of the behaviour.
|
// based on the needs of the behaviour.
|
||||||
|
|
||||||
for (ModifierEntry modifierEntry : effect.mods) {
|
for (ModifierEntry modifierEntry : effect.mods) {
|
||||||
Object modifier = modifierEntry.type.behaviorType.apply(caster, target, power,
|
Object modifier = modifierEntry.type.behaviorType.apply(caster, power, rank, target,
|
||||||
powerAction, effect, modifierEntry, rank);
|
powerAction, effect, modifierEntry);
|
||||||
appliedEffect.modifiers.put(modifierEntry.type, modifier);
|
appliedEffect.modifiers.put(modifierEntry.type, modifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,96 +18,96 @@ import engine.wpak.data.PowerAction;
|
|||||||
|
|
||||||
public class Behaviours {
|
public class Behaviours {
|
||||||
|
|
||||||
public static Object Flag(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object Flag(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
boolean modValue = true;
|
boolean modValue = true;
|
||||||
return modValue;
|
return modValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object MapIntToInts(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object MapIntToInts(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
|
|
||||||
return powerAction.attackAnimations.clone();
|
return powerAction.attackAnimations.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object Standard(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object Standard(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
|
|
||||||
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
|
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object FPSubTypeAttr(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object FPSubTypeAttr(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
|
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object SubTypeSourceType(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object SubTypeSourceType(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
|
|
||||||
return modifierEntry.arg1; // Should we return the enum here?
|
return modifierEntry.arg1; // Should we return the enum here?
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object SubTypePowerType(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object SubTypePowerType(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
return modifierEntry.arg1;
|
return modifierEntry.arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object SubTypeSkill(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object SubTypeSkill(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
return modifierEntry.arg1;
|
return modifierEntry.arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object FPSubTypeDmg(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object FPSubTypeDmg(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
String key = modifierEntry.arg1;
|
String key = modifierEntry.arg1;
|
||||||
float value = WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
|
float value = WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank);
|
||||||
return new Pair<>(key,value);
|
return new Pair<>(key,value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object DD(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object DD(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object StringBehaviour(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object StringBehaviour(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object SubTypeMod(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object SubTypeMod(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object SubTypePower(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object SubTypePower(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object SubTypeDmg(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object SubTypeDmg(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object FPSubTypeSkill(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object FPSubTypeSkill(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object FPSubTypeMonster(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object FPSubTypeMonster(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object ProcInfo(AbstractCharacter caster, AbstractWorldObject target, Power power,
|
public static Object ProcInfo(AbstractCharacter caster, Power power, Integer rank, AbstractWorldObject target,
|
||||||
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) {
|
PowerAction powerAction, Effect effect, ModifierEntry modifierEntry) {
|
||||||
System.out.println("Behavior method called");
|
System.out.println("Behavior method called");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user