From cdc067738348e93a56ebbfd90c7d3e0197970b78 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Wed, 24 Jul 2002 06:13:29 +0000 Subject: [PATCH] ending hallucination while blind Don't suppress hallucination on/off messages when blind. This fixes the case where you might be observing hallucinatory monsters via telepathy yet not be told that perception was back to normal when hallucination timed out. It does not fix the case where temporary hallucination times out while the effect is being blocked (in which case successful application of a unicorn horn yields no feedback), nor the hypothetical cases where timed hallucination starts or ends while also hallucinating for some other reason (which could happen via polymorph someday if a monster which is always hallucinating--the way that bats are always stunned--ever gets introduced). --- doc/fixes34.1 | 1 + src/potion.c | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 02ee19e3d..19c820b66 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -169,6 +169,7 @@ order of container and objects was different for mazelike and roomfilled levels minetown guards only enforce town rules inside the town proper electric damage heals hero polymorphed into flesh golem rather than iron golem fix bug preventing wishing for bear traps (not beartrap objects) in debug mode +be notified about cessation of hallucinations even if blind and the time Platform- and/or Interface-Specific Fixes diff --git a/src/potion.c b/src/potion.c index 2a79d856e..fdfac8b42 100644 --- a/src/potion.c +++ b/src/potion.c @@ -246,16 +246,11 @@ boolean talk; long mask; /* nonzero if resistance status should change by mask */ { boolean changed = 0; -#ifdef LINT - const char *message = 0; -#else - const char *message; -#endif + const char *message, *verb; - if (!xtime) - message = "Everything looks SO boring now."; - else - message = "Oh wow! Everything seems so cosmic!"; + message = (!xtime) ? "Everything %s SO boring now." : + "Oh wow! Everything %s so cosmic!"; + verb = (!Blind) ? "looks" : "feels"; if (mask) { if (HHallucination) changed = TRUE; @@ -283,7 +278,7 @@ long mask; /* nonzero if resistance status should change by mask */ update_inventory(); flags.botl = 1; - if (!Blind && talk) pline(message); + if (talk) pline(message, verb); } }