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.Task;
8import com.runehive.game.world.World;
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.NpcRangedStrategy;
16import com.runehive.game.world.entity.mob.Mob;
17import com.runehive.game.world.entity.mob.npc.Npc;
18import com.runehive.game.world.position.Position;
19import com.runehive.util.RandomUtils;
20import com.runehive.util.Utility;
24import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
25import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
26import static com.runehive.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
35 this.currentStrategy = randomStrategy(
STRATEGIES);
44 super.hit(attacker, defender,
hit);
57 List<Position> positions = Arrays.asList(boundaries);
58 Collections.shuffle(positions);
75 protected void execute() {
78 }
else if (count == 18) {
87 defender.
getPlayer().
message(
"Your poison immunity reduces the damage taken from the acidic pool.");
100 super(getDefinition(
"Hydra Magic"));
125 super(getDefinition(
"Hydra Ranged"));
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
A game representing a cyclic unit of work.
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 wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
void setAccurate(boolean accurate)
final CombatHit nextRangedHit(T attacker, Mob defender)
final CombatHit nextMagicHit(T attacker, Mob defender)
CombatStrategy< Npc > currentStrategy
NpcMagicStrategy(CombatProjectile combatProjectile)
NpcRangedStrategy(CombatProjectile combatProjectile)
Animation getAttackAnimation(Npc attacker, Mob defender)
static final Animation ANIMATION
CombatHit[] getHits(Npc attacker, Mob defender)
int getAttackDistance(Npc attacker, FightType fightType)
static final Animation ANIMATION
CombatHit[] getHits(Npc attacker, Mob defender)
Animation getAttackAnimation(Npc attacker, Mob defender)
int getAttackDistance(Npc attacker, FightType fightType)
CombatStrategy getNextStrategy()
static Task poisonTask(Npc attacker, Mob defender, Position position)
static void poisonAttack(Npc attacker, Mob defender)
void hit(Npc attacker, Mob defender, Hit hit)
static final Ranged RANGED
static final CombatStrategy< Npc >[] STRATEGIES
void writeDamage(Hit hit)
final GenericAttributes attributes
void animate(int animation)
Represents a non-player character in the in-game world.
void message(String message)
final MutableNumber getPoisonImmunity()
Represents a single tile on the game world.
boolean equals(Object obj)
int get()
Gets the value present within this counter.
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...
Handles miscellaneous methods.
static int random(int bound)
static boolean hasOneOutOf(double chance)
static Position[] getInnerBoundaries(Position position, int width, int length)
public< K, E > void set(K key, E attribute)
Sets a generic attribute.
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The enumerated type whose elements represent the fighting types.