RuneHive-Game
Loading...
Searching...
No Matches
BandosSpritualRanger.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.attack.listener.npc.godwar;
2
3import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
4import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
5import com.runehive.game.world.entity.combat.hit.Hit;
6import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
7import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
8import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
9import com.runehive.game.world.entity.mob.Mob;
10import com.runehive.game.world.entity.mob.npc.Npc;
11
12import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
13import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
14import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
15
16/**
17 * @author Daniel
18 */
19@NpcCombatListenerSignature(npcs = { 2242 })
21
22 private static RangedAttack RANGED = new RangedAttack();
23 private static CombatStrategy<Npc>[] STRATEGIES = createStrategyArray(NpcMeleeStrategy.get(), RANGED);
24
25 @Override
26 public void start(Npc attacker, Mob defender, Hit[] hits) {
27 attacker.setStrategy(randomStrategy(STRATEGIES));
28 }
29
30 private static class RangedAttack extends NpcRangedStrategy {
31 private RangedAttack() {
32 super(getDefinition("Spirtual Ranger"));
33 }
34 }
35}
A Hit object holds the damage amount and hitsplat data.
Definition Hit.java:10
Handles the mob class.
Definition Mob.java:66
Represents a non-player character in the in-game world.
Definition Npc.java:29
void setStrategy(CombatStrategy< Npc > strategy)
Definition Npc.java:212