133
edits
(Fix variable name to specify it's one additional fish.) |
(Fix variable name to specify +1 additional fish.) |
||
Line 123: | Line 123: | ||
==== Checking the Chance to Increase the Number of Fish ==== | ==== Checking the Chance to Increase the Number of Fish ==== | ||
The ''' | The '''chanceForOneMoreFish''' value is then compared to a random number generated by the <code>rnd(100)</code> function. The value of <code>rnd(100)</code> generates a random number between '''0''' and '''99''' (inclusive). | ||
If the value of ''' | If the value of '''chanceForOneMoreFish''' is greater than or equal to the random number, the number of fish will increase by '''1'''. | ||
This check is done with: | This check is done with: | ||
<pre> | <pre> | ||
if ( | if (chanceForOneMoreFish >= rnd(100)) | ||
</pre> | </pre> | ||
Line 136: | Line 136: | ||
* If the random number is '''greater than 50''', the number of fish will remain the same. | * If the random number is '''greater than 50''', the number of fish will remain the same. | ||
Thus, the probability of increasing the number of fish is '''50%''' (because ''' | Thus, the probability of increasing the number of fish is '''50%''' (because '''chanceForOneMoreFish = 50''' ). | ||
==== Example with Land Feats ==== | ==== Example with Land Feats ==== |
edits