add byrna/cape magic tracking

This commit is contained in:
spannerisms
2021-07-04 05:21:48 -04:00
parent 00c59c791f
commit 270f0685ff
2 changed files with 18 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ CalculateByrnaUsage:
PLX
++
LDA $7EF36E ; thing we wrote over
RTL
JML IncrementMagicUseCounterByrna
;--------------------------------------------------------------------------------
CalculateCapeUsage:
LDA $1B : BEQ ++
@@ -51,8 +51,7 @@ CalculateCapeUsage:
LDA.l HardModeExclusionCapeUsage, X : STA $4C ; set cape decrement timer
PLX
++
LDA $7EF36E ; thing we wrote over
RTL
JML IncrementMagicUseCounterOne
;--------------------------------------------------------------------------------
ActivateInvulnerabilityOrDont:
LDA $1B : BEQ .nowhere_special

View File

@@ -402,6 +402,8 @@ RTL
IncrementMagicUseCounter:
STA.l $7EF36E
IncrementMagicUseCounterByrna:
PHA : PHP
LDA !LOCK_STATS : BNE +
REP #$21
@@ -415,6 +417,17 @@ IncrementMagicUseCounter:
RTL
IncrementMagicUseCounterOne:
LDA !LOCK_STATS : BNE +
REP #$20
LDA.l !MAGIC_COUNTER
INC
BEQ ++
STA.l !MAGIC_COUNTER
++ SEP #$20
+ LDA.l $7EF36E
RTL
;--------------------------------------------------------------------------------
!OW_MIRROR_COUNTER = "$7EF43A"
IncrementOWMirror: