Shield handling for pots and enemy drops and a few more NPCs

This commit is contained in:
2026-02-07 16:51:21 -06:00
parent 381868c3ce
commit 779c9a27ce
12 changed files with 112 additions and 40 deletions

View File

@@ -99,10 +99,8 @@ RTL
ItemSet_OldMan:
PHA
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
LDA.l OldManItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
@@ -119,10 +117,8 @@ RTL
ItemSet_SickKid:
PHA
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
LDA.l SickKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
@@ -135,10 +131,8 @@ RTL
ItemSet_TreeKid:
PHA
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
LDA.l TreeKidItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
@@ -151,10 +145,8 @@ RTL
ItemSet_Sahasrala:
PHA
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
LDA.l SahasralaItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
@@ -171,10 +163,8 @@ RTL
ItemSet_Library:
PHA
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
LDA.l LibraryItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
@@ -187,15 +177,23 @@ RTL
ItemSet_Mushroom:
PHA
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
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
+
JSL ShieldCheck
BCC .skip
LDA.l MushroomItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLA
STZ.w ItemReceiptMethod ; thing we wrote over - the mushroom is an npc for item purposes apparently
PLA
JSL Link_ReceiveItem
PHA
LDA.l NpcFlags+1 : ORA.b #$10 : STA.l NpcFlags+1
.skip
PLA
RTL
ItemSet_Powder:
@@ -273,20 +271,16 @@ MarkThrownItem:
LDA.b OverworldIndex : CMP.b #$81 : BNE .catfish
.zora
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
JSL ItemSet_ZoraKing
LDA.l ZoraItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
BRA .done
.catfish
TYA : STA.b $0C
JSL ShieldCheck
BCC .skip
LDA.b $0C : TAY
JSL ItemSet_Catfish
LDA.l CatfishItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID