1package com.runehive.game.world.entity.combat.strategy.npc.boss;
3import com.runehive.game.Animation;
4import com.runehive.game.Graphic;
5import com.runehive.game.Projectile;
6import com.runehive.game.UpdatePriority;
7import com.runehive.game.world.World;
8import com.runehive.game.world.entity.combat.CombatType;
9import com.runehive.game.world.entity.combat.attack.FightType;
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.projectile.CombatProjectile;
13import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
14import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
15import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
16import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
17import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
18import com.runehive.game.world.entity.mob.Mob;
19import com.runehive.game.world.entity.mob.npc.Npc;
20import com.runehive.game.world.entity.mob.player.Player;
21import com.runehive.game.world.items.Item;
22import com.runehive.game.world.position.Position;
23import com.runehive.net.packet.out.SendMessage;
24import com.runehive.util.Utility;
26import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
27import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
28import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
42 "Develish Oxen Roll!",
43 "All your wilderness are belong to them!",
44 "AhehHeheuhHhahueHuUEehEahAH",
45 "I shall call him squidgy and he shall be my squidgy!",
93 for (
int i = 0; i < 3; i++) {
94 int offsetX = defender.
getX() - attacker.
getX();
95 int offsetY = defender.
getY() - attacker.
getY();
96 if (i == 0 || i == 2) {
97 offsetX += i == 0 ? -1 : 1;
108 Item[] equipment =
player.equipment.toNonNullArray();
109 if (equipment.length == 0)
111 if (
player.inventory.isFull()) {
117 player.equipment.unEquip(disarm);
133 hit.setAccurate(
false);
139 return roll + 50_000;
145 super(getDefinition(
"Chaos Fanatic Range"));
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
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.
static void sendProjectile(Projectile projectile, Position position, int instance, int lock, byte offsetX, byte offsetY)
Sends a world projectile.
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
static CombatProjectile getDefinition(String name)
final CombatHit nextMagicHit(T attacker, Mob defender)
boolean withinDistance(T attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
CombatStrategy< Npc > currentStrategy
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
NpcRangedStrategy(CombatProjectile combatProjectile)
int modifyAccuracy(Npc attacker, Mob defender, int roll)
void hit(Npc attacker, Mob defender, Hit hit)
void attack(Npc attacker, Mob defender, Hit hit)
CombatHit[] getHits(Npc attacker, Mob defender)
void start(Npc attacker, Mob defender, Hit[] hits)
static final String[] MESSAGES
void finishOutgoing(Npc attacker, Mob defender)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
static final CombatStrategy< Npc >[] NON_MELEE
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
boolean canAttack(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] FULL_STRATEGIES
void speak(String forceChat)
Sets the mob's forced chat.
void animate(int animation)
final boolean isPlayer()
Check if an entity is a player.
Represents a non-player character in the in-game world.
Combat< Npc > getCombat()
The combat of the mob.
This class represents a character controlled by a player.
The container class that represents an item that can be interacted with.
EquipmentType getEquipmentType()
Represents a single tile on the game world.
boolean equals(Object obj)
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles miscellaneous methods.
static String formatName(final String input)
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The enumerated type whose elements represent the fighting types.