1package com.runehive.game.world.entity.combat.formula;
3import com.runehive.game.world.entity.combat.FormulaModifier;
4import com.runehive.game.world.entity.mob.Mob;
5import com.runehive.game.world.entity.mob.player.Player;
6import com.runehive.game.world.entity.mob.prayer.Prayer;
7import com.runehive.game.world.entity.skill.Skill;
8import com.runehive.game.world.items.containers.equipment.Equipment;
15 return 8 + attacker.
getCombat().modifyMagicLevel(defender, level);
21 return 8 + attacker.
getCombat().modifyMagicLevel(defender, level);
32 defence = defender.
getCombat().modifyDefenceLevel(attacker, defence);
35 if (attacker instanceof
Player) {
36 eD =
magic * 0.7 + defence * 0.3;
58 damage += damage * bonus / 100;
59 damage = attacker.
getCombat().modifyDamage(defender, damage);
62 damage *= !attacker.
isPlayer() || defender.
isNpc() ? 0.0 : 0.6;
71 return attacker.
getCombat().modifyOffensiveBonus(defender, bonus);
76 return attacker.
getCombat().modifyAggresiveBonus(defender, bonus);
82 return defender.
getCombat().modifyDefensiveBonus(attacker, bonus);
final SkillManager skills
abstract Combat<? extends Mob > getCombat()
The combat of the mob.
final boolean isNpc()
Check if an entity is an npc.
final boolean isPlayer()
Check if an entity is a player.
This class represents a character controlled by a player.
boolean isActive(Prayer... prayers)
Checks if all given prayers are active.
Represents a trainable and usable skill.
static final int DEFENCE
The defence skill id.
static final int MAGIC
The magic skill id.
int getLevel(int id)
Gets the level of a skill.
The container that manages the equipment for a player.
static final int MAGIC_DEFENSE
static final int MAGIC_OFFENSE
static final int MAGIC_STRENGTH
CombatProjectile getCombatProjectile()