fix #H239 - doppleganger/mimic bug
From a bug report: a shapechanger
which becomes a mimic would always stay as 'm' rather than take on object
or furniture shape. Same applied to monsters which hide in other ways.
The code did that deliberately, but I don't think that it's actually
necessary so this lets them mimic/hide when they're in the right shape.
If they change form to non-mimic/hider while concealed, concealment ends.
It would be fun to have shapechangers-as-mimics actually change their
mimicked shapes periodically, but this doesn't do that. They'd probably
change to non-mimic quicker than they'd mimic something else so it's not
worth the effort.
This commit is contained in:
@@ -311,6 +311,7 @@ fireproof, non-rustable weapon would be revealed as fireproof by hitting a
|
|||||||
rust-causing target; ditto for fixed crysknife
|
rust-causing target; ditto for fixed crysknife
|
||||||
surviving choking while eating various foods (cockatrice egg, fortune cookie,
|
surviving choking while eating various foods (cockatrice egg, fortune cookie,
|
||||||
wolfsbane, others) didn't carry through to those foods' side-effects
|
wolfsbane, others) didn't carry through to those foods' side-effects
|
||||||
|
shapechangers who take on mimic or hider form will mimic or hide when feasible
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)mon.c 3.5 2007/01/12 */
|
/* SCCS Id: @(#)mon.c 3.5 2007/02/08 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2395,7 +2395,7 @@ register struct monst *mtmp;
|
|||||||
{
|
{
|
||||||
struct trap *t;
|
struct trap *t;
|
||||||
|
|
||||||
if((mtmp->cham >= LOW_PM) || mtmp->mcan || mtmp->m_ap_type ||
|
if (mtmp->mcan || mtmp->m_ap_type ||
|
||||||
cansee(mtmp->mx, mtmp->my) || rn2(3) || (mtmp == u.ustuck) ||
|
cansee(mtmp->mx, mtmp->my) || rn2(3) || (mtmp == u.ustuck) ||
|
||||||
/* can't hide while trapped except in pits */
|
/* can't hide while trapped except in pits */
|
||||||
(mtmp->mtrapped && (t = t_at(mtmp->mx, mtmp->my)) != 0 &&
|
(mtmp->mtrapped && (t = t_at(mtmp->mx, mtmp->my)) != 0 &&
|
||||||
@@ -2646,6 +2646,8 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
|||||||
wormgone(mtmp);
|
wormgone(mtmp);
|
||||||
place_monster(mtmp, mtmp->mx, mtmp->my);
|
place_monster(mtmp, mtmp->mx, mtmp->my);
|
||||||
}
|
}
|
||||||
|
if (mtmp->m_ap_type && mdat->mlet != S_MIMIC)
|
||||||
|
seemimic(mtmp); /* revert to normal monster */
|
||||||
|
|
||||||
/* (this code used to try to adjust the monster's health based on
|
/* (this code used to try to adjust the monster's health based on
|
||||||
a normal one of its type but there are too many special cases
|
a normal one of its type but there are too many special cases
|
||||||
|
|||||||
Reference in New Issue
Block a user