From ea18afa4dd9875d1ea111ea8a2757ed73890c575 Mon Sep 17 00:00:00 2001 From: cohrs Date: Wed, 27 Mar 2002 00:58:44 +0000 Subject: [PATCH] seemimic produces transparent doors - if a mimic mimics a boulder (top sokoban) or a door atop a closed door the closed door didn't block your vision after the mimic is sensed. - also, make mondied consistent with xkilled WRT corpses on inaccessible locations: no corpse --- doc/fixes34.1 | 3 +++ src/mon.c | 22 ++++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 26800ebaf..d2a45197f 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -18,6 +18,9 @@ print regular death message when leashed, mounted steed dies of starvation fix more funny messages, new and old restore the behavior of bumping into closed doors when moving while impaired fix iron ball cases that could put the chain in solid rock +discovering a mimic on a closed door location should not unblock the location +don't drop corpse when a monster kills another monster on an inaccessible + location (i.e. behave like xkilled behaves) Platform- and/or Interface-Specific Fixes diff --git a/src/mon.c b/src/mon.c index 816370e6b..a213006fd 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1473,7 +1473,8 @@ register struct monst *mdef; mondead(mdef); if (mdef->mhp > 0) return; /* lifesaved */ - if (corpse_chance(mdef, (struct monst *)0, FALSE)) + if (corpse_chance(mdef, (struct monst *)0, FALSE) && + (accessible(mdef->mx, mdef->my) || is_pool(mdef->mx, mdef->my))) (void) make_corpse(mdef); } @@ -2061,16 +2062,21 @@ void seemimic(mtmp) register struct monst *mtmp; { - /* - * Discovered mimics don't block light. - */ - if ((mtmp->m_ap_type == M_AP_FURNITURE && - (mtmp->mappearance==S_hcdoor || mtmp->mappearance==S_vcdoor))|| - (mtmp->m_ap_type == M_AP_OBJECT && mtmp->mappearance == BOULDER)) - unblock_point(mtmp->mx,mtmp->my); + unsigned old_app = mtmp->mappearance; + uchar old_ap_type = mtmp->m_ap_type; mtmp->m_ap_type = M_AP_NOTHING; mtmp->mappearance = 0; + + /* + * Discovered mimics don't block light. + */ + if (((old_ap_type == M_AP_FURNITURE && + (old_app == S_hcdoor || old_app == S_vcdoor)) || + (old_ap_type == M_AP_OBJECT && old_app == BOULDER)) && + !does_block(mtmp->mx, mtmp->my, &levl[mtmp->mx][mtmp->my])) + unblock_point(mtmp->mx, mtmp->my); + newsym(mtmp->mx,mtmp->my); }