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]

Is reload cancelling faster in Overwatch? Is reload cancelling faster in Overwatch?

Posted On: July 14, 2023
Today I learned that, for all heroes with limited ammunition, they can reload cancel their weapons with a melee attack. What I'm curious about is, does it really save time? Is it really a "...[More]


Can a cart system between 2 spawners work? Can a cart system between 2 spawners work?

Posted On: January 27, 2023
I have 2 spawners 63 blocks apart. I want to create a cart network so that I can.go front and back from a spawner to another for them to work in my xp farm since the spawning radius for a spawner is o...[More]


In Skyrim How do I unselect a completed quest? In Skyrim How do I unselect a completed quest?

Posted On: May 3, 2023
A completed quest in my journal is selected, as shown below:. This causes new quests to not be selected immediately. How can I unselect it? Clicking on the quest title does not deselect it. Q...[More]


What is your toughest Hogwarts Legacy enemies so far? What is your toughest Hogwarts Legacy enemies so far?

Posted On: June 5, 2023
For me it's DUGBOG!!!. It is frustrating to run upon them in a swamp. If there are only one or two of them, it is tolerable, but if there are four, I will die right away. Levioso won't w...[More]


Where can I contact roblox support (a real person)? Where can I contact roblox support (a real person)?

Posted On: September 19, 2023
Can someone tell me how to contact Roblox support? I don't mean roblox/support, that's just a bot. I want to talk to a real human who works in Roblox support. Question from user comand100vi...[More]


Will a Star Fragment disappear if I use fast travel in Tears of the Kingdom? Will a Star Fragment disappear if I use fast travel in Tears of the Kingdom?

Posted On: May 29, 2023
I saw a Star Fragment land a fair distance away from me while exploring at night. I was going to run towards it, when I noticed it had landed right next to a tower I could fast travel to. If I fast...[More]


What build order should I use for Zerg in StarCraft 2? What build order should I use for Zerg in StarCraft 2?

Posted On: March 14, 2013
I'm familiar with the general mechanics of the game, but what's the best build order for the beginning of the game? Question from user McKay at gaming.stackexchange.com. Answer: An op...[More]


Where does The Darkness II keeps its save files? Where does The Darkness II keeps its save files?

Posted On: May 11, 2023
Say I wanted to back up or delete my saves on the PC version (via Steam). Where are they located? Question from user a cat at gaming.stackexchange.com. Answer: Using X to represent the gam...[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]


Why didnt the game save some of my Walking Dead choices? Why didnt the game save some of my Walking Dead choices?

Posted On: March 25, 2023
In Season 1, and the first time when Kenny, Lee, Clem, Katya, Duck, and others found the abandoned car with supplies in it, I chose NOT to take it and told Clem that we would be okay without it. Howev...[More]