RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
FlockleaderGeerin.java
1package com.osroyale.game.world.entity.combat.strategy.npc.boss.armadyl;
2
3import com.osroyale.game.world.entity.combat.CombatType;
4import com.osroyale.game.world.entity.combat.attack.FightType;
5import com.osroyale.game.world.entity.combat.hit.CombatHit;
6import com.osroyale.game.world.entity.combat.projectile.CombatProjectile;
7import com.osroyale.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
8import com.osroyale.game.world.entity.mob.Mob;
9import com.osroyale.game.world.entity.mob.npc.Npc;
10
30
31public class FlockleaderGeerin extends NpcRangedStrategy {
32
33 public FlockleaderGeerin() {
34 super(CombatProjectile.getDefinition("Flockleader Geerin"));
35 }
36
37 @Override
38 public boolean canOtherAttack(Mob attacker, Npc defender) {
39 if (attacker.isPlayer() && attacker.getStrategy().getCombatType().equals(CombatType.MELEE)) {
40 attacker.getPlayer().message("You can't attack this npc with melee!");
41 return false;
42 }
43 return super.canOtherAttack(attacker, defender);
44 }
45
46 @Override
47 public int getAttackDelay(Npc attacker, Mob defender, FightType fightType) {
48 return attacker.definition.getAttackDelay();
49 }
50
51 @Override
52 public CombatHit[] getHits(Npc attacker, Mob defender) {
53 return new CombatHit[] { nextRangedHit(attacker, defender, 25) };
54 }
55
56}
abstract< T extends Mob > CombatStrategy<? super T > getStrategy()