Skip to content

Commit

Permalink
don't reveal surface when Blind and levitating
Browse files Browse the repository at this point in the history
<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.
  • Loading branch information
nethack.allison committed Apr 11, 2006
1 parent 51d60d9 commit cc31b25
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/hack.c
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down Expand Up @@ -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;
Expand Down
10 changes: 7 additions & 3 deletions src/invent.c
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit cc31b25

Please sign in to comment.