diff --git a/hardmode.asm b/hardmode.asm index 18c5531..0229b81 100644 --- a/hardmode.asm +++ b/hardmode.asm @@ -62,7 +62,7 @@ ActivateInvulnerabilityOrDont: CMP.w #179 : BEQ .somewhere_cool ; Room in Misery Mire CMP.w #213 : BEQ .somewhere_cool ; Laser Bridge CMP.w #279 : BEQ .somewhere_cool ; Spike Cave - + SEP #$20 ; set 8-bit accumulator BRA .nowhere_special .somewhere_cool @@ -72,3 +72,19 @@ ActivateInvulnerabilityOrDont: LDA.l ByrnaInvulnerability : STA $037B RTL ;-------------------------------------------------------------------------------- +CheckStunItemAction: + LDA.b #$40 : STA $0DF0, X + LDA $0303 : CMP #$02 : BNE + ; boomerang + LDA.l StunItemAction : AND #$01 : CMP #$01 : BNE .no_stun + BRA .normal + + + LDA $0303 : CMP #$0E : BNE + ; hookshot + LDA.l StunItemAction : AND #$02 : CMP #$02 : BNE .no_stun + BRA .normal + + + LDA $0CF2 : BEQ .no_stun + .normal + LDA.b #$0B : STA $0DD0, X ; stun enemy + .no_stun +RTL +;-------------------------------------------------------------------------------- diff --git a/hooks.asm b/hooks.asm index 1148e9e..581e8ad 100644 --- a/hooks.asm +++ b/hooks.asm @@ -284,6 +284,12 @@ JSL.l CalculateCapeUsage org $08DCA7 ; <- 45CA7 - ancilla_cane_spark.asm : 256 (LDA.b #$01 : STA $037B) JSL.l ActivateInvulnerabilityOrDont : NOP ;-------------------------------------------------------------------------------- +org $06EF1B ; <- 36F1B - Bank06.asm : 5100 (TYA : STA $7FFA3C, X : BEQ BRANCH_DELTA) +db #$27 +;-------------------------------------------------------------------------------- +org $06EF43 ; <- 36F43 - Bank06.asm : 5117 (LDA.b #$40 : STA $0DF0, X) +JSL CheckStunItemAction : NOP +;-------------------------------------------------------------------------------- ;================================================================================ ; Misc Stats @@ -2141,4 +2147,4 @@ Overworld_Entrance_BRANCH_RHO: ; branch here to continue into door ;-------------------------------------------------------------------------------- org $008C1B ; Bank00.asm@1633 (LDA.b #$01 : STA $420B) JSL ParadoxCaveGfxFix -NOP \ No newline at end of file +NOP diff --git a/tables.asm b/tables.asm index 4826b0c..b474b0c 100644 --- a/tables.asm +++ b/tables.asm @@ -790,6 +790,13 @@ org $30817F ; PC 0x18017F Seizure_Safety: db #$00 ; #$00 = Off (Default) - #$01 = Limit Certain Effects ;================================================================================ +;---- --hb +;h - Hookshot +;b - Boomerang +org $308180 ; PC 0x180180 +StunItemAction: +db #$03 ; #$03 = Hookshot and Boomerang (Default) +;================================================================================ org $308190 ; PC 0x180190 TimerStyle: db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch