From: nethack.rankin Date: Mon, 2 Jun 2003 08:05:41 +0000 (+0000) Subject: fix B03007 - monster gender handling + level follower tuning X-Git-Tag: MOVE2GIT~1941 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=974bab3a3281abc993b9c73e8f1612850c25cffa;p=nethack fix B03007 - monster gender handling + level follower tuning 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. --- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 82f4be6f9..45211cb00 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/mondata.c b/src/mondata.c index c64112e27..5eb076052 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -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] = {