]> granicus.if.org Git - nethack/commitdiff
pet ascension
authornethack.rankin <nethack.rankin>
Sun, 20 Mar 2005 05:23:33 +0000 (05:23 +0000)
committernethack.rankin <nethack.rankin>
Sun, 20 Mar 2005 05:23:33 +0000 (05:23 +0000)
     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.

doc/fixes34.4
src/dog.c

index 7421315d63d5c5a5b2348a5dc25dc0194b024964..f0cea27da7bd9eaa1f635e6fc001922b08a420c6 100644 (file)
@@ -101,6 +101,7 @@ avoid giving extra information about things that break out of sight
 avoid giving away wand type for near misses while blind
 avoid excessive repetition of "monsters are aware of your presence"
 monster's aggravation spell now affects meditating monsters
+busy pet won't miss out upon ascension
 
 
 Platform- and/or Interface-Specific Fixes
index f908fcf9944346cf9dcf763889942539850a55f5..0a6294cf4e0d5f51004884ebdf285e73a058d6c2 100644 (file)
--- a/src/dog.c
+++ b/src/dog.c
@@ -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) ||