1package com.osroyale.content.activity.infernomobs;
3import com.osroyale.game.Animation;
4import com.osroyale.game.UpdatePriority;
5import com.osroyale.game.task.Task;
6import com.osroyale.game.world.World;
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.MultiStrategy;
10import com.osroyale.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
11import com.osroyale.game.world.entity.mob.Mob;
12import com.osroyale.game.world.entity.mob.npc.Npc;
40public class Jalimkot
extends MultiStrategy {
42 private static Melee MELEE =
new Melee();
43 private static Burrow BURROW =
new Burrow();
46 currentStrategy = MELEE;
50 public boolean canAttack(
Npc attacker,
Mob defender) {
52 currentStrategy = BURROW;
54 currentStrategy = MELEE;
56 return currentStrategy.canAttack(attacker, defender);
59 private static class Burrow
extends NpcMeleeStrategy {
63 public void start(
Npc attacker,
Mob defender,
Hit[] hits) {
64 attacker.animate(ANIMATION,
true);
69 protected void execute() {
73 attacker.animate(7601);
81 return new CombatHit[] { nextMeleeHit(attacker, defender, 49) };
85 private static class Melee
extends NpcMeleeStrategy {
95 return new CombatHit[] { nextMeleeHit(attacker, defender, 49) };
static void schedule(Task task)
boolean isWithinDistance(Position other, int radius)