aligned cleric corpse
I was looking into "The Lord Surtur's corpse" and got side-tracked by something else: move a priest hack for avoiding "aligned" in a corpse description from corpse_xname() to obj_pmname(). The old variation always picked "priest corpse" over "priestess corpse". The new one will use either one of those if the corpse is flagged as such, or use "cleric corpse" (avoiding "aligned cleric corpse") if it's flagged as random.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -1560,11 +1560,6 @@ corpse_xname(
|
||||
mnam = OBJ_NAME(objects[otmp->otyp]); /* "glob of <monster>" */
|
||||
} 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])) {
|
||||
|
||||
Reference in New Issue
Block a user