Fix Gyro Ball only checking base stat
parent
fbc0800571
commit
f7b391746e
|
@ -1770,13 +1770,13 @@ export class BattleStatRatioPowerAttr extends VariablePowerAttr {
|
||||||
|
|
||||||
if (this.invert) {
|
if (this.invert) {
|
||||||
// Gyro ball uses a specific formula
|
// Gyro ball uses a specific formula
|
||||||
let userSpeed = user.getStat(this.stat);
|
let userSpeed = user.getBattleStat(this.stat);
|
||||||
if (userSpeed < 1) {
|
if (userSpeed < 1) {
|
||||||
// Gen 6+ always have 1 base power
|
// Gen 6+ always have 1 base power
|
||||||
power.value = 1;
|
power.value = 1;
|
||||||
return true;
|
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;
|
power.value = bp;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue