]> granicus.if.org Git - nethack/commitdiff
fix B03007 - monster gender handling + level follower tuning
authornethack.rankin <nethack.rankin>
Mon, 2 Jun 2003 08:05:41 +0000 (08:05 +0000)
committernethack.rankin <nethack.rankin>
Mon, 2 Jun 2003 08:05:41 +0000 (08:05 +0000)
     Fix the reported problem of combat messages referring to Orcus as
"it" when the data.base entry uses "he"; extend use of gender-specific
pronouns to named and other unique monsters as well as to humanoids.
If any of those should stay as "it", they'll need to be M2_NEUTERed....

     And prevent level followers from chasing you across levels if they
are fleeing at the time.  It's an old change I've been sitting on which
is not related but happens to be right next to the pronoun code.

doc/fixes34.2
src/mondata.c

index 82f4be6f93283d9335b7be7adfc6bcedefaf2d5e..45211cb00ccc3dc8303197ef719f84df7091348c 100644 (file)
@@ -86,6 +86,8 @@ refine cmdassist handling for armor vs accessories
 prevent monsters from level teleporting out of the quest into the main dungeon
 "m," command sequence would let you see all objects at a location even when 
        they included a cockatrice corpse which hero was unequipped to handle
+use correct pronoun for unique monsters
+hostile monsters who follow you between levels won't do so if they're fleeing
 
 
 Platform- and/or Interface-Specific Fixes
index c64112e276f239c36add4fed5e94dd2451d80be0..5eb0760521e7ae69d40b6d442cba6653030fe4e2 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)mondata.c  3.4     2003/01/08      */
+/*     SCCS Id: @(#)mondata.c  3.4     2003/06/02      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -523,20 +523,29 @@ int
 pronoun_gender(mtmp)
 register struct monst *mtmp;
 {
-       if (!canspotmon(mtmp) || !humanoid(mtmp->data))
-               return 2;
-       return mtmp->female;
+       if (is_neuter(mtmp->data) || !canspotmon(mtmp)) return 2;
+       return (humanoid(mtmp->data) || (mtmp->data->geno & G_UNIQ) ||
+               type_is_pname(mtmp->data)) ? (int)mtmp->female : 2;
 }
 
 #endif /* OVL2 */
 #ifdef OVLB
 
+/* used for nearby monsters when you go to another level */
 boolean
 levl_follower(mtmp)
-register struct monst *mtmp;
+struct monst *mtmp;
 {
-       return((boolean)(mtmp->mtame || (mtmp->data->mflags2 & M2_STALK) || is_fshk(mtmp)
-               || (mtmp->iswiz && !mon_has_amulet(mtmp))));
+       /* monsters with the Amulet--even pets--won't follow across levels */
+       if (mon_has_amulet(mtmp)) return FALSE;
+
+       /* some monsters will follow even while intending to flee from you */
+       if (mtmp->mtame || mtmp->iswiz || is_fshk(mtmp)) return TRUE;
+
+       /* stalking types follow, but won't when fleeing unless you hold
+          the Amulet */
+       return (boolean)((mtmp->data->mflags2 & M2_STALK) &&
+                               (!mtmp->mflee || u.uhave.amulet));
 }
 
 static const short grownups[][2] = {