From: nethack.rankin Date: Sun, 8 Jan 2012 01:26:35 +0000 (+0000) Subject: drain life vs drain resisting objects (trunk only) X-Git-Tag: MOVE2GIT~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1563a3e0eca85f25cb6137035a744d686168a39c;p=nethack drain life vs drain resisting objects (trunk only) 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. --- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 85d70658b..a670606db 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -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 detection performed while +hangup save made during magic mapping or 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 diff --git a/src/zap.c b/src/zap.c index 7871a9553..47a6375fe 100644 --- 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 */