RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
ElysianListener.java
1package com.osroyale.game.world.entity.combat.attack.listener.item;
2
3import com.osroyale.game.Graphic;
4import com.osroyale.game.UpdatePriority;
5import com.osroyale.game.world.entity.combat.CombatType;
6import com.osroyale.game.world.entity.combat.attack.listener.ItemCombatListenerSignature;
7import com.osroyale.game.world.entity.combat.attack.listener.SimplifiedListener;
8import com.osroyale.game.world.entity.combat.hit.Hit;
9import com.osroyale.game.world.entity.mob.Mob;
10import com.osroyale.game.world.entity.mob.player.Player;
11
18@ItemCombatListenerSignature(requireAll = false, items = {12817})
19public class ElysianListener extends SimplifiedListener<Player> {
20
21 @Override
22 public void block(Mob attacker, Player defender, Hit hit, CombatType combatType) {
23 if (Math.random() > 0.30) {
24 hit.modifyDamage(damage -> damage * 3 / 4);
25 defender.graphic(new Graphic(321, UpdatePriority.HIGH));
26 }
27 }
28}