How do monsters in NetHack attack?

[BACK]
How do monsters in NetHack attack?
Posted On: April 25, 2024

There is much information about how the player attacks (or attempts to attack) in the weapon spoiler. But there is no information on how monsters attack.


How is the monsters value of to-Hit* calculated?


*) alias 'chance to hit' or 'toHit'.


The damage and effects of successful hits is described in the monster spoiler from the spoiler page.


Question from user Martin Frank at gaming.stackexchange.com.


Answer:

The to-hit formula is covered in detail on the wiki's Armor Class page. The source ref for much of this is in mhitu.c.


I'll summarize the to-hit; there are a lot of special cases based on visibility, attack type, situation, and consecutive monster attacks.


The basic formula is: 10 + AC + Level, where "AC" is the player's current AC (i.e. Armor Class - it is lowered primarily by equipping armor; lower is better), and Level is the monster level of the attacker. This value is compared against a random number between 1 and 20; if the roll is lower than this formula, the attack hits.


If the player's AC is below 0, it is instead treated as a random number between -1 and their displayed AC. Lower AC is always better, but even at -100 AC it is possible to get a very unlucky roll and still get hit.


The wiki includes tables showing statistically expected damage for differing armor class values from various attackers; this can give a general idea of how much AC protects you, but this also includes the damage resistance from having negative AC.


Answer from user qazmlpok at gaming.stackexchange.com.


[BACK]
How do monsters in NetHack attack?
Posted On: April 25, 2024

There is much information about how the player attacks (or attempts to attack) in the weapon spoiler. But there is no information on how monsters attack.


How is the monsters value of to-Hit* calculated?


*) alias 'chance to hit' or 'toHit'.


The damage and effects of successful hits is described in the monster spoiler from the spoiler page.


Question from user Martin Frank at gaming.stackexchange.com.


Answer:

The to-hit formula is covered in detail on the wiki's Armor Class page. The source ref for much of this is in mhitu.c.


I'll summarize the to-hit; there are a lot of special cases based on visibility, attack type, situation, and consecutive monster attacks.


The basic formula is: 10 + AC + Level, where "AC" is the player's current AC (i.e. Armor Class - it is lowered primarily by equipping armor; lower is better), and Level is the monster level of the attacker. This value is compared against a random number between 1 and 20; if the roll is lower than this formula, the attack hits.


If the player's AC is below 0, it is instead treated as a random number between -1 and their displayed AC. Lower AC is always better, but even at -100 AC it is possible to get a very unlucky roll and still get hit.


The wiki includes tables showing statistically expected damage for differing armor class values from various attackers; this can give a general idea of how much AC protects you, but this also includes the damage resistance from having negative AC.


Answer from user qazmlpok at gaming.stackexchange.com.


[BACK]

What is the stat Fumble? What is the stat Fumble?

Posted On: January 24, 2023
I couldn't get a very clear explanation over the internet. Within the Dexterity stat figures "Fumble Recovery". What does it mean if the attack is "fumbled"? Question fro...[More]


Does router speed affect ping? Does router speed affect ping?

Posted On: June 11, 2023
I currently own a 150 Mbps router, and I am playing MW3 on PS3 with about 75ms to 100ms ping. Does getting a new 300 Mbps router make a big difference? Would it reduce my lag? Question from user...[More]


Why is Lae'zel dead ? Why is Lae'zel dead ?

Posted On: January 9, 2026
I just started playing (bought the game Jan 1) and almost at the end of Act 1. .After the crash, I found Shadowheart, Astarion, and Gale straightaway but could never find Lae'zel. .When I was at Risen...[More]


How do I find the missing Gold Skulltulas? How do I find the missing Gold Skulltulas?

Posted On: August 5, 2023
I've almost completely finished Ocarina of Time now, and I'd like to get 100% completion just for the fun of it. The big problem is the Gold Skulltulas. I've heard there's some sort...[More]


J Pippins Potions J Pippins Potions

Posted On: September 3, 2023
For some reason j pips potions will not restock spinder fangs /mongrel fur .I go back days and days have gone by nothing is available ? Anyone else have this issue ? Question from user RenoRainesnz...[More]


What does a checkmarked item mean in Somnium? What does a checkmarked item mean in Somnium?

Posted On: May 9, 2023
When I replay a Somnium section sometimes some of the items will have a checkmark next to them. This can appear even if I haven't performed every possible action with that item. What does a che...[More]


What does the Reset button on an N64 actually do? What does the Reset button on an N64 actually do?

Posted On: August 17, 2023
The question struck me this morning when I saw my old N64; there's a reset button on it. What does it actually do? Can't remember a moment where I did have to push it. Is it simply a button...[More]


Does boss difficulty change depending on the floor? Does boss difficulty change depending on the floor?

Posted On: February 27, 2024
In Splatoon 3 Side Order, because of the randomization of the tower, there are three bosses that can be fought on either floor 10 or 20 (Asynchronous Rondo, Pinging Marciale, and Parallel Canon).Does ...[More]


Is there a way to tell a Steam shortcut to open in big picture mode? Is there a way to tell a Steam shortcut to open in big picture mode?

Posted On: June 15, 2023
I have a monitor and a TV side by side. Sometimes I want to game from my couch and sometimes I want to sit and game at the computer. When I'm gaming at my desktop I don't have the TV on. Wh...[More]


Noore had to die thrice Noore had to die thrice

Posted On: March 21, 2024
Sometimes, one of my colleague comes around to play the game on my system. Yesterday, he finished the mission Shoot the messenger. He chose not to kill Noore. A cutscene followed where Noore cuts hers...[More]