fairy revival counter

This commit is contained in:
Karkat
2018-01-06 22:48:26 -05:00
parent 7a77e900bf
commit f500950e51
2 changed files with 26 additions and 1 deletions

View File

@@ -115,7 +115,7 @@
; s - swordless bosses
; c - capacity upgrades
;--------------------------------------------------------------------------------
; $7EF453 - unused
; $7EF453 - fairy revival counter
;--------------------------------------------------------------------------------
; $7EF454w[2] - challenge timer (low)
;--------------------------------------------------------------------------------
@@ -224,6 +224,18 @@ IncrementSmallKeys:
PLX
RTL
;--------------------------------------------------------------------------------
IncrementSmallKeysNoPrimary:
STA $7EF36F ; thing we wrote over, write small key count
PHX
LDA !LOCK_STATS : BNE +
JSL AddInventory_incrementKeyLong
+
JSL.l UpdateKeys
JSL.l HUD_RebuildLong
PLX
RTL
;--------------------------------------------------------------------------------
DecrementSmallKeys:
STA $7EF36F ; thing we wrote over, write small key count
JSL.l UpdateKeys
@@ -248,6 +260,16 @@ IncrementDeathCounter:
PLA
RTL
;--------------------------------------------------------------------------------
!FAIRY_COUNTER = "$7EF453"
IncrementFairyRevivalCounter:
STA $7EF35C, X ; thing we wrote over
PHA
LDA !LOCK_STATS : BNE +
LDA !FAIRY_COUNTER : INC : STA !FAIRY_COUNTER
+
PLA
RTL
;--------------------------------------------------------------------------------
!CHEST_COUNTER = "$7EF442"
IncrementChestCounter:
LDA.b #$01 : STA $02E9 ; thing we wrote over