From: nethack.rankin Date: Tue, 22 May 2007 00:41:12 +0000 (+0000) Subject: anmesia of last discovery (trunk only) X-Git-Tag: MOVE2GIT~586 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47348b92d71e27c6260795dfe003f6997d26193f;p=nethack anmesia of last discovery (trunk only) 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.... --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 1d72589ff..fb6ec7710 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/src/read.c b/src/read.c index b40f44aeb..9bf6b2090 100644 --- a/src/read.c +++ b/src/read.c @@ -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]); }