RuneHive-Game
Loading...
Searching...
No Matches
GuthansListner.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.attack.listener.item;
2
3import com.runehive.game.Graphic;
4import com.runehive.game.UpdatePriority;
5import com.runehive.game.world.entity.combat.attack.listener.ItemCombatListenerSignature;
6import com.runehive.game.world.entity.combat.attack.listener.NpcCombatListenerSignature;
7import com.runehive.game.world.entity.combat.attack.listener.SimplifiedListener;
8import com.runehive.game.world.entity.combat.hit.Hit;
9import com.runehive.game.world.entity.mob.Mob;
10
11/**
12 * Handles the guthan item set listener
13 * OSRS Wiki: http://oldschoolrunescape.wikia.com/wiki/Guthan_the_Infested%27s_equipment
14 *
15 * @author Daniel
16 */
17@NpcCombatListenerSignature(npcs = {1674})
18@ItemCombatListenerSignature(requireAll = true, items = {4726, 4724, 4728, 4730})
20
21 @Override
22 public void hit(Mob attacker, Mob defender, Hit hit) {
23 if (Math.random() > 0.75) {
24 attacker.heal(hit.getDamage());
25 attacker.graphic(new Graphic(398, UpdatePriority.HIGH));
26 }
27 }
28}
Represents a single graphic that can be used by entities.
Definition Graphic.java:10
Handles the guthan item set listener OSRS Wiki: http://oldschoolrunescape.wikia.com/wiki/Guthan_the_I...
A Hit object holds the damage amount and hitsplat data.
Definition Hit.java:10
Handles the mob class.
Definition Mob.java:66
Optional< Graphic > graphic
Definition Mob.java:91
Represents different priorities for updating.