From b80cf6138c4efc8c5a4d52159e5e4ea629085b1a Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Tue, 4 Oct 2022 18:27:40 -0400 Subject: [PATCH] Don't hardcode min Str in losestr Min Str is typically 3 no matter the hero's race, but could be higher (at least in theory?). Using ATTRMIN makes losestr respect the same minimum as other kinds of attribute loss (I'm operating under the assumption that this wasn't an intentional move to fix the minimum at 3 regardless of other factors). --- src/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attrib.c b/src/attrib.c index 8dd57b291..7684c057c 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -222,7 +222,7 @@ losestr(int num, const char *knam, schar k_format) k_format = KILLED_BY; } - while (ustr < 3) { + while (ustr < ATTRMIN(A_STR)) { ++ustr; --num; losehp(6, knam, k_format);