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 maximum speed an AMX 40 can achieve over flat terrain in World Of Tanks? What is the maximum speed an AMX 40 can achieve over flat terrain in World Of Tanks?

Posted On: August 11, 2023
I've rebought my AMX-40 lately after reading a guide which tries to fix the issues with the tank (it's speed mostly) and I noticed that sometimes I can reach 26-7kmh on flat pavement surfaces ...[More]


Should I turn in sebastion in Hogwarts Legacy? Should I turn in sebastion in Hogwarts Legacy?

Posted On: March 16, 2023
I already learned Avada Kedavra so there's no point for me to keep him around just wondering if there are any underlining consequences to doing so, plus he does say whatever happens he's glad ...[More]


What advantage do I get by evolving my Pokemon? What advantage do I get by evolving my Pokemon?

Posted On: April 10, 2023
I know that if I postpone my Pokemon's evolution, I can learn certain moves earlier. For example, Mareep learns Thunder at level 55 while its fully evolved form, Ampharos, only gets it at level 79...[More]


Are there any jump scares - giant sea monsters that would affect someone with thalassophobia? Are there any jump scares - giant sea monsters that would affect someone with thalassophobia?

Posted On: September 18, 2023
I just bought Subnautica from the latest Humble Bundle and I've always wanted to try it out. It looks beautiful and I typically enjoy survival/exploration games. However, I've got a mild case ...[More]


What are the in-app purchases for Layton and the Diabolical Box on Android? What are the in-app purchases for Layton and the Diabolical Box on Android?

Posted On: March 19, 2023
The Google Play store page for Professor Layton and the Diabolical Box on Android says it contains in-app purchases. I can't find any other mention of them on the store page. What are the in-ap...[More]


Xbox One controller will not turn Xbox on Xbox One controller will not turn Xbox on

Posted On: February 8, 2023
I used to be able to turn my Xbox on with the wireless controller without fail but recently it will work for a while and then just suddenly stop turning on the Xbox. I hold the center X button and it ...[More]


Is there a limit for the waiting queue outside the vault? Is there a limit for the waiting queue outside the vault?

Posted On: December 13, 2023
Inspired by this question i wondered how many Dwellers can wait outside the vault. Even if there is no gameplay limit, what happens when more dwellers are waiting then can be graphically displayed bec...[More]


How to Trade Between Pokemon Ruby and Sapphire emulator on my Macbook pro? How to Trade Between Pokemon Ruby and Sapphire emulator on my Macbook pro?

Posted On: March 31, 2024
I would like to trade Pokemon for evolution between Ruby and Sapphire emulators for trades. However, I cannot seem to get an emulator that works on my Macbook M1 with Ventura to load 2 games at once.T...[More]


Does Circuit Superstars support splitscreen with two (identical) controllers? Does Circuit Superstars support splitscreen with two (identical) controllers?

Posted On: March 19, 2023
Is it possible to play Circuit Superstars in split screen (i.e. local multiplayer) with two (identical) controllers? I know that the game's Steam page mentions both Split Screen and Full contro...[More]


How do I get the ghillie suit? How do I get the ghillie suit?

Posted On: November 19, 2023
Sometimes while I play Call of Duty Modern Warfare 3 online, I see people with a ghillie suit to help them blend in to their surroundings. How do I get that costume? Question from user Scribblenaut...[More]