Refactor manager for action support

This commit is contained in:
2025-02-22 07:57:38 -05:00
parent e3e8fae90c
commit 7ed291860f
2 changed files with 29 additions and 28 deletions
@@ -353,33 +353,6 @@ public class WpakPowerManager {
powerAction.action_type.execute(caster, target, power, rank,
powerAction);
// Iterate effects for this powerAction and apply
for (Effect effect : powerAction.effects) {
// Create pojo to hold effect/modifiers stored in AWO
AppliedEffect appliedEffect = new AppliedEffect();
appliedEffect.effect = effect;
appliedEffect.rank = rank;
// Add modifier objects from behaviours to pojo.
// Anything from a float to an array can be returned
// based on the needs of the behaviour.
for (ModifierEntry modifierEntry : effect.mods) {
Object modifier = modifierEntry.type.behaviorType.apply(caster, target, power,
powerAction, effect, modifierEntry, rank);
appliedEffect.modifiers.put(modifierEntry.type, modifier);
}
// Add this power effect to the target
// or overwrite the old value
target._effects.put(effect, appliedEffect);
}
// target.updateBonuses() here?
}
}