From 1cdaaa6bed1c9c571df0aeb05b12350f49254c84 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sat, 26 Oct 2024 06:30:52 -0700 Subject: [PATCH] Protect against missing move entry Co-authored-by: PigeonBar <56974298+PigeonBar@users.noreply.github.com> --- src/data/move.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index eede84a2a52..154f4671dbe 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1421,7 +1421,7 @@ export class RecoilAttr extends MoveEffectAttr { } // Chloroblast and Struggle should not deal recoil damage if the move was not successful - if (this.useHp && [ MoveResult.FAIL, MoveResult.MISS ].includes(user.getLastXMoves(1)[0].result)) { + if (this.useHp && [ MoveResult.FAIL, MoveResult.MISS ].includes(user.getLastXMoves(1)[0]?.result)) { return false; }