]> granicus.if.org Git - nethack/commitdiff
crystal balls and space key
authornethack.allison <nethack.allison>
Sun, 19 Oct 2003 19:49:43 +0000 (19:49 +0000)
committernethack.allison <nethack.allison>
Sun, 19 Oct 2003 19:49:43 +0000 (19:49 +0000)
Another buglist entry.

<Someone> 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()

doc/fixes34.3
src/detect.c

index 31f4bdb1cc32742f0c963b7e7a17a104ec73cd74..6b80d81e37efeae2b1ec5e0459981bcea6e3f5e7 100644 (file)
@@ -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
index ed73dab338c485e3c920d2bcf9441694d12abaa0..7be5fa66219e1e16363c2ae321e3665e85ec8c85 100644 (file)
@@ -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;
     }