From ce1bf539aca372be370ed1b81788ad8e76ff9477 Mon Sep 17 00:00:00 2001 From: cohrs Date: Thu, 27 Jan 2005 17:21:33 +0000 Subject: [PATCH] U1270 - monster evading kick produces a teleport message in Sokoban This time, it was just the message that was incorrect. Added a !level.flags.noteleport check before displaying "teleports". --- doc/fixes34.4 | 1 + src/dokick.c | 43 ++++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index ee81d66fc..30eae3532 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/dokick.c b/src/dokick.c index 59ae99499..42d62283e 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -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); } -- 2.40.0