From 18a467617b32894deef93a635e3217c30eedf7e1 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Mon, 16 Apr 2007 03:03:08 +0000 Subject: [PATCH] kicker kicking Reported in Dec'04 by , an unpoly'd hero or a hero poly'd into monster form which lacks a kick attack both get bonus from rings of increase damage when kicking, but a hero poly'd into monster form which has a kick attack did not. --- doc/fixes34.4 | 2 ++ src/uhitm.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 458cfb5c5..a87a86678 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -344,6 +344,8 @@ likewise with casting stone-to-flesh on self for figurine of non-veggy monst format names of not yet id'd artifacts such that obj type shows for non-weapons make quest leader and nemesis be unlikely to be affected by traps use a more precise jumping path for far, non-straight line destinations +increase damage bonus applies when kicking while polymorphed into a monster + form which has a kicking attack, just like for other kicks Platform- and/or Interface-Specific Fixes diff --git a/src/uhitm.c b/src/uhitm.c index 18eb479de..76f5496a2 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)uhitm.c 3.5 2006/12/02 */ +/* SCCS Id: @(#)uhitm.c 3.5 2007/04/13 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1369,6 +1369,16 @@ register struct attack *mattk; } else tmp = rnd(4); /* bless damage */ } + /* add ring(s) of increase damage */ + if (u.udaminc > 0) { + /* applies even if damage was 0 */ + tmp += u.udaminc; + } else if (tmp > 0) { + /* ring(s) might be negative; avoid converting + 0 to non-0 or positive to non-positive */ + tmp += u.udaminc; + if (tmp < 1) tmp = 1; + } } break; case AD_FIRE: