[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
This commit is contained in:
Tempoanon 2024-06-19 17:36:23 -04:00 committed by GitHub
parent 3d9b134332
commit cb5cedac84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}