From 97974e99681776f62982e91551e77ff7a53ba196 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 18 Dec 2015 18:24:13 -0500 Subject: [PATCH] make corpse visible if stethoscope told you about it Bug bz14, no web id. Steps to reproduce: - have a stethoscope handy. - place an amulet in a doorway and move one square outside the room's door. - create and lead an invisible stalker to be on top of amulet, with you just outside the room beside the door square. - zap the stalker asleep with a wand of sleep. - put on a blindfold. - quaff a potion of object detection. - amulet shows in the doorway. - save the game and keep the savefile for ease of returning to this point. Bug 1 observed (remember that you're blind due to blindfold): - zap a wand of death at the stalker that you know to be on top of the amulet, but that the game gives no indication of. - if the stalker left a corpse, and you apply a stethoscope to the doorway, the game tells you that "You determine that that unfortunate being is dead" yet no being or corpse is displayed, still just the amulet. Fix that by calling map_object(corpse, TRUE) in its_dead() under these circumstances. The circumstances in the original report were also reproduced, specifically: If a stethoscope finds an unseen monster on a square with an object-detected object while blind, after killing the monster, the object isn't remembered. That remains unfixed because the I (invis monster glyph) aleady overwrote the detected object glyph, so it is a much tougher situation. --- src/apply.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/apply.c b/src/apply.c index 22cef7f5a..96c77386c 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 apply.c $NHDT-Date: 1446808436 2015/11/06 11:13:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.210 $ */ +/* NetHack 3.6 apply.c $NHDT-Date: 1450481050 2015/12/18 23:24:10 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.214 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -237,6 +237,13 @@ int rx, ry, *resp; } else if (corpse) { boolean here = (rx == u.ux && ry == u.uy), one = (corpse->quan == 1L && !more_corpses), reviver = FALSE; + int visglyph, corpseglyph; + + visglyph = glyph_at(rx, ry); + corpseglyph = obj_to_glyph(corpse); + + if (Blind && (visglyph != corpseglyph)) + map_object(corpse, TRUE); if (Role_if(PM_HEALER)) { /* ok to reset `corpse' here; we're done with it */ -- 2.40.0