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

Incorrect calculation of EXP #136

Open
REWesker opened this issue Apr 17, 2022 · 0 comments
Open

Incorrect calculation of EXP #136

REWesker opened this issue Apr 17, 2022 · 0 comments

Comments

@REWesker
Copy link

REWesker commented Apr 17, 2022

As seen in attached example, tool calculates 75200 needed exp as 10 battles when it's clearly 11 (7400 exp per battle equals 74000 exp for 10 battles, 1200 exp shy of target).

example

Problem lies in line 317 of file ./aklevel.html
First, it assumes that one LS-5 battle gives 7500 exp, when it is in fact 7400 (3 * 2000 + 1 * 1000 + 1* 400).
Second, .toFixed(1) may give wrong results, since it modifies all division results that have 0 as first digit after decimal separator to form X.0 that Math.ceil interprets as integer X and doesn't add one to ceil the number

As seen in example:

75200 / 7500 == 10.026666666666667
(10.026666666666667).toFixed(1) == 10.0
Math.ceil(10.0) == 10
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

No branches or pull requests

1 participant