From: nethack.allison Date: Sun, 19 Oct 2003 19:49:43 +0000 (+0000) Subject: crystal balls and space key X-Git-Tag: MOVE2GIT~1681 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b1313a93cc6ffaf3c0cca048166823aadc6b139;p=nethack crystal balls and space key Another buglist entry. wrote: - There appears to be no way to detect ghosts-and-shades; the space key just "Never mind"s. (Not that they'd be particularly visible on the resulting screen under ASCII, unless you've changed the 'monsters' option.) Allow space; display results in inverse using detected_mon_to_glyph() --- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index 31f4bdb1c..6b80d81e3 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -55,6 +55,9 @@ don't silently interrupt monster's hold on you if Levitation/Flying ends while over water you could specifiy '~' with crystal ball and have it try to detect monsters, but it never revealed anything; show the entire long worm now +allow a crystal ball to detect ghosts-and-shades via space key, and display + the results using detected_mon_to_glyph() so that they show up in + inverse video Platform- and/or Interface-Specific Fixes diff --git a/src/detect.c b/src/detect.c index ed73dab33..7be5fa662 100644 --- a/src/detect.c +++ b/src/detect.c @@ -600,7 +600,11 @@ int mclass; /* monster class, 0 for all */ if (!mclass || mtmp->data->mlet == mclass || (mtmp->data == &mons[PM_LONG_WORM] && mclass == S_WORM_TAIL)) if (mtmp->mx > 0) { - show_glyph(mtmp->mx,mtmp->my,mon_to_glyph(mtmp)); + if (mclass && def_monsyms[mclass] == ' ') + show_glyph(mtmp->mx,mtmp->my, + detected_mon_to_glyph(mtmp)); + else + show_glyph(mtmp->mx,mtmp->my,mon_to_glyph(mtmp)); /* don't be stingy - display entire worm */ if (mtmp->data == &mons[PM_LONG_WORM]) detect_wsegs(mtmp,0); } @@ -837,7 +841,8 @@ struct obj *obj; /* read a single character */ if (flags.verbose) You("may look for an object or monster symbol."); ch = yn_function("What do you look for?", (char *)0, '\0'); - if (index(quitchars,ch)) { + /* Don't filter out ' ' here; it has a use */ + if ((ch != def_monsyms[S_GHOST]) && index(quitchars,ch)) { if (flags.verbose) pline(Never_mind); return; }