RuneHive-Game
Loading...
Searching...
No Matches
EldritchNightmareStaff.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
14/**
15 * @author Andys1814
16 */
17public final class EldritchNightmareStaff extends PlayerRangedStrategy {
18
19 private static final Animation ANIMATION = new Animation(8532, UpdatePriority.HIGH);
20 private static final Graphic GRAPHIC = new Graphic(1760, 50, UpdatePriority.HIGH);
21 private static final Graphic DEFENDER_GRAPHIC = new Graphic(1762, 50, UpdatePriority.HIGH);
22
24
26 }
27
28 @Override
29 public void hitsplat(Player attacker, Mob defender, Hit hit) {
30 super.hitsplat(attacker, defender, hit);
31 defender.graphic(DEFENDER_GRAPHIC);
32 }
33
34 @Override
35 public CombatHit[] getHits(Player attacker, Mob defender) {
36 return new CombatHit[] { nextRangedHit(attacker, defender) };
37 }
38
39 @Override
40 public int getAttackDelay(Player attacker, Mob defender, FightType fightType) {
41 return 10;
42 }
43
44 @Override
45 public Animation getAttackAnimation(Player attacker, Mob defender) {
46 return ANIMATION;
47 }
48
49 @Override
50 public int modifyAccuracy(Player attacker, Mob defender, int roll) {
51 return roll * 5 / 4;
52 }
53
54 @Override
55 public int modifyDamage(Player attacker, Mob defender, int roll) {
56 return roll * 5 / 4;
57 }
58
59 public static EldritchNightmareStaff get() {
60 return INSTANCE;
61 }
62
63}
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.