mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 22:09:27 +02:00
Added forgotten conditional.
This commit is contained in:
parent
56be31e548
commit
6cd9d248a7
@ -1631,7 +1631,7 @@ export class FlinchChanceModifier extends PokemonHeldItemModifier {
|
|||||||
*/
|
*/
|
||||||
override apply(pokemon: Pokemon, flinched: BooleanHolder): boolean {
|
override apply(pokemon: Pokemon, flinched: BooleanHolder): boolean {
|
||||||
// The check for pokemon.battleSummonData is to ensure that a crash doesn't occur when a Pokemon with King's Rock procs a flinch
|
// The check for pokemon.battleSummonData is to ensure that a crash doesn't occur when a Pokemon with King's Rock procs a flinch
|
||||||
if (!flinched.value && pokemon.randSeedInt(100) < (this.getStackCount() * this.chance)) {
|
if (pokemon.battleSummonData && !flinched.value && pokemon.randSeedInt(100) < (this.getStackCount() * this.chance)) {
|
||||||
flinched.value = true;
|
flinched.value = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1639,7 +1639,7 @@ export class FlinchChanceModifier extends PokemonHeldItemModifier {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
getMaxHeldItemCount(pokemon: Pokemon): number {
|
getMaxHeldItemCount(_pokemon: Pokemon): number {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user