fix: issues around item substitution for harder difficulties
This commit is contained in:
@@ -679,7 +679,8 @@ KeyGet:
|
|||||||
JSL CountChestKeyLong
|
JSL CountChestKeyLong
|
||||||
++ PLA : RTL
|
++ PLA : RTL
|
||||||
+ STY $00
|
+ STY $00
|
||||||
LDA SprItemMWPlayer, X : STA !MULTIWORLD_ITEM_PLAYER_ID : BNE .receive
|
LDA SprItemMWPlayer, X : STA !MULTIWORLD_ITEM_PLAYER_ID
|
||||||
|
STA !MULTIWORLD_SPRITEITEM_PLAYER_ID : BNE .receive
|
||||||
PHX
|
PHX
|
||||||
LDA $040C : CMP #$FF : BNE +
|
LDA $040C : CMP #$FF : BNE +
|
||||||
LDA $00 : CMP.b #$AF : BNE .skip
|
LDA $00 : CMP.b #$AF : BNE .skip
|
||||||
@@ -696,6 +697,7 @@ KeyGet:
|
|||||||
.skip PLX
|
.skip PLX
|
||||||
.receive
|
.receive
|
||||||
JSL $0791b3 ; Player_HaltDashAttackLong
|
JSL $0791b3 ; Player_HaltDashAttackLong
|
||||||
|
TYA : JSL.l AttemptItemSubstitution : JSL.l ResolveLootIDLong : TAY
|
||||||
JSL.l Link_ReceiveItem
|
JSL.l Link_ReceiveItem
|
||||||
PLA : DEC : RTL
|
PLA : DEC : RTL
|
||||||
|
|
||||||
|
|||||||
13
newitems.asm
13
newitems.asm
@@ -692,20 +692,15 @@ ResolveReceipt:
|
|||||||
PHA : PHX
|
PHA : PHX
|
||||||
PHK : PLB
|
PHK : PLB
|
||||||
JSL.l PreItemGet
|
JSL.l PreItemGet
|
||||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE +
|
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||||
LDA.w ItemReceiptID
|
LDA.w ItemReceiptID : STA.l !MULTIWORLD_ITEM_ID
|
||||||
.get_item
|
|
||||||
JSL.l AttemptItemSubstitution
|
JSL.l AttemptItemSubstitution
|
||||||
JSR.w HandleBowTracking
|
JSR.w HandleBowTracking
|
||||||
+
|
|
||||||
LDA.w ItemReceiptID
|
|
||||||
STA.l !MULTIWORLD_ITEM_ID
|
|
||||||
JSR.w ResolveLootID
|
JSR.w ResolveLootID
|
||||||
.have_item
|
|
||||||
STA.w ItemReceiptID
|
STA.w ItemReceiptID
|
||||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE +
|
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE +
|
||||||
LDA.w ItemReceiptID
|
LDA.w ItemReceiptID
|
||||||
JSR IncrementItemCounters
|
JSR IncrementItemCounters
|
||||||
+
|
+
|
||||||
PLX : PLA
|
PLX : PLA
|
||||||
RTS
|
RTS
|
||||||
|
|||||||
@@ -464,10 +464,13 @@ Shopkeeper_BuyItem:
|
|||||||
LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here.
|
LDA.l EnableShopItemCount, X : STA.l ShopEnableCount ; If so, store the permission to count the item here.
|
||||||
+++
|
+++
|
||||||
PLX
|
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.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X
|
||||||
LDA.b #0 : STA.l ShopEnableCount
|
LDA.b #0 : STA.l ShopEnableCount
|
||||||
|
|
||||||
TXA : LSR #2 : TAX
|
TXA : LSR #2 : TAX
|
||||||
LDA.l ShopType : BIT.b #$80 : BNE +
|
LDA.l ShopType : BIT.b #$80 : BNE +
|
||||||
LDA ShopkeeperRefill : BNE +++
|
LDA ShopkeeperRefill : BNE +++
|
||||||
|
|||||||
Reference in New Issue
Block a user