1package com.runehive.game.world.entity.combat.strategy.player.special.melee;
3import com.runehive.game.Animation;
4import com.runehive.game.Graphic;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.world.entity.combat.attack.FightType;
7import com.runehive.game.world.entity.combat.hit.Hit;
8import com.runehive.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
9import com.runehive.game.world.entity.mob.Mob;
10import com.runehive.game.world.entity.mob.player.Player;
11import com.runehive.game.world.entity.skill.Skill;
24 super.start(attacker, defender, hits);
30 super.attack(attacker, defender, h);
34 int level =
skill.getLevel();
35 int reduction = (int) (level * 0.30);
40 attacker.
message(
"You've drained " + defender.
getName() +
"'s defence level by 30%.");
60 return damage * 3 / 2;
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
abstract String getName()
Gets the name of this entity.
A Hit object holds the damage amount and hitsplat data.
int getDamage()
Gets the damage amount.
Animation getAttackAnimation(Player attacker, Mob defender)
static final Animation ANIMATION
int modifyDamage(Player attacker, Mob defender, int damage)
void attack(Player attacker, Mob defender, Hit h)
static final DragonWarhammer INSTANCE
static final Graphic GRAPHIC
int getAttackDelay(Player attacker, Mob defender, FightType fightType)
void start(Player attacker, Mob defender, Hit[] hits)
final SkillManager skills
final boolean isPlayer()
Check if an entity is a player.
Optional< Graphic > graphic
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.
void removeLevel(int amount)
Removes levels from this skill by the given amount.
Skill get(int id)
Gets the skill for an id.
void refresh()
Refreshes all the skills for the mob.
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.