From: nethack.rankin Date: Fri, 8 Feb 2002 00:15:32 +0000 (+0000) Subject: fix B1022 -- bare handed to-hit bonus X-Git-Tag: MOVE2GIT~3231 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7f79858210f6366fcfd66804f0ccfb57c06c06b;p=nethack fix B1022 -- bare handed to-hit bonus Make the code match the comments. I'm sure I checked that forwards and backwards when I put it in; I don't know how it ended up mismatched. --- diff --git a/src/weapon.c b/src/weapon.c index 500b0d1e2..58f94b07a 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)weapon.c 3.4 2000/09/17 */ +/* SCCS Id: @(#)weapon.c 3.4 2002/02/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1046,7 +1046,7 @@ struct obj *weapon; */ bonus = P_SKILL(type); bonus = max(bonus,P_UNSKILLED) - 1; /* unskilled => 0 */ - bonus = (bonus * (martial_bonus() ? 2 : 1)) / 2; + bonus = ((bonus + 2) * (martial_bonus() ? 2 : 1)) / 2; } #ifdef STEED