Files
alttpr-baserom/halfmagicbat.asm
2024-04-09 09:26:27 -06:00

17 lines
630 B
NASM

;================================================================================
; Randomize Half Magic Bat
;--------------------------------------------------------------------------------
GetMagicBatItem:
JSL ItemSet_MagicBat
%GetPossiblyEncryptedItem(MagicBatItem, SpriteItemValues)
CMP.b #$FF : BEQ .normalLogic
TAY
PHA : LDA.l MagicBatItem_Player : STA.l !MULTIWORLD_ITEM_PLAYER_ID : PLA
STZ.b ItemReceiptMethod ; 0 = Receiving item from an NPC or message
JML Link_ReceiveItem
.normalLogic
LDA.l HalfMagic
STA.l MagicConsumption
RTL
;--------------------------------------------------------------------------------