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.task.impl.ForceMovementTask;
8import com.runehive.game.world.World;
9import com.runehive.game.world.entity.combat.CombatType;
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.projectile.CombatProjectile;
14import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
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.Direction;
19import com.runehive.game.world.entity.mob.Mob;
20import com.runehive.game.world.entity.mob.npc.Npc;
21import com.runehive.game.world.entity.mob.player.ForceMovement;
22import com.runehive.game.world.pathfinding.path.SimplePathChecker;
23import com.runehive.game.world.position.Position;
24import com.runehive.net.packet.out.SendMessage;
25import com.runehive.util.RandomUtils;
26import com.runehive.util.Utility;
28import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
29import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
30import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
90 int dx = current.
getX() - best.
getX();
91 int dy = current.
getY() - best.
getY();
95 int y = dy / (dx == 0 ? dy : dx);
98 current = destination;
110 protected void onSchedule() {
112 defender.mobAnimation.setWalk(1157);
113 defender.locking.lock();
117 protected void onCancel(
boolean logout) {
118 super.onCancel(logout);
138 hit.setAccurate(
true);
147 super(getDefinition(
"Callisto Shockwave"));
152 super.hit(attacker, defender,
hit);
162 hit.setAccurate(
true);
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 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)
CombatHit nextMeleeHit(T attacker, Mob defender)
final CombatHit nextMagicHit(T attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
CombatStrategy< Npc > currentStrategy
NpcMagicStrategy(CombatProjectile combatProjectile)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
static final Animation ANIMATION
int getAttackDistance(Npc attacker, FightType fightType)
CombatHit[] getHits(Npc attacker, Mob defender)
void start(Npc attacker, Mob defender, Hit[] hits)
void attack(Npc attacker, Mob defender, Hit hit)
void hit(Npc attacker, Mob defender, Hit hit)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
static final Animation ANIMATION
void hit(Npc attacker, Mob defender, Hit hit)
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
static Shockwave SHOCKWAVE
void finishOutgoing(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] FULL
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
boolean canAttack(Npc attacker, Mob defender)
void unlock()
Unlocks the mob.
MobAnimation mobAnimation
void interact(Mob mob)
Sets the mob interacting with another mob.
void animate(int animation)
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.
void send(OutgoingPacket encoder)
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.
Position copy()
Creates a deep copy of this location.
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 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)
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The enumerated type whose elements represent the fighting types.
Represents the enumerated directions an entity can walk or face.
static Direction getFollowDirection(Position source, Position target)
static Direction getOppositeDirection(Direction direction)