1package com.osroyale.game.world.entity.combat.attack.listener.npc.godwar;
3import com.osroyale.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
4import com.osroyale.game.world.entity.combat.attack.listener.SimplifiedListener;
5import com.osroyale.game.world.entity.combat.hit.Hit;
6import com.osroyale.game.world.entity.combat.strategy.CombatStrategy;
7import com.osroyale.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
8import com.osroyale.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
9import com.osroyale.game.world.entity.mob.Mob;
10import com.osroyale.game.world.entity.mob.npc.Npc;
12import static com.osroyale.game.world.entity.combat.CombatUtil.createStrategyArray;
13import static com.osroyale.game.world.entity.combat.CombatUtil.randomStrategy;
14import static com.osroyale.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
46 private static RangedAttack RANGED =
new RangedAttack();
47 private static CombatStrategy<Npc>[] STRATEGIES = createStrategyArray(NpcMeleeStrategy.get(), RANGED);
50 public void start(
Npc attacker,
Mob defender,
Hit[] hits) {
51 attacker.setStrategy(randomStrategy(STRATEGIES));
54 private static class RangedAttack
extends NpcRangedStrategy {
55 private RangedAttack() {
56 super(getDefinition(
"Spirtual Ranger"));