-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.376 $ $NHDT-Date: 1607252278 2020/12/06 10:57:58 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.377 $ $NHDT-Date: 1607373999 2020/12/07 20:46:39 $
General Fixes and Modified Features
-----------------------------------
the compound options; on OSX they showed a description of "(null)"
but for other sprintf implementations they might cause a crash
change name of #wizlevelflip to #wizfliplevel
+dwarves could sometimes pass through walls without digging their way
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
-/* NetHack 3.7 dogmove.c $NHDT-Date: 1596498159 2020/08/03 23:42:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.91 $ */
+/* NetHack 3.7 dogmove.c $NHDT-Date: 1607374000 2020/12/07 20:46:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.94 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
if (dist2(i, j, fx, fy) >= dist)
continue;
if (IS_ROCK(levl[i][j].typ) && !passes_walls(mon->data)
- && (!may_dig(i, j) || !tunnels(mon->data)))
+ && (!may_dig(i, j) || !tunnels(mon->data)
+ /* tunnelling monsters can't do that on the rogue level */
+ || Is_rogue_level(&u.uz)))
continue;
if (IS_DOOR(levl[i][j].typ)
&& (levl[i][j].doormask & (D_CLOSED | D_LOCKED)))
-/* NetHack 3.7 mon.c $NHDT-Date: 1606623308 2020/11/29 04:15:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.357 $ */
+/* NetHack 3.7 mon.c $NHDT-Date: 1607374002 2020/12/07 20:46:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.359 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
boolean can_unlock = ((can_open && monhaskey(mtmp, TRUE))
|| mtmp->iswiz || is_rider(mtmp->data));
boolean doorbuster = is_giant(mtmp->data);
+ /* don't tunnel if on rogue level or if hostile and close enough
+ to prefer a weapon; same criteria as in m_move() */
+ boolean can_tunnel = (tunnels(mtmp->data) && !Is_rogue_level(&u.uz));
+
+ if (can_tunnel && needspick(mtmp->data)
+ && ((!mtmp->mpeaceful || Conflict)
+ && dist2(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) <= 8))
+ can_tunnel = FALSE;
if (mtmp->mtame)
allowflags |= ALLOW_M | ALLOW_TRAPS | ALLOW_SANCT | ALLOW_SSM;
allowflags |= (ALLOW_ROCK | ALLOW_WALL);
if (throws_rocks(mtmp->data))
allowflags |= ALLOW_ROCK;
- if (tunnels(mtmp->data)
- && !Is_rogue_level(&u.uz)) /* same restriction as m_move() */
+ if (can_tunnel)
allowflags |= ALLOW_DIG;
if (doorbuster)
allowflags |= BUSTDOOR;