RuneHive-Game
Loading...
Searching...
No Matches
OsmumFang.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.player.special.melee;
2
3import com.runehive.content.achievement.AchievementHandler;
4import com.runehive.content.achievement.AchievementKey;
5import com.runehive.game.Animation;
6import com.runehive.game.Graphic;
7import com.runehive.game.UpdatePriority;
8import com.runehive.game.world.entity.combat.attack.FightType;
9import com.runehive.game.world.entity.combat.hit.Hit;
10import com.runehive.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
11import com.runehive.game.world.entity.mob.Mob;
12import com.runehive.game.world.entity.mob.player.Player;
13
14/** @author Daniel | Obey */
15public class OsmumFang extends PlayerMeleeStrategy {
16 private static final Animation ANIMATION = new Animation(6118, UpdatePriority.HIGH);
17 private static final Graphic GRAPHIC = new Graphic(2124);
18 private static final OsmumFang INSTANCE = new OsmumFang();
19
20 private OsmumFang() { }
21
22 @Override
23 public void start(Player attacker, Mob defender, Hit[] hits) {
24 super.start(attacker, defender, hits);
25 attacker.graphic(GRAPHIC);
26 }
27
28 @Override
29 public void hitsplat(Player attacker, Mob defender, Hit hit) {
30 super.hitsplat(attacker, defender, hit);
31 }
32
33 @Override
34 public void onKill(Player attacker, Mob defender, Hit hit) {
35 }
36
37 @Override
38 public int getAttackDelay(Player attacker, Mob defender, FightType fightType) {
39 return 4;
40 }
41
42 @Override
43 public Animation getAttackAnimation(Player attacker, Mob defender) {
44 return ANIMATION;
45 }
46
47 @Override
48 public int modifyAccuracy(Player attacker, Mob defender, int roll) {
49 return roll * 5 / 4;
50 }
51
52 @Override
53 public int modifyDamage(Player attacker, Mob defender, int damage) {
54 return 3 / 2;
55 }
56
57 public static OsmumFang get() {
58 return INSTANCE;
59 }
60
61}
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 Hit object holds the damage amount and hitsplat data.
Definition Hit.java:10
int getAttackDelay(Player attacker, Mob defender, FightType fightType)
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.