1package com.runehive.game.world.entity.combat.strategy.npc.boss;
3import com.runehive.game.Animation;
4import com.runehive.game.Projectile;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.world.World;
7import com.runehive.game.world.entity.combat.attack.FightType;
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.projectile.CombatProjectile;
11import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
12import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
13import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
14import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
15import com.runehive.game.world.entity.mob.Mob;
16import com.runehive.game.world.entity.mob.npc.Npc;
17import com.runehive.game.world.position.Position;
18import com.runehive.util.RandomUtils;
19import com.runehive.util.Utility;
21import java.util.Deque;
22import java.util.LinkedList;
24import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
43 private final Deque<CombatStrategy<Npc>>
strategyQueue =
new LinkedList<>();
53 for (
int index = 0; index < 6; index++) {
150 public void appendDeath() {
156 shadow.
walkTo(defender, () -> {
Class that models a single animation used by an entity.
Represents the game world.
static void schedule(Task task)
Submits a new event.
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
void setAccurate(boolean accurate)
void setDamage(int damage)
Sets the hit damage.
static CombatProjectile getDefinition(String name)
final CombatHit nextRangedHit(T attacker, Mob defender)
final CombatHit nextMagicHit(T attacker, Mob defender)
CombatStrategy< Npc > currentStrategy
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
Animation getAttackAnimation(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
final Projectile PROJECTILE
CombatHit[] getHits(Npc attacker, Mob defender)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
CombatHit[] getHits(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
static final FrozenSpecial FROZEN_SPECIAL
static final CombatStrategy< Npc >[] FULL_STRATEGIES
final CombatStrategy< Npc >[] SPECIALS
void init(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] NON_MELEE
static final NpcMeleeStrategy MELEE
final Deque< CombatStrategy< Npc > > strategyQueue
static final RangedAttack RANGED
static final IceSpecial ICE_SPECIAL
boolean canAttack(Npc attacker, Mob defender)
static final MagicAttack MAGIC
boolean withinDistance(Npc attacker, Mob defender)
void walkTo(Position position)
Optional< Graphic > graphic
Represents a non-player character in the in-game world.
void appendDeath()
Handles the mob death.
void register()
Registers an entity to the World.
void unregister()
Unregisters an entity from the World.
Represents a single tile on the game world.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static< T > T random(T[] array)
Pseudo-randomly retrieves a element from array.
Handles miscellaneous methods.
static int random(int bound)
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.