1package com.runehive.game.world.entity.combat.attack.listener.npc.dragon;
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.attack.FightType;
9import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
10import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
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.NpcMagicStrategy;
16import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
17import com.runehive.game.world.entity.combat.strategy.npc.impl.BrutalDragonfireStrategy;
18import com.runehive.game.world.entity.combat.strategy.npc.impl.DragonfireStrategy;
19import com.runehive.game.world.entity.mob.Mob;
20import com.runehive.game.world.entity.mob.npc.Npc;
21import com.runehive.util.Utility;
23import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
24import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
25import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
292918, 7273, 7274, 7275, 8081, 8087, 8092
39 }
catch (Exception e) {
49 }
else if (style == 1) {
54 return attacker.
getStrategy().canAttack(attacker, defender);
62 }
else if (style == 1) {
109 super(getDefinition(
"EMPTY"));
127 return switch (npcId) {
128 case 2918, 8081 -> 18;
130 case 7274, 8087 -> 22;
131 case 7275, 8092 -> 29;
137 return switch (npcId) {
138 case 2918, 8081 ->
new Projectile(136, 40, 90, 27, 30, 5);
139 case 7273 ->
new Projectile(133, 40, 90, 27, 30, 5);
140 case 7274, 8087 ->
new Projectile(130, 40, 90, 27, 30, 5);
141 case 7275, 8092 ->
new Projectile(88, 40, 90, 27, 30, 5);
Class that models a single animation used by an entity.
Represents the game world.
static void sendProjectile(Projectile projectile, Position position, int instance, int lock, byte offsetX, byte offsetY)
Sends a world projectile.
static final Animation ANIMATION
Animation getAttackAnimation(Npc attacker, Mob defender)
int getAttackDistance(Npc attacker, FightType fightType)
CombatHit[] getHits(Npc attacker, Mob defender)
static final Animation ANIMATION
int getAttackDistance(Npc attacker, FightType fightType)
Animation getAttackAnimation(Npc attacker, Mob defender)
CombatHit[] getHits(Npc attacker, Mob defender)
static CombatStrategy< Npc >[] STRATEGIES
static BrutalDragonfireStrategy DRAGONFIRE
boolean canAttack(Npc attacker, Mob defender)
void finishOutgoing(Npc attacker, Mob defender)
static Projectile getMagicProjectile(int npcId)
static int getMaxHit(int npcId)
CombatHit[] getHits(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
void setAccurate(boolean accurate)
CombatHit nextMeleeHit(T attacker, Mob defender)
final CombatHit nextMagicHit(T attacker, Mob defender)
boolean withinDistance(T attacker, Mob defender)
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
Represents a non-player character in the in-game world.
void setStrategy(CombatStrategy< Npc > strategy)
CombatStrategy< Npc > getStrategy()
The combat strategy of the mob.
Handles miscellaneous methods.
static int random(int bound)
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The enumerated type whose elements represent the fighting types.