Fix bugnet on aga not reflecting balls

This commit is contained in:
2023-09-03 23:27:06 -05:00
parent ae8020642b
commit 52c3033282
2 changed files with 21 additions and 20 deletions

View File

@@ -118,8 +118,8 @@ ProcessEventItems:
RTS
;--------------------------------------------------------------------------------
AddReceivedItemExpanded:
JSR.w ResolveReceipt
PHB : PHK
JSR.w ResolveReceipt
PHB : PHK
JML AddReceivedItem+2
AddReceivedItemExpandedGetItem:
@@ -662,22 +662,22 @@ ItemBehavior:
.done
RTS
.prog_weapon
LDA.l SpecialWeaponLevel : INC : STA.l SpecialWeaponLevel
LDA.l SpecialWeapons : CMP #$01 : BEQ ..bombs
CMP #$03 : BEQ ..byrna
CMP #$04 : BEQ ..somaria
CMP #$08 : BEQ ..bug_net
RTS
..bombs
LDA #$01 : STA.l InfiniteBombs : RTS
INC.w UpdateHUD
..byrna
LDA #$01 : STA.l ByrnaEquipment : RTS
..somaria
LDA #$01 : STA.l SomariaEquipment : RTS
..bug_net
LDA #$01 : STA.l BugNetEquipment : RTS
.prog_weapon
LDA.l SpecialWeaponLevel : INC : STA.l SpecialWeaponLevel
LDA.l SpecialWeapons : CMP #$01 : BEQ ..bombs
CMP #$03 : BEQ ..byrna
CMP #$04 : BEQ ..somaria
CMP #$08 : BEQ ..bug_net
RTS
..bombs
LDA #$01 : STA.l InfiniteBombs : RTS
INC.w UpdateHUD
..byrna
LDA #$01 : STA.l ByrnaEquipment : RTS
..somaria
LDA #$01 : STA.l SomariaEquipment : RTS
..bug_net
LDA #$01 : STA.l BugNetEquipment : RTS
ResolveReceipt:
PHA : PHX

View File

@@ -595,14 +595,15 @@ RTS
;--------------------------------------------------------------------------------
CheckBugNet:
LDA.w $037A : AND.b #$10 : BEQ .done ; normal behavior if not bugnet
PHP ; we want to preserve the carry bit
LDA.l SpecialWeapons : CMP.b #$08 : BNE .return_10 ; normal behavior if not bugnet mode
.bugnet_mode
LDA.w $0E20, X : CMP.b #$E3 : BEQ .return_10 ; normal behavior if fairy
CMP.b #$79 : BEQ .return_10 ; normal behavior if bee
CMP.b #$B2 : BEQ .return_10 ; normal behavior if bee
LDA.b #$00 : BRA .done
PLP : LDA.b #$00 : RTL
.return_10
LDA.b #$10
PLP : LDA.b #$10
.done
RTL
;--------------------------------------------------------------------------------