]> granicus.if.org Git - nethack/commitdiff
anmesia of last discovery (trunk only)
authornethack.rankin <nethack.rankin>
Tue, 22 May 2007 00:41:12 +0000 (00:41 +0000)
committernethack.rankin <nethack.rankin>
Tue, 22 May 2007 00:41:12 +0000 (00:41 +0000)
     While testing something, I noticed that my last remaining discovery
would never be forgotten.  The formula
  count = ((count * percent) + 50) / 100
always yields 0 with count==1 and percent==25 (the value used for mind
flayer attacks).  Not likely to come up in actual play very often....

doc/fixes34.4
src/read.c

index 1d72589ff1dc867630ee3cd0f7e63b26a0e0b5a0..fb6ec77101191738cabf0e9a027d980dca91b3b1 100644 (file)
@@ -355,6 +355,7 @@ kicking at "empty space" has side-effects so should use current turn
 using weapon to kill tame engulfer from inside triggered "placing defunct
        monster onto map?" warning
 nymphs could steal carried boulders
+amnesia of object discoveries would never forget the very last one
 
 
 Platform- and/or Interface-Specific Fixes
index b40f44aeba55031a6ebf6314712d67ee29da6b76..9bf6b2090052c69f0e7ef9472194d1d8a36afc7f 100644 (file)
@@ -526,7 +526,7 @@ forget_objects(percent)
        randomize(indices, count);
 
        /* forget first % of randomized indices */
-       count = ((count * percent) + 50) / 100;
+       count = ((count * percent) + rn2(100)) / 100;
        for (i = 0; i < count; i++)
            forget_single_object(indices[i]);
 }