fix SC343-9, bones handling for corpse/statue of unique monster (trunk only)

The logic in cant_revive() was a little off, so reviving a unique
corpse or statue on a bones level would recreate that unique monster instead
of making a doppelganger who's imitating it.  Fixing that was simple but had
the unintended side-effect of making it impossible to deliberately create
unique monsters with ^G in wizard mode.  So create_particular() has been
modified to let the user override the zombie or doppelganger conversion.
And then when not overriding, shapechangers took on random appearance, so
this also changes create_particular() to override shape changing.  And that
has the side-effect of making chameleons or vampires start out as themselves
instead of as random critters or bats/fog clouds.  [Better stop now! :-]

    resetobjs() also needed to have extra corpse handling when saving bones
because the fix for revival wouldn't prevent you from turning to stone by
eating apparent-Medusa's corpse.  Statues of uniques and corpses of special
humans like vault guards and shopkeepers didn't need anything extra; they
can retain original form until an attempt at revival is tried.

    I'm not going to try to adapt this for 3.4.4.
This commit is contained in:
nethack.rankin
2005-10-08 04:19:31 +00:00
parent 8c56042a0c
commit 8f8538e527
3 changed files with 37 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)bones.c 3.5 2004/12/17 */
/* SCCS Id: @(#)bones.c 3.5 2005/10/07 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
/* NetHack may be freely redistributed. See license for details. */
@@ -127,8 +127,18 @@ boolean restore;
vault guards in order to prevent corpse
revival or statue reanimation. */
if (otmp->oattached == OATTACHED_MONST &&
cant_revive(&mnum, FALSE, (struct obj *)0))
cant_revive(&mnum, FALSE, (struct obj *)0)) {
otmp->oattached = OATTACHED_NOTHING;
/* mnum is now either human_zombie or
doppelganger; for corpses of uniques,
we need to force the transformation
now rather than wait until a revival
attempt, otherwise eating this corpse
would behave as if it remains unique */
if (mnum == PM_DOPPELGANGER &&
otmp->otyp == CORPSE)
otmp->corpsenm = mnum;
}
} else if (otmp->otyp == AMULET_OF_YENDOR) {
/* no longer the real Amulet */
otmp->otyp = FAKE_AMULET_OF_YENDOR;