rnl() tweaks

Eliminate two minor anomalies in the behavior of the rnl() function
which returns a random number that is modified by the hero's Luck attribute.
Integer division by 3 on requests for small ranges and the fact that the
chance of making a modification was lower for good luck than for bad luck
meant that highest luck did not produce best chance to avoid worst result.

     The actual effect on game play is sure to have been negligible.  More
troubling is that the program has several rnl(3) and rnl(4) calls.  These
practically guarantee a result of 0 when the hero has maximum luck.  The
rnl() function really shouldn't be used for such tiny ranges (unless the
actual intent is that high level characters are expected to almost always
have the 0 outcome...).
This commit is contained in:
nethack.rankin
2004-08-28 01:54:20 +00:00
parent 50ab8bf9c5
commit f1cfafb89b
2 changed files with 25 additions and 6 deletions

View File

@@ -51,6 +51,7 @@ monster throwing greased weapon has same chance for slip/misfire as player
killing a pet by displacing it into a trap now yields experience
prevent a rolling boulder that is in motion from vanishing in bones files
ensure that a sleeping steed doesn't answer a #chat
eliminate two very minor anomalies when using Luck to adjust random numbers
Platform- and/or Interface-Specific Fixes