Bee Mode WIP

This commit is contained in:
2022-04-29 15:23:47 -07:00
parent 90a4c50a01
commit 103c41ae94
4 changed files with 59 additions and 6 deletions

View File

@@ -2829,6 +2829,10 @@ db $B2, $28, $B3, $28, $C2, $28, $C2, $68
org $079CE6 ; Bank07.asm@4632 (LDA #$80 : TSB $3A)
JSL CheckDetonateBomb
;--------------------------------------------------------------------------------
org $1EDCF8 ; bank_1E.asm@16086 (LDX $0202 : ...)
JSL SetBeeType
BRA + : NOP #15 : +
;--------------------------------------------------------------------------------
;================================================================================
; Variable Ganon Vulnerability
@@ -2845,8 +2849,9 @@ org $0DD628 ; Bank0D.asm@1266 (LDA $0B6B, Y : AND #$02)
JSL CheckBeeBoss
NOP
;--------------------------------------------------------------------------------
org $0DD677 ; Bank0D.asm@1303 (JSL Ancilla_CheckSpriteDamage.preset_class)
org $0DD676 ; Bank0D.asm@1303 (TYX : JSL Ancilla_CheckSpriteDamage.preset_class)
JSL Ganon_CheckBeeVulnerability
NOP
;--------------------------------------------------------------------------------
;================================================================================

View File

@@ -331,6 +331,7 @@ AllowBombingMoldorm:
CMP #$03 : BEQ .no_disable_projectiles
CMP #$04 : BEQ .no_disable_projectiles
CMP #$05 : BEQ .no_disable_projectiles
CMP #$06 : BEQ .no_disable_projectiles
INC $0BA0, X
.no_disable_projectiles
JSL !SPRITE_INITIALIZED_SEGMENTED
@@ -432,6 +433,12 @@ StoreSwordDamage:
LDA #$05
RTL
;--------------------------------------------------------------------------------
BeeDamageClass:
db $01
db $06, $00, $07, $08, $0A
db $0B, $0C, $0D, $0E, $0F
db $01, $03, $01, $01, $01
db $01, $01, $01, $01, $01
CheckDetonateBomb:
LDA.l SpecialWeapons : CMP.b #$01 : BNE .not_bomb_mode
.detonate_bombs
@@ -445,9 +452,33 @@ CheckDetonateBomb:
.next_ancilla
DEX
BPL .check_ancilla
BRA .done
.not_bomb_mode
LDA.l SpecialWeapons : CMP.b #$06 : BNE .done
JSL $1EDCC9
BMI .done
PHX
LDX.w $0202
LDA.l BeeDamageClass, X
STA.w $0ED0, Y
PLX
.done
; what we wrote over
LDA.b #$80
TSB.b $3A
RTL
;--------------------------------------------------------------------------------
SetBeeType:
LDA.l SpecialWeapons : CMP.b #$06 : BNE .regular_bee
LDX.w $0202
LDA.l $7EF33F, X
TAX
LDA.l $7EF35B, X
CMP.b #$08
BNE .regular_bee
LDA.b #$01
STA.w $0EB0, Y
.regular_bee
LDA.b #$01
STA.w $0ED0, Y
RTL

View File

@@ -112,7 +112,14 @@ db #$00 ; #$00 = Default behavior (silver arrows)
;--------------------------------------------------------------------------------
org $30802F ; PC 0x18003F
SpecialWeapons:
db #$00 ; #$00 = Off (default) - #$01 = Bomb-Only mode - #$02 = Pseudosword mode - #$03 = Byrna-Only mode - #$04 = Somaria-Only mode - #$05 = Canes-Only mode
db #$00
; $00 = Off (default)
; $01 = Bomb-Only mode
; $02 = Pseudosword
; $03 = Byrna-Only mode
; $04 = Somaria-Only mode
; $05 = Canes-Only mode
; $06 = Bee mode
;--------------------------------------------------------------------------------
org $308030 ; PC 0x180030
EnableSRAMTrace:

View File

@@ -68,17 +68,24 @@ Ganon_CheckPowderVulnerability: ; we know it's powder
RTL
;--------------------------------------------------------------------------------
Ganon_CheckBeeVulnerability: ; we know it's a bee
; X is bee sprite index
; Y is target sprite index
LDA.l GanonVulnerabilityItem : CMP #$10 : BNE .normal ; ganon not vulnerable to bee
LDA $0E20, X : CMP #$D7 : BNE .normal ; not stunned ganon
LDA $0EE0, X : BNE .normal ; ganon has iframes
LDA $0E20, Y : CMP #$D7 : BNE .normal ; not stunned ganon
LDA $0EE0, Y : BNE .normal ; ganon has iframes
LDA.l Ganon_IFrameDuration+$10
STA $0EE0, X ; give the poor pig some iframes
LDA #$20 : STA $0F10, X
STA $0EE0, Y ; give the poor pig some iframes
LDA #$20 : STA $0F10, Y
LDA #$09
BRA .done
.normal
LDA.l SpecialWeapons : CMP.b #$06 : BNE .regular_bee
LDA.w $0ED0, X
BRA .done
.regular_bee
LDA.b #$01
.done
TYX
JSL.l !ANCILLA_CHECK_SPRITE_DAMAGE_PRESET_CLASS
RTL
;--------------------------------------------------------------------------------
@@ -108,6 +115,9 @@ Ganon_CheckHammerVulnerability: ; we know it's hammer
;--------------------------------------------------------------------------------
CheckBeeBoss:
; Y is sprite index
LDA.l SpecialWeapons : CMP #$06 : BNE .not_bee_mode
LDA #$00 : RTL
.not_bee_mode
LDA.l GanonVulnerabilityItem : CMP #$10 : BNE .normal ; ganon not vulnerable to bee
LDA $0E20, Y : CMP #$D7 : BNE .normal ; not stunned ganon
LDA #$00 : RTL