# User:Killian/Antimagic
include/youprop.h:72:#define EAntimagic		u.uprops[ANTIMAGIC].extrinsic
include/youprop.h:73:#define Antimagic		(EAntimagic || \
src/mcastu.c:289:		if(Antimagic) {
src/mcastu.c:336:	} else if (!Antimagic &amp;&amp; rn2(mtmp-&gt;m_lev) &gt; 12) {
src/mcastu.c:345:	    if (Antimagic) shieldeff(u.ux, u.uy);
src/mcastu.c:393:	if (Antimagic) {
src/mcastu.c:402:	if (Antimagic) {
src/mcastu.c:426:	if (Antimagic || Free_action) {
src/mcastu.c:454:	/* prior to 3.4.0 Antimagic was setting the damage to 1--this
src/mcastu.c:456:	if (Antimagic) {
src/mcastu.c:599:	if (Antimagic || Free_action) {
src/mcastu.c:614:	if (Antimagic) {
src/mcastu.c:641:	if (Antimagic) {
src/cmd.c:878:	if (Antimagic) you_are("magic-protected");
src/muse.c:1114:			if (Antimagic) {
src/sit.c:324:	if(Antimagic) {
src/sit.c:337:	    for (cnt = rnd(6/((!!Antimagic) + (!!Half_spell_damage) + 1));
src/uhitm.c:2223:	    if(Antimagic) {
src/pray.c:594:			if (!Blind &amp;&amp; !Antimagic)
src/zap.c:1886:		    if(Antimagic) {
src/zap.c:1959:		    if(Antimagic) {
src/zap.c:2236:	if (youdefend&nbsp;? (!youattack &amp;&amp; Antimagic)
src/zap.c:3077:	    if (Antimagic) {
src/zap.c:3143:	    } else if (Antimagic) {
src/trap.c:1075:		if(Antimagic) {
src/trap.c:1096:		if(Antimagic || Unchanging) {
src/artifact.c:376:	    mask = &amp;EAntimagic
src/artifact.c:542:	dmg = d((Antimagic&nbsp;? 2&nbsp;: 4), (self_willed&nbsp;? 10&nbsp;: 4));
src/artifact.c:604:			return&nbsp;!(yours&nbsp;? Antimagic&nbsp;: (rn2(100) &lt; ptr-&gt;mr));
src/artifact.c:856:	    if (Antimagic) {
src/explode.c:104:				explmask[i][j] =&nbsp;!!Antimagic;
src/mhitu.c:1494:		    if (!Antimagic) {
src/mhitu.c:1506:		    if (Antimagic) shieldeff(u.ux, u.uy);
src/potion.c:1005:		if (!Unchanging &amp;&amp; !Antimagic) polyself(FALSE);
src/spell.c:161:		if(Antimagic) {
src/teleport.c:844:	if (In_endgame(&amp;u.uz) || Antimagic) {
src/teleport.c:845:		if (Antimagic)
src/teleport.c:865:	if (Antimagic) {
src/teleport.c:868:	if (Antimagic || In_endgame(&amp;u.uz)) {
debian/patches/93_enh_dump.dpatch:313:+	if (Antimagic) dump(youwere, "magic-protected");

Things that magic resistance protects against:
Magic missile monster spell
Touch of death monster spell
Destroy armor (monster spell)
Drain strength (weaken) monster spell
Stun monster spell (reduces effect to 1 turn)
Psi bolt monster spell (halves damage, rounded up)
Paralyze clerical monster spell (reduces effect to 1 turn)
Confuse clerical monster spell
Open wounds clerical monster spell (halves damage, rounded up)
Wand of striking zapped by monster
Curses caused by rndcurse in sit.c (reduces effect somehow)
Oracle's passive magic missile attack
Wand or spell of force bolt zapped by player at self
Wand or spell of magic missile zapped by player at self
Player canceled by monster via cancel_monst in zap.c (is this possible?)
Player hit by zapped magic missile
Player hit by zapped death ray
Player stepping on an anti-magic field
Player stepping on a polytrap
Player zapped by touching an artifact (halves damage dice from 4 to 2)
Special damage of player hit by Magicbane
Magicbane's "scare" special attack
Effects of explode in explode.c for AD_MAGM explosions
Possible instadeath from Death's touch attack
Being hit by a thrown potion of polymorph
Explosion of an unsuccessfully-read spellbook
Player stepping on teletrap
Player stepping on level-teletrap