mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Update gyro ball for gen6+
This commit is contained in:
parent
a0b692a279
commit
eb043af173
@ -1702,10 +1702,11 @@ export class BattleStatRatioPowerAttr extends VariablePowerAttr {
|
||||
// Gyro ball uses a specific formula
|
||||
let userSpeed = user.getStat(this.stat);
|
||||
if (userSpeed < 1) {
|
||||
// Prevent division by zero
|
||||
userSpeed = 1;
|
||||
// Gen 6+ always have 1 base power
|
||||
power.value = 1;
|
||||
return true;
|
||||
}
|
||||
let bp = Math.min(150, 25 * target.getStat(this.stat) / userSpeed + 1);
|
||||
let bp = Math.floor(Math.min(150, 25 * target.getStat(this.stat) / userSpeed + 1));
|
||||
power.value = bp;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user