]> granicus.if.org Git - nethack/commitdiff
drain life vs drain resisting objects (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 8 Jan 2012 01:26:35 +0000 (01:26 +0000)
committernethack.rankin <nethack.rankin>
Sun, 8 Jan 2012 01:26:35 +0000 (01:26 +0000)
     From the newsgroup:  casting spell of drain life at Stormbringer
(or Excalibur or Staff of Aesculapius) would reduce its enchantment just
like any other weapon.  Drain resistance should protect against that even
when not actively wielded.

doc/fixes35.0
src/zap.c

index 85d70658b3a6bd1215ea0e263d4f6afefae8f336..a670606db67d404ff39aaa3731f7dc7ab8ddfe98 100644 (file)
@@ -1,4 +1,4 @@
-$RCSfile$ $Revision$ $Date$
+$rcsfile: fixes35.0,v $ $Revision$ $Date$
 
 General Fixes and Modified Features
 -----------------------------------
@@ -398,8 +398,9 @@ wand/scroll/spell of light now hurts gremlins (lamp/candle light doesn't)
 ditto for hero in gremlin form (camera too)
 autosearch finds and transforms secret doors and corridors even while blind,
        but it wasn't updating the map to show them unless the hero could see
-panic save made during magic mapping or <foo> detection performed while
+hangup save made during magic mapping or <foo> detection performed while
        underwater could put hero on top of the water after restore
+items conferring life drain resistance were affected by drain life spell
 
 
 Platform- and/or Interface-Specific Fixes
index 7871a95536b192b4ac0e7e6974791b24c0c6e032..47a6375fe2b76a6810b0769d37332dea4c1f7a74 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -1007,7 +1007,8 @@ register struct obj *obj;
                        obj->oclass != ARMOR_CLASS && !is_weptool(obj)) ||
                        obj->spe <= 0)
            return (FALSE);
-       if (obj_resists(obj, 10, 90))
+       if (defends(AD_DRLI, obj) || defends_when_carried(AD_DRLI, obj) ||
+               obj_resists(obj, 10, 90))
            return (FALSE);
 
        /* Charge for the cost of the object */