fix issue #1256 - no_of_wizards incorrect \

if Wizard escapes the dungeon

Reported by vultur-cadens:  a fix to prevent quest feedback when quest
nemesis is removed from the game during bones creation introduced a
regression for an earlier fix that kept context.no_of_wizards up to
date if the Wizard of Yendor escapes the dungeon without dying.

Change 'wizdead()' to 'wizdeadorgone()' and call it from m_detach()
for mongone() as well as for mondead().

Fixes #1256
This commit is contained in:
PatR
2024-06-13 12:18:17 -07:00
parent 30d2eeea41
commit 24e06171db
5 changed files with 18 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 wizard.c $NHDT-Date: 1705357487 2024/01/15 22:24:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.105 $ */
/* NetHack 3.7 wizard.c $NHDT-Date: 1718303204 2024/06/13 18:26:44 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.110 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2016. */
/* NetHack may be freely redistributed. See license for details. */
@@ -793,8 +793,10 @@ intervene(void)
}
}
/* Wizard of Yendor is being removed from play (dead or escaped the dungeon);
keep the bookkeeping for him up to date */
void
wizdead(void)
wizdeadorgone(void)
{
gc.context.no_of_wizards--;
if (!u.uevent.udemigod) {