From c430f9c4a91b270090582c471dc5eaf458831089 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 15 Dec 2024 16:16:28 -0500 Subject: [PATCH] Add MagicBean event to OcarinaEffect_SummonStorms --- Items/ocarina.asm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Items/ocarina.asm b/Items/ocarina.asm index a3f6008..bf512c6 100644 --- a/Items/ocarina.asm +++ b/Items/ocarina.asm @@ -254,7 +254,8 @@ org $2B8000 OcarinaEffect_SummonStorms: { ; Dismiss the rain in the Zora area where it is already raining - LDA.w $8A : CMP.b #$1E : BEQ .checkForEvent + LDA.w $8A : CMP.b #$00 : BEQ .check_for_magic_bean + CMP.b #$1E : BEQ .checkForEvent CMP.b #$2E : BEQ .dismissStorms CMP.b #$2F : BEQ .dismissStorms ; Check for areas which should not be allowed to have rain @@ -289,6 +290,16 @@ OcarinaEffect_SummonStorms: .checkForEvent JSR CheckForZoraEvent : BCC .errorBeep JMP .dismissStorms + + .check_for_magic_bean + LDA.b #Sprite_BeanVendor : LDX.b #$00 + JSL Sprite_CheckForPresence : BCC .not_active + ; Check that it's the magic bean planted + LDA.l MagicBeanProg + AND.b #$04 + STA.l MagicBeanProg + .not_active + RTL } ; Y: E8 06, X: 48 0C