From b7f79858210f6366fcfd66804f0ccfb57c06c06b Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 8 Feb 2002 00:15:32 +0000 Subject: [PATCH] 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. --- src/weapon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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