forked from MagicBane/Server
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
182 lines
8.0 KiB
182 lines
8.0 KiB
package engine.wpakpowers; |
|
|
|
import engine.objects.AbstractCharacter; |
|
import engine.objects.AbstractWorldObject; |
|
import engine.wpak.data.Effect; |
|
import engine.wpak.data.ModifierEntry; |
|
import engine.wpak.data.Power; |
|
import engine.wpak.data.PowerAction; |
|
|
|
public class Actions { |
|
|
|
public static void ApplyEffects(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction 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? |
|
} |
|
|
|
public static void Block(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Charm(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void ClaimMine(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void ClearAggro(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void ClearNearbyAggro(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Confusion(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void CreateMob(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void DamageOverTime(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void DeferredPower(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void DirectDamage(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Invis(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void MobRecall(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Peek(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Recall(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void RemoveEffect(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Resurrect(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void RunegateTeleport(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void SetItemFlag(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void SimpleDamage(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void SpireDisable(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Steal(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Summon(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Teleport(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Track(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void TransferStat(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void TransferStatOT(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Transform(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void TreeChoke(AbstractCharacter caster, AbstractWorldObject target, Power power, |
|
Integer rank, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
}
|
|
|