Changes according to Eslint

This commit is contained in:
Daniël van Noord
2021-03-16 09:32:50 +01:00
parent 26d8e75935
commit a65af049b6
63 changed files with 314 additions and 295 deletions

View File

@@ -10,11 +10,11 @@ export default function CalculateGrimoireRefillTime(
maxMagic,
targetMagic,
) {
let magic = currentMagic;
let count = 0;
while (currentMagic < targetMagic) {
currentMagic +=
Math.max(0.002, (currentMagic / Math.max(maxMagic, 100)) ** 0.5) * 0.002;
count++;
while (magic < targetMagic) {
magic += Math.max(0.002, (magic / Math.max(maxMagic, 100)) ** 0.5) * 0.002;
count += 1;
}
return count / Game.fps;
}