From dab873154e299df912352fa608fa490ff27ec940 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 17 May 2007 03:12:32 +0000 Subject: [PATCH] fix #H331 - kicking at empty takes no time From a bug report, getting the "you kick at empty space" result doesn't use any turns but can have side-effects like waking up monsters and negatively exercising hero's stats. It should take a turn even though nothing gets kicked. --- doc/fixes34.4 | 1 + src/dokick.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 5d77d35a9..9e4ba11b1 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -351,6 +351,7 @@ increase damage bonus applies when kicking while polymorphed into a monster if magically removing steed's saddle is fatal, don't leave it saddled in bones charging prompt used wrong criteria when deciding whether to list rings an orc (or gnome) will respond to #chat if hero is also an orc (or gnome) +kicking at "empty space" has side-effects so should use current turn Platform- and/or Interface-Specific Fixes diff --git a/src/dokick.c b/src/dokick.c index 4d1145b54..057798b0b 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dokick.c 3.5 2007/03/17 */ +/* SCCS Id: @(#)dokick.c 3.5 2007/05/16 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1070,11 +1070,9 @@ dumb: exercise(A_STR, FALSE); set_wounded_legs(RIGHT_SIDE, 5 + rnd(5)); } - if ((Is_airlevel(&u.uz) || Levitation) && rn2(2)) { + if ((Is_airlevel(&u.uz) || Levitation) && rn2(2)) hurtle(-u.dx, -u.dy, 1, TRUE); - return 1; /* you moved, so use up a turn */ - } - return(0); + return 1; /* uses a turn */ } /* not enough leverage to kick open doors while levitating */