]> granicus.if.org Git - nethack/commit
corpse revival and statue animation (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 30 Nov 2003 21:19:01 +0000 (21:19 +0000)
committernethack.rankin <nethack.rankin>
Sun, 30 Nov 2003 21:19:01 +0000 (21:19 +0000)
commitfbfb8e92abd9aa4e2420e5b24bb77eeddb926bc7
tree8c2872e8c5e21bd1444dc440ed679cd648def7d8
parentd6bf777e63028a866b34d6b9ce04601ccc7c8249
corpse revival and statue animation (trunk only)

     Try to address the problem From a bug report:  turning the Wizard
of Yendor to stone preserves monster information with his statue and
presence of that information overrides the statue animation check
intended to prevent players from creating the Wizard (or other unique
monsters).  That's ok for the current game--the monster had to have been
in play in order to be turned to stone--but is a problem if the statue
is found in a bones file.  The report was for placing such a statue at
the location of an untriggered statue trap by a player who leaves bones,
but stone-to-flesh by the player who loads bones is a simpler way to
trigger this.  (Aside from getting unique monsters earlier than usual
under some degree of player control they won't have their starting
inventory so special items like the Candelabrum might not get created.)
Using undead turning to revive corpses found in bones was another way to
get into the same trouble (I thought corpses of special monsters were
already excluded from bones?).

     It looks like it's also possible to get strange quest behavior if
a corpse or statue of the leader or nemesis is brought into the dungeon,
left in bones, then revived by the second player, but I didn't attempt
to reproduce it.  More work is probably needed; this tightens up leader
handling a bit but doesn't do anything about the nemesis.  This patch
has already been spreading tentacles and I've got to cut it off....

     The patch discards saved monster traits for corpses and statues of
unique monsters while saving bones; reviving or reanimating them will
produce doppelgangers instead of the original monsters, same as stone-to-
flesh on wished-for statues behaves.  It also discards saved traits for
shopkeepers (also temple priests and vault guards--their traits weren't
saved in 3.4.2 though).  That info might be useable when the corpse or
statue is on the same level as the monster started (ie, where its special
room is located), but that's a complication I'm going to bypass.  This
patch also adds chameleon handling for statue activation--it wouldn't
have mattered in 3.4.2 since shapechangers didn't get their traits saved;
it does matter now but was omitted when trait-saving was extended to all
statues a while back.  (It adds chameleon handling to corpse revival too,
but they still don't get their traits saved with corpses so that's just
protection in case of future modifications.)

     Other bits:  `cant_create()' is renamed to `cant_revive()' since
the latter is a more signicant use than wizard mode <ctrl/G> handling.
Now save traits with nymph corses so that cancellation can be propagated
if they're revived; that doesn't matter much but matches statue handling
(where it was more important since it dealt with succubi as well as with
nymphs).  Explicitly initialize the shape-changer field of all monsters
instead of relying on implicit initialization to 0 (CHAM_ORDINARY).

     There'll be a *much* shorter patch for 3.4.3 which will have to get
by with most of these obscure problems--fortunately they're unlikely to
impact many (any?) players.
include/extern.h
include/mondata.h
src/bones.c
src/makemon.c
src/mon.c
src/read.c
src/trap.c
src/zap.c