Add more shield logic

This commit is contained in:
2026-05-02 23:22:37 -05:00
parent bd722bef33
commit 0f36eca4ab
4 changed files with 85 additions and 12 deletions
+33 -8
View File
@@ -222,24 +222,49 @@ Multiworld_BottleVendor_GiveBottle:
Multiworld_MiddleAgedMan_ReactToSecretKeepingResponse:
{
PHA
JSL ShieldCheck
PLA
BCC .no_take_shield
PHA : PHP
SEP #$20
LDA.l PurpleChest_Item_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLP : PLA
JSL Link_ReceiveItem ; thing we wrote over
RTL
; what we wrote over
JSL Link_ReceiveItem
LDA.l NpcFlagsVanilla
ORA.b #$10
STA.l NpcFlagsVanilla
.no_take_shield
RTL
}
Multiworld_Hobo_GrantBottle:
{
PHA : PHP
SEP #$20
LDA.l HoboItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
PLP : PLA
PHA
JSL ShieldCheck
PLA
BCC .no_take_shield
JSL Link_ReceiveItem ; thing we wrote over
RTL
; first bit we wrote over
LDX.b OverworldIndex
LDA.l OverworldEventDataWRAM, X
ORA.b #$20
STA.l OverworldEventDataWRAM, X
LDA.l HoboItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID
; second bit we wrote over
JSL Link_ReceiveItem
LDA.l NpcFlagsVanilla
ORA.b #$01
STA.l NpcFlagsVanilla
.no_take_shield
RTL
}
Multiworld_MasterSword_GrantToPlayer: