fix gamelog 1st kill vs 1st weapon hit sequencing

If the first monster the hero kills is killed by the hero's first hit
with a wielded weapon, report the hit first and kill second instead of
the other way around.  Not as hard to manage as I feared, but bound to
be more fragile than the simpler handling that produced the odd order.

Also while testing it I knocked something into a polymorph trap and it
changed form without any feedback.  Give foo-changes-into-bar message
if the hero is moving and can see it happening.  It isn't needed with
a monster moves deliberately into a polymorph trap but probably would
be useful when that's is unintentional.

The "<hero> enters the dungeon" log message had a trailing period but
other log messages don't have sentence punctuation, so take that off.
This commit is contained in:
PatR
2022-02-11 16:17:17 -08:00
parent 9b6d6d3133
commit 2b4cf04281
3 changed files with 68 additions and 21 deletions

View File

@@ -2129,7 +2129,12 @@ 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, FALSE);
(void) newcham(mtmp, (struct permonst *) 0, FALSE,
/* if hero is moving, he probably just swapped
places with a pet or perhaps used a joust
attack to push mtmp into the trap; describe
mtmp's transformation into another shape */
(!g.context.mon_moving && in_sight));
if (in_sight)
seetrap(trap);
}