fix #H104 - misnamed high priestess

When high priests have their affiliation suppressed to avoid giving
away which altar is which on the Astral level, the name formatting also
bypasses the code that converts "priest" into "priestess" for females.
(The bug report was about Moloch's high priestess; the occupant of the
Sanctum's temple gets similar handling to those on Astral.)

     Also a tidbit for a change made a couple of days ago.  Avoid using
"Manlobbi the invisible shopkeeper" or "Asidonhopo the newt" in the message
given when a shk refuses an attempt to be renamed via the 'C' command.
This commit is contained in:
nethack.rankin
2006-05-25 03:44:34 +00:00
parent 804864c723
commit c67b9788fc
2 changed files with 13 additions and 4 deletions

View File

@@ -224,6 +224,8 @@ fix bad grammar when putting on not-yet-seen Eyes of the Overworld while blind
don't "walk quietly" while levitating
fix message handling when multiple shopkeepers are present at end of game
'C' command can't name shopkeepers or temple priests and other minions
when "of <deity>" is intentionally being suppressed, an aligned or high
priestess would be described as an aligned or high priest
Platform- and/or Interface-Specific Fixes

View File

@@ -367,7 +367,7 @@ do_mname()
else if (mtmp->isshk &&
!(Deaf || mtmp->msleeping ||
!mtmp->mcanmove || mtmp->data->msound <= MS_ANIMAL))
verbalize("I'm %s, not %s.", monnambuf, buf);
verbalize("I'm %s, not %s.", shkname(mtmp), buf);
else if (mtmp->ispriest || mtmp->isminion || mtmp->isshk)
pline("%s will not accept the name %s.", upstart(monnambuf), buf);
else
@@ -604,6 +604,7 @@ boolean called;
{
char *buf = nextmbuf();
struct permonst *mdat = mtmp->data;
const char *pm_name = mdat->mname;
boolean do_hallu, do_invis, do_it, do_saddle;
boolean name_at_start, has_adjectives;
char *bp;
@@ -650,6 +651,12 @@ boolean called;
name += 4;
return strcpy(buf, name);
}
/* an "aligned priest" not flagged as a priest or minion should be
"priest" or "priestess" (normally handled by priestname()) */
if (mdat == &mons[PM_ALIGNED_PRIEST])
pm_name = mtmp->female ? "priestess" : "priest";
else if (mdat == &mons[PM_HIGH_PRIEST] && mtmp->female)
pm_name = "high priestess";
/* Shopkeepers: use shopkeeper name. For normal shopkeepers, just
* "Asidonhopo"; for unusual ones, "Asidonhopo the invisible
@@ -671,7 +678,7 @@ boolean called;
Strcat(buf, " the ");
if (do_invis)
Strcat(buf, "invisible ");
Strcat(buf, mdat->mname);
Strcat(buf, pm_name);
return buf;
}
@@ -704,7 +711,7 @@ boolean called;
Sprintf(eos(buf), "%s ghost", s_suffix(name));
name_at_start = TRUE;
} else if (called) {
Sprintf(eos(buf), "%s called %s", mdat->mname, name);
Sprintf(eos(buf), "%s called %s", pm_name, name);
name_at_start = (boolean)type_is_pname(mdat);
} else if (is_mplayer(mdat) && (bp = strstri(name, " the ")) != 0) {
/* <name> the <adjective> <invisible> <saddled> <rank> */
@@ -730,7 +737,7 @@ boolean called;
Strcat(buf, lcase(pbuf));
name_at_start = FALSE;
} else {
Strcat(buf, mdat->mname);
Strcat(buf, pm_name);
name_at_start = (boolean)type_is_pname(mdat);
}