From 6d041e1f6a74dfa027721e606e28dfdce4f7bec8 Mon Sep 17 00:00:00 2001 From: Dean Date: Sat, 8 Mar 2025 00:11:43 -0800 Subject: [PATCH] Add applyPreLeaveFieldAbAttrs call to AttemptRunPhase --- src/phases/attempt-run-phase.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/phases/attempt-run-phase.ts b/src/phases/attempt-run-phase.ts index 72a108c1991..2825f11f7bc 100644 --- a/src/phases/attempt-run-phase.ts +++ b/src/phases/attempt-run-phase.ts @@ -1,4 +1,4 @@ -import { applyAbAttrs, RunSuccessAbAttr } from "#app/data/ability"; +import { applyAbAttrs, applyPreLeaveFieldAbAttrs, PreLeaveFieldAbAttr, RunSuccessAbAttr } from "#app/data/ability"; import { Stat } from "#app/enums/stat"; import { StatusEffect } from "#app/enums/status-effect"; import type { PlayerPokemon, EnemyPokemon } from "#app/field/pokemon"; @@ -34,6 +34,8 @@ export class AttemptRunPhase extends PokemonPhase { applyAbAttrs(RunSuccessAbAttr, playerPokemon, null, false, escapeChance); if (playerPokemon.randSeedInt(100) < escapeChance.value && !this.forceFailEscape) { + enemyField.forEach(enemyPokemon => applyPreLeaveFieldAbAttrs(PreLeaveFieldAbAttr, enemyPokemon)); + globalScene.playSound("se/flee"); globalScene.queueMessage(i18next.t("battle:runAwaySuccess"), null, true, 500);