From 66a731005ec4d9acd692321ab110554f2c7fd07f Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 15 Oct 2026 07:24:33 -0400 Subject: [PATCH] Use race rune natural attack damage for unarmed players Unarmed base damage was a hardcoded 1-3 (TODO). Read it from the race rune natural attack for the swinging hand (1-4 for all races), then scale it with the existing formula, matching the client (0x46D200). Falls back to 1-3 if the rune has no natural attack. Co-Authored-By: Claude Opus 5.5 --- src/engine/objects/AbstractCharacter.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/AbstractCharacter.java b/src/engine/objects/AbstractCharacter.java index fe77b0f2..95f6e19b 100644 --- a/src/engine/objects/AbstractCharacter.java +++ b/src/engine/objects/AbstractCharacter.java @@ -735,9 +735,18 @@ public abstract class AbstractCharacter extends AbstractWorldObject { mastDam = CharacterSkill.getQuickMastery(abstractCharacter, "Unarmed Combat Mastery"); else mastDam = masteryPercentage; - // TODO Correct these - min = 1; - max = 3; + // Base fist damage from the race rune natural attack (1-4 for all races), scaled below like a weapon. + // Matches the client's unarmed damage calc (0x46D200). + + float[] naturalAttack = CombatManager.getNaturalAttack(abstractCharacter, mainHand ? EquipSlotType.RHELD : EquipSlotType.LHELD); + + if (naturalAttack != null && naturalAttack.length > 9) { + min = (int) naturalAttack[8]; + max = (int) naturalAttack[9]; + } else { + min = 1; + max = 3; + } } else { if (mainHand)