Ganon_CheckAncillaVulnerability: PHA LDA.w $0EE0, X : BNE .not_vulnerable_pla PLA PHX : PHA LDA.l GanonVulnerabilityItem BMI .no_weakness TAX : PLA CMP.l Ganon_CheckByAncilla, X : BNE + PLX : BRA .vulnerable + PLX : PHA LDA.l GanonVulnerabilityItem BEQ .silver_arrows CMP.b #$01 : BEQ .silver_arrows CMP.b #$11 : BEQ .somaria BRA .not_vulnerable_pla .no_weakness PLA : PLX BRA .not_vulnerable .silver_arrows PLA : CMP.b #$09 : BNE .not_vulnerable LDA.l BowEquipment : CMP.b #$03 : BCS + LDA.b #$09 : BRA .not_vulnerable + BRA .vulnerable .somaria PLA CMP.b #$01 : BEQ .vulnerable CMP.b #$2C : BEQ .vulnerable BRA .not_vulnerable .vulnerable PHX LDA.l GanonVulnerabilityItem TAX LDA.l Ganon_IFrameDuration, X PLX STA.w $0EE0, X ; give the poor pig some iframes LDA.b #$20 : STA.w SpriteTimerE, X LDA.b #$09 RTL .not_vulnerable_pla_pla PLA .not_vulnerable_pla PLA .not_vulnerable PHX : TAX LDA.l $86EC84, X PLX RTL ;-------------------------------------------------------------------------------- Ganon_CheckPowderVulnerability: LDA.l GanonVulnerabilityItem : CMP.b #$05 : BNE .normal LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal LDA.w $0EE0, X : BNE .normal ; ganon has i-frames LDA.l Ganon_IFrameDuration+$05 STA.w $0EE0, X ; give ganon i-frames LDA.b #$20 : STA.w SpriteTimerE, X LDA.b #$09 BRA .done .normal LDA.b #$0A .done JML $86ECE6 ;-------------------------------------------------------------------------------- Ganon_CheckBeeVulnerability: ; X is bee sprite index ; Y is target sprite index LDA.l GanonVulnerabilityItem : CMP.b #$10 : BNE .normal LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal LDA.w $0EE0, Y : BNE .normal ; ganon has i-frames LDA.l Ganon_IFrameDuration+$10 STA.w $0EE0, X ; give ganon i-frames LDA.b #$20 : STA.w SpriteTimerE, X LDA.b #$09 BRA .done .normal LDA.b #$01 .done TYX JML $86ECE6 ;-------------------------------------------------------------------------------- Ganon_CheckInvincible: LDA.w $04C5 : CMP.b #$02 : BEQ .not_transparent LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .transparent ; non-stunned ganon LDA.w UseY1 : AND.b #$0A : BEQ .transparent ; normal behavior if not hammering LDA.l GanonVulnerabilityItem : CMP.b #$0C : BNE .transparent .not_transparent LDA.b #$00 : RTL .transparent LDA.b #$01 : RTL ;-------------------------------------------------------------------------------- Ganon_CheckHammerVulnerability: LDA.l GanonVulnerabilityItem : CMP.b #$0C : BNE .normal LDA.w SpriteTypeTable, X : CMP.b #$D7 : BNE .normal LDA.w $0EE0, X : BNE .normal ; ganon has i-frames LDA.l Ganon_IFrameDuration+$0C STA.w $0EE0, X ; give ganon i-frames LDA.b #$20 : STA.w SpriteTimerE, X LDA.b #$09 : STA.w $0CF2 ; set damage class to silver SEC : RTL .normal CLC : RTL ;-------------------------------------------------------------------------------- CheckBeeBoss: ; Y is sprite index LDA.l GanonVulnerabilityItem : CMP.b #$10 : BNE .normal LDA.w SpriteTypeTable, Y : CMP.b #$D7 : BNE .normal LDA.b #$00 : RTL .normal LDA.w $0B6B, Y : AND.b #$02 RTL ;-------------------------------------------------------------------------------- Ganon_CheckByAncilla: db #$00 ; default behavior db #$00, #$05, #$1F, #$07, #$00 db #$02, #$0B, #$19, #$18, #$1C db #$00, #$00, #$00, #$00, #$00 db #$00, #$00, #$31, #$00, #$00 Ganon_IFrameDuration: db #$00 ; default behavior db #$00, #$00, #$00, #$34, #$00 db #$00, #$00, #$00, #$00, #$00 db #$00, #$00, #$00, #$00, #$00 db #$00, #$00, #$00, #$00, #$00 ;--------------------------------------------------------------------------------