fix: issues around item substitution for harder difficulties
This commit is contained in:
@@ -679,7 +679,8 @@ KeyGet:
|
||||
JSL CountChestKeyLong
|
||||
++ PLA : RTL
|
||||
+ 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
|
||||
LDA $040C : CMP #$FF : BNE +
|
||||
LDA $00 : CMP.b #$AF : BNE .skip
|
||||
@@ -696,6 +697,7 @@ KeyGet:
|
||||
.skip PLX
|
||||
.receive
|
||||
JSL $0791b3 ; Player_HaltDashAttackLong
|
||||
TYA : JSL.l AttemptItemSubstitution : JSL.l ResolveLootIDLong : TAY
|
||||
JSL.l Link_ReceiveItem
|
||||
PLA : DEC : RTL
|
||||
|
||||
|
||||
13
newitems.asm
13
newitems.asm
@@ -692,20 +692,15 @@ ResolveReceipt:
|
||||
PHA : PHX
|
||||
PHK : PLB
|
||||
JSL.l PreItemGet
|
||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE +
|
||||
LDA.w ItemReceiptID
|
||||
.get_item
|
||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
|
||||
LDA.w ItemReceiptID : STA.l !MULTIWORLD_ITEM_ID
|
||||
JSL.l AttemptItemSubstitution
|
||||
JSR.w HandleBowTracking
|
||||
+
|
||||
LDA.w ItemReceiptID
|
||||
STA.l !MULTIWORLD_ITEM_ID
|
||||
JSR.w ResolveLootID
|
||||
.have_item
|
||||
STA.w ItemReceiptID
|
||||
LDA.l !MULTIWORLD_ITEM_PLAYER_ID : BNE +
|
||||
LDA.w ItemReceiptID
|
||||
JSR IncrementItemCounters
|
||||
LDA.w ItemReceiptID
|
||||
JSR IncrementItemCounters
|
||||
+
|
||||
PLX : PLA
|
||||
RTS
|
||||
|
||||
@@ -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 +++
|
||||
|
||||
Reference in New Issue
Block a user