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