RuneHive-Game
Loading...
Searching...
No Matches
DragonfireStrategy.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.npc.impl;
2
3import com.runehive.game.Animation;
4import com.runehive.game.UpdatePriority;
5import com.runehive.game.world.entity.combat.CombatUtil;
6import com.runehive.game.world.entity.combat.attack.FightType;
7import com.runehive.game.world.entity.combat.hit.CombatHit;
8import com.runehive.game.world.entity.combat.projectile.CombatProjectile;
9import com.runehive.game.world.entity.combat.strategy.npc.NpcMagicStrategy;
10import com.runehive.game.world.entity.mob.Mob;
11import com.runehive.game.world.entity.mob.npc.Npc;
12
14
15 public DragonfireStrategy(CombatProjectile projectileDefinition) {
16 super(projectileDefinition);
17 }
18
19 @Override
20 public Animation getAttackAnimation(Npc attacker, Mob defender) {
21 return new Animation(81, UpdatePriority.VERY_HIGH);
22 }
23
24 @Override
25 public int getAttackDistance(Npc attacker, FightType fightType) {
26 return 1;
27 }
28
29 @Override
30 public CombatHit[] getHits(Npc attacker, Mob defender) {
31 return new CombatHit[] { CombatUtil.generateDragonfire(attacker, defender, 60, true) };
32 }
33
34}
Class that models a single animation used by an entity.
A collection of util methods and constants related to combat.
static CombatHit generateDragonfire(Mob attacker, Mob defender, int max, boolean prayer)
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
Handles the mob class.
Definition Mob.java:66
Represents a non-player character in the in-game world.
Definition Npc.java:29
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.