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 backup my Minecraft world on Xbox to a flash drive without realms? How do I backup my Minecraft world on Xbox to a flash drive without realms?

Posted On: June 10, 2023
How do I backup my Minecraft Bedrock world from my Xbox to a flash drive?. I don’t have realms and don’t want to get realms to backup my world. I want to keep it on a drive separate ...[More]


You're his lawyer, defend him You're his lawyer, defend him

Posted On: November 18, 2024
Question from user Gettor at BaldursGate3 at reddit.com.Answer:Your Honor its a well known fact, axiomatic even, that a victim of vampirism is not themselves.The vampire cazador is different from the ...[More]


Command to say player coords in chat? Command to say player coords in chat?

Posted On: January 28, 2023
Trying to get a command that tells a player's coords in chat. I have a working command: /data get entity @s Pos, but I assume I would need to combine this with /tellraw?Question from user Aceplante at...[More]


In SoulKnight Game is there a secret way to get some character skins? In SoulKnight Game is there a secret way to get some character skins?

Posted On: August 18, 2023
I'm quite new playing soulknight, And I quite find it enjoying and entertaining, I see that there are skins in the game, but I just can't afford to buy one, Is there a secret thing or secret m...[More]


Why don't I love my Dragonborn as I did my Argonians? Why don't I love my Dragonborn as I did my Argonians?

Posted On: March 22, 2026
I can't pinpoint what it is, but I had a fantastic time playing lizard people in Morrowind, Oblivion and Skyrim. It felt different, fun and interesting. The racial traits didn't matter to me - I just ...[More]


How can I recognize wanted criminals in Godlike Burger? How can I recognize wanted criminals in Godlike Burger?

Posted On: October 17, 2023
There's this event in Godlike Burger where your restaurant may sometimes be visited by wanted criminals that you can kill for a money reward. Problem is, I don't see any distinguishable marks ...[More]


Is it a problem if the wall portion of a bedroom overlaps with another one in Dwarf Fortress? Is it a problem if the wall portion of a bedroom overlaps with another one in Dwarf Fortress?

Posted On: December 26, 2023
I've just recently learned that a bedroom should contain the walls too, but I only have a 1 tile wide wall between my bedrooms. Is it a problem if these room designations overlap? Question f...[More]


Great Hall area Field Guide Pages Great Hall area Field Guide Pages

Posted On: July 31, 2023
Can anyone please help me find the last field guide page in the Great Hall area? It says I only have 23 out of the 24 for that area. I have used online guides and visited every single one of the page ...[More]


Missing Field Guide Pages in Hogwarts Legacy Missing Field Guide Pages in Hogwarts Legacy

Posted On: August 15, 2023
Missing two from the Bell tower zone, one from the Astronomy, and one from the Great Hall. I went through two guides step by step for the Great Hall and then a video guide step by step for the Great H...[More]


How do you role play anything but nice characters? How do you role play anything but nice characters?

Posted On: October 27, 2023
I'm someone who feels bad in any video game if I am mean to some NPC. I'm also someone who tries to get everything in a single playthrough and try to pick the right dialogue option for that, r...[More]