pet ascension

From the newsgroup:  player offered the Amulet with a pet adjacent
to his character, and instead of getting "You and Fido ascended" he got
"Fido is still eating" followed by "You ascended".  Make all adjacent pets
eligible to accompany an ascension even when they're in circumstances where
they'd be prevented from coming along on a normal level change.
This commit is contained in:
nethack.rankin
2005-03-20 05:23:33 +00:00
parent f6c08d9f80
commit 916a636fe3
2 changed files with 14 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)dog.c 3.5 2005/01/29 */
/* SCCS Id: @(#)dog.c 3.5 2005/03/17 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -488,7 +488,18 @@ boolean pets_only; /* true for ascension or final escape */
for (mtmp = fmon; mtmp; mtmp = mtmp2) {
mtmp2 = mtmp->nmon;
if (DEADMONSTER(mtmp)) continue;
if (pets_only && !mtmp->mtame) continue;
if (pets_only) {
if (!mtmp->mtame) continue; /* reject non-pets */
/* don't block pets from accompanying hero's dungeon
escape or ascension simply due to mundane trifles;
unlike level change for steed, don't bother trying
to achieve a normal trap escape first */
mtmp->mtrapped = 0;
mtmp->meating = 0;
mtmp->msleeping = 0;
mtmp->mfrozen = 0;
mtmp->mcanmove = 1;
}
if (((monnear(mtmp, u.ux, u.uy) && levl_follower(mtmp)) ||
#ifdef STEED
(mtmp == u.usteed) ||