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 #179 : BEQ .somewhere_cool ; Room in Misery Mire
CMP.w #213 : BEQ .somewhere_cool ; Laser Bridge CMP.w #213 : BEQ .somewhere_cool ; Laser Bridge
CMP.w #279 : BEQ .somewhere_cool ; Spike Cave CMP.w #279 : BEQ .somewhere_cool ; Spike Cave
SEP #$20 ; set 8-bit accumulator SEP #$20 ; set 8-bit accumulator
BRA .nowhere_special BRA .nowhere_special
.somewhere_cool .somewhere_cool
@@ -72,3 +72,19 @@ ActivateInvulnerabilityOrDont:
LDA.l ByrnaInvulnerability : STA $037B LDA.l ByrnaInvulnerability : STA $037B
RTL 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
;--------------------------------------------------------------------------------

View File

@@ -284,6 +284,12 @@ JSL.l CalculateCapeUsage
org $08DCA7 ; <- 45CA7 - ancilla_cane_spark.asm : 256 (LDA.b #$01 : STA $037B) org $08DCA7 ; <- 45CA7 - ancilla_cane_spark.asm : 256 (LDA.b #$01 : STA $037B)
JSL.l ActivateInvulnerabilityOrDont : NOP 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 ; 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) org $008C1B ; Bank00.asm@1633 (LDA.b #$01 : STA $420B)
JSL ParadoxCaveGfxFix JSL ParadoxCaveGfxFix
NOP NOP

View File

@@ -790,6 +790,13 @@ org $30817F ; PC 0x18017F
Seizure_Safety: Seizure_Safety:
db #$00 ; #$00 = Off (Default) - #$01 = Limit Certain Effects 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 org $308190 ; PC 0x180190
TimerStyle: TimerStyle:
db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch