1package com.osroyale.game.world.entity.combat.attack.listener.npc;
3import com.osroyale.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
4import com.osroyale.game.world.entity.combat.attack.listener.SimplifiedListener;
5import com.osroyale.game.world.entity.combat.hit.CombatHit;
6import com.osroyale.game.world.entity.combat.strategy.CombatStrategy;
7import com.osroyale.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
8import com.osroyale.game.world.entity.mob.Mob;
9import com.osroyale.game.world.entity.mob.npc.Npc;
11import static com.osroyale.game.world.entity.combat.CombatUtil.createStrategyArray;
12import static com.osroyale.game.world.entity.combat.CombatUtil.randomStrategy;
13import static com.osroyale.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
47public class Ahrim extends SimplifiedListener<Npc> {
49 private static FireBlast FIRE_BLAST =
new FireBlast();
50 private static Confuse CONFUSE =
new Confuse();
51 private static Weaken WEAKEN =
new Weaken();
52 private static Curse CURSE =
new Curse();
53 private static final CombatStrategy<Npc>[] STRATEGIES = createStrategyArray(
54 FIRE_BLAST, FIRE_BLAST, FIRE_BLAST, CONFUSE, WEAKEN, CURSE
58 public void finishOutgoing(
Npc attacker,
Mob defender) {
59 attacker.setStrategy(randomStrategy(STRATEGIES));
62 private static class FireBlast
extends NpcMagicStrategy {
64 super(getDefinition(
"Fire Blast"));
69 CombatHit hit = nextMagicHit(attacker, defender, 25);
70 hit.setAccurate(
true);
75 private static class Confuse
extends NpcMagicStrategy {
77 super(getDefinition(
"Confuse"));
81 private static class Weaken
extends NpcMagicStrategy {
83 super(getDefinition(
"Weaken"));
87 private static class Curse
extends NpcMagicStrategy {
89 super(getDefinition(
"Curse"));