fix: issues around item substitution for harder difficulties

This commit is contained in:
aerinon
2024-02-07 15:15:22 -07:00
parent ed8cefe0c6
commit 16d249859f
3 changed files with 12 additions and 12 deletions

View File

@@ -464,10 +464,13 @@ Shopkeeper_BuyItem:
LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here.
+++
PLX
LDA.l ShopInventory, X : TAY : JSL.l Link_ReceiveItem
LDA.l ShopInventory, X
JSL.l AttemptItemSubstitution
JSL.l ResolveLootIDLong
TAY
JSL.l Link_ReceiveItem
LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X
LDA.b #0 : STA.l ShopEnableCount
TXA : LSR #2 : TAX
LDA.l ShopType : BIT.b #$80 : BNE +
LDA ShopkeeperRefill : BNE +++