1package com.runehive.game.world.entity.combat.strategy.basic;
3import com.runehive.game.world.entity.combat.attack.FightType;
4import com.runehive.game.world.entity.combat.hit.Hit;
5import com.runehive.game.world.entity.combat.hit.HitIcon;
6import com.runehive.game.world.entity.combat.strategy.CombatStrategy;
7import com.runehive.game.world.entity.mob.Mob;
8import com.runehive.game.world.entity.mob.player.Player;
9import com.runehive.game.world.entity.skill.Skill;
10import com.runehive.game.world.pathfinding.path.SimplePathChecker;
11import com.runehive.util.Utility;
20 final FightType fightType = attacker.getCombat().getFightType();
24 if (defender.
id == 1739 || defender.
id == 1740 || defender.
id == 1741 || defender.
id == 1742 || defender.
id == 1756) {
35 if (
hit.getDamage() <= 0)
continue;
37 exp +=
hit.getDamage();
43 exp *=
player.experienceRate;
45 switch (
player.getCombat().getFightType().getStyle()) {
A Hit object holds the damage amount and hitsplat data.
abstract int getAttackDistance(T attacker, FightType fightType)
void hit(T attacker, Mob defender, Hit hit)
Called when the attacking mob performs an attack on the defender.
static void addCombatExperience(Player player, double base, Hit... hits)
static void addCombatExperience(Player player, Hit... hits)
boolean withinDistance(T attacker, Mob defender)
This class represents a character controlled by a player.
Represents a trainable and usable skill.
static final int DEFENCE
The defence skill id.
static final int ATTACK
The attack skill id.
static final int STRENGTH
The strength skill id.
static final int HITPOINTS
The hitpoints skill id.
Represents a PathFinder which is meant to be used to check projectiles passage in a straight line.
static boolean checkLine(Interactable source, Interactable target)
Handles miscellaneous methods.
static boolean inRange(int absX, int absY, int size, int targetX, int targetY, int targetSize, int distance)
The enumerated type whose elements represent the fighting types.
The enumerated type whose elements represent the hit icon of a Hit.
MELEE
Represents the melee sword hit icon.
MAGIC
Represents the magic hat hit icon.