]> granicus.if.org Git - nethack/commitdiff
U1270 - monster evading kick produces a teleport message in Sokoban
authorcohrs <cohrs>
Thu, 27 Jan 2005 17:21:33 +0000 (17:21 +0000)
committercohrs <cohrs>
Thu, 27 Jan 2005 17:21:33 +0000 (17:21 +0000)
This time, it was just the message that was incorrect.  Added a
!level.flags.noteleport check before displaying "teleports".

doc/fixes34.4
src/dokick.c

index ee81d66fc45132a6893bd2c0bd360c91b30ff309..30eae353211e075f0d70345111e3caf61abe8b5e 100644 (file)
@@ -81,6 +81,7 @@ adding more candles than required to total 7 to a candelabrum which
        already had between 1 and 6 gave an ungrammatical message
 give correct message when a spellcasting monster summons other monsters
 correct experience calculation for monsters that cause nonphysical damage
+monsters evading a kick on noteleport levels would cause a "teleports" message
 
 
 Platform- and/or Interface-Specific Fixes
index 59ae99499abde39e8a6763a465dae50cc24d34f4..42d62283e4c3e4ad66fe3eafc8bcceeb58dc37d0 100644 (file)
@@ -201,30 +201,31 @@ doit:
           mon->data->mlet != S_EEL && haseyes(mon->data) && mon->mcanmove &&
           !mon->mstun && !mon->mconf && !mon->msleeping &&
           mon->data->mmove >= 12) {
-               if(!nohands(mon->data) && !rn2(martial() ? 5 : 3)) {
-                   pline("%s blocks your %skick.", Monnam(mon),
-                               clumsy ? "clumsy " : "");
+           if(!nohands(mon->data) && !rn2(martial() ? 5 : 3)) {
+               pline("%s blocks your %skick.", Monnam(mon),
+                     clumsy ? "clumsy " : "");
+               (void) passive(mon, FALSE, 1, AT_KICK, FALSE);
+               return;
+           } 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),
+                         (!level.flags.noteleport && can_teleport(mon->data)) ?
+                               "teleports" :
+                               is_floater(mon->data) ? "floats" :
+                               is_flyer(mon->data) ? "swoops" :
+                               (nolimbs(mon->data) || slithy(mon->data)) ?
+                                       "slides" : "jumps",
+                         clumsy ? "easily" : "nimbly",
+                         clumsy ? "clumsy " : "");
                    (void) passive(mon, FALSE, 1, AT_KICK, FALSE);
                    return;
-               } 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" :
-                                is_flyer(mon->data) ? "swoops" :
-                                (nolimbs(mon->data) || slithy(mon->data)) ?
-                                       "slides" : "jumps"),
-                               clumsy ? "easily" : "nimbly",
-                               clumsy ? "clumsy " : "");
-                       (void) passive(mon, FALSE, 1, AT_KICK, FALSE);
-                       return;
-                   }
                }
+           }
        }
        kickdmg(mon, clumsy);
 }