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.
This commit is contained in:
nethack.rankin
2003-06-02 08:05:41 +00:00
parent 70b0a44a80
commit 974bab3a32
2 changed files with 18 additions and 7 deletions

View 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

View 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] = {