]> granicus.if.org Git - nethack/commitdiff
fix #H4296 - grease no checked for passive damage
authorPatR <rankin@nethack.org>
Sun, 10 Apr 2016 01:51:28 +0000 (18:51 -0700)
committerPatR <rankin@nethack.org>
Sun, 10 Apr 2016 01:51:28 +0000 (18:51 -0700)
Hitting a rust monster with a greased weapon would rust the weapon
instead of removing the grease.  Likewise for monsters with passive
acid or corrosion damage.  passive_obj() was ignoring grease.

doc/fixes36.1
src/uhitm.c

index 4c72bf86d0d8f9f63710682dc23c5e3f775c9179..0592a4637ef6c6d8d53be3ccfd4c0095687a69af 100644 (file)
@@ -201,6 +201,8 @@ tweak Baalzebub's lair and clean up the map display for it
 symbol set definitions didn't recognize S_darkroom and S_vibrating_square
 wizard mode enlightenment was reporting "very fast innately" (which is not
        possible) for very fast hero who was innately fast
+when attacking a monster with a rust or corrosion or acid passive
+       counter-attack, grease wasn't protecting the attacker's weapon
 
 post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp
 post-3.6.0: more sortloot revisions
index 48a16883f3ab8c5d34651cc281535f9c0da74ce6..4512006dc6a18f000dc04120a990f9e30ab2499e 100644 (file)
@@ -2550,17 +2550,17 @@ struct attack *mattk;     /* null means we find one internally */
         break;
     case AD_ACID:
         if (!rn2(6)) {
-            (void) erode_obj(obj, NULL, ERODE_CORRODE, EF_NONE);
+            (void) erode_obj(obj, NULL, ERODE_CORRODE, EF_GREASE);
         }
         break;
     case AD_RUST:
         if (!mon->mcan) {
-            (void) erode_obj(obj, NULL, ERODE_RUST, EF_NONE);
+            (void) erode_obj(obj, (char *) 0, ERODE_RUST, EF_GREASE);
         }
         break;
     case AD_CORR:
         if (!mon->mcan) {
-            (void) erode_obj(obj, NULL, ERODE_CORRODE, EF_NONE);
+            (void) erode_obj(obj, (char *) 0, ERODE_CORRODE, EF_GREASE);
         }
         break;
     case AD_ENCH: