1package com.osroyale.game.world.entity.combat.strategy.npc.boss.dagannoths;
3import com.osroyale.game.Animation;
4import com.osroyale.game.UpdatePriority;
5import com.osroyale.game.world.entity.combat.attack.FightType;
6import com.osroyale.game.world.entity.combat.hit.CombatHit;
7import com.osroyale.game.world.entity.combat.strategy.CombatStrategy;
8import com.osroyale.game.world.entity.combat.strategy.npc.MultiStrategy;
9import com.osroyale.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
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.CombatUtil.createStrategyArray;
14import static com.osroyale.game.world.entity.combat.CombatUtil.randomStrategy;
47public class DagannothRex
extends MultiStrategy {
48 private static final CrushMelee CRUSH =
new CrushMelee();
49 private static final SlashMelee SLASH =
new SlashMelee();
51 private static final CombatStrategy<Npc>[] STRATEGIES = createStrategyArray(CRUSH, SLASH);
53 public DagannothRex() {
54 currentStrategy = randomStrategy(STRATEGIES);
58 public int getAttackDelay(
Npc attacker,
Mob defender,
FightType fightType) {
62 private static final class CrushMelee
extends NpcMeleeStrategy {
66 public void finishOutgoing(
Npc attacker,
Mob defender) {
71 public int getAttackDistance(
Npc attacker,
FightType fightType) {
82 return new CombatHit[]{nextMeleeHit(attacker, defender)};
86 private static final class SlashMelee
extends NpcMeleeStrategy {
90 public void finishOutgoing(
Npc attacker,
Mob defender) {
95 public int getAttackDistance(
Npc attacker,
FightType fightType) {
106 return new CombatHit[]{nextMeleeHit(attacker, defender)};
Combat< Npc > getCombat()