Added prettier (#661)
* Added prettier * Added prettier * Added prettier
This commit is contained in:
@@ -5,11 +5,16 @@
|
||||
* @param {number} targetMagic The target magic level
|
||||
* @returns {number} count / Game.fps The time it takes to reach targetMagic
|
||||
*/
|
||||
export default function CalculateGrimoireRefillTime(currentMagic, maxMagic, targetMagic) {
|
||||
let count = 0;
|
||||
while (currentMagic < targetMagic) {
|
||||
currentMagic += Math.max(0.002, (currentMagic / Math.max(maxMagic, 100)) ** 0.5) * 0.002;
|
||||
count++;
|
||||
}
|
||||
return count / Game.fps;
|
||||
export default function CalculateGrimoireRefillTime(
|
||||
currentMagic,
|
||||
maxMagic,
|
||||
targetMagic,
|
||||
) {
|
||||
let count = 0;
|
||||
while (currentMagic < targetMagic) {
|
||||
currentMagic +=
|
||||
Math.max(0.002, (currentMagic / Math.max(maxMagic, 100)) ** 0.5) * 0.002;
|
||||
count++;
|
||||
}
|
||||
return count / Game.fps;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user