RuneHive-Game
Loading...
Searching...
No Matches
DragonLongsword.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.player.special.melee;
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.Hit;
8import com.runehive.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
9import com.runehive.game.world.entity.mob.Mob;
10import com.runehive.game.world.entity.mob.player.Player;
11
12/** @author Daniel | Obey */
14 private static final Animation ANIMATION = new Animation(1058, UpdatePriority.HIGH);
15 private static final Graphic GRAPHIC = new Graphic(248);
16 private static final DragonLongsword INSTANCE = new DragonLongsword();
17
18 private DragonLongsword() { }
19
20 @Override
21 public void start(Player attacker, Mob defender, Hit[] hits) {
22 super.start(attacker, defender, hits);
23 attacker.graphic(GRAPHIC);
24 }
25
26 @Override
27 public int getAttackDelay(Player attacker, Mob defender, FightType fightType) {
28 return 4;
29 }
30
31 @Override
32 public Animation getAttackAnimation(Player attacker, Mob defender) {
33 return ANIMATION;
34 }
35
36 @Override
37 public int modifyDamage(Player attacker, Mob defender, int damage) {
38 return (int) (damage * 1.15);
39 }
40
41 public static DragonLongsword get() {
42 return INSTANCE;
43 }
44
45}
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.