]> granicus.if.org Git - nethack/commitdiff
Don't push unknown boulders when moving
authorPasi Kallinen <paxed@alt.org>
Sat, 5 Feb 2022 09:30:31 +0000 (11:30 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 5 Feb 2022 09:30:35 +0000 (11:30 +0200)
If you're blind and there's a boulder you don't know about,
don't automatically push it. Instead, give a message and show
the boulder on the map.

doc/fixes3-7-0.txt
src/hack.c

index a10ff63387db2d4b67702c33e6968b50a6ef0371..9ccb108562b2bf8832f0d4e7dc42182c140bb904 100644 (file)
@@ -766,6 +766,7 @@ stinking gas clouds block line-of-sight
 covetous monsters will teleport to downstairs or upstairs to heal
 have fake player monsters use verbalize instead of pline when reacting to chat
 fix mention_walls distinguishing unseen walls from solid stone
+don't push unknown boulders when moving
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 1e07ade0b77edfe2b1a11fc5d4cf784408db7e8c..dacb8d88999ddc3c48b0abfaf9f818c079b6e1a6 100644 (file)
@@ -133,6 +133,14 @@ moverock(void)
 
     sx = u.ux + u.dx, sy = u.uy + u.dy; /* boulder starting position */
     while ((otmp = sobj_at(BOULDER, sx, sy)) != 0) {
+
+        if (Blind && glyph_to_obj(glyph_at(sx, sy)) != BOULDER) {
+            pline("That feels like a boulder.");
+            map_object(otmp, TRUE);
+            nomul(0);
+            return -1;
+        }
+
         /* when otmp->next_boulder is 1, xname() will format it as
            "next boulder" instead of just "boulder"; affects
            boulder_hits_pool()'s messages as well as messages below */