RuneHive-Game
Loading...
Searching...
No Matches
InfernalMage.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.attack.listener.npc;
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.hit.Hit;
8import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
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.projectile.CombatProjectile.getDefinition;
13
14/**
15 * @author Daniel
16 */
17@NpcCombatListenerSignature(npcs = {443,444,445,446,447})
19
20 private static MageAttack MAGE = new MageAttack();
21
22 @Override
23 public void start(Npc attacker, Mob defender, Hit[] hits) {
24 attacker.setStrategy(MAGE);
25 }
26
27 private static class MageAttack extends NpcMagicStrategy {
28 private MageAttack() {
29 super(getDefinition("Fire Bolt"));
30 }
31
32 @Override
33 public Animation getAttackAnimation(Npc attacker, Mob defender) {
34 return new Animation(426, UpdatePriority.VERY_HIGH);
35 }
36 }
37}
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.