Skip to content

Commit

Permalink
anmesia of last discovery (trunk only)
Browse files Browse the repository at this point in the history
     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....
  • Loading branch information
nethack.rankin committed May 22, 2007
1 parent 2ff8b16 commit 47348b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 47348b9

Please sign in to comment.