From a2257ebb1a0eac8fb668293265b994d827f240c9 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Sun, 22 Feb 2009 01:37:09 +0000 Subject: [PATCH] mimics as doors on rogue level From a bug report.5 years ago? and again today: mimics appear on the rogue level even though they're lowercase letter monsters. notes that during level generation, mimics pretending to be closed doors are sometimes substituted for trapped actual doors. That should be avoided on the rogue level both because its doorways are always empty (enforced after the fact in extralev.c code rather than in the door making code) and because mimics aren't uppercase letter monsters (so should only ever appear there if they've travelled from another level). --- doc/fixes34.4 | 1 + src/mklev.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 8587de8d0..63f635b9e 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -156,6 +156,7 @@ some messages which referred to "mirror" ought to have used "looking glass" incubi react to mirrors alignment of Angels was handled inconsistently pets capable of digging could pass through walls and stone on the Rogue level +don't generate mimics pretending to be closed doors when making Rogue level avoid inappropriate "the corridor disappears" when vault guard gets killed avoid inappropriate "the guard calms down" if vault guard's magic corridor reaches a spot where gold is embedded in the rock diff --git a/src/mklev.c b/src/mklev.c index a363c4295..b91554660 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)mklev.c 3.5 2006/05/29 */ +/* SCCS Id: @(#)mklev.c 3.5 2009/02/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -400,6 +400,13 @@ register int type; #else levl[x][y].doormask = (shdoor ? D_ISOPEN : D_NODOOR); #endif + +#ifdef REINCARNATION + /* also done in roguecorr(); doing it here first prevents + making mimics in place of trapped doors on rogue level */ + if (Is_rogue_level(&u.uz)) levl[x][y].doormask = D_NODOOR; +#endif + if(levl[x][y].doormask & D_TRAPPED) { struct monst *mtmp;