04-09-2018, 09:45 PM
(This post was last modified: 04-09-2018, 09:45 PM by Noah Buttes. Edited 1 time in total.)
From
This would positively murder the code's efficiency.
The cleanest way to implement this feature would be to replace the large majority of prob() calls with a custom proc that can take in luck as a param. This would require a pretty thorough refactorization of the codebase.
What's worse is that this custom proc would be marginally slower than just a raw prob() call. While this slowdown is negligible for a single instance, when repeated countless times over the entire source code, the inefficiency adds up to a significant performance hit.
(04-09-2018, 09:07 PM)Frank_Stein Wrote: Luck would influence the odds of pretty much anything and everything that is percentage based, increasing or decreasing the probability of certain outcomes
This would positively murder the code's efficiency.
The cleanest way to implement this feature would be to replace the large majority of prob() calls with a custom proc that can take in luck as a param. This would require a pretty thorough refactorization of the codebase.
What's worse is that this custom proc would be marginally slower than just a raw prob() call. While this slowdown is negligible for a single instance, when repeated countless times over the entire source code, the inefficiency adds up to a significant performance hit.