From 5f683cfcc79cc0aa8bb7fc53c6970568c2f05414 Mon Sep 17 00:00:00 2001 From: TiKevin83 Date: Tue, 31 Oct 2023 03:08:08 -0400 Subject: [PATCH] Add fix documentation for battle transition empty party glitch --- docs/bugs_and_glitches.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md index fa1050fd1..0c7acc25c 100644 --- a/docs/bugs_and_glitches.md +++ b/docs/bugs_and_glitches.md @@ -41,7 +41,15 @@ The Battle Transitions code has no error handling for this and reads wPartyMon1H This means you can manipulate this first transition to be faster by choosing a default rival name or writing and deleting 6 characters in a custom rival name. A similar series of bugs appears to exist in pokecrystal. -**Fix:** TBD in [engine/battle/battle_transitions.asm#L93](/engine/battle/battle_transitions.asm#L93) +**Fix:** Update [engine/battle/battle_transitions.asm#L93](/engine/battle/battle_transitions.asm#L93) + +```diff +GetBattleTransitionID_CompareLevels: ++ ld a, [wPartyCount] ++ cp 0 ++ jr z, .highLevelEnemy + ld hl, wPartyMon1HP +``` ## `wPikachuFollowCommandBuffer` can overflow