Fix Gyro Ball only checking base stat

This commit is contained in:
Jaime 2024-05-03 13:29:22 +02:00 committed by Samuel H
parent fbc0800571
commit f7b391746e
1 changed files with 2 additions and 2 deletions

View File

@ -1770,13 +1770,13 @@ export class BattleStatRatioPowerAttr extends VariablePowerAttr {
if (this.invert) {
// Gyro ball uses a specific formula
let userSpeed = user.getStat(this.stat);
let 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.getStat(this.stat) / userSpeed + 1));
let bp = Math.floor(Math.min(150, 25 * target.getBattleStat(this.stat) / userSpeed + 1));
power.value = bp;
return true;
}