Merge pull request #131 from Bonta0/chestturns

Credits: Add chest turns counter
This commit is contained in:
KatDevsGames
2021-06-28 11:47:01 -05:00
committed by GitHub
5 changed files with 32 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
;================================================================================
; Stat Tracking
;================================================================================
; $7EF420 - $7EF466 - Stat Tracking
; $7EF420 - $7EF468 - Stat Tracking
;--------------------------------------------------------------------------------
; $7EF420 - bonk counter
;--------------------------------------------------------------------------------
@@ -137,6 +137,8 @@
;--------------------------------------------------------------------------------
; $7EF466w[2] - mirror timestamp (high)
;--------------------------------------------------------------------------------
; $7EF468 - chest turn counter
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
!LOCK_STATS = "$7EF443"
@@ -321,6 +323,15 @@ IncrementFairyRevivalCounter:
PLA
RTL
;--------------------------------------------------------------------------------
!CHESTTURN_COUNTER = "$7EF468"
IncrementChestTurnCounter:
PHA
LDA !LOCK_STATS : BNE +
LDA !CHESTTURN_COUNTER : INC : STA !CHESTTURN_COUNTER
+
PLA
RTL
;--------------------------------------------------------------------------------
!CHEST_COUNTER = "$7EF442"
IncrementChestCounter:
LDA.b #$01 : STA $02E9 ; thing we wrote over