# Magic cancellation
For the effects of a wand of cancellation or a spell of cancellation, see Cancellation.
Magic cancellation, or MC for short, is a property which protects the player from certain non-damage effects caused by a monster attacking and touching the player with some part of its body. Examples include poison from killer bee stings, lycanthropy caused by werejackal bites, and the green slime's sliming attacks. Such attacks are referred to as special melee attacks in this article. Having the highest (best) magic cancellation means that only 1⁄10 of special melee attacks will succeed (assuming they would hit otherwise). This makes magic cancellation a high priority trait. A precise list of the special melee attacks that magic cancellation protects against is provided in the section below.
Magic cancellation must not be confused with cancellation caused by a wand or spell, nor with magic resistance. See §&nbsp;Differences from cancellation and magic resistance for further details.
Your current level of magic cancellation can be verified via any source of enlightenment; "You are warded" means you have MC1, "You are guarded" is MC2, and "You are protected" is MC3.

Contents

1 Sources
2 Mechanics

2.1 Cancelable effects

3 Differences from cancellation and magic resistance
4 Noteworthy interactions
5 Strategy
6 History
7 References
8 External links

Sources
The most common source of magic cancellation is armor. Each piece of armor has a magic cancellation number (MC number) ranging from 0 (worst) to 3 (best). Note that magic cancellation from armor is not cumulative—the player's magic cancellation is the maximum of that provided by any single piece of armor worn. This means that if you are wearing a chain mail with MC 1, and a dwarvish cloak with MC 1, then your magic cancellation is still 1.
Magic cancellation can also be granted by protection, either intrinsic or extrinsic.  Extrinsic protection augments your magic cancellation by 1, to a maximum of 3.  Intrinsic protection or temporary protection from the spell of protection counts as magic cancellation 1, but doesn't stack with armor sources or extrinsic protection.  The sources of extrinsic protection are the ring of protection, the Tsurugi of Muramasa, and the Mitre of Holiness; more than one such source provides no additional benefit.  Intrinsic protection is granted when you get an AC bonus by donating to an aligned priest or by a favor when praying.  Intrinsic protection may be lost by a gremlin's special attack or eating a disenchanter corpse; if so, donating the appropriate amount to an aligned priest will restore it, even if it would fail to improve your AC.  High priests have extrinsic protection, and aligned priests and monsters represented by A have intrinsic protection.
The following list contains all the sources of magic cancellation:

Armor

Armor type

MC

Extrinsic protection

N/A

+1 (max 3)

Intrinsic protection

1 (if no extrinsic)

spell of protection

alchemy smock

cloak

1

cloak of displacement

cloak of invisibility

cloak of magic resistance

dwarvish cloak

elven cloak

leather cloak

mummy wrapping

orcish cloak

banded mail

body armor

bronze plate mail

chain mail

leather armor

orcish chain mail

orcish ring mail

ring mail

scale mail

splint mail

studded leather armor

cornuthaum

helm

oilskin cloak

cloak

2

robe

crystal plate mail

body armor

dwarvish mithril-coat

elven mithril-coat

plate mail

cloak of protection

cloak

3

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

A worn amulet of guarding adds +2 to magic cancellation.
Mechanics
Magic cancellation protects the player by reducing the probability of special melee attacks occurring.

The attack must first hit the player. This means passing the player's armor class. Unless you are resistant to the damage type of the attack, you will be dealt damage, which reduces your hitpoints. This occurs regardless of whether the damage type was ordinary physical, or a special type such as poison.
After this, there is a probability of special effects occurring, for instance:
100% Sticking-to, teleport, sliming, disenchanting, disease
1⁄3 Drain level and paralysis
1⁄4 Lycanthropy, slowing attack, and drain energy
1⁄5 Sleep
1⁄8 Poison
The monster itself must not be cancelled[1].
Finally, the attack must pass the player's magic cancellation aura. The chance of this happening is 1 − 0.3×MC, or listed in the table below:

MC
Effect probability

0
100%

1
70%

2
40%

3
10%

If all these tests are passed, the player will suffer the special effect. In the case of fire, cold, and shock, there is further a test for determining if any inventory items are damaged or destroyed.

Cancelable effects
Understanding how magic cancellation works requires some understanding of how an attack works in NetHack. An attack has two characteristics: attack type (e.g. bites and stings) and damage type (e.g. physical or poisonous). A soldier ant, for instance, has two attacks: a bite which does 2d4 physical damage (i.e. ordinary damage), and a sting which does 3d4 poison damage. Magic cancellation will not protect against the 2d4 physical damage from the bite, nor will it prevent the 3d4 damage caused by the sting. It will, however, protect against the special effects from the poisonous sting, which randomly include hitpoint reduction, attribute reduction, and instadeath.
There is no obvious pattern to what magic cancellation does and doesn't protect against. Shortly put, magic cancellation protects against certain attack types that deal a certain type of damage. This relation is shown in the table below. To be prevented by magic cancellation, both the attack type and damage type must be in the orange area of the table. If either the attack type or damage type is outside the orange area, magic cancellation will have no effect on the attack.
In earlier versions of the game, the idea was that some types of armor covered your entire body surface, so the attacker effectively could not touch you despite his successful attack. Over time, with the addition of the cornuthaum and many types of special attacks, this point has become moot, and the current explanation can only be "it's magic".

Attack type

Damage type

Attack type unaffected

Attack type prevented

Damage type prevented

Damage type unaffected

Passive attacks
Spitting attacks
Engulfing attacks
Breath attacks
Explosions from proximity
Explosions from dying
Gaze attacks
Magic spells
Ranged weapon attacks[note 1]

Claw
Bite
Kick[note 2]
Head butt[note 2]
Touch
Sting
Tentacle attack[note 2]
Holding attacks[note 2]
Melee weapon attacks[note 1]

Fire (burns scrolls and boils potions)
Cold (shatters potions)
Shock (detonates rings and wands)
Sleep (completely immobilized)
Poison (hitpoint and attribute reduction, instadeath)
Paralysis (player completely immobilized)
Drain life (player loses levels)
Sticky attack (inability to move to another square)
Lycanthropy (player regularly changes form)
Slowing attack (reduces player speed)
Teleport (randomly teleports player)
Sliming (kills player in a few turns)
Disenchanting (reduces enchantment on items)
Dexterity- or constitution-draining poison
Power draining (reduces power)

Ordinary physical
Magic missile
Disintegration
Acid
Blinding
Stunning
Leg damage by xans
Petrification
Gold stealing effects by leprechauns
Item stealing
Erosion (including rust, rot, and corrosion)
Confusion
Digestion
Healing effects by nurses
Drowning
Intelligence drain
Disease effect by Juiblex
Seduction
Hallucination
Amulet stealing by the Wizard of Yendor
Intrinsic-stealing by gremlins
Random clerical spell, magic spell or breath weapon damage
Special damage of the Riders

Examples – unaffected due to attack type

Examples – prevented due to combination of attack type and damage type

Examples – unaffected due to damage type

Floating eye passive paralysis attack
Disenchanter passive disenchanting attack
Guardian naga spitting poison
Ice vortex engulfing cold
Red dragon fire breath
Yellow light blinding explosion
Medusa petrifying gaze
Pyrolisk fire gaze
Lich magic spells

Fire damage from a fire ant bite
Cold damage from a lich touch
Shock damage from an electric eel bite
Sleep caused by a homunculus bite
Poison damage from a killer bee sting
Paralysis caused by a guardian naga bite
Drain life by a barrow wight weapon attack
Sticking-to caused by a large mimic bite
Lycanthropy caused by a werejackal bite when it is in animal form
Slowing caused by a shade touch
Teleport caused by a quantum mechanic claw
Sliming caused by a green slime touch
Disenchanting by a disenchanter claw[note 3]
Constitution-draining poison by a rabid rat bite
Dexterity-draining poison by a quasit claw

Physical damage due to tiger claws
Medusa petrifying gaze
Raven blinding claws
Petrification (stoning) due to a cockatrice's touch or passive hissing attack
Seduction due to succubus bites
Intelligence drain due to mind flayer tentacle attacks
Purple worm engulfing digestion
Drowning due to giant eel wrapping
Hallucination caused by a black light exploding
Erosion due to brown pudding bites
Nymph stealing claw

↑ 1.0 1.1 Magic cancellation protects against special melee weapon attacks, such as level drain from a barrow wights weapon, but it does not protect against weapons that are thrown or launched, such as poisoned arrows and darts.

↑ 2.0 2.1 2.2 2.3 The type of damage done by every single kick, headbutt, tentacle attack, and grabbing attacks in the game are listed in the rightmost column "Damage type unaffected". And hence they all bypass magic cancellation.

↑ Disenchantment by the disenchanter claw is prevented, but magic cancellation does not however protect against the passive disenchanting attack, since passive attacks are listed in the leftmost column "Attack type unaffected".

Differences from cancellation and magic resistance
Main articles: Cancellation and Magic resistance
Magic cancellation is distinct from cancellation, which a monster suffers when hit by a wand or spell of cancellation. Cancelling a monster completely removes the monster's ability to perform its special melee attacks, while magic cancellation only reduces the probability of those attacks succeeding against the player. Also, the attacks affected by cancelling a monster are not exactly the same as those prevented through magic cancellation. See the article on cancellation to compare effects.
Magic cancellation is not the same as magic resistance. Magic resistance is an extrinsic that protects against spell, wand, and trap effects and damage.
Magic cancellation is also different from intrinsic resistances against fire, cold, and shock damage. If you suffer fire damage while fire resistant, you won't be dealt hit point damage, but there is still a chance of items such as scrolls, spellbooks, and potions being destroyed. Magic cancellation on the other hand won't prevent the damage, but it will reduce the probability of item-destroying effects occurring.

Noteworthy interactions
Magic cancellation does not protect against paralyzing passive attacks nor gaze attacks, which include the attacks of floating eyes and Medusa.
Magic cancellation partially protects against disenchanters; it prevents the disenchantment though the claws, but not through the disenchanter's passive attack.
Magic cancellation does not protect against the touch nor against the hissing attack of the cockatrice. It is however possible to cancel the cockatrice itself, using a wand of cancellation or spell of cancellation. This will remove its ability to petrify by hissing only.
Monsters, including pets, enjoy magic cancellation from armor just as the player does. This is especially important if you rely on a powerful pet, as monsters cannot gain intrinsic resistances from eating corpses.

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

Pets can gain intrinsics from eating, though MC is still good for preventing effects that can't be intrinsically resisted.
Strategy
Magic cancellation is a useful properly which gets more useful the more of it you have; a character with MC3 will suffer only 1⁄4 as many cancellable attacks as one with MC2. However, its value must be weighed against its opportunity costs. Acquiring MC3 requires a cloak of protection, or one of the MC2 cloaks or suits and a source of extrinsic protection. Armor which provides MC2 or 3 doesn't provide the useful properties of the MC1 magic cloaks or MC0 dragon scale mail. In many cases, it's better to wear the cloak of magic resistance to protect yourself from polymorph traps and death magic, or silver dragon scale mail to protect your wands and rings from lightning. Most cancellable attacks have either resistances to negate them, or countermeasures to reverse their effects (fire for sliming, holy water for lycanthropy, Elbereth to unstick from mimics), so a well-prepared player may find magic cancellation a lower priority than more critical properties.
Magic cancellation only protects from melee attacks, and characters with strong ranged attacks can generally kill the attackers from a distance before they become a threat. Beware of monsters (especially nasties) being summoned to you, though.
If you want MC3, you may want to treat the ring of protection as a situational item, which you equip when a relevant monster appears and then swap out for a more generally useful one when the situation is dealt with. Priests and Samurai get protection from their quest artifacts; other roles must be lawful (at least temporarily) to wish for them.

History
Before version 3.6.0, magic cancellation was more readily available and stronger, and intrinsic or extrinsic protection had no effect on it.  For more details on magic cancellation as it functioned in 3.4.3, see Magic cancellation (3.4.3).

References

↑ src/mhitu.c in NetHack 3.6.0, line 892

Source:Mhitu.c
Source:Monattk.h
Source:Monst.c
Source:Mthrowu.c
External links
armr-343.txt
NAO top types of death

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.