"someone"/"something" instead of "it"
I thought there were more places that checked for "it" and substituted "someone" or "something". Perhaps there are and I'm just not finding them now. Anyway, this extends x_monnam() and adds some_mon_nam() and Some_Monnam() to do that during monster name formatting instead of having various bits of code try fix it up after the fact. The fixups could be fooled by monsters given the name "it" or "It"; x_monnam() won't be.
This commit is contained in:
10
src/muse.c
10
src/muse.c
@@ -2166,15 +2166,7 @@ use_misc(struct monst* mtmp)
|
||||
if (vis || vistrapspot)
|
||||
seetrap(t);
|
||||
if (vismon || vistrapspot) {
|
||||
const char *Mnam = Monnam(mtmp);
|
||||
|
||||
/* when the trap is seen but the monster isn't, Monnam()
|
||||
will yield "It"; change that to "Someone" or "Something";
|
||||
the canspotmon() check is to avoid making the change if
|
||||
mtmp has been explicitly named "It" */
|
||||
if (!strcmp(Mnam, "It") && !canspotmon(mtmp))
|
||||
Mnam = humanoid(mtmp->data) ? "Someone" : "Something";
|
||||
pline("%s deliberately %s onto a %s trap!", Mnam,
|
||||
pline("%s deliberately %s onto a %s trap!", Some_Monnam(mtmp),
|
||||
vtense(fakename[0], locomotion(mtmp->data, "jump")),
|
||||
t->tseen ? "polymorph" : "hidden");
|
||||
/* note: if mtmp is unseen because it is invisible, its new
|
||||
|
||||
Reference in New Issue
Block a user