RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
DragonScimitar.java
1package com.osroyale.game.world.entity.combat.strategy.player.special.melee;
2
3import com.osroyale.net.packet.out.SendMessage;
4import com.osroyale.game.Animation;
5import com.osroyale.game.Graphic;
6import com.osroyale.game.UpdatePriority;
7import com.osroyale.game.world.entity.combat.attack.FightType;
8import com.osroyale.game.world.entity.combat.hit.Hit;
9import com.osroyale.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
10import com.osroyale.game.world.entity.mob.Mob;
11import com.osroyale.game.world.entity.mob.player.Player;
12import com.osroyale.game.world.entity.mob.prayer.Prayer;
13
40
41public class DragonScimitar extends PlayerMeleeStrategy {
42 private static final Animation ANIMATION = new Animation(1872, UpdatePriority.HIGH);
43 private static final Graphic GRAPHIC = new Graphic(347);
44 private static final DragonScimitar INSTANCE = new DragonScimitar();
45
46 private DragonScimitar() { }
47
48 @Override
49 public void start(Player attacker, Mob defender, Hit[] hits) {
50 super.start(attacker, defender, hits);
51 attacker.graphic(GRAPHIC);
52 }
53
54 @Override
55 public void attack(Player attacker, Mob defender, Hit h) {
56 if (!defender.isPlayer())
57 return;
58
59 defender.prayer.deactivate(Prayer.PROTECT_FROM_MAGIC, Prayer.PROTECT_FROM_MELEE, Prayer.PROTECT_FROM_RANGE);
60 defender.getPlayer().send(new SendMessage("Your overhead prayers have been disabled!"));
61 attacker.getPlayer().send(new SendMessage("You have disabled " + defender.getName() + "'s overhead prayers!"));
62 }
63
64 @Override
65 public int getAttackDelay(Player attacker, Mob defender, FightType fightType) {
66 return 4;
67 }
68
69 @Override
70 public Animation getAttackAnimation(Player attacker, Mob defender) {
71 return ANIMATION;
72 }
73
74 public static DragonScimitar get() {
75 return INSTANCE;
76 }
77
78}