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 True Ending in Hogwarts Legacy? What is the True Ending in Hogwarts Legacy?

Posted On: July 19, 2023
What is the True Ending in Hogwarts Legacy after you've completed the main storyline? The answer in this question explains the main storyline endings, but I'm looking for the so-called &quo...[More]


How can I assigning specific depots to trains? How can I assigning specific depots to trains?

Posted On: March 18, 2024
Is there a way to tell a train to which depot it "belongs"? .Because it frequently happens to me, that my trains leave their normal route and head to depots on some other tracks (probably they just h...[More]


Luigis Mansion 3: Does a higher rank change the ending in any way? Luigis Mansion 3: Does a higher rank change the ending in any way?

Posted On: January 13, 2024
I've recently played through Luigi's Mansion 3. I didn't really care for any Boos, crystals or money, and the game awarded me with the rank B at the end of the credits scene.  Give...[More]


Does XBox gamepad emulator software exist for the PC? Does XBox gamepad emulator software exist for the PC?

Posted On: March 21, 2023
What I'm hoping to do is use a second keyboard and/or mouse in the place of a gamepad for games that require a gamepad to enable multiplayer gaming. I've noticed a few games that are XBox port...[More]


What does Ominis mean when he says Imelda's quick and not just on a broom? What does Ominis mean when he says Imelda's quick and not just on a broom?

Posted On: July 19, 2023
he says it so cheeky as if it's an insult but the only insulting meaning for quick really only applies to guys and even then generally quick means witty and/or smart. am I misreading his voice or ...[More]


What does researching Advanced Propulsion Tech I and higher do in Master of Orion 1? What does researching Advanced Propulsion Tech I and higher do in Master of Orion 1?

Posted On: May 6, 2023
It looks like once you've finished researching all available technologies up to tech level 50 in a specific category, you are presented with a set of Advanced Something Tech I to X to research. ...[More]


What is the origin of the Qin Shi Huang theme music in Civilization IV? What is the origin of the Qin Shi Huang theme music in Civilization IV?

Posted On: July 10, 2023
I've been trying to identify the music that is heard while one talks diplomacy with Qin Shi Huang in Civilization IV. The melody has been stuck in my head for a while now, and I'd like to k...[More]


Just need some advice ?? Just need some advice ??

Posted On: November 28, 2025
Im doing my first real play through, and decided to play on tactician and would really like some advice/tips. So far i made it to the cove after finding the guy who can respec your characters. Battle...[More]


XBox 360 storage device issue with Darksiders XBox 360 storage device issue with Darksiders

Posted On: April 16, 2024
I've been playing Darksiders now for some time now and I've noticed that when I start the game, in the main menu where it says "Press Start", it always triggers me to select a storage device. Why does...[More]


How many chapters are in Nier Reincarnation? How many chapters are in Nier Reincarnation?

Posted On: April 2, 2024
How many story chapters are in Nier Reincarnation? The game just released its final chapter. I just finished chapter 10 and want to know how many chapters I have left to complete before the game shuts...[More]