diff --git a/src/do_name.c b/src/do_name.c index 0880333bc..ed88d2dab 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -2209,9 +2209,22 @@ obj_pmname(struct obj *obj) int cgend = (obj->spe & CORPSTAT_GENDER), mgend = ((cgend == CORPSTAT_MALE) ? MALE : (cgend == CORPSTAT_FEMALE) ? FEMALE - : NEUTRAL); + : NEUTRAL), + mndx = obj->corpsenm; - return pmname(&mons[obj->corpsenm], mgend); + /* mons[].pmnames[] for monster cleric uses "priest" or "priestess" + or "aligned cleric"; we want to avoid "aligned cleric [corpse]" + unless it has been explicitly flagged as neuter rather than + defaulting to random (which fails male or female check above); + role monster cleric uses "priest" or "priestess" or "cleric" + without "aligned" prefix so we switch to that; [can't force + random gender to be chosen here because splitting a stack of + corpses could cause the split-off portion to change gender, so + settle for avoiding "aligned"] */ + if (mndx == PM_ALIGNED_CLERIC && cgend == CORPSTAT_RANDOM) + mndx = PM_CLERIC; + + return pmname(&mons[mndx], mgend); } return "two-legged glorkum-seeker"; } diff --git a/src/objnam.c b/src/objnam.c index 7bf853fc9..c26ecac6b 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1560,11 +1560,6 @@ corpse_xname( mnam = OBJ_NAME(objects[otmp->otyp]); /* "glob of " */ } else if (omndx == NON_PM) { /* paranoia */ mnam = "thing"; - /* [Possible enhancement: check whether corpse has monster traits - attached in order to use priestname() for priests and minions.] */ - } else if (omndx == PM_ALIGNED_CLERIC) { - /* avoid "aligned priest"; it just exposes internal details */ - mnam = "priest"; } else { mnam = obj_pmname(otmp); if (the_unique_pm(&mons[omndx]) || type_is_pname(&mons[omndx])) {