]> granicus.if.org Git - nethack/commitdiff
U917 - floating above unknown stairs
authorcohrs <cohrs>
Fri, 21 May 2004 21:20:16 +0000 (21:20 +0000)
committercohrs <cohrs>
Fri, 21 May 2004 21:20:16 +0000 (21:20 +0000)
Attempting to go > while blind and floating over unknown stairs/ladder
would refer to the stairs in the "high above" message (however, the
stairs/ladder remained unidentified on the map).  Change this case so
it only refers to stairs/ladder if that's what the hero remembers on the map.

doc/fixes35.0
src/do.c

index 4e5255888f442de98bf06346fbfec9cae3567104..106aeae163e2b76b96cf81256451e078def51c30 100644 (file)
@@ -64,6 +64,7 @@ keep score from wrapping around and becoming negative by capping it
 kicked objects do not slide when on the air or water levels
 when a giant carrying a boulder dies in a pit, ensure that the corpse is
        buried under the filled pit
+when blind and levitating > shouldn't say "stairs" if player has not seen them
 
 
 Platform- and/or Interface-Specific Fixes
index 9bb52b0edb366e0171e60ad1e256ca733dab9bcb..3f379e49fe3d77443067806aa34fafa4c0f8a005 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -770,6 +770,18 @@ dodown()
                if (float_down(I_SPECIAL|TIMEOUT, W_ARTI))
                    return (1);   /* came down, so moved */
            }
+           if (Blind) {
+               /* Avoid alerting player to an unknown stair or ladder.
+                * Changes the message for a covered, known staircase
+                * too; staircase knowledge is not stored anywhere.
+                */
+               if (stairs_down)
+                   stairs_down =
+                       (glyph_to_cmap(levl[u.ux][u.uy].glyph) == S_dnstair);
+               else if (ladder_down)
+                   ladder_down =
+                       (glyph_to_cmap(levl[u.ux][u.uy].glyph) == S_dnladder);
+           }
            floating_above(stairs_down ? "stairs" : ladder_down ?
                           "ladder" : surface(u.ux, u.uy));
            return (0);   /* didn't move */