RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
BandosSpritualRanger.java
1package com.osroyale.game.world.entity.combat.attack.listener.npc.godwar;
2
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.Hit;
6import com.osroyale.game.world.entity.combat.strategy.CombatStrategy;
7import com.osroyale.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
8import com.osroyale.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
9import com.osroyale.game.world.entity.mob.Mob;
10import com.osroyale.game.world.entity.mob.npc.Npc;
11
12import static com.osroyale.game.world.entity.combat.CombatUtil.createStrategyArray;
13import static com.osroyale.game.world.entity.combat.CombatUtil.randomStrategy;
14import static com.osroyale.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
15
19@NpcCombatListenerSignature(npcs = { 2242 })
43
44public class BandosSpritualRanger extends SimplifiedListener<Npc> {
45
46 private static RangedAttack RANGED = new RangedAttack();
47 private static CombatStrategy<Npc>[] STRATEGIES = createStrategyArray(NpcMeleeStrategy.get(), RANGED);
48
49 @Override
50 public void start(Npc attacker, Mob defender, Hit[] hits) {
51 attacker.setStrategy(randomStrategy(STRATEGIES));
52 }
53
54 private static class RangedAttack extends NpcRangedStrategy {
55 private RangedAttack() {
56 super(getDefinition("Spirtual Ranger"));
57 }
58 }
59}