From: nethack.rankin Date: Thu, 25 May 2006 03:44:34 +0000 (+0000) Subject: fix #H104 - misnamed high priestess X-Git-Tag: MOVE2GIT~1006 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c67b9788fc954bd5d5257ac8bb3896195ddbbe63;p=nethack 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. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 445ce4a25..479ab274b 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 " is intentionally being suppressed, an aligned or high + priestess would be described as an aligned or high priest Platform- and/or Interface-Specific Fixes diff --git a/src/do_name.c b/src/do_name.c index c09fda203..da473b964 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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) { /* the */ @@ -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); }