From 63103b6705274f226538a0e8d95feb658b4d3ef4 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Thu, 2 Mar 2006 05:54:04 +0000 Subject: [PATCH] luck confusion Remove a couple of false comments about Luck, and an unreachable switch case based upon them. I don't know if the comment in you.h was ever true, but it was false by the time Kevin brought across assorted changes from slash'em however many years ago. Full moon does not change the range of possible Luck values, and ``rn2((Luck + 6) >> 1)'' produces a value between 0 and 8 for prayer result, never 9. Natural luck is always within the range of -10 to +10, and extra luck from carrying blessed or cursed luckstone can add or subtract another 3. Full moon and Friday the 13th change the equilibrium point for luck timeout but do not change the overall range of possible values, which remains at -13 to +13. --- include/you.h | 4 ++-- src/pray.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/you.h b/include/you.h index 43f1ea6a3..8c141fc00 100644 --- a/include/you.h +++ b/include/you.h @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)you.h 3.5 2005/09/12 */ +/* SCCS Id: @(#)you.h 3.5 2006/03/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -323,7 +323,7 @@ struct you { schar uluck, moreluck; /* luck and luck bonus */ #define Luck (u.uluck + u.moreluck) #define LUCKADD 3 /* added value when carrying luck stone */ -#define LUCKMAX 10 /* on moonlit nights 11 */ +#define LUCKMAX 10 #define LUCKMIN (-10) schar uhitinc; schar udaminc; diff --git a/src/pray.c b/src/pray.c index d7ebf0d77..679a03873 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)pray.c 3.5 2005/12/26 */ +/* SCCS Id: @(#)pray.c 3.5 2006/03/01 */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1018,7 +1018,6 @@ pleased(g_align) } case 7: case 8: - case 9: /* KMH -- can occur during full moons */ #ifdef ELBERETH if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) { gcrownu(); -- 2.40.0