kicking and killing an unseen monster

<Someone> reported that kicking [unlike hitting] an unseen monster
to death would leave an "I" on the screen.  This was due to a missing
DEADMONSTER check.  I also noticed that code to avoid leaving an extra "I"
behind when a monster jumps of of the way was only half right, resulting in
an extra "I" anyway.
This commit is contained in:
cohrs
2002-07-09 04:21:58 +00:00
parent 034892d5a8
commit 568b8de533
2 changed files with 7 additions and 1 deletions

View File

@@ -152,6 +152,7 @@ Cancelled while polymorphed and Unchanging should provide feedback
stone to flesh on a statue with contents would lose the contents if a
monster was on the same location as the statue
steed movement would use your speed if walking step by step
kicking a known, unseen monster would sometimes leave behind an extra I symbol
Platform- and/or Interface-Specific Fixes

View File

@@ -214,6 +214,10 @@ doit:
} else {
mnexto(mon);
if(mon->mx != x || mon->my != y) {
if(glyph_is_invisible(levl[x][y].glyph)) {
unmap_object(x, y);
newsym(x, y);
}
pline("%s %s, %s evading your %skick.", Monnam(mon),
(can_teleport(mon->data) ? "teleports" :
is_floater(mon->data) ? "floats" :
@@ -715,7 +719,8 @@ dokick()
kick_monster(x, y);
flags.forcefight = FALSE;
/* see comment in attack_checks() */
if (!canspotmon(mtmp) &&
if (!DEADMONSTER(mtmp) &&
!canspotmon(mtmp) &&
/* check x and y; a monster that evades your kick by
jumping to an unseen square doesn't leave an I behind */
mtmp->mx == x && mtmp->my == y &&