Have newcham() give messages when monsters polymorph in more cases

This is a descendent of an earlier patch I wrote. The main idea is still
to clearly communicate to the player *what* something is turning into,
without the need to farlook afterwards, and give them the opportunity to
add MSGTYPE for when something jumps on a polymorph trap and becomes an
arch-lich. If it happens out of sight, the player also might get a whiff
of the monster's smell, giving a bit of advance warning.

There is one new case in here, in normal_shape(), which came about
because I noticed a weird message sequence: "The magic-absorbing blade
cancels the python!  You kill the chameleon!" with no intervening
message indicating the python reverted to a chameleon.
This commit is contained in:
copperwater
2017-12-01 16:36:34 -05:00
parent 0aba9ff77e
commit 218a6a9d25
3 changed files with 6 additions and 6 deletions

View File

@@ -2166,7 +2166,7 @@ trapeffect_poly_trap(
if (resists_magm(mtmp)) {
shieldeff(mtmp->mx, mtmp->my);
} else if (!resist(mtmp, WAND_CLASS, 0, NOTELL)) {
(void) newcham(mtmp, (struct permonst *) 0, FALSE, in_sight);
(void) newcham(mtmp, (struct permonst *) 0, FALSE, TRUE);
if (in_sight)
seetrap(trap);
}
@@ -2617,7 +2617,7 @@ steedintrap(struct trap* trap, struct obj* otmp)
if (!resists_magm(steed) && !resist(steed, WAND_CLASS, 0, NOTELL)) {
struct permonst *mdat = steed->data;
(void) newcham(steed, (struct permonst *) 0, FALSE, FALSE);
(void) newcham(steed, (struct permonst *) 0, FALSE, TRUE);
if (!can_saddle(steed) || !can_ride(steed)) {
dismount_steed(DISMOUNT_POLY);
} else {