mapped, but entry there is a secret door rather than a drawbridge
sortloot changed to group holy water and unholy water with water instead of
placing them among the h- and u-named items
+digging down on a grave converted the terrain to floor but did not create a
+ pit and uncover the grave's contents; digging again--on floor--did
post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp
post-3.6.0: more sortloot revisions
-/* NetHack 3.6 trap.c $NHDT-Date: 1461090580 2016/04/19 18:29:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.266 $ */
+/* NetHack 3.6 trap.c $NHDT-Date: 1461568321 2016/04/25 07:12:01 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.268 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
struct trap *
maketrap(x, y, typ)
-register int x, y, typ;
+int x, y, typ;
{
static union vlaunchinfo zero_vl;
- register struct trap *ttmp;
- register struct rm *lev;
boolean oldplace;
+ struct trap *ttmp;
+ struct rm *lev = &levl[x][y];
if ((ttmp = t_at(x, y)) != 0) {
if (ttmp->ttyp == MAGIC_PORTAL || ttmp->ttyp == VIBRATING_SQUARE)
&& typ != SPIKED_PIT)))
u.utrap = 0;
/* old <tx,ty> remain valid */
- } else if (IS_FURNITURE(levl[x][y].typ)) {
+ } else if (IS_FURNITURE(lev->typ)
+ && (!IS_GRAVE(lev->typ) || (typ != PIT && typ != HOLE))) {
/* no trap on top of furniture (caller usually screens the
location to inhibit this, but wizard mode wishing doesn't) */
return (struct trap *) 0;
/*FALLTHRU*/
case HOLE:
case TRAPDOOR:
- lev = &levl[x][y];
if (*in_rooms(x, y, SHOPBASE)
&& (typ == HOLE || typ == TRAPDOOR
|| IS_DOOR(lev->typ) || IS_WALL(lev->typ)))