Weapon hits check the wrong resistance, so 46 mobs resist melee by accident
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with check_resistances in src/utility.cpp and read the LegacyWeaponResistOrder tests plus uses_legacy_weapon_spec, which intentionally preserve the current order while #315 is tested on live. Before changing behavior, recount affected mobs against the world files and review the listed major fights. Done means weapon hits and arrows use physical resistance and vulnerability as intended, with the separate special attack design question resolved.
Written by the indexing model from the issue text.
Description
Who notices this?
Players, Builders
What happens today?
Weapon hits and arrows check the wrong resistance. 46 mobs resist melee, or take extra melee damage, when their files never say they should.
Weapons and archery are meant to check only a mob's physical resistance and vulnerability. Since a 2018 change, every weapon swing and arrow first checks a different flag, "ungrouped" (bit 0), and only then checks physical (bludgeon checks bit 14 instead of bit 0). Any mob carrying bit 0 is treated as resistant or vulnerable to weapons:
- 44 mobs take a third less damage from most weapon hits and arrows. 41 of them share the same mask, 17 (ungrouped + protection), copied into both resistance and vulnerability.
- 2 mobs take half again as much damage from every weapon hit: Muzgash the emerald (#6408) and a small brown lizard (#7001).
- Some of them are real fights: the Lord of the Tower (#29800, level 93), the fell beasts of Dol-Guldur and Mor Erlond (#27582, #27728), and Vaz the enchanter (#29808, #29809). Most of the rest are town NPCs and small critters.
The test server's world adds one more: a snowdrift (#13900) takes half again as much damage from weapons. It will reach live with the next world copy.
What should happen instead?
Weapon hits and arrows check physical resistance and vulnerability only, as the original code intended. A mob resists weapons only when its file gives it physical resistance.
How can someone see it in game?
- Find a rat (#2307). Its file gives it no physical resistance, only ungrouped and protection.
- Hit it with any weapon.
- On most hits, the room reads "A rat resists a lot." and the damage is cut by a third.
Where in the game?
Melee and archery against the 46 mobs, in many zones. The full list, with each mob's level and masks, is on the findings page below.
Anything else?
Why it happens. check_resistances (src/utility.cpp) looks up the attack's own row in the skill table before its weapon block, which checks physical. Weapon types are 130-143. Before 2018 the table held 128 skills, so weapon hits skipped that lookup and went straight to physical. Commit 2bcee24 (2018-06-13, "Switched mark to a touch attack...") raised MAX_SKILLS to 256, which put weapon types inside the table. Their rows are blank placeholders naming bit 0, except row 131, where defend was added in 489b7f1 (2023), so bludgeon checks bit 14. No mob sets bit 14 today. Archery (skill 61) has checked bit 0 since the original code.
Held back on purpose, for now. The resistance work (#315, merged 2026-09-29) keeps today's order deliberately, in uses_legacy_weapon_spec, pinned by 7 LegacyWeaponResistOrder tests. Changing mob toughness in the same release as resistance magnitudes would make the two impossible to tell apart in testing. The plan is to fix this after #315 has been tested and is live. As of 2026-10-18, #315 is on the test server but not on live.
A separate question to settle with it. Special attacks (bash, ambush, maul, bite, rend, smash, stomp, overrun, cleave, trap, mark, windblast, blinding) also check bit 0, on live and in release-frodo. Fixing only weapons would leave the 44 mobs resisting a bash but not a sword, while physically resistant mobs still don't resist a bash at all. Whether special attacks should check physical is a design call, and nothing is decided.
Before fixing. Some of these mobs may have been tuned around how they play today. A builder may want to look at the bigger fights first. Recount the mobs against the world files at the time of the fix: the counts above come from the 2026-09-28 live pull and the 2026-09-30 test pull.
Findings page, with the full mob list and the history: https://claude.ai/artifact/7hzXiP2LqP1giNQwLZjz26
- Dominant language
- C++
- Stars
- 3
- Forks
- 4
- Avg merge
- 18h 36m
- Merged PRs (30d)
- 87
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from returnoftheshadow/RotS_Live
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
returnoftheshadow/RotS_Live#521 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
returnoftheshadow/RotS_Live#485 ·
Maintainers usually reply within 1 day
-
Remove dead object refresh code (check_inventory_proto and friends)Possibly taken @drelidan7 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
returnoftheshadow/RotS_Live#414 ·
Maintainers usually reply within 1 day
-
purge <player> idle-saves the immortal instead of the playerPossibly taken @bskalpavrukshab25-sketch claimed this 11 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
returnoftheshadow/RotS_Live#411 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
returnoftheshadow/RotS_Live#410 · 2 comments ·
Maintainers usually reply within 1 day
All issues in returnoftheshadow/RotS_Live
Similar issues
-
launch-client --save-creds creates creds/<account>/ with mode 755, not 700Possibly taken @metis-sprock claimed this today. Openbacklog bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
EchoTools/nevr-runtime#1471 ·
Maintainers usually reply within 1 day
-
.NET ep:WebGPU platform:web
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/onnxruntime#33755 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
grumpycoders/pcsx-redux#2530 ·
-
A-tools P-medium S-ready-to-start studio task
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Status: Needs confirmation Status: Needs triage Type: Code Quality
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day