1package com.runehive.game.world.entity.combat.strategy.npc.boss;
3import com.runehive.game.Animation;
4import com.runehive.game.Graphic;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.task.Task;
7import com.runehive.game.world.World;
8import com.runehive.game.world.entity.combat.CombatType;
9import com.runehive.game.world.entity.combat.CombatUtil;
10import com.runehive.game.world.entity.combat.hit.CombatHit;
11import com.runehive.game.world.entity.combat.hit.Hit;
12import com.runehive.game.world.entity.combat.hit.HitIcon;
13import com.runehive.game.world.entity.combat.hit.Hitsplat;
14import com.runehive.game.world.entity.combat.projectile.CombatProjectile;
15import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
16import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
17import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
18import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
19import com.runehive.game.world.entity.mob.Mob;
20import com.runehive.game.world.entity.mob.npc.Npc;
21import com.runehive.game.world.position.Position;
22import com.runehive.util.Utility;
24import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
25import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
26import static com.runehive.game.world.items.containers.equipment.Equipment.SHAYZIEN_PIECES;
49 boolean spawned = attacker.
attributes.
is(
"LIZARD_SPAWNED");
80 protected void execute() {
85 }
else if (count == 3) {
87 }
else if (count == 4) {
90 }
else if (count == 5) {
92 if (actor.getPosition().equals(
position)) {
94 actor.movement.reset();
102 protected void onCancel(
boolean logout) {
103 attacker.
attack(defender);
130 for (
int index = 0; index < 3; index++) {
189 for (
int index = 0; index < SHAYZIEN_PIECES.length; index++) {
194 int damage = (itemCount == SHAYZIEN_PIECES.length) ? 0 :
Utility.
random(25 - 5 * itemCount, 30 - 5 * itemCount);
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
A game representing a cyclic unit of work.
Represents the game world.
static void schedule(Task task)
Submits a new event.
static void sendGraphic(Graphic graphic, Position position, int instance)
Sends a graphic to the world.
void setVisible(boolean visible)
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.
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 setIcon(HitIcon hitIcon)
Sets the hit icon.
void setDamage(int damage)
Sets the hit damage.
void setHitsplat(Hitsplat hitsplat)
static CombatProjectile getDefinition(String name)
final CombatHit nextMagicHit(T attacker, Mob defender)
CombatStrategy< Npc > currentStrategy
NpcMagicStrategy(CombatProjectile combatProjectile)
boolean canAttack(Npc attacker, Mob defender)
static NpcMeleeStrategy get()
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
void hit(Npc attacker, Mob defender, Hit hit)
void start(Npc attacker, Mob defender, Hit[] hits)
CombatHit[] getHits(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
void start(Npc attacker, Mob defender, Hit[] hits)
void hit(Npc attacker, Mob defender, Hit hit)
static final CombatStrategy< Npc >[] MAGIC_STRATEGIES
static final CombatStrategy< Npc >[] FULL_STRATEGIES
boolean canAttack(Npc attacker, Mob defender)
static final AcidAttack ACID
static final MinionsAttack MINION
static final JumpAttack JUMP
static final CombatStrategy< Npc >[] BASIC_STRATEGIES
static final MagicAttack MAGIC
final GenericAttributes attributes
void animate(int animation)
void move(Position position)
Moves the mob to a set position.
Represents a non-player character in the in-game world.
void register()
Registers an entity to the World.
void unregister()
Unregisters an entity from the World.
final Equipment equipment
boolean contains(int[] bowsWithNoArrowsRequired)
Represents a single tile on the game world.
boolean isWithinDistance(Position other, int radius)
Checks if this location is within range of another.
Handles miscellaneous methods.
static int random(int bound)
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
public< K > boolean is(K key)
Gets the state of a key.
public< K, E > void set(K key, E attribute)
Sets a generic attribute.
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The enumerated type whose elements represent the hit icon of a Hit.
MELEE
Represents the melee sword hit icon.
NONE
Represents no hit icon at all.
POISON
Represents a poison hit type.