1package com.runehive.game.world.entity.combat.strategy.player.custom;
3import com.runehive.Config;
4import com.runehive.game.Animation;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.world.entity.combat.CombatType;
7import com.runehive.game.world.entity.combat.CombatUtil;
8import com.runehive.game.world.entity.combat.attack.FightType;
9import com.runehive.game.world.entity.combat.hit.CombatHit;
10import com.runehive.game.world.entity.combat.hit.Hit;
11import com.runehive.game.world.entity.combat.projectile.CombatProjectile;
12import com.runehive.game.world.entity.combat.strategy.basic.MagicStrategy;
13import com.runehive.game.world.entity.mob.Mob;
14import com.runehive.game.world.entity.mob.player.Player;
15import com.runehive.game.world.entity.skill.Skill;
17import static com.runehive.game.world.entity.combat.CombatUtil.getHitDelay;
26 }
catch (Exception e) {
34 int hitsplatDelay = 1;
41 attacker.
message(
"You have no charges to do this!");
49 PROJECTILE.getAnimation().ifPresent(animation -> attacker.
animate(animation,
true));
50 PROJECTILE.getStart().ifPresent(attacker::graphic);
54 damage +=
hit.getDamage();
60 if (defender.
isNpc()) {
76 PROJECTILE.getEnd().ifPresent(defender::graphic);
The class that contains setting-related constants for the server.
static final double COMBAT_MODIFICATION
The experience modification for combat.
Class that models a single animation used by an entity.
A collection of util methods and constants related to combat.
static CombatHit generateDragonfire(Mob attacker, Mob defender, int max, boolean prayer)
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)
Animation getAttackAnimation(Player attacker, Mob defender)
void hit(Player attacker, Mob defender, Hit hit)
CombatType getCombatType()
void hitsplat(Player attacker, Mob defender, Hit hit)
void attack(Player attacker, Mob defender, Hit hit)
static CombatProjectile PROJECTILE
boolean canAttack(Player attacker, Mob defender)
int getAttackDistance(Player attacker, FightType fightType)
static final DragonfireShieldStrategy INSTANCE
int getAttackDelay(Player attacker, Mob defender, FightType fightType)
void start(Player attacker, Mob defender, Hit[] hits)
CombatHit[] getHits(Player attacker, Mob defender)
final SkillManager skills
void interact(Mob mob)
Sets the mob interacting with another mob.
void animate(int animation)
final boolean isNpc()
Check if an entity is an npc.
void resetFace()
Resets the mob's face location.
This class represents a character controlled by a player.
void message(String message)
Represents a trainable and usable skill.
static final int DEFENCE
The defence skill id.
static final int MAGIC
The magic skill id.
static final int HITPOINTS
The hitpoints skill id.
void addExperience(int id, double experience)
Adds experience to a given skill.
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.