# Magic resistance (monster)
In NetHack, monsters have some degree of innate magic resistance, also known as monster MR. Monsters' magic resistance allows them to resist various attacks, generally of a "magical" nature. It is handled by the resist() function—if a monster successfully resists an attack, it takes roughly half damage.[1] Players cannot ever gain monster-style resistance, e.g. through polymorph, and must instead rely upon magic cancellation and magic resistance.
Monster magic resistance is separate from the magic resistance propery provided by various worn or carried items, which some monsters such as gray dragons and Angels also have intrinstically; this form of "player-style" magic resistance does not affect taming and conflict, but renders polymorph traps ineffective. Neither type of magic resistance will protect monsters from level teleporters.

Contents

1 Description
2 Strategy
3 Messages
4 Variants

4.1 EvilHack
4.2 NetHack Fourk
4.3 FIQHack
4.4 xNetHack

5 References

Description
MR is given as a number from 0 to 100. This is frequently given as a percentage, although this is not entirely accurate. The chance of a monster resisting is given as follows:

Chance = MR/(100 + (attack level) - (defense level))[2]

which is only equal to MR as a percentage when attack and defense level are equal. Zero MR monsters will never resist.
Attack level is calculated as follows, where the defense level is the monster level of the target, which has a maximum of 50:

Source

Attack level

spell

Caster's level

wand, polytrap[3]

12

tool

10

weapon

10

scroll

9

potion

6

ring

5

All this also determines the chance that monsters (including pets resist conflict; conflict from the Sceptre of Might is treated the same as the ring of conflict for this purpose.

A user has suggested improving this page or section as follows:
"A list of all effects subject to monster mr, and/or confirmation that all those effects mention they are subject to it and link here."

Strategy
Monster magic resistance generally determines what strategies are effective against certain monsters - for examples, the Riders have complete monster magic resistance, but &amp;&nbsp;Pestilence and &amp;&nbsp;Famine can be subjected to level drain, making it possible for magical effects to work on them if their level is drained enough; &amp;&nbsp;Death is completely resistant to drain life.

Messages

<foo> resists!
A monster resisted an attack; this is shown only in some cases.
Variants
Some variants change the monster magic resistance stats for certain monsters that are included from vanilla NetHack, and may additionally change the name to further distinguish it from the magic resistance property.

EvilHack
In EvilHack, this stat is referred to as magic saving throw in the monster lookup; various monsters added from NetHack and other variants also have their magic saving throw improved.

NetHack Fourk
NetHack Fourk refers to this stat as willpower.

FIQHack
In FIQHack, this stat is also called willpower, with the attacker bonus from wands dependent on the wand skill.

xNetHack
xNetHack calls this stat magic saving throw. 

References

↑ zap.c in NetHack 3.6.0, line 4802

↑ zap.c in NetHack 3.6.0, line 4842

↑ trap.c in NetHack 3.6.0, line 2588

This page may need to be updated for the current version of NetHack.
It may contain text specific to NetHack 3.6.0. Information on this page may be out of date.
Editors: After reviewing this page and making necessary edits, please change the {{nethack-360}} tag to the current version's tag or {{noversion}} as appropriate.

</foo>