Fix gold bugnet mothula, bugnet on B

This commit is contained in:
2023-09-01 16:32:39 -05:00
parent d71ffe0d9a
commit 7a56ce4cb7
3 changed files with 24 additions and 16 deletions

View File

@@ -2523,9 +2523,6 @@ db $B2, $28, $B3, $28, $C2, $28, $C2, $68
org $879CE6 ; Bank07.asm@4632 (LDA #$80 : TSB $3A)
JSL CheckDetonateBomb
;--------------------------------------------------------------------------------
org $879D08 ; 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 : +
@@ -2542,7 +2539,9 @@ NOP #48
skip 11
.bee_valid_target
;--------------------------------------------------------------------------------
org $87F88C ; free rom from F877 - F88F; the starting part of this is used in quadrant glitch fix in overworld fork, however.
org $87F888 ; 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 $87F890

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

View File

@@ -141,6 +141,7 @@ RoomTag_GetHeartForPrize_spawn_prize = $81C731
RoomTag_GetHeartForPrize_delete_tag = $81C749
Chicken_SpawnAvengerChicken = $86A7DB
Link_UseHammer = $879F82
Link_UseBugNet = $87AFEE
Link_PerformOpenChest_no_replacement = $87B59F
Sprite_EA_HeartContainer_main = $85EF47
Ancilla_ExecuteAll = $88832B