RuneHive-Game
Loading...
Searching...
No Matches
SpritualRanger.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.attack.listener.npc.godwar;
2
3import com.runehive.game.Animation;
4import com.runehive.game.UpdatePriority;
5import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
6import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
7import com.runehive.game.world.entity.combat.attack.listener.npc.Dessourt;
8import com.runehive.game.world.entity.combat.hit.Hit;
9import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
10import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
11import com.runehive.game.world.entity.mob.Mob;
12import com.runehive.game.world.entity.mob.npc.Npc;
13
14import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
15import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
16
17/**
18 * @author Daniel
19 */
20@NpcCombatListenerSignature(npcs = {3160, 2211})
22
23 private static RangedAttack RANGED = new RangedAttack();
24
25 @Override
26 public void start(Npc attacker, Mob defender, Hit[] hits) {
27 attacker.setStrategy(RANGED);
28 }
29
30 private static class RangedAttack extends NpcRangedStrategy {
31 private RangedAttack() {
32 super(getDefinition("Spirtual Ranger"));
33 }
34
35 @Override
36 public Animation getAttackAnimation(Npc attacker, Mob defender) {
37 return new Animation(426, UpdatePriority.VERY_HIGH);
38 }
39 }
40}
Class that models a single animation used by an entity.
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
Represents different priorities for updating.