mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-28 20:42:45 +02:00
Update ability.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
d1e5cd7067
commit
cbcc07a267
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user