Update ability.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Bertie690 2025-04-28 21:34:04 -04:00 committed by GitHub
parent d1e5cd7067
commit cbcc07a267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4072,7 +4072,7 @@ export class PostTurnRestoreBerryAbAttr extends PostTurnAbAttr {
// Clamp procChance to [0, 1]. Skip if didn't proc (less than pass) // Clamp procChance to [0, 1]. Skip if didn't proc (less than pass)
const pass = Phaser.Math.RND.realInRange(0, 1); const pass = Phaser.Math.RND.realInRange(0, 1);
return Math.max(Math.min(this.procChance(pokemon), 1), 0) >= pass; return Phaser.Math.Clamp(this.procChance(pokemon), 0, 1) >= pass;
} }
override applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): void { override applyPostTurn(pokemon: Pokemon, passive: boolean, simulated: boolean, args: any[]): void {