1package com.runehive.game.world.entity.combat.attack.listener.item;
3import com.runehive.game.world.entity.combat.attack.listener.ItemCombatListenerSignature;
4import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
5import com.runehive.game.world.entity.combat.effect.impl.CombatPoisonEffect;
6import com.runehive.game.world.entity.combat.effect.impl.CombatVenomEffect;
7import com.runehive.game.world.entity.combat.hit.Hit;
8import com.runehive.game.world.entity.mob.Mob;
9import com.runehive.game.world.entity.mob.player.Player;
10import com.runehive.game.world.items.Item;
11import com.runehive.game.world.items.containers.equipment.Equipment;
12import com.runehive.util.RandomUtils;
19 if (!defender.
isNpc()) {
30 serp(attacker, defender,
this);
32 tanz(attacker, defender,
this);
34 magma(attacker, defender,
this);
40 attacker.serpentineHelmCharges -= 2;
41 boolean poisonous =
false;
59 attacker.
message(
"Your Serpentine helm is out of charges.");
67 attacker.tanzaniteHelmCharges -= 2;
68 boolean poisonous =
false;
86 attacker.
message(
"Your Tanzanite helm is out of charges.");
94 attacker.magmaHelmCharges -= 2;
95 boolean poisonous =
false;
113 attacker.
message(
"Your Magma helm is out of charges.");
static void magma(Player attacker, Mob defender, ZulrahHelm listener)
static void serp(Player attacker, Mob defender, ZulrahHelm listener)
void hit(Player attacker, Mob defender, Hit hit)
static void tanz(Player attacker, Mob defender, ZulrahHelm listener)
The combat effect applied when a character needs to be poisoned.
static Optional< PoisonType > getPoisonType(Item item)
Gets the PoisonType for item wrapped in an optional.
The combat effect applied when a character needs to be venomed.
static boolean isVenomous(Npc npc)
A Hit object holds the damage amount and hitsplat data.
final boolean isNpc()
Check if an entity is an npc.
void venom()
Applies venom to the entity.
This class represents a character controlled by a player.
void message(String message)
final Equipment equipment
int serpentineHelmCharges
Combat< Player > getCombat()
The combat of the mob.
The container class that represents an item that can be interacted with.
boolean matchesId(int id)
final Item get(int index)
Gets the Item located on index.
final void set(Item[] toSet)
The container that manages the equipment for a player.
static final int ARROWS_SLOT
static final int HELM_SLOT
A static-util class that provides additional functionality for generating pseudo-random numbers.
static boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...