1package com.runehive.game.world.entity.combat.attack.listener.npc;
3import com.runehive.game.Animation;
4import com.runehive.game.UpdatePriority;
5import com.runehive.game.world.entity.combat.CombatUtil;
6import com.runehive.game.world.entity.combat.attack.FightType;
7import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
8import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
9import com.runehive.game.world.entity.combat.hit.CombatHit;
10import com.runehive.game.world.entity.combat.hit.Hit;
11import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
12import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
13import com.runehive.game.world.entity.mob.Mob;
14import com.runehive.game.world.entity.mob.npc.Npc;
15import com.runehive.game.world.position.Area;
16import com.runehive.util.RandomUtils;
17import com.runehive.util.Utility;
19import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
29 private static final String[]
SHOUTS = {
31 "Split their skulls!",
32 "All glory to Bandos!",
35 "Crush them underfoot!",
36 "Death to our enemies!",
38 "For the glory of the Big High War God!",
39 "We feast on the bones of our enemies tonight!"
44 MELEE =
new MeleeAttack();
45 RANGED =
new RangedAttack();
46 }
catch (Exception e) {
78 super(getDefinition(
"Graardor Ranged"));
93 super.hitsplat(attacker, defender,
hit);
Class that models a single animation used by an entity.
A collection of util methods and constants related to combat.
static void areaAction(Mob mob, Consumer< Mob > action)
Executes an action for mobs within a 3x3 square, including the source mob.
void hit(T attacker, Mob defender, Hit hit)
void finishOutgoing(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
int getAttackDistance(Npc attacker, FightType fightType)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
void finishOutgoing(Npc attacker, Mob defender)
void hitsplat(Npc attacker, Mob defender, Hit hit)
static final String[] SHOUTS
static RangedAttack RANGED
void start(Npc attacker, Mob defender, Hit[] hits)
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
final CombatHit nextRangedHit(T attacker, Mob defender)
static NpcMeleeStrategy get()
NpcRangedStrategy(CombatProjectile combatProjectile)
void speak(String forceChat)
Sets the mob's forced chat.
Represents a non-player character in the in-game world.
void setStrategy(CombatStrategy< Npc > strategy)
CombatStrategy< Npc > getStrategy()
The combat strategy of the mob.
Handles checking if mobs are in a certain area.
static boolean inBandos(Mob mob)
A static-util class that provides additional functionality for generating pseudo-random numbers.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
Handles miscellaneous methods.
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.