fix github issue #372 - Wizard escaping dungeon
If the Wizard fled up the stairs on level 1 and escaped the dungeon (which can only happen if he isn't carrying the Amulet or any of the invocation items), the number_of_wizards counter wasn't being decremented. If that was the only Wizard, he couldn't be brought back into play because he wasn't on the migrating monsters list, and he wouldn't appear on the Plane of Earth when the hero eventually went there. If that was one of two, the remaining one couldn't use Double Trouble anymore. (I'm not sure about Earth handling in that situation; should be moot now.) Wizard mode blessed genocide of "*" when the Wizard is on current level caused the same problem. Fix by keeping the number_of_wizards counter up to date if mongone() is called for the Wizard, handling both cases. Also, don't let the Wizard escape the dungeon unless he's one of two at the time, making the first case no longer possible. If wizard mode blessed genocide of "*" is used on the level where the quest nemesis is present, the killed-the-nemesis feedback will now be given. I'm not completely convinced that this was the right thing to do, but it only applies to wizard mode so may not matter. Fixes #372
This commit is contained in:
+6
-2
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 muse.c $NHDT-Date: 1590870788 2020/05/30 20:33:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.127 $ */
|
||||
/* NetHack 3.6 muse.c $NHDT-Date: 1594630714 2020/07/13 08:58:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.128 $ */
|
||||
/* Copyright (C) 1990 by Ken Arromdee */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -938,8 +938,12 @@ struct monst *mtmp;
|
||||
* (mongone -> mdrop_special_objs) but we force any
|
||||
* monster who manages to acquire it or the invocation
|
||||
* tools to stick around instead of letting it escape.
|
||||
* Don't let the Wizard escape even when not carrying
|
||||
* anything of interest unless there are more than 1
|
||||
* of him.
|
||||
*/
|
||||
if (mon_has_special(mtmp))
|
||||
if (mon_has_special(mtmp)
|
||||
|| (mtmp->iswiz && g.context.no_of_wizards < 2))
|
||||
return 0;
|
||||
if (vismon)
|
||||
pline("%s escapes the dungeon!", Monnam(mtmp));
|
||||
|
||||
Reference in New Issue
Block a user