mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-17 01:37:36 +00:00
Hotfix uturn with kings rock (#2385)
This commit is contained in:
parent
21f1e077fa
commit
04c94fcbba
@ -525,6 +525,10 @@ export abstract class PokemonHeldItemModifier extends PersistentModifier {
|
||||
|
||||
//Applies to items with chance of activating secondary effects ie Kings Rock
|
||||
getSecondaryChanceMultiplier(pokemon: Pokemon): integer {
|
||||
// Temporary quickfix to stop game from freezing when the opponet uses u-turn while holding on to king's rock
|
||||
if (!pokemon.getLastXMoves(0)[0]) {
|
||||
return 1;
|
||||
}
|
||||
const sheerForceAffected = allMoves[pokemon.getLastXMoves(0)[0].move].chance >= 0 && pokemon.hasAbility(Abilities.SHEER_FORCE);
|
||||
|
||||
if (sheerForceAffected) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user