diff options
Diffstat (limited to 'engine/battle/core.asm')
-rw-r--r--[-rwxr-xr-x] | engine/battle/core.asm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 1ca4fa43..8869b4ae 100755..100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -51,7 +51,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ldh [hWY], a ldh [rWY], a xor a - ldh [hTilesetType], a + ldh [hTileAnimations], a ldh [hSCY], a dec a ld [wUpdateSpritesEnabled], a @@ -2013,18 +2013,19 @@ DisplayBattleMenu:: .menuselected ld [wTextBoxID], a call DisplayTextBoxID + ; handle menu input if it's not the old man tutorial ld a, [wBattleType] dec a - jp nz, .handleBattleMenuInput ; handle menu input if it's not the old man tutorial + jp nz, .handleBattleMenuInput ; the following happens for the old man tutorial - ; Temporarily save the player name in wGrassRate, - ; which is supposed to get overwritten when entering a - ; map with wild Pokémon. - ; Due to an oversight, the data may not get - ; overwritten (on Cinnabar and Route 21) and the infamous - ; Missingno. glitch can show up. + ; Temporarily save the player name in wLinkEnemyTrainerName. + ; Since wLinkEnemyTrainerName == wGrassRate, this affects wild encounters. + ; The wGrassRate byte and following wGrassMons buffer are supposed + ; to get overwritten when entering a map with wild Pokémon, + ; but an oversight prevents this in Cinnabar and Route 21, + ; so the infamous MissingNo. glitch can show up. ld hl, wPlayerName - ld de, wGrassRate + ld de, wLinkEnemyTrainerName ld bc, NAME_LENGTH call CopyData ld hl, .oldManName @@ -6275,7 +6276,7 @@ DoBattleTransitionAndInitBattleVariables: ldh [hAutoBGTransferEnabled], a ldh [hWY], a ldh [rWY], a - ldh [hTilesetType], a + ldh [hTileAnimations], a ld hl, wPlayerStatsToDouble ld [hli], a ld [hli], a @@ -6865,8 +6866,8 @@ _InitBattleCommon: ld [wLetterPrintingDelayFlags], a pop af ld [wMapPalOffset], a - ld a, [wSavedTilesetType] - ldh [hTilesetType], a + ld a, [wSavedTileAnimations] + ldh [hTileAnimations], a scf ret .emptyString |