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....
This commit is contained in:
nethack.rankin
2007-05-22 00:41:12 +00:00
parent 2ff8b16874
commit 47348b92d7
2 changed files with 2 additions and 1 deletions

View 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]);
}