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 I read messages after scanning them? How do I read messages after scanning them?

Posted On: December 23, 2023
In one of the first areas of ZombiU after leaving the safehouse, I found a message seemingly left by another player while scanning on the gamepad. It said the message was added after I scanned it, but...[More]


How do I give players already enchanted Tools - Armour - Weapons How do I give players already enchanted Tools - Armour - Weapons

Posted On: April 26, 2024
I'm making a map where I want players to be able to choose there kits/classes. The problem I'm having with it though is giving players already enchanted Tools/Armour/Weapons.I'm not sure if you can us...[More]


In Zelda TOTK, What materials do you need to repair the Champion Weapons? In Zelda TOTK, What materials do you need to repair the Champion Weapons?

Posted On: May 23, 2023
After constructing the Boulder Breaker, the goron smith informed me that he would be able to repair it if it breaks, given the materials. What materials do you need to repair the Boulder Breaker? I...[More]


Can I install an old DirectX version without affecting the latest version? Can I install an old DirectX version without affecting the latest version?

Posted On: May 25, 2023
I'm attempting to run RetroArch for an old game , but it requires DirectX 9.0c. Will installing DirectX 9.0c overwrite or delete the current version I have installed (v12)? If so, can I subsequ...[More]


Wii controllers keep losing connection. What can I do? Wii controllers keep losing connection. What can I do?

Posted On: January 15, 2024
I have a Wii and two controllers. In the last few months the controllers lose the connection to the Wii rather often. It's bad enough that we cannot play Mario Kart any more (because one player ge...[More]


How many people wish they could Use the killing curse on the flu flame lady How many people wish they could Use the killing curse on the flu flame lady

Posted On: August 3, 2023
I’m getting sick and tired of hearing her say You Wouldn’t believe how inconvenient travel was before I invited Floo powder.Question from user DavidCopeland276 at HogwartsLegacyGaming at...[More]


How can you jump farther in Temple Run? How can you jump farther in Temple Run?

Posted On: August 5, 2023
I'm playing Temple Run for iOS and there are parts where you need to jump really far in order to get over a broken path. Does anyone know how to jump over these tricky parts? Is there a way to ...[More]


Zelda TOTK, What does the blue numbers for my weapon strength indicate? Zelda TOTK, What does the blue numbers for my weapon strength indicate?

Posted On: May 20, 2023
I have a wide selection of fused weapons. Though, I noticed that many of the numbers are colored blue while the rest are white. At first I assumed it was to indicate either fused weapons or weapons...[More]


How can I improve framerate of Minecraft client? How can I improve framerate of Minecraft client?

Posted On: March 8, 2023
I'm a happy Minecraft player. I place my blocks, mine my coal, and generally nobody gets hurt. Lately though, those mean creepers have been sneaking up on me from behind, and killing me. Why? Beca...[More]


Team Fortress 2 Bonus Points and How To Get Them Team Fortress 2 Bonus Points and How To Get Them

Posted On: June 11, 2023
Is there a comprehensive list of ways to earn bonus points in TF2?. I have seen here and there one way to do it with this class or the other, but there seems to be no complete list that I've fo...[More]