1package com.runehive.game.world.entity.combat.attack.listener.npc;
3import com.runehive.net.packet.out.SendMessage;
4import com.runehive.game.Animation;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
7import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
8import com.runehive.game.world.entity.combat.hit.CombatHit;
9import com.runehive.game.world.entity.combat.hit.Hit;
10import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
11import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
12import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
13import com.runehive.game.world.entity.mob.Mob;
14import com.runehive.game.world.entity.mob.npc.Npc;
15import com.runehive.game.world.entity.mob.player.Player;
16import com.runehive.game.world.items.Item;
18import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
19import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
20import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
35 }
catch(Exception e) {
45 return attacker.
getStrategy().canAttack(attacker, defender);
71 player.
send(
new SendMessage(
"Flambeeds has removed your weapon since you are not wearing ice gloves."));
76 super(getDefinition(
"Flames Of Zamorak"));
Class that models a single animation used by an entity.
CombatHit[] getHits(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
boolean canAttack(Npc attacker, Mob defender)
static CombatStrategy< Npc >[] STRATEGIES
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 nextMagicHit(T attacker, Mob defender)
boolean withinDistance(T attacker, Mob defender)
final CombatProjectile combatProjectile
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
final boolean isPlayer()
Check if an entity is a player.
Represents a non-player character in the in-game world.
void setStrategy(CombatStrategy< Npc > strategy)
CombatStrategy< Npc > getStrategy()
The combat strategy of the mob.
This class represents a character controlled by a player.
final Equipment equipment
void send(OutgoingPacket encoder)
The container class that represents an item that can be interacted with.
boolean contains(int[] bowsWithNoArrowsRequired)
The OutgoingPacket that sends a message to a Players chatbox in the client.
Represents different priorities for updating.