]> granicus.if.org Git - nethack/commitdiff
rumor consumption during level creation
authornethack.rankin <nethack.rankin>
Sat, 6 May 2006 05:08:27 +0000 (05:08 +0000)
committernethack.rankin <nethack.rankin>
Sat, 6 May 2006 05:08:27 +0000 (05:08 +0000)
     I've forgotten who pointed this out recently, but the hero was having
wisdom exercized (if true rumor chosen) or abused (for false one) whenever
level creation made a random floor engraving which used a rumor for its text.

doc/fixes34.4
src/rumors.c

index ab621066b6c4566a9c5f96b0b75d5d909c9fc908..e6433291e56163c0d3f3c5b7e66aadbf0c8d0a79 100644 (file)
@@ -214,6 +214,7 @@ code handling a monster's use of potion or food to cure stoning or confusion
 properly handle destruction of equipment carried by monsters hit by
        disintegration breath; life-saving retained conferred properties of
        formerly worn items (loss of steed's saddle caused much confusion)
+don't exercize or abuse wisdom when rumors get used for random graffiti
 
 
 Platform- and/or Interface-Specific Fixes
index 0bca828da139ba2de0aeb326a028c82dcc832025..5d37b75d887127eb11d4fc0203831467793494ff 100644 (file)
@@ -138,11 +138,12 @@ boolean exclude_cookie;
                }
                if ((endp = index(line, '\n')) != 0) *endp = 0;
                Strcat(rumor_buf, xcrypt(line, xbuf));
-           } while(count++ < 50 && exclude_cookie && (strstri(rumor_buf, "fortune") || strstri(rumor_buf, "pity")));
+           } while (count++ < 50 && exclude_cookie &&
+               (strstri(rumor_buf, "fortune") || strstri(rumor_buf, "pity")));
            (void) dlb_fclose(rumors);
            if (count >= 50)
                impossible("Can't find non-cookie rumor?");
-           else
+           else if (!in_mklev) /* avoid exercizing wisdom for graffiti */
                exercise(A_WIS, (adjtruth > 0));
        } else {
                pline("Can't open rumors file!");