Skip to content

Commit

Permalink
Update bugs_and_glitches.md
Browse files Browse the repository at this point in the history
Updated with new "`SFX_RUN` does not play correctly when a wild Pokemon flees from battle
  • Loading branch information
SoupPotato authored Dec 22, 2023
1 parent 9a917e3 commit 46834f0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/bugs_and_glitches.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```

0 comments on commit 46834f0

Please sign in to comment.