Skip to content
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

Merged
merged 2 commits into from
Oct 20, 2019

Conversation

gmriggs
Copy link
Collaborator

@gmriggs gmriggs commented Oct 20, 2019

No description provided.

LtRipley36706
LtRipley36706 previously approved these changes Oct 20, 2019
@@ -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;
Copy link
Member

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.

Copy link
Collaborator Author

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;
Copy link
Member

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

@gmriggs gmriggs merged commit 17589a9 into ACEmulator:master Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants