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

View File

@@ -402,6 +402,8 @@ RTL
IncrementMagicUseCounter: IncrementMagicUseCounter:
STA.l $7EF36E STA.l $7EF36E
IncrementMagicUseCounterByrna:
PHA : PHP PHA : PHP
LDA !LOCK_STATS : BNE + LDA !LOCK_STATS : BNE +
REP #$21 REP #$21
@@ -415,6 +417,17 @@ IncrementMagicUseCounter:
RTL 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" !OW_MIRROR_COUNTER = "$7EF43A"
IncrementOWMirror: IncrementOWMirror: