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]

EU4: Why is my personal union ending? EU4: Why is my personal union ending?

Posted On: August 5, 2023
I am playing as Aragon and I have a personal union with Castile. My ruler is called "Alfons VI de Trastámara". Everything is well, Castile's opinion of me is 200, and I have just ...[More]


How many types of charging ports do Nintendo handhelds have? How many types of charging ports do Nintendo handhelds have?

Posted On: June 17, 2023
I'm sorting through my old Nintendo handhelds and have found that many of them use different charging cables. I've seen at least four different types:. Nintendo Switch & Switch Lite. ...[More]


Where in Skellige is this shipwreck located? Where in Skellige is this shipwreck located?

Posted On: October 5, 2023
I wanted to find a shipwreck in Witcher 3's Skellige for purposes of a Witcher Tabletop RPG campaign I'm playing, and I found these images of one:. While these images are nice, what they do...[More]


What am I missing with Weapon Infusion in Elden Ring? What am I missing with Weapon Infusion in Elden Ring?

Posted On: October 20, 2023
So I just got back into Elden Ring, and am re-acquainting myself with the weapon upgrades/infusion systems. I'm playing a Dex build, and am currently wielding the base dual-scimitars. However, ...[More]


Is 2 ranks in V.A.N.S. better than 2 ranks in Perception Training? Is 2 ranks in V.A.N.S. better than 2 ranks in Perception Training?

Posted On: September 27, 2023
Let's say I wanted +2 Perception. I could. Put two points into Perception. Put two points into VANS; the second rank gives you +2 Perception. Seems like for 2 points I could have +2 Pe...[More]


I turned Karlach into a hell hound by accident. I turned Karlach into a hell hound by accident.

Posted On: November 24, 2024
Question from user Annepackrat at BaldursGate3 at reddit.com.Answer:Hope youre doing well, soldier.Answer from user Cambyses-II at BaldursGate3 at reddit.com....[More]


How do I quickly regain health during combat in Mass Effect Andromeda? How do I quickly regain health during combat in Mass Effect Andromeda?

Posted On: May 6, 2023
I built an Isharay with the bio-converter augmentation, which gives me an extremely powerful sniper rifle that never needs to reload (with effectively infinite ammo), but at cost of running through my...[More]


How do you make Cuphead black and white? How do you make Cuphead black and white?

Posted On: March 13, 2024
I've seen screenshots of it, and a character on the third isle says something about you have to be a pacifist or something. How is it done?Question from user Levi C. Olson at gaming.stackexchange.com....[More]


PS5 controller doesnt charge PS5 controller doesnt charge

Posted On: July 5, 2023
I have bought controller to use on PC. But when I connect it to USB to charge, orange light glows once and stops. If I connect it to Mac, it glows solid orange with white middle light. It should...[More]


How to make a 1v1v1v1 game in Age of Empires 2 DE? How to make a 1v1v1v1 game in Age of Empires 2 DE?

Posted On: July 5, 2023
Every time I try to make a game with multiple people it ends up being a team game. What lobby settings do I need to make it a FFA? Question from user Zhro at stackexchange. Answer: Set your T...[More]