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

Fix stats for lucky/chain cookies #383

Merged
merged 2 commits into from
Dec 1, 2020

Conversation

Chorizorro
Copy link
Contributor

Add CM.Cache.RemakeGoldenAndWrathCookiesMults method to calculate both Golden and Wrath multipliers applied to their respective cookies.
Add CM.Cache.GoldenCookiesMult and CM.Cache.WrathCookiesMult to retain the calculated mults.
Use the new mults to fix calculated rewards for lucky/chain cookies.
Update display accordingly.

Note: the requirements don't change because the multiplier is applied after the requirement / limits have been computed.

This closes #379

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the function seems fine and resolves the issue I have one small request.
Could you change all Game.Has's and Game.eff's to CM.Sim.Has and CM.Sim.eff.

Although the current function does not really on us simulating anything I believe it is better to have most of the CM-code rely on CM-cached data. That way if we want to simulate anything later (for example, calculating the effect of buying something on the Lucky-reward) it is relatively easy to do so!

@Chorizorro
Copy link
Contributor Author

That's a good idea, I've updated CM.Cache.RemakeGoldenAndWrathCookiesMults to use CM.Sim instead of Game for Has, auraMult and eff methods!

@DanielNoord DanielNoord merged commit 0bebb12 into CookieMonsterTeam:dev Dec 1, 2020
@Chorizorro Chorizorro deleted the fix/luckychain branch December 1, 2020 15:28
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.

Lucky/Chain cookies rewards stats are incorrect
2 participants