]> granicus.if.org Git - nethack/commitdiff
luck confusion
authornethack.rankin <nethack.rankin>
Thu, 2 Mar 2006 05:54:04 +0000 (05:54 +0000)
committernethack.rankin <nethack.rankin>
Thu, 2 Mar 2006 05:54:04 +0000 (05:54 +0000)
     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
src/pray.c

index 43f1ea6a32227cbb45fda3a850877ecf488a5fde..8c141fc00b4e638d994e25fb08c0e7d678f1d6a3 100644 (file)
@@ -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;
index d7ebf0d77c2ac13870e07f7129cdf256e224f1a0..679a0387375101c4eb2ca6371d07620927a13931 100644 (file)
@@ -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();