]> granicus.if.org Git - nethack/commitdiff
B01005 - fasting by monks
authornethack.rankin <nethack.rankin>
Wed, 17 Jul 2002 23:31:12 +0000 (23:31 +0000)
committernethack.rankin <nethack.rankin>
Wed, 17 Jul 2002 23:31:12 +0000 (23:31 +0000)
     Implement a suggestion by <Someone> that turns spent in
"hungry" state exercise wisdom for monk characters; also make
turns spent in "satiated" state abuse it instead.

src/attrib.c

index 0605cdaa7bec2b5d530528253dd0ea1211b163ef..7719710fa0b48a8451a8695767eee7d4b54ca6ed 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)attrib.c   3.4     2000/05/17      */
+/*     SCCS Id: @(#)attrib.c   3.4     2002/07/17      */
 /*     Copyright 1988, 1989, 1990, 1992, M. Stephenson           */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -318,9 +318,15 @@ exerper()
                pline("exerper: Hunger checks");
 #endif
                switch (hs) {
-                   case SATIATED:      exercise(A_DEX, FALSE); break;
+                   case SATIATED:      exercise(A_DEX, FALSE);
+                                       if (Role_if(PM_MONK))
+                                           exercise(A_WIS, FALSE);
+                                       break;
                    case NOT_HUNGRY:    exercise(A_CON, TRUE); break;
-                   case WEAK:          exercise(A_STR, FALSE); break;
+                   case WEAK:          exercise(A_STR, FALSE);
+                                       if (Role_if(PM_MONK))   /* fasting */
+                                           exercise(A_WIS, TRUE);
+                                       break;
                    case FAINTING:
                    case FAINTED:       exercise(A_CON, FALSE); break;
                }