]> granicus.if.org Git - nethack/commitdiff
Monsters shouldn't use wands of digging in Sokoban
authorkmhugo <kmhugo>
Fri, 18 Jan 2002 17:17:05 +0000 (17:17 +0000)
committerkmhugo <kmhugo>
Fri, 18 Jan 2002 17:17:05 +0000 (17:17 +0000)
A number of players have complained that Sokoban can be rendered
unsolvable without "creative nethacking" when monsters zap wands of
digging.  This patch prevents monsters from selecting wands of
digging in Sokoban.

Note that we can't simply make Sokoban HARDFLOOR, as that causes
problems with the hole generation code.

doc/fixes33.2
src/muse.c

index 431a8411738cf995831f65504cbabcbc4c562d4f..15873265d9f3dd1a313c8fa064474f22696566a4 100644 (file)
@@ -394,6 +394,7 @@ golden glow when praying will recover lost level if blessed full healing could
 gaining a level while polymorphed increases current monst hit points as well
        as latent human (or whatever) hit points
 pets should not try to go after food that they can't reach
+monsters shouldn't use wands of digging in Sokoban
 
 
 Platform- and/or Interface-Specific Fixes
index 1ca7f0d277edd1801103d3407db39ea67e01f3b3..81f4209ea811c8926c73c54ce2157701dbd281d9 100644 (file)
@@ -433,6 +433,8 @@ struct monst *mtmp;
                if (obj->otyp == WAN_DIGGING && obj->spe > 0 && !stuck && !t
                    && !mtmp->isshk && !mtmp->isgd && !mtmp->ispriest
                    && !is_floater(mtmp->data)
+                   /* monsters digging in Sokoban can ruin things */
+                   && !In_sokoban(&u.uz)
                    /* digging wouldn't be effective; assume they know that */
                    && !(levl[x][y].wall_info & W_NONDIGGABLE)
                    && !(Is_botlevel(&u.uz) || In_endgame(&u.uz))