Hall of Fame Crash Fix

I forgot to put a `ret` at the end of `ShowThis`, causing the sequence to break. It also fixes a bug that would trap you in your house if you cleared the game at all - LAST_MAP is set to the player's room due to how we changed the starting position.

The post-game Legendary respawns are NOT fixed with this, for reasons I don't yet know. It's most likely the faulty dex as a whole.

The post-game setup itself now works, though - Route 1 Oak appears, Crater Guard disappears, Bill's Garden becomes accessible, etc.

Cerulean Cave is made accessible through the post-game setup until the gauntlet is officially done.
This commit is contained in:
Llinos Evans 2023-09-07 01:20:53 +01:00
parent 62d39249c0
commit 8bd3b8a703
5 changed files with 10 additions and 14 deletions

View file

@ -4,8 +4,8 @@ IndigoPlateauLobby_Object:
def_warp_events def_warp_events
warp_event 7, 11, LAST_MAP, 1 warp_event 7, 11, LAST_MAP, 1
warp_event 8, 11, LAST_MAP, 2 warp_event 8, 11, LAST_MAP, 2
warp_event 8, 0, HALL_OF_FAME, 1 ; test post-game setup ;warp_event 8, 0, HALL_OF_FAME, 1 ; test post-game setup
;warp_event 8, 0, LORELEIS_ROOM, 1 warp_event 8, 0, LORELEIS_ROOM, 1
def_bg_events def_bg_events

View file

@ -2,8 +2,8 @@ RedsHouse1F_Object:
db $a ; border block db $a ; border block
def_warp_events def_warp_events
warp_event 2, 7, LAST_MAP, 1 warp_event 2, 7, PALLET_TOWN, 1 ; So we can't use LastMap here, due to changing where the player starts upon clearing the game.
warp_event 3, 7, LAST_MAP, 1 warp_event 3, 7, PALLET_TOWN, 1
warp_event 7, 1, REDS_HOUSE_2F, 1 warp_event 7, 1, REDS_HOUSE_2F, 1
def_bg_events def_bg_events

View file

@ -4,11 +4,11 @@ RedsHouse2F_Object:
def_warp_events def_warp_events
warp_event 7, 1, REDS_HOUSE_1F, 3 warp_event 7, 1, REDS_HOUSE_1F, 3
;warp_event 5, 1, SILPH_GAUNTLET_7F, 1 ; - Test Chief ;warp_event 5, 1, SILPH_GAUNTLET_7F, 1 ; - Test Chief
warp_event 5, 1, SILPH_CO_11F, 2 ; - Test J&J, Omega, & Giovanni. To test the Omega refight, change to SHOW in hide/show data, and set warp ID to 1. ;warp_event 5, 1, SILPH_CO_11F, 2 ; - Test J&J, Omega, & Giovanni. To test the Omega refight, change to SHOW in hide/show data, and set warp ID to 1.
;warp_event 5, 1, ROCKET_HIDEOUT_B4F, 2 ; - Test Giovanni 1 ;warp_event 5, 1, ROCKET_HIDEOUT_B4F, 2 ; - Test Giovanni 1
;warp_event 5, 1, MT_MOON_SQUARE, 1 ; - Test Shop, NPCs, and Crater ;warp_event 5, 1, MT_MOON_SQUARE, 1 ; - Test Shop, NPCs, and Crater
;warp_event 5, 1, CELESTE_HILL, 1 ; - Test GMolt ;warp_event 5, 1, CELESTE_HILL, 1 ; - Test GMolt
;warp_event 5, 1, INDIGO_PLATEAU_LOBBY, 1 ; easy league access warp_event 5, 1, HALL_OF_FAME, 1 ; Test post-game setup
;warp_event 5, 1, GARNET_CAVERN_B1F, 1 ; Test GCuno ;warp_event 5, 1, GARNET_CAVERN_B1F, 1 ; Test GCuno
;warp_event 5, 1, FARAWAY_ISLAND_INSIDE, 1 ; Test Mew ;warp_event 5, 1, FARAWAY_ISLAND_INSIDE, 1 ; Test Mew

View file

@ -228,8 +228,6 @@ DebugItemsList:
db BOTTLE_CAP, 99 db BOTTLE_CAP, 99
db -1 ; end db -1 ; end
DebugUnusedList:
db -1 ; end
ELSE ELSE
ret ret
ENDC ENDC

View file

@ -113,7 +113,6 @@ HallofFameRoomText1:
; Post-Game Functionality ; Post-Game Functionality
; This script is adapted from the Silph Co. 11F script that reforms Saffron City. ; This script is adapted from the Silph Co. 11F script that reforms Saffron City.
; It replaces the Cerulean Cave Guard bit, adapting him into the whole ordeal. ; It replaces the Cerulean Cave Guard bit, adapting him into the whole ordeal.
PostGameSetup: PostGameSetup:
ld hl, ObjectsToHide ld hl, ObjectsToHide
.loop1 ; Hides .loop1 ; Hides
@ -135,6 +134,7 @@ PostGameSetup:
call ShowThis call ShowThis
pop hl pop hl
jr .loop2 jr .loop2
; do NOT put a ret here it's going to ret if zero earlier in the script BE EFFICIENT ffs
; Begin conditional shows for Legendary Pokemon. ; Begin conditional shows for Legendary Pokemon.
; Here, we check if a Pokemon is owned, and if it is, we reset their events. ; Here, we check if a Pokemon is owned, and if it is, we reset their events.
@ -165,11 +165,10 @@ ResetLegendaryPokemon:
; If Omega wasn't caught, it'll be available in the empty room of Silph Co. 11F. ; If Omega wasn't caught, it'll be available in the empty room of Silph Co. 11F.
; In my mind, Omega was sent there, pending eventual scrapping for spare parts. ; In my mind, Omega was sent there, pending eventual scrapping for spare parts.
ld a, DEX_OMEGA ld a, DEX_OMEGA
ld [wd11e], a
call HoFIsPokemonBitSet call HoFIsPokemonBitSet
jr nz, .skipOmega jr nz, .skipOmega
ResetEvent EVENT_BEAT_OMEGA ; Reusing the old event - it's completely free to use. ResetEvent EVENT_BEAT_OMEGA ; Reusing the old event - it's completely free to use.
ld a, HS_OMEGA_2 ld a, HS_OMEGA_2 ; However, we want to use the different Omega placement!
call ShowThis call ShowThis
.skipOmega .skipOmega
; Mew's hints aren't until the post-game, but is available regardless. ; Mew's hints aren't until the post-game, but is available regardless.
@ -181,10 +180,8 @@ ResetLegendaryPokemon:
ld a, HS_MEW ld a, HS_MEW
call ShowThis call ShowThis
.skipMew .skipMew
; If you haven't cleared the game yet, you've not met the Galarian Birds.
; So we may as well skip processing all this.
CheckEvent EVENT_POST_GAME_ATTAINED CheckEvent EVENT_POST_GAME_ATTAINED
jp z, .skipGalarianBirdsAndMewtwo jp z, .skipGalarianBirdsAndMewtwo ; If you haven't cleared the game yet, you've not met the Galarian Birds. So we may as well skip processing all this.
ld a, DEX_ARTICUNO_G ld a, DEX_ARTICUNO_G
call HoFIsPokemonBitSet call HoFIsPokemonBitSet
jr z, .skipArticunoG jr z, .skipArticunoG
@ -220,6 +217,7 @@ ResetLegendaryPokemon:
ShowThis: ShowThis:
ld [wMissableObjectIndex], a ld [wMissableObjectIndex], a
predef ShowObject predef ShowObject
ret
ObjectsToShow: ObjectsToShow:
db HS_ROUTE_1_OAK ; Oak post-game fight db HS_ROUTE_1_OAK ; Oak post-game fight