Update MagicBean song of storms logic

This commit is contained in:
scawful
2024-12-15 17:56:35 -05:00
parent a428d736f5
commit 3b9352620e

View File

@@ -259,6 +259,7 @@ OcarinaEffect_SummonStorms:
CMP.b #$28 : BEQ .errorBeep CMP.b #$28 : BEQ .errorBeep
CMP.b #$29 : BEQ .errorBeep CMP.b #$29 : BEQ .errorBeep
.summon_or_dismiss
; If the rain is already summoned, dismiss it ; If the rain is already summoned, dismiss it
LDA.l $7EE00E : BEQ .summonStorms LDA.l $7EE00E : BEQ .summonStorms
.dismissStorms .dismissStorms
@@ -276,8 +277,8 @@ OcarinaEffect_SummonStorms:
RTL RTL
.errorBeep .errorBeep
LDA.b #$3C : STA.w $012E ; Error beep LDA.b #$3C : STA.w $012E ; Error beep
RTL RTL
.checkForEvent .checkForEvent
JSR CheckForZoraEvent : BCC .errorBeep JSR CheckForZoraEvent : BCC .errorBeep
@@ -287,9 +288,13 @@ OcarinaEffect_SummonStorms:
LDA.b #Sprite_BeanVendor : LDX.b #$00 LDA.b #Sprite_BeanVendor : LDX.b #$00
JSL Sprite_CheckForPresence : BCC .not_active JSL Sprite_CheckForPresence : BCC .not_active
; Check that it's the magic bean planted ; Check that it's the magic bean planted
LDA.l MagicBeanProg LDA.l MagicBeanProg : AND.b #$01 : BEQ +
AND.b #$04 AND.b #$04 : BNE +
STA.l MagicBeanProg LDA.l MagicBeanProg
ORA.b #$04
STA.l MagicBeanProg
+
JMP .summon_or_dismiss
.not_active .not_active
RTL RTL
} }