1package com.osroyale.game.world.entity.combat.attack.listener.npc;
3import com.osroyale.game.Animation;
4import com.osroyale.game.UpdatePriority;
5import com.osroyale.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
6import com.osroyale.game.world.entity.combat.attack.listener.SimplifiedListener;
7import com.osroyale.game.world.entity.combat.hit.CombatHit;
8import com.osroyale.game.world.entity.combat.hit.Hit;
9import com.osroyale.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
10import com.osroyale.game.world.entity.mob.Mob;
11import com.osroyale.game.world.entity.mob.npc.Npc;
13import static com.osroyale.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
45public class Gowler extends SimplifiedListener<Npc> {
47 private static MagicAttack MAGIC;
51 MAGIC =
new MagicAttack();
52 }
catch (Exception e) {
58 public boolean canAttack(
Npc attacker,
Mob defender) {
59 return attacker.
getStrategy().canAttack(attacker, defender);
63 public void start(
Npc attacker,
Mob defender,
Hit[] hits) {
64 attacker.setStrategy(MAGIC);
67 private static class MagicAttack
extends NpcMagicStrategy {
68 private MagicAttack() {
69 super(getDefinition(
"Fire Wave"));
73 public void start(
Npc attacker,
Mob defender,
Hit[] hits) {
79 CombatHit hit = nextMagicHit(attacker, defender, 16, combatProjectile);
80 hit.setAccurate(
true);
CombatStrategy< Npc > getStrategy()