Magic resistance (monster)

From NetHackWiki
Revision as of 02:47, 22 December 2024 by Cathartes (talk | contribs) (correction: healing is against Pestilence; also change example given in Strategy section)
Jump to navigation Jump to search

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 property provided by various worn or carried items, which some monsters such as gray dragons and Angels also have intrinsically; 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.

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.

List of effects subject to monster magic resistance

Unless otherwise specified, monster magic resistance completely prevents effects. Some exceptions cause monsters to take less damage instead of nullifying it completely.

Strategy

Monster magic resistance generally determines what strategies are effective against certain monsters - for example, mind flayers have 90 monster magic resistance, which makes strategies such as polymorph magic or scaring from a musical instrument unlikely to work. In contrast, these strategies will work on minotaurs, which have no monster magic resistance.

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 or other variants, and may additionally change the name to further distinguish it from the magic resistance property.

NetHack Fourk

In NetHack Fourk, the stat is referred to 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.

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.

References

  1. src/zap.c in NetHack 3.6.0, line 4802
  2. src/zap.c in NetHack 3.6.0, line 4842
  3. src/trap.c in NetHack 3.6.0, line 2588
  4. src/artifact.c in NetHack 3.6.7, line 1076
  5. src/dogmove.c in NetHack 3.6.7, line 899
  6. src/dogmove.c in NetHack 3.6.7, line 938
  7. src/monmove.c in NetHack 3.6.7, line 506
  8. src/monmove.c in NetHack 3.6.7, line 645
  9. src/monmove.c in NetHack 3.6.7, line 1082
  10. src/priest.c in NetHack 3.6.7, line 204
  11. src/shk.c in NetHack 3.6.7, line 3839
  12. src/mhitm.c in NetHack 3.6.7, line 126
  13. src/explode.c in NetHack 3.6.7, line 425
  14. src/mhitm.c in NetHack 3.6.7, line 1512
  15. 15.0 15.1 src/zap.c in NetHack 3.6.7, line 5210: damage is done directly inside the resist() function, and halved if resisted
  16. src/muse.c in NetHack 3.6.7, line 1270
  17. src/zap.c in NetHack 3.6.7, line 175
  18. src/music.c in NetHack 3.6.7, line 79: for horns and drums
  19. src/music.c in NetHack 3.6.7, line 205: for bugles
  20. src/music.c in NetHack 3.6.7, line 230
  21. src/read.c in NetHack 3.6.7, line 944
  22. src/potion.c in NetHack 3.6.7, line 1457
  23. src/potion.c in NetHack 3.6.7, line 1468
  24. src/potion.c in NetHack 3.6.7, line 1502
  25. src/potion.c in NetHack 3.6.7, line 1551
  26. src/pray.c in NetHack 3.6.7, line 2023
  27. src/pray.c in NetHack 3.6.7, line 2023
  28. src/read.c in NetHack 3.6.7, line 1250
  29. src/trap.c in NetHack 3.6.7, line 1639
  30. src/trap.c in NetHack 3.6.7, line 2682
  31. src/uhitm.c in NetHack 3.6.7, line 1323
  32. src/zap.c in NetHack 3.6.7, line 182
  33. src/zap.c in NetHack 3.6.7, line 195
  34. src/zap.c in NetHack 3.6.7, line 218
  35. src/zap.c in NetHack 3.6.7, line 235
  36. src/zap.c in NetHack 3.6.7, line 394
  37. src/zap.c in NetHack 3.6.7, line 438
  38. src/zap.c in NetHack 3.6.7, line 2741
  39. src/zap.c in NetHack 3.6.7, line 3753

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.