1package com.runehive.content.activity.impl.zulrah;
4import com.runehive.content.activity.Activity;
5import com.runehive.content.activity.ActivityDeathType;
6import com.runehive.content.activity.ActivityListener;
7import com.runehive.content.activity.ActivityType;
8import com.runehive.game.Animation;
9import com.runehive.game.Graphic;
10import com.runehive.game.world.World;
11import com.runehive.game.world.entity.combat.hit.Hit;
12import com.runehive.game.world.entity.combat.hit.Hitsplat;
13import com.runehive.game.world.entity.combat.strategy.npc.boss.Zulrah;
14import com.runehive.game.world.entity.mob.Mob;
15import com.runehive.game.world.entity.mob.npc.Npc;
16import com.runehive.game.world.entity.mob.npc.NpcDeath;
17import com.runehive.game.world.entity.mob.player.Player;
18import com.runehive.game.world.object.CustomGameObject;
19import com.runehive.game.world.object.GameObject;
20import com.runehive.game.world.position.Area;
21import com.runehive.game.world.position.Position;
22import com.runehive.net.packet.out.SendMessage;
23import com.runehive.util.RandomUtils;
24import com.runehive.util.Stopwatch;
25import com.runehive.util.Utility;
49 List<Npc>
snakes =
new ArrayList<>();
52 List<CustomGameObject>
clouds =
new ArrayList<>();
69 player.dialogueFactory.sendStatement(
"Welcome to Zulrah's shrine.").execute();
80 player.getCombat().reset();
81 zulrah.getCombat().reset();
92 }
else if (next == 2043) {
94 }
else if (next == 2044) {
105 Set<ZulrahPhase> states =
new HashSet<>();
120 if (positions.contains(snake.getPosition())) {
121 positions.remove(snake.getPosition());
131 if (positions.contains(cloud.getPosition())) {
132 positions.remove(cloud.getPosition());
150 boolean valid =
zulrah !=
null;
152 if (valid &&
zulrah.isDead()) {
159 zulrah.getCombat().cooldown(2);
209 if (
snakes.contains(npc)) {
238 protected Optional<? extends ActivityListener<? extends Activity>>
getListener() {
Activity(int cooldown, int instance)
Constructs a new SequencedMinigame object.
int instance
The activity instance level.
A combat listener that is applied to all mobs added to (or removed from) the activity.
ZulrahPhase nextPhase()
Gets the next Zulrah phase.
int count
The activity count.
void start()
Starts the next activity stage.
int nextForm()
Gets the next Zulrah form.
Position getCloudPosition()
Gets the cloud position.
Stopwatch stopwatch
The activity stopwatch.
List< Npc > snakes
The currently spawned snakes.
static ZulrahActivity create(Player player)
Creates a new Zulrah activity for the player.
void finish()
Finishes the activity.
Position target
The current zulrah target position.
Npc zulrah
The Zulrah npc for this activity.
List< CustomGameObject > clouds
The currently spawned clouds.
void cloudEffect()
Handles the cloud effect.
void reset()
Resets the Zulrah phase.
void onRegionChange(Player player)
Called when the player changes region.
void cleanup()
Cleans up the activity when finished.
final Player player
The player instance for this activity.
void increment()
Increments the activity count.
ZulrahActivity(Player player, int instance)
Constructs a new ZulrahActivity.
boolean canTeleport(Player player)
Called when the player attempts to teleport.
Optional<? extends ActivityListener<? extends Activity > > getListener()
Gets an Optional of the ActivityListener for this activity.
final ActivityListener<? extends Activity > LISTENER
The combat listener for this activity.
Position getSnakelingPosition()
Gets the snakeling position.
void onDeath(Mob mob)
Called when the player die.
ZulrahPhase phase
The current zulrah phase.
ActivityDeathType deathType()
Holds all the zulrah constants.
static final Position[] CLOUD_POSITIONS
All the possible positions zulrah can spawn his clouds for.
static final int MAXIMUM_CLOUDS
The maximum amount of clouds that zulrah can spawn at a time.
static final int MAXIMUM_SNAKELINGS
The maximum amount of snakelings that zulrah can spawn at a time.
static final Integer[] ZULRAH_IDS
The zulrah identifications.
static final Position[] SNAKELINGS_POSITIONS
The zulrah activity combat listener.
Class that models a single animation used by an entity.
static final Animation RESET
Represents a single graphic that can be used by entities.
static final Graphic RESET
Represents the game world.
static void schedule(Task task)
Submits a new event.
abstract boolean equals(Object obj)
A Hit object holds the damage amount and hitsplat data.
final boolean isNpc()
Check if an entity is an npc.
Represents a non-player character in the in-game world.
This class represents a character controlled by a player.
Represents a static game object loaded from the map fs.
Handles checking if mobs are in a certain area.
static boolean inZulrah(Interactable entity)
Represents a single tile on the game world.
The OutgoingPacket that sends a message to a Players chatbox in the client.
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.
Handles miscellaneous methods.
static boolean inside(Interactable source, Interactable target)
static< T > T randomElement(Collection< T > collection)
Picks a random element out of any array type.
static String getTime()
Gets the current server time and formats it.
Created by Daniel on 2018-01-28.
Holds all activity types that are timed.
Handles all the activity phases for zulrah.
VENOM
Represents a venom hit type.
Represents a game object.