]> granicus.if.org Git - nethack/commitdiff
do_look at warning co-located with boulder
authornethack.allison <nethack.allison>
Sun, 14 Jul 2002 15:59:04 +0000 (15:59 +0000)
committernethack.allison <nethack.allison>
Sun, 14 Jul 2002 15:59:04 +0000 (15:59 +0000)
This does not fix a reported bug where you
can't attack a hidden creature that is
co-located with a boulder, but it might
assist the player in understanding what is
going on.

src/pager.c

index 1d794754d517aabcd1546d16ff0060dd6d37a974..9d1f6b8a252bb2608f9ae08824c777d3f9199858 100644 (file)
@@ -642,6 +642,10 @@ do_look(quick)
                } else {
                        found += append_str(out_str, def_warnsyms[i].explanation);
                }
+               /* Kludge: warning trumps boulders on the display.
+                  Reveal the boulder too or player can get confused */
+               if (sobj_at(BOULDER, cc.x, cc.y))
+                       Strcat(out_str, " co-located with a boulder");
                break;  /* out of for loop*/
            }
        }