From 9a430f9fc0e121995b0319e6fd9675c35480f9c5 Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 27 Apr 2024 13:28:09 -0400 Subject: [PATCH] sick kid item trigger by song of healing --- Sprites/NPCs/bug_net_kid.asm | 42 +++++++++++++++++++++++++----------- Sprites/all_sprites.asm | 4 +++- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Sprites/NPCs/bug_net_kid.asm b/Sprites/NPCs/bug_net_kid.asm index f368659..f1030ab 100644 --- a/Sprites/NPCs/bug_net_kid.asm +++ b/Sprites/NPCs/bug_net_kid.asm @@ -1,3 +1,19 @@ +; Sick Kid - Bug Net Kid +; Gives the Boots if the player plays the Song of Healing + +SickKid_CheckForSongOfHealing: +{ + LDA $FE : CMP.b #$01 : BNE .no_song + + INC $0D80, X + INC $02E4 + STZ $FE + +.no_song + + RTL +} + pushpc org $07F4D0 @@ -6,6 +22,16 @@ Sprite_CheckIfPlayerPreoccupied: org $06F154 Sprite_CheckDamageToPlayer_same_layer: +org $068D7F +SpritePrep_SickKid: +{ + LDA.l $7EF355 : BEQ .no_boots + LDA.b #$03 : STA $0D80, X + .no_boots + INC.w $0BA0, X + RTS +} + org $06B962 BugNetKid_Resting: { @@ -13,26 +39,18 @@ BugNetKid_Resting: JSR Sprite_CheckDamageToPlayer_same_layer : BCC .dont_awaken - LDA.l $7EF34C + JSL SickKid_CheckForSongOfHealing + LDA.l $7EF355 + CMP.b #$01 : BCC .no_boots - CMP.b #$01 : BCC .no_ocarina - - INC $0D80, X - - INC $02E4 - .dont_awaken RTS -.no_ocarina - - ; "... Do you have a bottle to keep a bug in? ... I see. You don't..." +.no_boots LDA.b #$04 LDY.b #$01 - JSL Sprite_ShowSolicitedMessageIfPlayerFacing - RTS } diff --git a/Sprites/all_sprites.asm b/Sprites/all_sprites.asm index 53b492e..4f44ba0 100644 --- a/Sprites/all_sprites.asm +++ b/Sprites/all_sprites.asm @@ -99,6 +99,8 @@ print "End of deku_scrub_enemy.asm ", pc incsrc "Sprites/NPCs/ranch_girl.asm" print "End of Ranch Girl.asm ", pc +incsrc "Sprites/NPCs/bug_net_kid.asm" + incsrc "Sprites/Bosses/arrghus.asm" print "End of arrghus.asm ", pc @@ -114,6 +116,6 @@ print "End of Lanmola_Expanded.asm ", pc ; incsrc "Sprites/Bosses/octoboss.asm" ; print "End of octoboss.asm ", pc -incsrc "Sprites/NPCs/bug_net_kid.asm" + warnpc $328000 \ No newline at end of file