]> granicus.if.org Git - nethack/commitdiff
fix #H104 - misnamed high priestess
authornethack.rankin <nethack.rankin>
Thu, 25 May 2006 03:44:34 +0000 (03:44 +0000)
committernethack.rankin <nethack.rankin>
Thu, 25 May 2006 03:44:34 +0000 (03:44 +0000)
     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.

doc/fixes34.4
src/do_name.c

index 445ce4a256a94a44476c843e5bcff448b10026ee..479ab274b8c8ac875e7e250578746b7a3d5bbba9 100644 (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
index c09fda203dafbbcb7656552d4400eb7eb2be2722..da473b9649824f1fbfbc6bc64320b846dcc5dfb2 100644 (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);
        }