1package com.runehive.game.world.entity.combat.strategy.player.custom;
3import com.runehive.game.Animation;
4import com.runehive.game.UpdatePriority;
5import com.runehive.game.world.entity.combat.CombatType;
6import com.runehive.game.world.entity.combat.attack.FightType;
7import com.runehive.game.world.entity.combat.effect.impl.CombatPoisonEffect;
8import com.runehive.game.world.entity.combat.hit.CombatHit;
9import com.runehive.game.world.entity.combat.hit.Hit;
10import com.runehive.game.world.entity.combat.ranged.RangedAmmunition;
11import com.runehive.game.world.entity.combat.strategy.basic.RangedStrategy;
12import com.runehive.game.world.entity.mob.Mob;
13import com.runehive.game.world.entity.mob.player.Player;
14import com.runehive.game.world.entity.mob.player.PlayerRight;
15import com.runehive.game.world.items.Item;
16import com.runehive.game.world.items.containers.equipment.Equipment;
17import com.runehive.game.world.items.ground.GroundItem;
18import com.runehive.game.world.position.Area;
19import com.runehive.game.world.position.Position;
20import com.runehive.net.packet.out.SendMessage;
21import com.runehive.util.RandomUtils;
43 if (ammu ==
null || !ammu.
isDart()) {
44 attacker.
message(
"Your blowpipe is not using darts for ammunition!");
54 attacker.
send(
new SendMessage(
"You need some ammunition to use this weapon!"));
67 if (attacker.
getCombat().getDefender() == defender) {
82 if (
hit.getDamage() > 1) {
93 int animation = attacker.
getCombat().getFightType().getAnimation();
99 int delay = attacker.
getCombat().getFightType().getDelay();
100 if (defender.
isNpc())
122 attacker.blowpipeScales -= 1.5f;
146 attacker.
send(
new SendMessage(
"That was the last of your ammunition!"));
147 attacker.blowpipeDarts =
null;
151 attacker.
send(
new SendMessage(
"Your blowpipe has run out of charges!"));
Class that models a single animation used by an entity.
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.
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
final CombatHit nextRangedHit(T attacker, Mob defender)
void hit(T attacker, Mob defender, Hit hit)
Called when the attacking mob performs an attack on the defender.
static void addCombatExperience(Player player, Hit... hits)
int getAttackDistance(Player attacker, FightType fightType)
int getAttackDelay(Player attacker, Mob defender, FightType fightType)
void start(Player attacker, Mob defender, Hit[] hits)
static final ToxicBlowpipeStrategy INSTANCE
void attack(Player attacker, Mob defender, Hit hit)
Animation getAttackAnimation(Player attacker, Mob defender)
CombatType getCombatType()
boolean canAttack(Player attacker, Mob defender)
void removeAmmunition(Player attacker, Mob defender)
CombatHit[] getHits(Player attacker, Mob defender)
void animate(int animation)
final boolean isNpc()
Check if an entity is an npc.
final boolean isPlayer()
Check if an entity is a player.
void venom()
Applies venom to the entity.
This class represents a character controlled by a player.
CombatSpecial getCombatSpecial()
void message(String message)
final Equipment equipment
boolean isSpecialActivated()
void send(OutgoingPacket encoder)
Combat< Player > getCombat()
The combat of the mob.
RangedAmmunition rangedAmmo
The container class that represents an item that can be interacted with.
final void decrementAmount()
Decrements the amount by 1.
final int getAmount()
Gets the quantity of this item.
Item createWithAmount(int newAmount)
Creates a new item with newAmount and the same identifier as this instance.
final Item get(int index)
Gets the Item located on index.
The container that manages the equipment for a player.
static boolean hasAccumulator(Player player)
static boolean hasAttractor(Player player)
static final int WEAPON_SLOT
static boolean hasAssembler(Player player)
Represents a single Ground item on the world map.
static GroundItem create(Player player, Item item)
Creates a new GroundItem object for a player and an item.
Handles checking if mobs are in a certain area.
static boolean inZulrah(Interactable entity)
static boolean inKraken(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 boolean success(double value)
Determines if a pseudorandomly generated double rounded to two decimal places is below or equal to va...
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.
int getDistance()
Gets the attack distance.
static RangedAmmunition find(Item weapon, Item item)
void sendProjectile(Mob attacker, Mob defender)
void drain(Player player)
Drains the special bar for player.
Holds all the player right data.
static boolean isIronman(Player player)
Checks if the player is an ironman.