Browse Source

argument rename for clarity

feature-config-usage
MagicBot 2 days ago
parent
commit
9e6b50d264
  1. 30
      src/engine/wpakpowers/Behaviour.java
  2. 8
      src/engine/wpakpowers/WpakPowerManager.java

30
src/engine/wpakpowers/Behaviour.java

@ -18,37 +18,37 @@ import engine.wpak.data.Power;
public class Behaviour { public class Behaviour {
public static Object Flag(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object Flag(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called"); System.out.println("Behavior method called");
return null; return null;
} }
public static Object Standard(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object Standard(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
return WpakPowerManager.applyCurveToModifier(powerAction, modifierEntry, rank); return WpakPowerManager.applyCurveToModifier(actionEntry, modifierEntry, rank);
} }
public static Object FPSubTypeAttr(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object FPSubTypeAttr(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called"); System.out.println("Behavior method called");
return null; return null;
} }
public static Object SubTypeSourceType(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object SubTypeSourceType(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called"); System.out.println("Behavior method called");
return null; return null;
} }
public static Object SubTypePowerType(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object SubTypePowerType(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called"); System.out.println("Behavior method called");
return null; return null;
} }
@ -60,49 +60,49 @@ public class Behaviour {
} }
public static Object FPSubTypeDmg(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object FPSubTypeDmg(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called"); System.out.println("Behavior method called");
return null; return null;
} }
public static Object DD(AbstractCharacter caster, AbstractWorldObject target, Power power, public static Object DD(AbstractCharacter caster, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
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, AbstractWorldObject target, Power power,
ActionEntry powerAction, Effect effect, ModifierEntry modifierEntry, Integer rank) { ActionEntry actionEntry, Effect effect, ModifierEntry modifierEntry, Integer rank) {
System.out.println("Behavior method called"); System.out.println("Behavior method called");
return null; return null;
} }

8
src/engine/wpakpowers/WpakPowerManager.java

@ -334,12 +334,12 @@ public class WpakPowerManager {
public static void applyAllPowerEffects(AbstractCharacter caster, Power power, int rank, AbstractWorldObject target) { public static void applyAllPowerEffects(AbstractCharacter caster, Power power, int rank, AbstractWorldObject target) {
for (ActionEntry powerAction : power.actionEntries) { for (ActionEntry actionEntry : power.actionEntries) {
Effect effect = effect_data.get(powerAction.effect_id); Effect effect = effect_data.get(actionEntry.effect_id);
if (effect == null) { if (effect == null) {
Logger.error("Null effect for " + powerAction.effect_id); Logger.error("Null effect for " + actionEntry.effect_id);
continue; continue;
} }
@ -353,7 +353,7 @@ public class WpakPowerManager {
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, target, power,
powerAction, effect, modifierEntry, rank); actionEntry, effect, modifierEntry, rank);
appliedEffect.modifiers.put(modifierEntry.type, modifier); appliedEffect.modifiers.put(modifierEntry.type, modifier);
} }

Loading…
Cancel
Save