]> granicus.if.org Git - nethack/commitdiff
don't reveal surface when Blind and levitating
authornethack.allison <nethack.allison>
Tue, 11 Apr 2006 02:00:38 +0000 (02:00 +0000)
committernethack.allison <nethack.allison>
Tue, 11 Apr 2006 02:00:38 +0000 (02:00 +0000)
<email deleted> wrote the following on April 10, 2006:
> When blind and levitating, you can produce a message - "You try to feel what
> is lying here on the ice. But you can't reach it!" - which reveals too much
> about the terrain below you.

doc/fixes34.4
src/hack.c
src/invent.c

index 47e0d69806d2e4d011694a3f223d007ccfcc0fa9..c6958f75416ebd91d947a149bd837eb2986802a0 100644 (file)
@@ -204,6 +204,7 @@ cancelled nurses shouldn't say "Relax, this won't hurt a bit"
 check for hero location in digactualhole() before clearing u.utrap
 clear any pits that the hero digs in the vault guard's temporary corridor
 shattering a monster's weapon didn't work as intended for stack of N>1
+don't reveal surface information that you can neither feel or see
 
 
 Platform- and/or Interface-Specific Fixes
index 93f83ef5ee0ec616b734d9d8dd5305ecc17ff061..37097eb86e82970749d26c005b2b74082836228f 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)hack.c     3.5     2006/02/22      */
+/*     SCCS Id: @(#)hack.c     3.5     2006/04/10      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1967,6 +1967,8 @@ dopickup()
            else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
                rider_cant_reach();
 #endif
+           else if (Blind && !can_reach_floor(TRUE))
+               You("cannot reach anything here.");
            else
                You("cannot reach the %s.", surface(u.ux,u.uy));
            return 0;
index f613f93c58395595b97a4b1e3358ee0d02932489..bae65c6fd6e9dc9da34f3d65f23cf458ebbf6c4f 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)invent.c   3.5     2006/02/15      */
+/*     SCCS Id: @(#)invent.c   3.5     2006/04/10      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -2269,9 +2269,13 @@ boolean picked_some;
                    /* don't say "altar" twice, dfeature has more info */
                    You("try to feel what is here.");
                } else {
+                   const char *where = (Blind && !can_reach_floor(TRUE)) ?
+                                     "lying beneath you" : "lying here on the ",
+                             *onwhat = (Blind && !can_reach_floor(TRUE)) ?
+                                       "" : surface(u.ux,u.uy);
                    You("try to feel what is %s%s.",
-                       drift ? "floating here" : "lying here on the ",
-                       drift ? ""              : surface(u.ux, u.uy));
+                       drift ? "floating here" : where,
+                       drift ? ""              : onwhat);
                }
                if (dfeature && !drift && !strcmp(dfeature, surface(u.ux,u.uy)))
                        dfeature = 0;           /* ice already identifed */