RuneHive-Game
Loading...
Searching...
No Matches
AkXil.java
Go to the documentation of this file.
1package com.runehive.content.activity.infernomobs;
2
3import com.runehive.game.world.entity.combat.attack.FightType;
4import com.runehive.game.world.entity.combat.hit.CombatHit;
5import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
6import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
7import com.runehive.game.world.entity.mob.Mob;
8import com.runehive.game.world.entity.mob.npc.Npc;
9
10import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
11
12public class AkXil extends MultiStrategy {
13
14 public AkXil() {
15 currentStrategy = new Ranged();
16 }
17
18 @Override
19 public int getAttackDelay(Npc attacker, Mob defender, FightType fightType) {
20 return attacker.definition.getAttackDelay();
21 }
22
23 private static class Ranged extends NpcRangedStrategy {
24 private Ranged() {
25 super(getDefinition("jalak xil"));
26 }
27
28 @Override
29 public CombatHit[] getHits(Npc attacker, Mob defender) {
30 return new CombatHit[] { nextRangedHit(attacker, defender, 18) };
31 }
32 }
33
34}
CombatHit[] getHits(Npc attacker, Mob defender)
Definition AkXil.java:29
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
Definition AkXil.java:19
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
final CombatHit nextRangedHit(T attacker, Mob defender)
Handles the mob class.
Definition Mob.java:66
Represents a non-player character in the in-game world.
Definition Npc.java:29
The enumerated type whose elements represent the fighting types.