]> granicus.if.org Git - nethack/commitdiff
reviving quest leader
authornethack.rankin <nethack.rankin>
Thu, 19 May 2005 04:11:41 +0000 (04:11 +0000)
committernethack.rankin <nethack.rankin>
Thu, 19 May 2005 04:11:41 +0000 (04:11 +0000)
     <email deleted>, 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
src/zap.c

index 7036c1dd77ed7dc32fca14863b05f2a4e4b94d0c..40641a77eccfd3ea3fc5088180110b2c5665d542 100644 (file)
@@ -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
index 910546a8237ff8117e4698b154c83a2588839581..4bd9821596548bfb71a33c0efb6da675adbfcf12 100644 (file)
--- 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;