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.TickableTask;
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.mob.Mob;
18import com.runehive.game.world.entity.mob.data.LockType;
19import com.runehive.game.world.entity.mob.npc.Npc;
20import com.runehive.game.world.entity.mob.prayer.Prayer;
21import com.runehive.game.world.entity.skill.Skill;
22import com.runehive.game.world.position.Area;
23import com.runehive.util.RandomUtils;
25import static com.runehive.game.world.entity.combat.CombatUtil.*;
109 return !defender.
locking.
locked() && super.canAttack(attacker, defender);
114 super.hit(attacker, defender,
hit);
115 if (!
hit.isAccurate())
118 defender.
getPlayer().
message(
"Venenatis hurls her web at you, sticking you to the ground.");
152 if (!
hit.isAccurate())
return;
155 protected void tick() {
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.
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()
static final Animation ANIMATION
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
static final Graphic GRAPHIC
Animation getAttackAnimation(Npc attacker, Mob defender)
void finishOutgoing(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
static final Animation ANIMATION
boolean canAttack(Npc attacker, Mob defender)
boolean canAttack(Npc attacker, Mob defender)
boolean withinDistance(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] FULL_STRATEGIES
void finishOutgoing(Npc attacker, Mob defender)
static final PrayerDrain PRAYER_DRAIN
static final CombatStrategy< Npc >[] NON_MELEE
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
boolean locked()
Checks if the mob is locked.
final SkillManager skills
final boolean isPlayer()
Check if an entity is a player.
Optional< Graphic > graphic
Represents a non-player character in the in-game world.
CombatStrategy< Npc > getStrategy()
The combat strategy of the mob.
Combat< Npc > getCombat()
The combat of the mob.
void message(String message)
boolean isActive(Prayer... prayers)
Checks if all given prayers are active.
Represents a trainable and usable skill.
void modifyLevel(Function< Integer, Integer > function)
Modifies the current level with a given function.
static final int PRAYER
The prayer skill id.
Skill get(int id)
Gets the skill for an id.
void refresh()
Refreshes all the skills for the mob.
A static-util class that provides additional functionality for generating pseudo-random numbers.
static< T > T randomExclude(T[] array, T exclude)
Returns a pseudo-random int value between inclusive min and inclusive max excluding the specified num...
static int inclusive(int min, int max)
Returns a pseudo-random int value between inclusive min and inclusive max.
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.
Holds all the lock types.