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.CombatHit;
6import com.osroyale.game.world.entity.combat.hit.Hit;
7import com.osroyale.game.world.entity.combat.strategy.CombatStrategy;
8import com.osroyale.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
9import com.osroyale.game.world.entity.combat.strategy.npc.NpcMeleeStrategy;
10import com.osroyale.game.world.entity.combat.strategy.npc.NpcRangedStrategy;
11import com.osroyale.game.world.entity.mob.Mob;
12import com.osroyale.game.world.entity.mob.npc.Npc;
14import static com.osroyale.game.world.entity.combat.CombatUtil.createStrategyArray;
15import static com.osroyale.game.world.entity.combat.CombatUtil.randomStrategy;
16import static com.osroyale.game.world.entity.combat.projectile.CombatProjectile.getDefinition;
49 private static MagicAttack MAGIC =
new MagicAttack();
50 private static CombatStrategy<Npc>[] STRATEGIES = createStrategyArray(NpcMeleeStrategy.get(), MAGIC);
53 public void start(
Npc attacker,
Mob defender,
Hit[] hits) {
54 attacker.setStrategy(randomStrategy(STRATEGIES));
57 private static class MagicAttack
extends NpcMagicStrategy {
58 private MagicAttack() {
59 super(getDefinition(
"Spirtual Mage"));
64 CombatHit combatHit = nextMagicHit(attacker, defender, 15);
65 combatHit.setAccurate(
true);