allow disabling of stuns from boomerang and hookshot

This commit is contained in:
sporchia
2018-03-12 01:41:20 -04:00
parent 8773c3c57a
commit fb0f87c19b
3 changed files with 31 additions and 2 deletions

View File

@@ -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
;--------------------------------------------------------------------------------