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]

Are there any Infinite Combos in Monster Train? Are there any Infinite Combos in Monster Train?

Posted On: June 17, 2023
In a similar game, Slay the Spire, I know of quite a few infinite combos, however with significantly less "draw" cards in Monster Train, I was wondering if there are any ways to get an infin...[More]


If you could Avarda Kedavra any person in Hogwarts who would it be? If you could Avarda Kedavra any person in Hogwarts  who would it be?

Posted On: July 5, 2023
I'm going Ignatia Wildsmith. Im so tired of hearing those same 3 lines everytime I floo flame!. Question from user Robj1992 at HogwartsLegacyGaming at reddit. Answer: The b*tch who tries ...[More]


Misadventures of P.B Winterbottom leaderboards Misadventures of P.B Winterbottom leaderboards

Posted On: March 24, 2023
The Misadventures of P.B Winterbottom is absolutely brilliant (if maybe a little short). Anyway, now that I've finished it, I'm in the process of going through the bonus shorts (levels), and a...[More]


Are my Assassins Creed experience levels bugged? Are my Assassins Creed experience levels bugged?

Posted On: July 8, 2023
I'm confused. In Assassins Creed: Revelations I have lots of assassins which I've sent off on missions, however their XP to next level is less than their current XP (i.e, XP of 13k, next level...[More]


Hogwarts Legacy Help 100% please Hogwarts Legacy Help 100% please

Posted On: July 29, 2023
Can somebody please walk me through what I'm missing for the platinum? I'm missing 1 revelio page in hogwarts and I don't know which one it is, I've tried guides and everything, I just...[More]


Is my story over? Is my story over?

Posted On: March 19, 2024
I LOVE NMS but the story is extremely confusing (I think I get the gist) so I'm not sure if I've finished it as I still have two main missions showing in the log. I switched galaxy for the first time ...[More]


Can I replay levels in Hi-Fi Rush? Can I replay levels in Hi-Fi Rush?

Posted On: February 19, 2023
I missed some collectables in a stage and want to go back to get them. Is there a way to replay a stage? Question from user Stevoisiak at gaming.stackexchange.com. Answer: Yes, you can replay...[More]


How to make an outline square? How to make an outline square?

Posted On: June 13, 2023
I want to start a build in a 10x10 chunk, but unfortunately I don't know how to form a square outline around the 10 by 10 chunks using smooth stone quickly. I've tried using the /fill commands...[More]


Dynamic Lighting in (vanilla) Minecraft Dynamic Lighting in (vanilla) Minecraft

Posted On: August 25, 2023
I have already seen tutorials on Minecraft regarding dynamic lighting, but none of them seem fancy enough. What I'm thinking of is a way to make dynamic lighting that is clean and not destructi...[More]


Hogwarts Legacy Recommendations? Hogwarts Legacy Recommendations?

Posted On: April 23, 2023
I finally got a PS5 and blew through Hogwarts Legacy. Can anyone recommend a similar story based open world game I can play before I go back for my next rerun? Question from user Elise2016 at Hogwa...[More]