From 46834f0c64f09c46057d3916025d2c93c96048b3 Mon Sep 17 00:00:00 2001 From: SoupPotato Date: Fri, 22 Dec 2023 06:33:47 +0000 Subject: [PATCH] Update bugs_and_glitches.md Updated with new "`SFX_RUN` does not play correctly when a wild Pokemon flees from battle --- docs/bugs_and_glitches.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index 77152efb5c0..adf6e4ef926 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -107,6 +107,7 @@ Fixes in the [multi-player battle engine](#multi-player-battle-engine) category - [`ClearWRAM` only clears WRAM bank 1](#clearwram-only-clears-wram-bank-1) - [`BattleAnimCmd_ClearObjs` only clears the first 6⅔ objects](#battleanimcmd_clearobjs-only-clears-the-first-6-objects) - [Options menu fails to clear joypad state on initialization](#options-menu-fails-to-clear-joypad-state-on-initialization) + - [`SFX_RUN` does not play correctly when a wild Pokemon flees from battle](#sfx_menu-does-not-play-correctly-when-a-awild-pokemon-flees-from-battle) ## Multi-player battle engine @@ -2726,3 +2727,24 @@ This bug allows all the options to be updated at once if the left or right butto ld a, [hl] push af ``` + + +### `SFX_RUN` does not play correctly when a wild Pokemon flees from battle + +Due to the wrong command being used, `SFX_RUN` is never heard when a wild Pokemon flees from battle. + +**Fix:** Edit `WildFled_EnemyFled_LinkBattleCanceled` in [engine/battle/core.asm] +(https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff +.skip_text + call StopDangerSound + call CheckMobileBattleError + jr c, .skip_sfx + + ld de, SFX_RUN +- call PlaySFX ++ call WaitPlaySFX + +.skip_sfx +```