RuneHive-Game
Loading...
Searching...
No Matches
AkMej.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.NpcMagicStrategy;
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 AkMej extends MultiStrategy {
13
14 public AkMej() {
15 currentStrategy = new Mage();
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 Mage extends NpcMagicStrategy {
24
25 private Mage() {
26 super(getDefinition("jalak mej"));
27 }
28
29 @Override
30 public CombatHit[] getHits(Npc attacker, Mob defender) {
31 return new CombatHit[] { nextRangedHit(attacker, defender, 18) };
32 }
33 }
34
35}
CombatHit[] getHits(Npc attacker, Mob defender)
Definition AkMej.java:30
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
Definition AkMej.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.