RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
SaradominSword.java
1package com.osroyale.game.world.entity.combat.strategy.player.special.melee;
2
3import com.osroyale.game.Animation;
4import com.osroyale.game.Graphic;
5import com.osroyale.game.UpdatePriority;
6import com.osroyale.game.world.entity.combat.hit.CombatHit;
7import com.osroyale.game.world.entity.combat.hit.Hit;
8import com.osroyale.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
9import com.osroyale.game.world.entity.mob.Mob;
10import com.osroyale.game.world.entity.mob.player.Player;
11
45
46public class SaradominSword extends PlayerMeleeStrategy {
47
48
49 private static final Animation ANIMATION = new Animation(1132, UpdatePriority.HIGH);
50
51 private static final Graphic OTHER_GRAPHIC = new Graphic(1196);
52 private static final Graphic GRAPHIC = new Graphic(1213);
53
54 private static final SaradominSword INSTANCE = new SaradominSword();
55
56 @Override
57 public void attack(Player attacker, Mob defender, Hit hit) {
58 super.attack(attacker, defender, hit);
59 attacker.graphic(GRAPHIC);
60 }
61
62 @Override
63 public void finishOutgoing(Player attacker, Mob defender) {
64 defender.graphic(OTHER_GRAPHIC);
65 }
66
67 @Override
68 public CombatHit[] getHits(Player attacker, Mob defender) {
69 CombatHit melee = nextMeleeHit(attacker, defender);
70 return new CombatHit[]{melee, nextMagicHit(attacker, defender, 16, 1, 0)};
71 }
72
73 @Override
74 public Animation getAttackAnimation(Player attacker, Mob defender) {
75 return ANIMATION;
76 }
77
78 @Override
79 public int modifyAccuracy(Player attacker, Mob defender, int roll) {
80 return roll * 5 / 4;
81 }
82
83 public static SaradominSword get() {
84 return INSTANCE;
85 }
86
87}