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.strategy.CombatStrategy;
13import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
14import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
15import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
16import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
17import com.runehive.game.world.entity.mob.Mob;
18import com.runehive.game.world.entity.mob.npc.Npc;
19import com.runehive.game.world.entity.mob.prayer.Prayer;
21import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
22import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
23import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
64 if (
MELEE.withinDistance(attacker, defender)) {
86 hit.modifyDamage(damage -> 0);
99 super(getDefinition(
"EMPTY"));
117 hit.modifyDamage(damage -> 0);
124 hit.modifyDamage(damage -> 0);
137 super(getDefinition(
"EMPTY"));
161 hit.modifyDamage(damage -> 0);
168 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 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.
final CombatHit nextRangedHit(T attacker, Mob defender)
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)
NpcRangedStrategy(CombatProjectile combatProjectile)
void attack(Npc attacker, Mob defender, Hit hit)
CombatHit[] getHits(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
void hitsplat(Npc attacker, Mob defender, Hit hit)
Animation getAttackAnimation(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
CombatHit[] getHits(Npc attacker, Mob defender)
void hitsplat(Npc attacker, Mob defender, Hit hit)
void hit(Npc attacker, Mob defender, Hit hit)
void attack(Npc attacker, Mob defender, Hit hit)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
boolean withinDistance(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] FULL_STRATEGIES
static RangedAttack RANGED
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
void finishOutgoing(Npc attacker, Mob defender)
static final CombatStrategy< Npc >[] NON_MELEE
boolean canAttack(Npc attacker, Mob defender)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
Optional< Graphic > graphic
Represents a non-player character in the in-game world.
Combat< Npc > getCombat()
The combat of the mob.
boolean isActive(Prayer... prayers)
Checks if all given prayers are active.
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.