From: nethack.rankin Date: Fri, 26 Jul 2002 00:33:14 +0000 (+0000) Subject: R1007 - Monk kicking bug X-Git-Tag: MOVE2GIT~2590 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5405940a22964f30ce64c1ac3ae94855f207b67;p=nethack R1007 - Monk kicking bug Kicking a monster as a monk or samurai or while wearing kicking boots might make it "reel from the blow" and be knocked back a step. If that knock back put it into a trap which killed it, the kicking code would kill it an extra time, then the player would get a warning about dmonsfree finding the wrong number of dead monsters. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 04ab741d9..0272c0b0e 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -172,6 +172,8 @@ fix bug preventing wishing for bear traps (not beartrap objects) in debug mode be notified about cessation of hallucinations even if blind and the time when using '/' to examine multiple map items in succession, don't mislabel some with "or a splash of venom" after having looked at a '.' item +martial arts kick that knocks a monster into a trap would result in warning + "dmonsfree: 1 removed doesn't match 2 pending" if the trap was fatal Platform- and/or Interface-Specific Fixes diff --git a/src/dokick.c b/src/dokick.c index 969baf855..5de4508b2 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dokick.c 3.4 2000/04/21 */ +/* SCCS Id: @(#)dokick.c 3.4 2002/07/25 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -34,6 +34,7 @@ register boolean clumsy; register int dmg = ( ACURRSTR + ACURR(A_DEX) + ACURR(A_CON) )/ 15; int kick_skill = P_NONE; int blessed_foot_damage = 0; + boolean trapkilled = FALSE; if (uarmf && uarmf->otyp == KICKING_BOOTS) dmg += 5; @@ -100,13 +101,13 @@ register boolean clumsy; place_monster(mon, mdx, mdy); newsym(mon->mx, mon->my); set_apparxy(mon); - (void) mintrap(mon); + if (mintrap(mon) == 2) trapkilled = TRUE; } } } (void) passive(mon, TRUE, mon->mhp > 0, AT_KICK); - if (mon->mhp <= 0) killed(mon); + if (mon->mhp <= 0 && !trapkilled) killed(mon); /* may bring up a dialog, so put this after all messages */ if (kick_skill != P_NONE) /* exercise proficiency */