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.attack.FightType;
11import com.runehive.game.world.entity.combat.hit.CombatHit;
12import com.runehive.game.world.entity.combat.hit.Hit;
13import com.runehive.game.world.entity.combat.hit.HitIcon;
14import com.runehive.game.world.entity.combat.projectile.CombatProjectile;
15import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
16import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
17import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
18import com.runehive.game.world.entity.mob.Mob;
19import com.runehive.game.world.entity.mob.npc.Npc;
20import com.runehive.game.world.position.Position;
21import com.runehive.game.world.region.RegionManager;
22import com.runehive.net.packet.out.SendMessage;
23import com.runehive.util.RandomUtils;
24import com.runehive.util.Utility;
26import java.util.Arrays;
27import java.util.LinkedList;
61 attacker.
getPlayer().
message(
"You must kill his hellhounds before dealing damage!");
76 super.preDeath(attacker, defender,
hit);
87 defender.
speak(
"Do it again!");
92 public void execute() {
111 defender.
speak(defender.
id == 6611 ?
"Kill, my pets!" :
"Bahh! Go, dogs!!");
117 public void appendDeath() {
124 public void appendDeath() {
132 public void appendDeath() {
139 public void appendDeath() {
147 pet1.definition.setRespawnTime(-1);
148 pet2.definition.setRespawnTime(-1);
149 pet1.speak(
"GRRRRRRRRRRRR");
150 pet2.speak(
"GRRRRRRRRRRRR");
151 pet1.getCombat().attack(attacker);
152 pet2.getCombat().attack(attacker);
184 player.send(
new SendMessage(
"Vet'ion pummels the ground sending a shattering earthquake shockwave through you."));
185 if (
player.equals(defender)) {
214 LinkedList<Position> positions =
new LinkedList<>(Arrays.asList(bounds));
215 for (
int index = 0; index < 3; index++) {
217 positions.remove(bound);
221 player.speak(
"OUCH!");
222 player.damage(new Hit(RandomUtils.inclusive(45), HitIcon.MAGIC));
229 hit.setAccurate(
false);
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.
static void sendProjectile(Projectile projectile, Position position, int instance, int lock, byte offsetX, byte offsetY)
Sends a world projectile.
A collection of util methods and constants related to combat.
static int getHitDelay(final Mob attacker, final Mob defender, final CombatType type)
Gets the hit delay for the specified type.
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)
CombatHit nextMeleeHit(T attacker, Mob defender)
final CombatHit nextMagicHit(T attacker, Mob defender)
boolean withinDistance(T attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
CombatStrategy< Npc > currentStrategy
final CombatProjectile combatProjectile
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
CombatHit[] getHits(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
static final Animation ANIMATION
Animation getAttackAnimation(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
void start(Npc attacker, Mob defender, Hit[] hits)
CombatHit[] getHits(Npc attacker, Mob defender)
static final Animation ANIMATION
void finishOutgoing(Npc attacker, Mob defender)
boolean canOtherAttack(Mob attacker, Npc defender)
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
boolean canAttack(Npc attacker, Mob defender)
boolean withinDistance(Npc attacker, Mob defender)
void finishIncoming(Mob attacker, Npc defender)
static Earthquake EARTHQUAKE
void onDeath(Mob attacker, Npc defender, Hit hit)
void preDeath(Mob attacker, Npc defender, Hit hit)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
void speak(String forceChat)
Sets the mob's forced chat.
void setDead(boolean dead)
void transform(int transformId)
final boolean isPlayer()
Check if an entity is a player.
Represents a non-player character in the in-game world.
void appendDeath()
Handles the mob death.
Combat< Npc > getCombat()
The combat of the mob.
void message(String message)
Represents a single tile on the game world.
Position transform(int diffX, int diffY, int diffZ)
Creates a new location based on this location.
Manages the world regions.
static void forNearbyPlayer(Mob mob, int distance, Consumer< Player > action)
Sends an action to Mob instance which is within a distance.
The OutgoingPacket that sends a message to a Players chatbox in the client.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static int inclusive(int min, int max)
Returns a pseudo-random int value between inclusive min and inclusive max.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
static< T > T random(T[] array)
Pseudo-randomly retrieves a element from array.
Handles miscellaneous methods.
static Position[] getInnerBoundaries(Position position, int width, int length)
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.
The enumerated type whose elements represent the hit icon of a Hit.
MELEE
Represents the melee sword hit icon.