1package com.runehive.game.world.entity.combat.attack.listener.other;
3import com.runehive.game.Graphic;
4import com.runehive.game.UpdatePriority;
5import com.runehive.game.world.entity.combat.CombatType;
6import com.runehive.game.world.entity.combat.CombatUtil;
7import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
8import com.runehive.game.world.entity.combat.hit.Hit;
9import com.runehive.game.world.entity.combat.hit.HitIcon;
10import com.runehive.game.world.entity.mob.Mob;
11import com.runehive.game.world.entity.mob.prayer.Prayer;
12import com.runehive.game.world.entity.skill.Skill;
13import com.runehive.game.world.position.Area;
14import com.runehive.util.RandomUtils;
35 int amount =
skill.getLevel() / 4;
36 defender.
heal(amount);
Represents a single graphic that can be used by entities.
A collection of util methods and constants related to combat.
static void areaAction(Mob mob, Consumer< Mob > action)
Executes an action for mobs within a 3x3 square, including the source mob.
static final PrayerListener INSTANCE
void block(Mob attacker, Mob defender, Hit hit, CombatType combatType)
void preDeath(Mob attacker, Mob defender, Hit hit)
void hit(Mob attacker, Mob defender, Hit hit)
A Hit object holds the damage amount and hitsplat data.
final SkillManager skills
final boolean isPlayer()
Check if an entity is a player.
Optional< Graphic > graphic
void drainPrayer(int amount)
final PlayerAssistant playerAssistant
boolean isActive(Prayer... prayers)
Checks if all given prayers are active.
Represents a trainable and usable skill.
static final int PRAYER
The prayer skill id.
void removeLevel(int amount)
Removes levels from this skill by the given amount.
int getMaxLevel(int id)
Gets the highest possible level of a skill.
Skill get(int id)
Gets the skill for an id.
void refresh()
Refreshes all the skills for the mob.
Handles checking if mobs are in a certain area.
static boolean inMulti(Entity entity)
A static-util class that provides additional functionality for generating pseudo-random numbers.
static int inclusive(int min, int max)
Returns a pseudo-random int value between inclusive min and inclusive max.
Represents different priorities for updating.
The enumerated type whose elements represent the hit icon of a Hit.
NONE
Represents no hit icon at all.