Monsters shouldn't use wands of digging in Sokoban

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.
This commit is contained in:
kmhugo
2002-01-18 17:17:05 +00:00
parent 03725e80b3
commit f5c0809aff
2 changed files with 3 additions and 0 deletions

View 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))