1package com.runehive.game.world.entity.combat.strategy.npc.boss;
3import com.runehive.content.bloodmoney.BloodMoneyChest;
4import com.runehive.game.Animation;
5import com.runehive.game.Graphic;
6import com.runehive.game.Projectile;
7import com.runehive.game.UpdatePriority;
8import com.runehive.game.world.World;
9import com.runehive.game.world.entity.combat.CombatType;
10import com.runehive.game.world.entity.combat.CombatUtil;
11import com.runehive.game.world.entity.combat.attack.FightType;
12import com.runehive.game.world.entity.combat.hit.CombatHit;
13import com.runehive.game.world.entity.combat.hit.Hit;
14import com.runehive.game.world.entity.combat.projectile.CombatProjectile;
15import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
16import com.runehive.game.world.entity.combat.strategy.npc.MultiStrategy;
17import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
18import com.runehive.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
19import com.runehive.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
20import com.runehive.game.world.entity.mob.Mob;
21import com.runehive.game.world.entity.mob.data.LockType;
22import com.runehive.game.world.entity.mob.npc.Npc;
23import com.runehive.game.world.entity.mob.player.Player;
24import com.runehive.game.world.entity.mob.prayer.Prayer;
25import com.runehive.game.world.position.Position;
26import com.runehive.util.RandomUtils;
27import com.runehive.util.Utility;
29import static com.runehive.game.world.entity.combat.CombatUtil.createStrategyArray;
30import static com.runehive.game.world.entity.combat.CombatUtil.randomStrategy;
56 int attackCount = attacker.
attributes.
get(
"STONE_GUARDIAN_ATTACK", Integer.class);
57 int blockCount = attacker.
attributes.
get(
"STONE_GUARDIAN_BLOCK", Integer.class);
59 if (attackCount >= 10 || blockCount >= 10) {
64 switch (attacker.
id) {
87 defender.
speak(
"NOOOOOOOOOO!!!");
88 super.preDeath(attacker, defender,
hit);
97 super.hitsplat(attacker, defender,
hit);
98 int count = attacker.
attributes.
get(
"STONE_GUARDIAN_ATTACK", Integer.class);
104 super.block(attacker, defender,
hit, combatType);
111 int count = attacker.
attributes.
get(
"STON_GUARDIAN_BLOCK", Integer.class);
142 attacker.
speak(
"AH!!! Give me a minute here...");
151 attacker.
speak(
"That feels better!");
159 hit.setAccurate(
false);
184 attacker.
speak(
"BOOM!");
204 hit.setAccurate(
false);
230 attacker.
speak(
"GET READY FOR A CHILL!!");
239 mob.getPlayer().message(
true,
"The stone guardian has frozen you!");
245 mob.writeDamage(
new Hit(0));
254 hit.setAccurate(
false);
280 attacker.
speak(
"YOUR GODS CAN'T SAVE YOU!");
291 mob.getPlayer().message(
"The stone guardian has deactivated your overhead prayers!");
294 mob.writeDamage(
new Hit(0));
304 hit.setAccurate(
false);
323 hit.setAccurate(
true);
337 hit.setAccurate(
true);
static Npc guardian
The guardian npc.
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 collection of util methods and constants related to combat.
static void areaAction(Mob mob, Consumer< Mob > action)
Executes an action for mobs within a 3x3 square, including the source mob.
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)
void hit(T attacker, Mob defender, Hit hit)
Called when the attacking mob performs an attack on the defender.
void hit(Npc attacker, Mob defender, Hit hit)
CombatStrategy< Npc > currentStrategy
NpcMagicStrategy(CombatProjectile combatProjectile)
static NpcMeleeStrategy get()
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 start(Npc attacker, Mob defender, Hit[] hits)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
void hit(Npc attacker, Mob defender, Hit hit)
void attack(Npc attacker, Mob defender, Hit hit)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
CombatHit[] getHits(Npc attacker, Mob defender)
void start(Npc attacker, Mob defender, Hit[] hits)
CombatHit[] getHits(Npc attacker, Mob defender)
void attack(Npc attacker, Mob defender, Hit hit)
CombatHit[] getHits(Npc attacker, Mob defender)
void start(Npc attacker, Mob defender, Hit[] hits)
void hit(Npc attacker, Mob defender, Hit hit)
int getAttackDelay(Npc attacker, Mob defender, FightType fightType)
CombatHit[] getHits(Npc attacker, Mob defender)
static int nextForm(int id)
static final Transform TRANSFORM
int modifyAccuracy(Npc attacker, Mob defender, int roll)
static final NpcMeleeStrategy MELEE
static final BoomAttack BOOM
static final BarrageAttack BARRAGE
static final Ranged RANGED
static final Integer[] GUARDIAN_IDS
static final PrayerAttack PRAYER
void hitsplat(Npc attacker, Mob defender, Hit hit)
void block(Mob attacker, Npc defender, Hit hit, CombatType combatType)
boolean canAttack(Npc attacker, Mob defender)
int modifyDefensive(Mob attacker, Npc defender, int roll)
void preDeath(Mob attacker, Npc defender, Hit hit)
void speak(String forceChat)
Sets the mob's forced chat.
void transform(int transformId)
final GenericAttributes attributes
void animate(int animation)
Optional< Graphic > graphic
Represents a non-player character in the in-game world.
void unregister()
Unregisters an entity from the World.
This class represents a character controlled by a player.
Represents a single tile on the game world.
Collection< Player > getPlayers(int height)
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)
public< K, E > E get(K key)
Gets a generic attribute.
public< K, V > void put(K key, V value)
public< K, E > void set(K key, E attribute)
Sets a generic attribute.
public< K > boolean has(K key)
Checks if a key is in the list of generic attribute.
Represents different priorities for updating.
VERY_HIGH
A very high priority.
The enumerated type whose elements represent the fighting types.
Holds all the lock types.