multiple iron bars fixes
Can't push boulders through iron bars; traps can't roll such through either; likewise for objects thrown by monsters. Thrown objects susceptible to breaking might do so when they hit iron bars. Assorted monsters can pass through iron bars; ditto for polymorphed character. Attempting to dig iron bars will wake nearby monsters instead of yielding "you swing your pick-axe through thin air". Autodig won't accept iron bars as candidate location.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)mon.c 3.4 2002/03/09 */
|
||||
/* SCCS Id: @(#)mon.c 3.4 2002/04/06 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -963,8 +963,7 @@ nexttry: /* eels prefer the water, but if there is no water nearby,
|
||||
!((flag & ALLOW_WALL) && may_passwall(nx,ny)) &&
|
||||
!((flag & ALLOW_DIG) && may_dig(nx,ny))) continue;
|
||||
/* KMH -- Added iron bars */
|
||||
if (ntyp == IRONBARS &&
|
||||
!((flag & ALLOW_WALL) && may_passwall(nx,ny))) continue;
|
||||
if (ntyp == IRONBARS && !(flag & ALLOW_BARS)) continue;
|
||||
if(IS_DOOR(ntyp) && !amorphous(mdat) &&
|
||||
((levl[nx][ny].doormask & D_CLOSED && !(flag & OPENDOOR)) ||
|
||||
(levl[nx][ny].doormask & D_LOCKED && !(flag & UNLOCKDOOR))
|
||||
|
||||
Reference in New Issue
Block a user