mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 23:42: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
|
// Gyro ball uses a specific formula
|
||||||
let userSpeed = user.getStat(this.stat);
|
let userSpeed = user.getStat(this.stat);
|
||||||
if (userSpeed < 1) {
|
if (userSpeed < 1) {
|
||||||
// Prevent division by zero
|
// Gen 6+ always have 1 base power
|
||||||
userSpeed = 1;
|
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;
|
power.value = bp;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user