Fixed Ganon silvers hint for free-standing items

This commit is contained in:
codemann8
2025-10-18 02:26:42 -05:00
parent dfc182a2d5
commit a9ef09e2d0
6 changed files with 10 additions and 29 deletions

View File

@@ -16,7 +16,7 @@ DrawLibraryItemGFX:
RTL
;--------------------------------------------------------------------------------
SetLibraryItem:
LDY.w SprItemReceipt, X
LDY.w SprSourceItemId, X
JSL ItemSet_Library ; contains thing we wrote over
RTL
;--------------------------------------------------------------------------------
@@ -52,7 +52,7 @@ RTL
;--------------------------------------------------------------------------------
GiveBonkItem:
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.w SprItemReceipt, X
LDA.w SprSourceItemId, X
JSR AbsorbKeyCheck : BCC .notKey
PHY : LDY.b #$24 : JSL AddInventory : PLY ; do inventory processing for a small key
LDA.l CurrentSmallKeys : INC A : STA.l CurrentSmallKeys

View File

@@ -4,19 +4,10 @@
HeartPieceGet:
PHX : PHY
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDY.w SprItemReceipt, X : BNE +
LDA.w SprSourceItemId, X : BNE ++
JSL LoadHeartPieceRoomValue
STA.w SprSourceItemId, X
++
JSL AttemptItemSubstitution
JSL ResolveLootIDLong
STA.w SprItemReceipt, X
TAY
+
LDY.w SprSourceItemId, X
JSL MaybeMarkDigSpotCollected
.skipLoad
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_ITEM_PLAYER_ID
CPY.b #$26 : BNE .not_heart ; don't add a 1/4 heart if it's not a heart piece
CMP.b #$00 : BNE .not_heart
LDA.l HeartPieceQuarter : INC A : AND.b #$03 : STA.l HeartPieceQuarter
@@ -32,16 +23,7 @@ RTL
HeartContainerGet:
PHX : PHY
JSL IncrementBossSword
LDY.w SprItemReceipt, X : BNE +
LDA.w SprSourceItemId, X : BNE ++
JSL LoadHeartContainerRoomValue
STA.w SprSourceItemId, X
++
JSL AttemptItemSubstitution
JSL ResolveLootIDLong
STA.w SprItemReceipt, X
TAY
+
LDY.w SprSourceItemId, X
BRA HeartPieceGet_skipLoad
;--------------------------------------------------------------------------------
DrawHeartPieceGFX:

View File

@@ -646,7 +646,7 @@ RTL
; CollectPowder:
;--------------------------------------------------------------------------------
CollectPowder:
LDY.w SprItemReceipt, X ; Retrieve stored item type
LDY.w SprSourceItemId, X ; Retrieve stored item type
BNE +
; if for any reason the item value is 0 reload it, just in case
%GetPossiblyEncryptedItem(WitchItem, SpriteItemValues) : TAY

View File

@@ -682,7 +682,7 @@ KeyGet:
PHA
LDA.l StandingItemsOn : BNE +
PLA : RTL
+ LDY.w SprItemReceipt, X
+ LDY.w SprSourceItemId, X
LDA.w SprItemIndex, X : STA.w SpawnedItemIndex
LDA.w SprItemFlags, X : STA.w SpawnedItemFlag
STY.b Scrap00
@@ -704,7 +704,7 @@ KeyGet:
.skip PLX
.receive
JSL Player_HaltDashAttackLong
TYA : JSL AttemptItemSubstitution : JSL ResolveLootIDLong : TAY
TYA : JSL AttemptItemSubstitution : TAY
JSL Link_ReceiveItem
PLA : DEC : RTL
@@ -712,7 +712,7 @@ KeyTable:
db $A0, $A0, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $AA, $AB, $AC, $AD
BigKeyGet:
LDY.w SprItemReceipt, X
LDY.w SprSourceItemId, X
CPY.b #$32 : BNE +
STZ.w ItemReceiptMethod : LDY.b #$32 ; what we wrote over
PHX : JSL Link_ReceiveItem : PLX ; what we wrote over

View File

@@ -138,7 +138,7 @@ RTL
ItemSet_Mushroom:
PHA
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
LDY.w SprItemReceipt, X ; Retrieve stored item type
LDY.w SprSourceItemId, X ; Retrieve stored item type
BNE +
; if for any reason the item value is 0 reload it, just in case
%GetPossiblyEncryptedItem(MushroomItem, SpriteItemValues) : TAY

View File

@@ -466,7 +466,6 @@ Shopkeeper_BuyItem:
PLX
LDA.l ShopInventory, X
JSL AttemptItemSubstitution
JSL ResolveLootIDLong
TAY : JSL Link_ReceiveItem
LDA.l ShopInventory+3, X : INC : STA.l ShopInventory+3, X
LDA.b #$00 : STA.l ShopEnableCount