R809 - newcham message reorganization

Add a param to newcham() to let it print "The oldmon turns into a newmon!"
rather than always printing this externally.  Should ensure a good ordering
of the messages.  Also put some special name handling in one place and
catch a couple cases where "saddled" was printed, resulting in funny messages.
This commit is contained in:
cohrs
2002-04-23 06:15:52 +00:00
parent 7c0e55e6aa
commit 2c26ea1dd5
9 changed files with 44 additions and 37 deletions

View File

@@ -191,23 +191,8 @@ boolean devour;
delobj(obj);
if (poly) {
char oldpet[BUFSZ];
#ifdef STEED
long mw = mtmp->misc_worn_check;
mtmp->misc_worn_check &= ~W_SADDLE;
#endif
Strcpy(oldpet, Monnam(mtmp));
#ifdef STEED
mtmp->misc_worn_check = mw;
#endif
if (newcham(mtmp, (struct permonst *)0, FALSE) &&
cansee(mtmp->mx, mtmp->my)) {
uchar save_mnamelth = mtmp->mnamelth;
mtmp->mnamelth = 0;
pline("%s turns into %s!", oldpet, a_monnam(mtmp));
mtmp->mnamelth = save_mnamelth;
}
(void) newcham(mtmp, (struct permonst *)0, FALSE,
cansee(mtmp->mx, mtmp->my));
}
/* limit "instant" growth to prevent potential abuse */
if (grow && (int) mtmp->m_lev < (int)mtmp->data->mlevel + 15) {