From c2d510a3f23015ee1dd154c30a7a4b3676b8c00d Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 23 Sep 2004 02:39:35 +0000 Subject: [PATCH] fix #U1150 - burning armor with oil Objects which were destroyed by dipping them into lit potions of oil didn't get unworn or unwielded in cases where that was needed. This left a stale pointer which could result in various strange things (user saw it be formatted as "glorkum" but that isn't guaranteed) and there was no update of any attributes or intrinsics conferred by the item, so persistent levitation or water walking or dexterity boost could occur. --- doc/fixes34.4 | 2 ++ src/potion.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 76480e468..13bbef38d 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -52,6 +52,8 @@ killing a pet by displacing it into a trap now yields experience prevent a rolling boulder that is in motion from vanishing in bones files ensure that a sleeping steed doesn't answer a #chat eliminate two very minor anomalies when using Luck to adjust random numbers +destroying a worn item via dipping in burning oil would not unwear/unwield + the item properly, possibly leading to various strange behaviors Platform- and/or Interface-Specific Fixes diff --git a/src/potion.c b/src/potion.c index a25f19501..1384267de 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)potion.c 3.4 2004/06/28 */ +/* SCCS Id: @(#)potion.c 3.4 2004/09/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1896,10 +1896,12 @@ dodip() } else { if ((omat == PLASTIC || omat == PAPER) && !obj->oartifact) obj->oeroded = MAX_ERODE; - pline_The("burning oil %s %s.", + pline_The("burning oil %s %s%c", obj->oeroded == MAX_ERODE ? "destroys" : "damages", - yname(obj)); + yname(obj), + obj->oeroded == MAX_ERODE ? '!' : '.'); if (obj->oeroded == MAX_ERODE) { + if (obj->owornmask) remove_worn_item(obj, TRUE); obj_extract_self(obj); obfree(obj, (struct obj *)0); obj = (struct obj *) 0; -- 2.40.0