Heart pieces and containers shielding, fix some GFX (swords)

This commit is contained in:
2026-02-05 22:10:53 -06:00
parent f6c0de88fb
commit 381868c3ce
7 changed files with 75 additions and 31 deletions

View File

@@ -6,7 +6,16 @@ HeartPieceGet:
LDA.w SprItemMWPlayer, X : STA.l !MULTIWORLD_SPRITEITEM_PLAYER_ID
LDY.w SprSourceItemId, X
JSL MaybeMarkDigSpotCollected
.skipLoad
JSL HeartGet
PLY : PLX
RTL
;--------------------------------------------------------------------------------
HeartGet:
STY.b $0C
JSL ShieldCheck
BCC .done
LDY.b $0C
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
@@ -16,15 +25,24 @@ HeartPieceGet:
STZ.w ItemReceiptMethod ; 0 = Receiving item from an NPC or message
JSL Link_ReceiveItem
JSL MaybeUnlockTabletAnimation
PLY : PLX
RTL
SEC
.done
RTL
;--------------------------------------------------------------------------------
HeartContainerGet:
PHX : PHY
JSL IncrementBossSword
LDY.w SprSourceItemId, X
BRA HeartPieceGet_skipLoad
JSL HeartGet
PLY : PLX
BCC +
LDA.w RoomItemsTaken
ORA.b #$80
STA.w RoomItemsTaken
+
LDA.b #$01
STA.l BossDropTouched
RTL
;--------------------------------------------------------------------------------
DrawHeartPieceGFX:
PHP