From 595758dbfdd8fcd95ab7e4d929a008faedf257a6 Mon Sep 17 00:00:00 2001 From: dam <27978131-real_damighty@users.noreply.gitlab.com> Date: Wed, 1 Apr 2026 17:48:12 +0300 Subject: [PATCH] Fixed K'ril Tsutsaroth to only use special prayer piercing and draining attack on players using protect from melee --- .../handlers/gwd/GWDTsutsarothSwingHandler.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Server/src/main/content/region/asgarnia/trollheim/handlers/gwd/GWDTsutsarothSwingHandler.java b/Server/src/main/content/region/asgarnia/trollheim/handlers/gwd/GWDTsutsarothSwingHandler.java index 8a4de99a8..2e18d36e2 100644 --- a/Server/src/main/content/region/asgarnia/trollheim/handlers/gwd/GWDTsutsarothSwingHandler.java +++ b/Server/src/main/content/region/asgarnia/trollheim/handlers/gwd/GWDTsutsarothSwingHandler.java @@ -6,14 +6,14 @@ import core.game.node.entity.combat.CombatStyle; import core.game.node.entity.combat.CombatSwingHandler; import core.game.node.entity.combat.InteractionType; import core.game.node.entity.combat.equipment.ArmourSet; -import core.game.node.entity.impl.Projectile; import core.game.node.entity.impl.Animator.Priority; +import core.game.node.entity.impl.Projectile; import core.game.node.entity.player.Player; import core.game.world.update.flag.context.Animation; import core.game.world.update.flag.context.Graphics; import core.tools.RandomFunction; -import static core.api.ContentAPIKt.*; +import static core.api.ContentAPIKt.applyPoison; /** * Handles K'ril Tsutsaroth's combat. @@ -62,11 +62,13 @@ public final class GWDTsutsarothSwingHandler extends CombatSwingHandler { if (RandomFunction.randomize(10) < 4) { ticks += (int) Math.ceil(entity.getLocation().getDistance(victim.getLocation()) * 0.3); style = CombatStyle.MAGIC; - } else if (RandomFunction.randomize(10) == 0) { - if (special = (victim instanceof Player)) { - ((Player) victim).getPacketDispatch().sendMessage("K'ril Tsutsaroth slams through your protection prayer, leaving you feeling drained."); - } + } else if (victim instanceof Player && RandomFunction.randomize(10) == 0) { + Player player = (Player) victim; + special = player.hasProtectionPrayer(CombatStyle.MELEE); + if (special) { + player.getPacketDispatch().sendMessage("K'ril Tsutsaroth slams through your protection prayer, leaving you feeling drained."); entity.sendChat("YARRRRRRR!"); + } } if (style.getSwingHandler().isAccurateImpact(entity, victim)) { int max = style.getSwingHandler().calculateHit(entity, victim, special ? 1.08 : 1.0); @@ -76,7 +78,7 @@ public final class GWDTsutsarothSwingHandler extends CombatSwingHandler { applyPoison(victim, entity, 80); } if (special) { - ((Player) victim).getSkills().decrementPrayerPoints((double) hit / 2); + victim.getSkills().decrementPrayerPoints((double) hit / 2); } } state.setEstimatedHit(hit);