From: Pasi Kallinen Date: Sat, 5 Feb 2022 09:30:31 +0000 (+0200) Subject: Don't push unknown boulders when moving X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20054551f92736bf4f4c14deff92a70db17fe836;p=nethack Don't push unknown boulders when moving 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. --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index a10ff6338..9ccb10856 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/hack.c b/src/hack.c index 1e07ade0b..dacb8d889 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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 */