RuneHive-Game
Loading...
Searching...
No Matches
VolatileNightmareStaff.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.player.special.magic;
2
3import com.runehive.game.Animation;
4import com.runehive.game.Graphic;
5import com.runehive.game.UpdatePriority;
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.hit.Hit;
9import com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy;
10import com.runehive.game.world.entity.mob.Mob;
11import com.runehive.game.world.entity.mob.player.Player;
12
13/** @author Michael | Chex */
15 private static final Animation ANIMATION = new Animation(8532, UpdatePriority.HIGH);
16 private static final Graphic GRAPHIC = new Graphic(1759, 50, UpdatePriority.HIGH);
17
19
21 }
22
23 @Override
24 public void hitsplat(Player attacker, Mob defender, Hit hit) {
25 super.hitsplat(attacker, defender, hit);
26 defender.graphic(GRAPHIC);
27 }
28
29 @Override
30 public CombatHit[] getHits(Player attacker, Mob defender) {
31 return new CombatHit[]{nextRangedHit(attacker, defender)};
32 }
33
34 @Override
35 public int getAttackDelay(Player attacker, Mob defender, FightType fightType) {
36 return 10;
37 }
38
39 @Override
40 public Animation getAttackAnimation(Player attacker, Mob defender) {
41 return ANIMATION;
42 }
43
44 @Override
45 public int modifyAccuracy(Player attacker, Mob defender, int roll) {
46 return roll * 5 / 4;
47 }
48
49 @Override
50 public int modifyDamage(Player attacker, Mob defender, int roll) {
51 return roll * 5 / 4;
52 }
53
54 public static VolatileNightmareStaff get() {
55 return INSTANCE;
56 }
57
58}
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
Definition Graphic.java:10
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
Definition Hit.java:10
final CombatHit nextRangedHit(T attacker, Mob defender)
Handles the mob class.
Definition Mob.java:66
Optional< Graphic > graphic
Definition Mob.java:91
This class represents a character controlled by a player.
Definition Player.java:125
Represents different priorities for updating.
The enumerated type whose elements represent the fighting types.