Fix gold bugnet mothula, bugnet on B

This commit is contained in:
2023-09-01 16:32:39 -05:00
parent cd1a1f4288
commit b52404469b
3 changed files with 26 additions and 16 deletions

View File

@@ -660,6 +660,9 @@ Link_ReceiveItem:
org $079F82
Link_UseHammer:
org $07AFEE
Link_UseBugNet:
org $07A985
SetGameModeLikeMirror:

View File

@@ -2968,9 +2968,6 @@ db $B2, $28, $B3, $28, $C2, $28, $C2, $68
org $079CE6 ; Bank07.asm@4632 (LDA #$80 : TSB $3A)
JSL CheckDetonateBomb
;--------------------------------------------------------------------------------
org $079D08 ; bank_07.asm@6068 (INC $3C : LDA $3C : CMP #$09)
JSL NoSwingHammerB : NOP #2
;--------------------------------------------------------------------------------
org $1EDCF8 ; bank_1E.asm@16086 (LDX $0202 : ...)
JSL SetBeeType
BRA + : NOP #15 : +
@@ -2987,7 +2984,9 @@ NOP #48
skip 11
.bee_valid_target
;--------------------------------------------------------------------------------
org $07F88C ; free rom from F877 - F88F; the starting part of this is used in quadrant glitch fix below, however.
org $07F888 ; free rom from F877 - F88F; the starting part of this is used in quadrant glitch fix in overworld fork, however.
Link_UseBugNetLong:
JSR Link_UseBugNet : RTL
Link_UseHammerLong:
JSR Link_UseHammer : RTL
warnpc $07F890

View File

@@ -470,13 +470,20 @@ CheckDetonateBomb:
.not_bomb_mode
LDA.l SpecialWeapons : CMP.b #$06 : BEQ .release_bee
CMP.b #$07 : BEQ .hammer
CMP.b #$08 : BEQ .net
BRA .done
.hammer
LDA.l HammerEquipment : BEQ .done
LDA.b $3A : ORA.b #$40 : STA.b $3A
LDA.b #$04 : STA.w $0304
JSL Link_UseHammerLong
BRA .done
RTL
.net
LDA.l BugNetEquipment : BEQ .done
LDA.b $3A : ORA.b #$40 : STA.b $3A
LDA.b #$07 : STA.w $0304
JSL Link_UseBugNetLong
RTL
.release_bee
LDX.w $0202
LDA.l BeeDamageClass, X : CMP.b #$FF : BEQ .nope
@@ -603,16 +610,6 @@ SEP #$10
PLP : PLX
RTS
;--------------------------------------------------------------------------------
NoSwingHammerB:
LDA.l SpecialWeapons : CMP.b #$07 : BNE .normal
LDA.l HammerEquipment : BEQ .normal
SEC : RTL
.normal ; what we wrote over
INC.b $3C
LDA.b $3C
CMP.b #$09
RTL
;--------------------------------------------------------------------------------
CheckBugNet:
LDA.w $037A : AND.b #$10 : BEQ .done ; normal behavior if not bugnet
LDA.l SpecialWeapons : CMP.b #$08 : BNE .return_10 ; normal behavior if not bugnet mode
@@ -629,7 +626,18 @@ RTL
SetHammerClass:
LDA.l SpecialWeapons : CMP.b #$08 : BNE .normal ; normal behavior if not bugnet mode
LDA.w $037A : AND.b #$10 : BEQ .normal ; normal behavior if not bugnet
LDA.l SpecialWeaponLevel : STA.w $0CF2
LDA 4, S : TAX ; get sprite index off of stack
LDA.w $0E20, X : CMP.b #$88 : BNE .not_mothula
LDA.l SpecialWeaponLevel
CMP #$04 : !BGE .fix_mothula
BRA .done
.fix_mothula
LDA #$03
BRA .done
.not_mothula
LDA.l SpecialWeaponLevel
.done
STA.w $0CF2
RTL
.normal
LDA.w $0301