diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index 181cf6744c0..626d744eef2 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -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) {