U917 - floating above unknown stairs

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.
This commit is contained in:
cohrs
2004-05-21 21:20:16 +00:00
parent 3283bcdb8b
commit 0414c09c7a
2 changed files with 13 additions and 0 deletions
+1
View 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 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 when a giant carrying a boulder dies in a pit, ensure that the corpse is
buried under the filled pit 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 Platform- and/or Interface-Specific Fixes
+12
View File
@@ -770,6 +770,18 @@ dodown()
if (float_down(I_SPECIAL|TIMEOUT, W_ARTI)) if (float_down(I_SPECIAL|TIMEOUT, W_ARTI))
return (1); /* came down, so moved */ 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 ? floating_above(stairs_down ? "stairs" : ladder_down ?
"ladder" : surface(u.ux, u.uy)); "ladder" : surface(u.ux, u.uy));
return (0); /* didn't move */ return (0); /* didn't move */