From c14c2e403c75a913e1a6d962fb6fe64f013adae5 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 1 Jul 2026 22:30:31 -0400 Subject: fix: combat formulas and mob attack types (mobs switch attack styles if safespotting) --- data/help/combat.yaml | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'data/help/combat.yaml') diff --git a/data/help/combat.yaml b/data/help/combat.yaml index f588d81..7a190f7 100644 --- a/data/help/combat.yaml +++ b/data/help/combat.yaml @@ -3,18 +3,40 @@ category: "General" description: | Attack a mob with: attack - Your accuracy depends on your attack type (stab, slash, crush, ranged, - or science) and your total equipment bonus for that type. Your weapon - determines the attack type. + Combat follows standard OSRS formulas for accuracy, hit chance, + maximum hit, and damage output. The three attack styles (melee, + ranged, and science) each use the same core formula structure. - Mobs have per-type defense bonuses. A skeleton with high slash defense - but weak crush defense takes more hits from a mace than a sword. + Attack roll: EffectiveAttack * (EquipmentBonus + 64) + Max hit: (EffectiveStrength * (EquipmentStrength + 64) + 320) / 640 + Hit chance: If AttackRoll > DefenseRoll: + 1 - (DefRoll + 2) / (2 * (AtkRoll + 1)) + Else: + AtkRoll / (2 * (DefRoll + 1)) + Damage: Roll [0, MaxHit], 0 becomes 1 + + Effective Levels: + Player: level + style_bonus + tech_boosts + 8 + NPC: level + 9 + Science: level + 9 (no style bonus) + + Your accuracy depends on your weapon's attack type (stab, slash, + crush, ranged, or science) and your total equipment bonus for + that type. + + Mobs have per-type defense bonuses. A skeleton with high slash + defense but weak crush defense takes more hits from a mace than + a sword. Mobs also have a weakness element — matching it with + a science module's element boosts both accuracy and damage. Use the 'style' command to change your combat style: - accurate - +3 accuracy level, XP to accuracy + accurate - +3 accuracy/ranged level, XP to accuracy/ranged aggressive - +3 strength level, XP to strength defensive - +3 defense level, XP to defense balanced - +1 to all, XP split evenly + For melee weapons the style affects attack/strength/defense. + For ranged weapons accurate and aggressive both give +3 ranged. + Use 'stats' to see your total equipment bonuses and current attack roll. Use 'look ' to see an item's combat stats. -- cgit v1.2.3