Change unnecessary let into const
parent
7660b244c9
commit
6f007c6e60
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue