pokecrystal-board/engine/events/itemfinder.asm

51 lines
798 B
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
ItemFinder:
2017-12-24 09:47:30 -08:00
farcall CheckForHiddenItems
2015-11-11 13:11:08 -08:00
jr c, .found_something
ld hl, .Script_FoundNothing
jr .resume
.found_something
ld hl, .Script_FoundSomething
.resume
call QueueScript
ld a, $1
2015-12-17 14:51:32 -08:00
ld [wItemEffectSucceeded], a
2015-11-11 13:11:08 -08:00
ret
2018-06-24 07:09:41 -07:00
.ItemfinderSound:
2015-12-18 17:07:09 -08:00
ld c, 4
2015-11-11 13:11:08 -08:00
.sfx_loop
push bc
ld de, SFX_SECOND_PART_OF_ITEMFINDER
call WaitPlaySFX
ld de, SFX_TRANSACTION
call WaitPlaySFX
pop bc
dec c
jr nz, .sfx_loop
ret
.Script_FoundSomething:
2015-11-11 13:11:08 -08:00
reloadmappart
special UpdateTimePals
callasm .ItemfinderSound
writetext .ItemfinderItemNearbyText
2015-11-25 07:16:29 -08:00
closetext
2015-11-11 13:11:08 -08:00
end
.Script_FoundNothing:
2015-11-11 13:11:08 -08:00
reloadmappart
special UpdateTimePals
writetext .ItemfinderNopeText
2015-11-25 07:16:29 -08:00
closetext
2015-11-11 13:11:08 -08:00
end
.ItemfinderItemNearbyText:
text_far _ItemfinderItemNearbyText
text_end
2015-11-11 13:11:08 -08:00
.ItemfinderNopeText:
text_far _ItemfinderNopeText
text_end