30public class CombatWaypoint
extends Waypoint {
32 public CombatWaypoint(
Mob mob,
Mob target) {
37 public void onDestination() {
42 protected boolean withinDistance() {
43 if (target.equals(mob.getCombat().getDefender())) {
44 return mob.isPlayer() &&
Activity.evaluate(mob.getPlayer(), it -> {
45 if (it instanceof KrakenActivity) {
46 Mob kraken = ((KrakenActivity) it).kraken;
47 return Utility.getDistance(mob, kraken) <= getRadius() && mob.getStrategy().withinDistance(mob, kraken);
50 }) ||
Utility.getDistance(mob, target) <= getRadius() && mob.getStrategy().withinDistance(mob, (
Mob) target);
52 return super.withinDistance();
56 protected int getRadius() {
57 if (target.equals(mob.getCombat().getDefender())) {
58 FightType fightType = mob.getCombat().getFightType();
59 return mob.getStrategy().getAttackDistance(mob, fightType);