1package com.runehive.game.world.entity.combat.attack.listener.npc;
3import com.runehive.game.world.entity.combat.CombatType;
4import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
5import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
6import com.runehive.game.world.entity.combat.hit.CombatHit;
7import com.runehive.game.world.entity.combat.hit.Hit;
8import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
9import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
10import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
11import com.runehive.game.world.entity.mob.Mob;
12import com.runehive.game.world.entity.mob.npc.Npc;
13import com.runehive.util.Utility;
15import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
16import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
17import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
23 private static final String[]
SHOUTS = {
"Attack them, you dogs!",
"Attack!",
"YARRRRRRRR!",
"Rend them limb from limb!",
"Forward!",
"No retreat!", };
29 }
catch (Exception e) {
50 super(getDefinition(
"Kril Tsutsaroth"));
56 hit.setAccurate(
true);
void hit(T attacker, Mob defender, Hit hit)
CombatHit[] getHits(Npc attacker, Mob defender)
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
void start(Npc attacker, Mob defender, Hit[] hits)
static final String[] SHOUTS
static CombatStrategy< Npc >[] STRATEGIES
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)
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
abstract< T extends Mob > CombatStrategy<? super T > getStrategy()
The combat strategy of the mob.
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)
Combat< Npc > getCombat()
The combat of the mob.
Handles miscellaneous methods.
static int random(int bound)
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.