Secrets-of-Sosaria / World

Code repository for the Secrets of Sosaria world
GNU General Public License v2.0
12 stars 10 forks source link

Fix resource rarity issue #16

Closed creiht closed 1 month ago

creiht commented 1 month ago

Due to a bug in the resource rarity calculation, the rarity is never greater than 2. This updates the calculation for every level to be 1/2 as likely to appear. So 50% chance is level 1, 25% level 2, 12.5% level 3, etc.

Hat tip to Lord Domino Twain in discord for discovering and proposing initial fixes for it.

Fixes bug #15

creiht commented 1 month ago

Note: I'm running this on my personal server to test, but would be worth others testing as well to make sure there are not adverse side effects, or didn't introduce any errors of my own :)