Fix heart piece item resolution when mirroring

Fix HC big key incrementing total item count
Fix key tracking
Fix misc stat incrementing
This commit is contained in:
cassidoxa
2023-08-14 00:25:59 -04:00
parent a3bc24c383
commit 491e033ff0
3 changed files with 13 additions and 9 deletions

View File

@@ -3,10 +3,9 @@
;--------------------------------------------------------------------------------
HeartPieceGet:
PHX : PHY
LDY.w SpriteID, X ; load item value into Y register
BNE +
JSL.l LoadHeartPieceRoomValue : TAY
+
JSL.l LoadHeartPieceRoomValue
JSL.l ResolveLootIDLong
TAY
JSL.l MaybeMarkDigSpotCollected
.skipLoad
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
@@ -83,14 +82,17 @@ RTL
NormalItemSkipSound:
; Out: C - skip sounds if set
JSL.l CheckIfBossRoom : BCS .boss_room
LDA.b #$00
TDC
CPY #$17 : BEQ .skip
RTL
.boss_room
.boss_room
LDA.w ItemReceiptMethod : CMP.b #$03 : BEQ +
SEC
.skip
SEC
RTL
+
LDA.b #$20
.dont_skip
CLC
RTL
;--------------------------------------------------------------------------------

View File

@@ -145,7 +145,7 @@ AddInventory:
LDA.l StatsLocked : BNE .done
LDA.w InventoryTable_properties,Y : BIT #$01 : BEQ .done
JSR.w ShopCheck : BCS .done
JSR.w DungeonIncrement
JSR.w DungeonIncrement : BCS .done
JSR.w IncrementByOne
JSR.w StampItem
SEP #$20
@@ -210,6 +210,7 @@ DungeonIncrement:
++
+
.done
CLC
RTS
.ballchain_bigkey
LDA.l BigKeysBigChests
@@ -260,6 +261,7 @@ RTS
IncrementByOne:
REP #$20
TYA : ASL : TAX
LDA.w InventoryTable_stat,X : BEQ .skip
STA.b Scrap0B
SEP #$20

View File

@@ -127,7 +127,7 @@ CountChestKey:
TYA
AND.b #$0F : CMP.b #$02 : BCC .hc_sewers
TAX
LDA.l DungeonCollectedKeys,X : INC : STA.l DungeonCollectedKeys
LDA.l DungeonCollectedKeys,X : INC : STA.l DungeonCollectedKeys,X
BRA .done
.this_dungeon
LDA.w DungeonID : CMP.b #$03 : BCC .hc_sewers