]> granicus.if.org Git - nethack/commitdiff
shopkeeper/priest movement
authornethack.rankin <nethack.rankin>
Sun, 7 Jan 2007 05:11:09 +0000 (05:11 +0000)
committernethack.rankin <nethack.rankin>
Sun, 7 Jan 2007 05:11:09 +0000 (05:11 +0000)
     From a bug report:  shopkeeper
wouldn't move to block his doorway if there was a grave at that location.
Nothing supernatural; shopkeeper and temple priest movement was too
specific about what sort of terrain might be present and didn't know that
room floor might be replaced by a grave.

doc/fixes34.4
src/priest.c

index f394ad44d41314594f4b79c14da04fe87764d16f..38e4f5b8549ed48dd5ef93a58c121a2bba8bcac6 100644 (file)
@@ -292,6 +292,7 @@ monster killed in midst of multi-shot volley throwing/shooting might cause
        freed memory to be accessed, potentially triggering a crash
 can't arm bear traps or land mines on Planes of Air or Water
 statues that "come to life" when trap activates shouldn't start out sleeping
+shopkeepers and priests wouldn't step on graves put in their rooms by bones
 
 
 Platform- and/or Interface-Specific Fixes
index 1e60d104d6f21177f8ba940f7f1e8199d3add18d..09ed521c937e7b35503f02c8ecf7cf2e34e69700 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)priest.c   3.5     2006/12/27      */
+/*     SCCS Id: @(#)priest.c   3.5     2007/01/06      */
 /* Copyright (c) Izchak Miller, Steve Linhart, 1989.             */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -87,9 +87,7 @@ pick_move:
        for(i=0; i<cnt; i++) {
                nx = poss[i].x;
                ny = poss[i].y;
-               if(levl[nx][ny].typ == ROOM ||
-                       (mtmp->ispriest &&
-                           levl[nx][ny].typ == ALTAR) ||
+               if (IS_ROOM(levl[nx][ny].typ) ||
                        (mtmp->isshk &&
                            (!in_his_shop || ESHK(mtmp)->following))) {
                    if(avoid && (info[i] & NOTONL))