-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated monster spellbook probabilities #2339
Conversation
@@ -60,7 +60,7 @@ public float GetSpellProbability() | |||
var probability = 0.0f; | |||
|
|||
foreach (var spell in Biota.BiotaPropertiesSpellBook) | |||
probability += spell.Probability; | |||
probability += spell.Probability - 2.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to have a comment describing why - 2.0f is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the data uses a base 2.0, i.e a 5% chance would be 2.05 instead of 0.05
Why it actually does this, not sure
@@ -242,10 +242,10 @@ public BiotaPropertiesSpellBook GetRandomSpell() | |||
var currentSpell = 0.0f; | |||
foreach (var spell in Biota.BiotaPropertiesSpellBook) | |||
{ | |||
if (rng < currentSpell + spell.Probability) | |||
return spell; | |||
currentSpell += spell.Probability - 2.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here regarding - 2.0f
No description provided.