From be61667b31a19000076393d0019cf81893199ad0 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 19 May 2005 04:11:41 +0000 Subject: [PATCH] reviving quest leader , attempting to #chat with quest leader who was raised from the dead yielded "impossible: invalid quest character". The code attempted to handle that but the conditional logic for preserving the m_id field was backwards. 3.4.3 only dealt with the corpse revival case; dev code tried to support it for statue animation too but still had the same problem. Several apparent bugs remain: if the leader is angry (perhaps hero killed him before reviving him) he won't give an angry response if the player initiates #chat rather than wait for adjacent leader to do so. If it's an archeologist reviving the statue of petrified Lord Carnarvon, hero gets a rather ironic message about feeling guilty for destroying historic statue. Lastly, shouldn't there be a comparable quest_status.nemesis_m_id so that if one player lugs the corpse or statue of his quest nemesis back into the main dungeon and another one revives that, it won't start behaving like 2nd player's nemesis? Live nemesis is explicitly kept out of bones but I don't think the corpse or statue of one is blocked and its monster behavior after revival is based on mon->data->msound==MS_NEMESIS rather than on m_id of current game's active nemesis monster. --- doc/fixes34.4 | 1 + src/zap.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 7036c1dd7..40641a77e 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -122,6 +122,7 @@ fatal wish from magic lamp left functional magic lamp in bones data fatal wish granted by monster left that monster in bones data clear prompt from screen after ESC is used to abort "In what direction?" minor interface changes for interactively manipulating autopickup exceptions +chatting with quest leader who was brought back from the dead gave warnings Platform- and/or Interface-Specific Fixes diff --git a/src/zap.c b/src/zap.c index 910546a82..4bd982159 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)zap.c 3.5 2005/04/20 */ +/* SCCS Id: @(#)zap.c 3.5 2005/05/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -472,15 +472,16 @@ coord *cc; /* Get these ones from mtmp */ mtmp2->minvent = mtmp->minvent; /*redundant*/ /* monster ID is available if the monster died in the current - game, but should be zero if the corpse was in a bones level + game, but will be zero if the corpse was in a bones level (we cleared it when loading bones) */ - if (!mtmp2->m_id) + if (mtmp->m_id) { mtmp2->m_id = mtmp->m_id; - /* might be bringing quest leader back to life */ - else if (quest_status.leader_is_dead && - /* leader_is_dead implies that leader_m_id is valid */ - mtmp2->m_id == quest_status.leader_m_id) - quest_status.leader_is_dead = FALSE; + /* might be bringing quest leader back to life */ + if (quest_status.leader_is_dead && + /* leader_is_dead implies leader_m_id is valid */ + mtmp2->m_id == quest_status.leader_m_id) + quest_status.leader_is_dead = FALSE; + } mtmp2->mx = mtmp->mx; mtmp2->my = mtmp->my; mtmp2->mux = mtmp->mux; -- 2.40.0