]> granicus.if.org Git - nethack/commitdiff
kicking and killing an unseen monster
authorcohrs <cohrs>
Tue, 9 Jul 2002 04:21:58 +0000 (04:21 +0000)
committercohrs <cohrs>
Tue, 9 Jul 2002 04:21:58 +0000 (04:21 +0000)
<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.

doc/fixes34.1
src/dokick.c

index 4065833415bfd540a5db1a0fee5a7f886e992abb..fbdb029d3d5587e7362370adf4b883cce58efa73 100644 (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
index 5b3fabfb3f922ae890dd2e4dd416bc5b0b63e666..ff733cedef16b94a96f3f44176d3ae20f07d41a3 100644 (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 &&