diff --git a/LTTP_RND_GeneralBugfixes.asm b/LTTP_RND_GeneralBugfixes.asm index 7fee8b6..830ecf0 100644 --- a/LTTP_RND_GeneralBugfixes.asm +++ b/LTTP_RND_GeneralBugfixes.asm @@ -492,6 +492,9 @@ AddWeathervaneExplosion: org $0993DF AddDashTremor: +org $099D04 +AddAncillaLong: + org $09AE64 Sprite_SetSpawnedCoords: @@ -595,6 +598,9 @@ ShopKeeper_RapidTerminateReceiveItem: org $1CF500 Sprite_NullifyHookshotDrag: +org $1CF537 +Ancilla_CheckForAvailableSlot: + org $1DE9B6 Filter_MajorWhitenMain: diff --git a/bugfixes.asm b/bugfixes.asm index eea177c..175c329 100644 --- a/bugfixes.asm +++ b/bugfixes.asm @@ -128,3 +128,13 @@ PodEGFix: .done RTL ;-------------------------------------------------------------------------------- +; Fix crystal not spawning when using somaria vs boss +TryToSpawnCrystalUntilSuccess: + STX $02D8 ; what we overwrote + JSL AddAncillaLong : BCC .spawned ; a clear carry flag indicates success + .failed + RTL + .spawned + STZ $AE ; the "trying to spawn crystal" flag + STZ $AF ; the "trying to spawn pendant" flag +RTL \ No newline at end of file diff --git a/hooks.asm b/hooks.asm index 2488774..2e5d841 100755 --- a/hooks.asm +++ b/hooks.asm @@ -1458,6 +1458,12 @@ JSL.l HUDRebuildIndoorHole ;JSL.l CheckPendantHUD ;NOP #2 ;================================================================================ +org $098BB0 ; <- 048BB0 - ancilla_init.asm:1663 - (STX $02D8 : JSR AddAncilla) +JSL.l TryToSpawnCrystalUntilSuccess +NOP +org $01C74B ; <- 00C74B - bank01.asm:10368 - (STZ $AE, X) +NOP #2 ; this STZ is what makes the crystal never spawn if it fails to spawn on the first try +;================================================================================ org $0DE9C8 ; <- 6E9C8 - equipment.asm:1623 - (LDA $7EF3C5 : CMP.b #$03 : BCC .beforeAgahnim) JSL.l DrawPendantCrystalDiagram : RTS ;NOP #11