1package com.runehive.game.world.entity.combat.strategy.npc.boss.magearena;
3import com.runehive.game.Animation;
4import com.runehive.game.Graphic;
5import com.runehive.game.Projectile;
6import com.runehive.game.UpdatePriority;
7import com.runehive.game.task.impl.ForceMovementTask;
8import com.runehive.game.world.World;
9import com.runehive.game.world.entity.combat.CombatType;
10import com.runehive.game.world.entity.combat.CombatUtil;
11import com.runehive.game.world.entity.combat.attack.FightType;
12import com.runehive.game.world.entity.combat.hit.CombatHit;
13import com.runehive.game.world.entity.combat.hit.Hit;
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.combat.strategy.npc.NpcRangedStrategy;
20import com.runehive.game.world.entity.mob.Direction;
21import com.runehive.game.world.entity.mob.Mob;
22import com.runehive.game.world.entity.mob.npc.Npc;
23import com.runehive.game.world.entity.mob.player.ForceMovement;
24import com.runehive.game.world.pathfinding.path.SimplePathChecker;
25import com.runehive.game.world.position.Position;
26import com.runehive.net.packet.out.SendMessage;
27import com.runehive.util.RandomUtils;
28import com.runehive.util.Utility;
30import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
31import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
71 if (!defender.
getCombat().isAttacking()) {
75 defender.
speak(
"Night King, Lend me your powers for i am your faithful servant!");
84 attacker.
move(destination);
146 hit.setAccurate(
false);
152 return roll + 50_000;
186 attacker.
speak(
"Time To HEAL!");
195 hit.setAccurate(
false);
201 return roll + 50_000;
225 attacker.
speak(
"I AM A DECENDENT OF HELL!");
235 hit.setAccurate(
false);
261 int dx = current.
getX() - best.
getX();
262 int dy = current.
getY() - best.
getY();
263 int y = dy / (dx == 0 ? dy : dx);
278 hit.setAccurate(
false);
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 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.
static CombatProjectile getDefinition(String name)
final CombatHit nextRangedHit(T attacker, Mob defender)
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
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
NpcRangedStrategy(CombatProjectile combatProjectile)
Jisticiar magic strategy.
void hit(Npc attacker, Mob defender, Hit hit)
void attack(Npc attacker, Mob defender, Hit hit)
int modifyAccuracy(Npc attacker, Mob defender, int roll)
CombatHit[] getHits(Npc attacker, Mob defender)
void start(Npc attacker, Mob defender, Hit[] hits)
CombatHit[] getHits(Npc attacker, Mob defender)
void attack(Npc attacker, Mob defender, Hit hit)
int modifyAccuracy(Npc attacker, Mob defender, int roll)
void start(Npc attacker, Mob defender, Hit[] hits)
void hit(Npc attacker, Mob defender, Hit hit)
void attack(Npc attacker, Mob defender, Hit hit)
void start(Npc attacker, Mob defender, Hit[] hits)
void hit(Npc attacker, Mob defender, Hit hit)
CombatHit[] getHits(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] FULL_STRATEGIES
static final CombatStrategy< Npc >[] MAGIC_STRATEGIES
static LightingRain LIGHTNING_RAIN
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
static TeleGrab TELE_GRAB
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
static final CombatStrategy< Npc >[] NON_MELEE
void finishOutgoing(Npc attacker, Mob defender)
Justiciar()
Constructs a new Justiciar.
boolean canAttack(Npc attacker, Mob defender)
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)
void speak(String forceChat)
Sets the mob's forced chat.
void interact(Mob mob)
Sets the mob interacting with another mob.
void animate(int animation)
void move(Position position)
Moves the mob to a set position.
final boolean isPlayer()
Check if an entity is a player.
Optional< Graphic > graphic
Represents a non-player character in the in-game world.
Combat< Npc > getCombat()
The combat of the mob.
Represents a PathFinder which is meant to be used to check projectiles passage in a straight line.
static boolean checkLine(Interactable source, Interactable target)
Represents a single tile on the game world.
int getY()
Gets the absolute y coordinate.
int getX()
Gets the absolute x coordinate.
Position transform(int diffX, int diffY, int diffZ)
Creates a new location based on this location.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
Handles miscellaneous methods.
static int random(int bound)
static Position findBestInside(Interactable source, Interactable target)
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.