From 0e332820a0fda4a738c6f03b9a86d97a1e32d662 Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Tue, 2 Jan 2024 23:31:32 -0700 Subject: [PATCH] Update data/abilities.ts --- data/abilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/abilities.ts b/data/abilities.ts index dc838955233c..8b86d393174c 100644 --- a/data/abilities.ts +++ b/data/abilities.ts @@ -1695,7 +1695,7 @@ export const Abilities: {[abilityid: string]: AbilityData} = { }, // The Dive part of this mechanic is implemented in Dive's `onTryMove` in moves.ts onSourceTryPrimaryHit(target, source, effect) { - if (effect && effect.id === 'surf' && source.hasAbility('gulpmissile') && source.species.name === 'Cramorant') { + if (effect?.id === 'surf' && source.hasAbility('gulpmissile') && source.species.name === 'Cramorant') { const forme = source.hp <= source.maxhp / 2 ? 'cramorantgorging' : 'cramorantgulping'; source.formeChange(forme, effect); }