1package com.runehive.game.world.entity.combat.strategy.player;
4import com.runehive.content.activity.Activity;
5import com.runehive.content.activity.impl.duelarena.DuelArenaActivity;
6import com.runehive.content.activity.impl.duelarena.DuelRule;
7import com.runehive.content.itemaction.impl.ViggorasChainmace;
8import com.runehive.game.Animation;
9import com.runehive.game.UpdatePriority;
10import com.runehive.game.world.entity.combat.CombatType;
11import com.runehive.game.world.entity.combat.attack.FightType;
12import com.runehive.game.world.entity.combat.effect.impl.CombatPoisonEffect;
13import com.runehive.game.world.entity.combat.hit.CombatHit;
14import com.runehive.game.world.entity.combat.hit.Hit;
15import com.runehive.game.world.entity.combat.strategy.basic.MeleeStrategy;
16import com.runehive.game.world.entity.mob.Mob;
17import com.runehive.game.world.entity.mob.player.Player;
18import com.runehive.game.world.entity.mob.player.PlayerRight;
19import com.runehive.game.world.items.Item;
20import com.runehive.game.world.items.containers.equipment.Equipment;
21import com.runehive.net.packet.out.SendMessage;
39 attacker.
send(
new SendMessage(
"Your Viggora's chainmace is out of charges!"));
73 if (
hit.getDamage() < 1) {
87 return attacker.
getCombat().getFightType().getDelay();
97 int animation = attacker.
getCombat().getFightType().getAnimation();
102 animation =
weapon.getAttackAnimation(fightType).orElse(animation);
108 animation =
weapon.getAttackAnimation(fightType).orElse(animation);
A Activity object constructs an in-game activity and sequences it through the start() and finish() me...
static< T extends Activity > Optional< T > search(Player player, Class< T > clazz)
final DuelRules rules
The duel rules for this duel session.
boolean contains(DuelRule rule)
static final short VIGGORAS_CHAINMACE_CHARGED_ID
FightType getFightType(Item item)
boolean hasOverride(int slot)
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.
CombatHit nextMeleeHit(T attacker, Mob defender)
static void addCombatExperience(Player player, Hit... hits)
int getAttackDistance(Player attacker, FightType fightType)
static final PlayerMeleeStrategy INSTANCE
CombatType getCombatType()
CombatHit[] getHits(Player attacker, Mob defender)
void start(Player attacker, Mob defender, Hit[] hits)
boolean canAttack(Player attacker, Mob defender)
void attack(Player attacker, Mob defender, Hit hit)
int getAttackDelay(Player attacker, Mob defender, FightType fightType)
void hit(Player attacker, Mob defender, Hit hit)
Animation getAttackAnimation(Player attacker, Mob defender)
void animate(int animation)
final boolean isPlayer()
Check if an entity is a player.
This class represents a character controlled by a player.
CombatSpecial getCombatSpecial()
final Equipment equipment
int viggorasChainmaceCharges
boolean isSpecialActivated()
void send(OutgoingPacket encoder)
Combat< Player > getCombat()
The combat of the mob.
final Overrides overrides
The container class that represents an item that can be interacted with.
final Item get(int index)
Gets the Item located on index.
The container that manages the equipment for a player.
static final int WEAPON_SLOT
The OutgoingPacket that sends a message to a Players chatbox in the client.
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.
final int getAnimation()
Gets the animation executed when this type is active.
int getDistance()
Gets the attack distance.
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.