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.
190 lines
8.7 KiB
190 lines
8.7 KiB
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ . |
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌· |
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀ |
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌ |
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀ |
|
// Magicbane Emulator Project © 2013 - 2024 |
|
// www.magicbane.com |
|
|
|
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, Power power, |
|
Integer rank, AbstractWorldObject target, 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, power, rank, target, |
|
powerAction, effect, modifierEntry); |
|
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, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Charm(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void ClaimMine(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void ClearAggro(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void ClearNearbyAggro(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Confusion(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void CreateMob(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void DamageOverTime(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void DeferredPower(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void DirectDamage(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Invis(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void MobRecall(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Peek(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Recall(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void RemoveEffect(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Resurrect(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void RunegateTeleport(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void SetItemFlag(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void SimpleDamage(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void SpireDisable(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Steal(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Summon(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Teleport(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Track(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void TransferStat(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void TransferStatOT(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void Transform(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
|
|
public static void TreeChoke(AbstractCharacter caster, Power power, |
|
Integer rank, AbstractWorldObject target, PowerAction powerAction) { |
|
System.out.println("PowerAction method called"); |
|
} |
|
}
|
|
|