From: PatR Date: Sun, 10 Apr 2016 01:51:28 +0000 (-0700) Subject: fix #H4296 - grease no checked for passive damage X-Git-Tag: NetHack-3.6.1_RC01~839 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65b9429b602ea20b5d1fd9577e4fa0a76ecf3001;p=nethack fix #H4296 - grease no checked for passive damage 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. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 4c72bf86d..0592a4637 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/uhitm.c b/src/uhitm.c index 48a16883f..4512006dc 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -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: