mon_pmname(), obj_pmname()

Revive some code from 5 or so years ago that's been sitting in a
defunct local git branch.  There are a couple of references to
figurines having gender; the old, unfinished code did already have
support for that, the current code doesn't.  It probably won't take
much effort to add it in but I want to get this first part out of
the way.

Replace some of the
pmname(mon->data, Mgender[mon]) calls with simpler
mon_pmname(mon) and some
pmname(&mons[statue->corpsenm],
   (statue->spe & CORPSTAT_GENDER) == ... ? ... : ...) with simpler
obj_pmname(obj).  There are other instances of them which haven't
been changed but could be.
This commit is contained in:
PatR
2021-06-12 03:07:30 -07:00
parent 234eceae60
commit 57e970b227
5 changed files with 83 additions and 58 deletions

View File

@@ -1052,8 +1052,7 @@ unturn_dead(struct monst *mon)
pline("%s%s suddenly %s%s%s!", owner, corpse,
nonliving(mtmp2->data) ? "reanimates" : "comes alive",
different_type ? " as " : "",
different_type ? an(pmname(mtmp2->data, Mgender(mtmp2)))
: "");
different_type ? an(mon_pmname(mtmp2)) : "");
else if (canseemon(mtmp2))
pline("%s suddenly appears!", Amonnam(mtmp2));
} else {