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]

How do damage upgrades of the same type stack in Dead Cells? How do damage upgrades of the same type stack in Dead Cells?

Posted On: April 13, 2023
When I pick up an upgrade scroll I can increase my attack power for brutality, tactic, or survival objects by 15%. How do damage increases of the same type stack with each other? Are they additive or ...[More]


Redstone door lock (memory cell) Redstone door lock (memory cell)

Posted On: March 30, 2024
I want to make a pvp map which has 2 spawnpoints on the map. The spawnpoints are closed off with an iron door. The teams can both get ready by flipping a lever. Now i want to make it so when both team...[More]


Are Cheats in GTA5 official feature or is it some hack spread by developers - users? Are Cheats in GTA5 official feature or is it some hack spread by developers - users?

Posted On: November 30, 2023
When you press ` (backtick) key in GTA5, you can enter cheat codes like BUZZOFF. Now I was wondering is this official feature? I find it a bit strange because on GTA5 official site and in their Man...[More]


Are the Draugr apologizing to me? Are the Draugr apologizing to me?

Posted On: February 4, 2015
Draugr sometimes say "Unstaad Krosis" when attacking. I understand that means "many apologies" in dragon tongue (convo with Paarthurnax). .Does this hint that they are doing something against their wi...[More]


What does shadow cache option exactly do in resident evil 4 remake? What does shadow cache option exactly do in resident evil 4 remake?

Posted On: April 10, 2023
Resident evil 4 remake on PC has the graphics option "shadow cache", what does it exactly do? The comparison picture they provide does not show any difference really. Is it dynamic or for mo...[More]


How to set Steam to always choose the same launch option for a game? How to set Steam to always choose the same launch option for a game?

Posted On: February 5, 2023
Sometimes when you launch a game you have to choose between different launch options:.Is it possible to configure Steam so the startup window is skipped and a specific options is chosen?I my case I wa...[More]


What is the use of making dinosaurs poop in Ark? What is the use of making dinosaurs poop in Ark?

Posted On: June 20, 2023
I'm kinda new to Ark, and exploring the (awkward) menus I've discovered that it's possible to force a tamed animal/dinosaur to poop. Why? Is there any actual advantage for doing this? O...[More]


What do the checkmarks on caves mean in ToTK? What do the checkmarks on caves mean in ToTK?

Posted On: May 16, 2023
I've noticed that some cave icons on my map have checkmarks next to them while others don't. What does the checkmark symbol mean? Question from user scohe001 at gaming.stackexchange.com. ...[More]


Am I doing this Durge thing right? About to hit act 2 Am I doing this Durge thing right? About to hit act 2

Posted On: June 24, 2025
Question from user Smiley_707 at BaldursGate3 at reddit.com.Answer:Umm… I think you may have an IRL dark urge.Answer from user TheMediumEagle at BaldursGate3 at reddit.com....[More]


What is the best gear to wear when fighting Ranrok in Hogwarts? What is the best gear to wear when fighting Ranrok in Hogwarts?

Posted On: April 12, 2023
Help.  What gear should I use? Question from user Legofan990 at HogwartsLegacyGaming at reddit.com. Answer: Honestly, its a really easy fight so I wouldnt worry about gear too much. J...[More]