From cb5cedac84b515b089f8f05cdd03e9c709da8fd2 Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+Tempo-anon@users.noreply.github.com> Date: Wed, 19 Jun 2024 17:36:23 -0400 Subject: [PATCH] [Bug] Fix bug in doubles after 1 opponent is phazed (#2419) * Hotfix uturn with kings rock * Hotfix for crashing after phazing away a doubles opponent * Hotfix for crashing after phazing away a doubles opponent --- src/data/ability.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/data/ability.ts b/src/data/ability.ts index 5a3f1d7b2cd..9cb4cae9db9 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2484,6 +2484,9 @@ function getSheerForceHitDisableAbCondition(): AbAttrCondition { function getWeatherCondition(...weatherTypes: WeatherType[]): AbAttrCondition { return (pokemon: Pokemon) => { + if (!pokemon.scene?.arena) { + return false; + } if (pokemon.scene.arena.weather?.isEffectSuppressed(pokemon.scene)) { return false; }