update bean vendor

This commit is contained in:
scawful
2024-06-13 22:21:13 -04:00
parent ec05fac8ee
commit 606a7221fa

View File

@@ -3,7 +3,7 @@
; ========================================================= ; =========================================================
!SPRID = $07 ; The sprite ID you are overwriting (HEX) !SPRID = $07 ; The sprite ID you are overwriting (HEX)
!NbrTiles = 00 ; Number of tiles used in a frame !NbrTiles = 04 ; Number of tiles used in a frame
!Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless !Harmless = 01 ; 00 = Sprite is Harmful, 01 = Sprite is Harmless
!HVelocity = 00 ; Is your sprite going super fast? put 01 if it is !HVelocity = 00 ; Is your sprite going super fast? put 01 if it is
!Health = 00 ; Number of Health the sprite have !Health = 00 ; Number of Health the sprite have
@@ -29,6 +29,7 @@
!ImperviousArrow = 00 ; 01 = Impervious to arrows !ImperviousArrow = 00 ; 01 = Impervious to arrows
!ImpervSwordHammer = 00 ; 01 = Impervious to sword and hammer attacks !ImpervSwordHammer = 00 ; 01 = Impervious to sword and hammer attacks
!Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss !Boss = 00 ; 00 = normal sprite, 01 = sprite is a boss
%Set_Sprite_Properties(Sprite_BeanVendor_Prep, Sprite_BeanVendor_Long) %Set_Sprite_Properties(Sprite_BeanVendor_Prep, Sprite_BeanVendor_Long)
; ========================================================= ; =========================================================
@@ -88,11 +89,7 @@ Sprite_BeanVendor_Main:
JSL Sprite_PlayerCantPassThrough JSL Sprite_PlayerCantPassThrough
%ShowSolicitedMessage($142) : BCC .no_message %ShowSolicitedMessage($142) : BCC .no_message
LDA $1CE8 : BNE .player_said_no %GotoAction(3)
%GotoAction(3)
RTS
.player_said_no
%GotoAction(4)
.no_message .no_message
RTS RTS
} }
@@ -121,32 +118,32 @@ Sprite_BeanVendor_Main:
SpawnMagicBean: SpawnMagicBean:
{ {
%PlayAnimation(0,0,1) %PlayAnimation(0,0,1)
LDA $1CE8 : BNE .player_said_no_or_not_enough_rupees
REP #$20
LDA.l $7EF360
CMP.w #$64 ; 100 rupees
SEP #$30
BCC .not_enough_rupees
REP #$20 REP #$20
LDA.l $7EF360 LDA.l $7EF360
SEC CMP.w #$64 ; 100 rupees
SBC.w #$64 ; Subtract 100 rupees
STA.l $7EF360
SEP #$30 SEP #$30
BCC .player_said_no_or_not_enough_rupees
LDA.b #$07 REP #$20
JSL Sprite_SpawnDynamically LDA.l $7EF360
LDA.b #$02 : STA.w SprAction, Y SEC
LDA.w SprX, X : CLC : ADC.b #$08 : STA $00 SBC.w #$64 ; Subtract 100 rupees
LDA.w SprY, X : STA $02 STA.l $7EF360
LDA.w SprYH, X : STA $03 SEP #$30
LDA.w SprXH, X : STA $01
; TODO: Set a flag that says you've got the magic bean LDA.b #$07
%ShowUnconditionalMessage($145) JSL Sprite_SpawnDynamically
%GotoAction(0) LDA.b #$02 : STA.w SprAction, Y
RTS LDA.w SprX, X : CLC : ADC.b #$08 : STA $00
.not_enough_rupees LDA.w SprY, X : STA $02
LDA.w SprYH, X : STA $03
LDA.w SprXH, X : STA $01
; TODO: Set a flag that says you've got the magic bean
%ShowUnconditionalMessage($145)
%GotoAction(0)
RTS
.player_said_no_or_not_enough_rupees
%GotoAction(4) %GotoAction(4)
RTS RTS
} }