-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.51 $ $NHDT-Date: 1578252630 2020/01/05 19:30:30 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.52 $ $NHDT-Date: 1578258722 2020/01/05 21:12:02 $
General Fixes and Modified Features
-----------------------------------
replace "money" in in-game texts with "gold"
when hallucinating, see hallucinated currencies instead of bits for an ale
applying a spellbook hints about read charges left
+wizard mode wishing for level topology can now create hidden doors (ask for
+ "secret door" when at a door or wall location) and hidden corridor
+ spots ("secret corridor" at a corridor location)
Platform- and/or Interface-Specific New Features
-/* NetHack 3.6 rm.h $NHDT-Date: 1573943499 2019/11/16 22:31:39 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.66 $ */
+/* NetHack 3.6 rm.h $NHDT-Date: 1578258722 2020/01/05 21:12:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.77 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
#define SYMHANDLING(ht) (g.symset[g.currentgraphics].handling == (ht))
/*
- * The 5 possible states of doors
+ * Note: secret doors (SDOOR) want to use both rm.doormask and
+ * rm.wall_info but those both overload rm.flags. SDOOR only
+ * has 2 states (closed or locked). However, it can't specify
+ * D_CLOSED due to that conflicting with WM_MASK (below). When
+ * a secret door is revealed, the door gets set to D_CLOSED iff
+ * it isn't set to D_LOCKED (see cvt_sdoor_to_door() in detect.c).
+ *
+ * D_TRAPPED conflicts with W_NONDIGGABLE but the latter is not
+ * expected to be used on door locations.
*/
+/*
+ * The 5 possible states of doors.
+ */
#define D_NODOOR 0
#define D_BROKEN 1
#define D_ISOPEN 2
-/* NetHack 3.7 objnam.c $NHDT-Date: 1578190895 2020/01/05 02:21:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.279 $ */
+/* NetHack 3.7 objnam.c $NHDT-Date: 1578258724 2020/01/05 21:12:04 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.280 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
wiztrap:
if (wizard && !g.program_state.wizkit_wishing) {
struct rm *lev;
- boolean madeterrain = FALSE;
+ boolean madeterrain = FALSE, badterrain = FALSE;
int trap, x = u.ux, y = u.uy;
for (trap = NO_TRAP + 1; trap < TRAPNUM; trap++) {
lev->typ = IRONBARS;
pline("Iron bars.");
madeterrain = TRUE;
+ } else if (!BSTRCMPI(bp, p - 11, "secret door")) {
+ if (lev->typ == DOOR
+ || (IS_WALL(lev->typ) && lev->typ != DBWALL)) {
+ lev->typ = SDOOR;
+ lev->wall_info = 0;
+ /* lev->horizontal stays as-is */
+ /* no special handling for rogue level is necessary;
+ exposing a secret door there yields a doorless doorway */
+#if 0 /*
+ * Can't do this; secret doors want both doormask and
+ * wall_info but those both overload rm.flags which makes
+ * D_CLOSED conflict with WM_MASK. However, converting
+ * secret door to regular door sets D_CLOSED iff D_LOCKED
+ * isn't specified so the alternate code suffices.
+ */
+ lev->doormask = locked ? D_LOCKED : D_CLOSED;
+#else
+ /* cvt_sdoor_to_door() will change D_NODOOR to D_CLOSED */
+ lev->doormask = locked ? D_LOCKED : D_NODOOR;
+#endif
+ if (trapped)
+ lev->doormask |= D_TRAPPED;
+ block_point(x, y);
+ pline("Secret door.");
+ madeterrain = TRUE;
+ } else {
+ pline("Secret door requires door or wall location.");
+ badterrain = TRUE;
+ }
+ } else if (!BSTRCMPI(bp, p - 15, "secret corridor")) {
+ if (lev->typ == CORR) {
+ lev->typ = SCORR;
+ block_point(x, y);
+ pline("Secret corridor.");
+ madeterrain = TRUE;
+ } else {
+ pline("Secret corridor requires corridor location.");
+ badterrain = TRUE;
+ }
}
if (madeterrain) {
&& !is_lava(u.ux, u.uy)) {
reset_utrap(FALSE);
}
+ }
+ if (madeterrain || badterrain) {
/* cast 'const' away; caller won't modify this */
return (struct obj *) &cg.zeroobj;
}