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]

Dark Souls 3, How do I kill the Abyss Watchers? Dark Souls 3, How do I kill the Abyss Watchers?

Posted On: May 21, 2023
I have been trying so hard for a week and I can't figure out how to kill these guys. I can finish off the first phase but no matter how hard I try, I can't kill the fire dude! Does anyone k...[More]


How can you be immune to damage from bed explosions in the nether? How can you be immune to damage from bed explosions in the nether?

Posted On: April 11, 2023
In Minecraft, everyone seems to able to use beds for mining or killing the Ender Dragon, but whenever I use it I blow up instantly. Is this a bug, or how can I be immune to this damage? Question...[More]


Damn, Minthara. Just pop off I guess. Damn, Minthara. Just pop off I guess.

Posted On: October 30, 2024
Question from user AcidicJester at BaldursGate3 at reddit.com.Answer:As long as we have spell slots, we win the game.Answer from user Parking_Put_1701 at BaldursGate3 at reddit.com....[More]


What devices can you play Sonic Mania on? What devices can you play Sonic Mania on?

Posted On: January 24, 2023
I asked this question because Sonic Mania can probably be played on a few devices.Question from user Dark sonic at gaming.stackexchange.com.Answer:From the Wikipedia article on Sonic Mania, the game i...[More]


What is the definition of a pug? What is the definition of a pug?

Posted On: February 2, 2023
What is a "pug"? I've heard multiple instances of it used in many MMORPG and FPS games. I've heard of games called "pubs", but those I think reference public games. Is t...[More]


Where are all the Daedalian Key locations in Hogwarts Legacy? Where are all the Daedalian Key locations in Hogwarts Legacy?

Posted On: July 20, 2023
I'm trying to find all the Daedalian Keys to put onto the chest cabinet thing in my common room, but I'm struggling to find all of them. Where can I find all of them? Does someone have a li...[More]


Is Hearthstone a game-within-game? Is Hearthstone a game-within-game?

Posted On: August 25, 2023
Hearthstone's visuals suggest that the game is played in a tavern in the World of Warcraft universe on a (possibly magical) game board. Is Hearthstone a game-within-game in WoW? When you play H...[More]


What do the stars under can produce mean in against the storm What do the stars under can produce mean in against the storm

Posted On: February 7, 2023
Does it mean it can produce those goods faster, higher quality or what? Is it worth it to replace buildings with higher starred versions or prioritize going for buildings with new stuff?So for example...[More]


Do you guys use potions? Do you guys use potions?

Posted On: August 10, 2023
Dear Witches and wizards. Do you guys use potions, and if you do. Which ones do you use the most? Question from user ItsSolomon at HogwartsLegacyGaming at reddit. Answer: Yeah, I use them in ...[More]


In Zelda TOTK, Is it possible to save scum the "Cash In on Ripened Flint" quest? In Zelda TOTK, Is it possible to save scum the "Cash In on Ripened Flint" quest?

Posted On: May 23, 2023
In the Cash In on Ripened Flint side quest Gomo a Gordon in Bedrock Bistro offers 1,000 rupees for a piece of ripened flint. Unfortunately he has to eat (consume) flint to determine if it is of the ri...[More]