Change unnecessary let into const

pull/742/head
Jakub Hanko 2024-05-11 16:13:59 +02:00
parent 7660b244c9
commit 6f007c6e60
No known key found for this signature in database
GPG Key ID: 775D427937A306CC
1 changed files with 3 additions and 3 deletions

View File

@ -1930,17 +1930,17 @@ export class BattleStatRatioPowerAttr extends VariablePowerAttr {
const statRatio = target.getBattleStat(this.stat) / user.getBattleStat(this.stat);
const statThresholds = [ 0.25, 1 / 3, 0.5, 1, -1 ];
let statThresholdPowers = [ 150, 120, 80, 60, 40 ];
const statThresholdPowers = [ 150, 120, 80, 60, 40 ];
if (this.invert) {
// Gyro ball uses a specific formula
let userSpeed = user.getBattleStat(this.stat);
const userSpeed = user.getBattleStat(this.stat);
if (userSpeed < 1) {
// Gen 6+ always have 1 base power
power.value = 1;
return true;
}
let bp = Math.floor(Math.min(150, 25 * target.getBattleStat(this.stat) / userSpeed + 1));
const bp = Math.floor(Math.min(150, 25 * target.getBattleStat(this.stat) / userSpeed + 1));
power.value = bp;
return true;
}