pokecrystal/engine/events/squirtbottle.asm

46 lines
703 B
NASM
Raw Normal View History

2018-06-24 14:09:41 +00:00
_Squirtbottle:
2016-05-10 16:59:34 +00:00
ld hl, .SquirtbottleScript
2015-11-12 04:38:57 +00:00
call QueueScript
ld a, $1
2015-12-17 22:51:32 +00:00
ld [wItemEffectSucceeded], a
2015-11-12 04:38:57 +00:00
ret
2016-05-10 16:59:34 +00:00
.SquirtbottleScript:
2015-11-12 04:38:57 +00:00
reloadmappart
special UpdateTimePals
2016-05-10 16:59:34 +00:00
callasm .CheckCanUseSquirtbottle
iffalse .SquirtbottleNothingScript
farsjump WateredWeirdTreeScript
2015-11-12 04:38:57 +00:00
.SquirtbottleNothingScript:
jumptext .SquirtbottleNothingText
2015-11-12 04:38:57 +00:00
.SquirtbottleNothingText:
text_far _SquirtbottleNothingText
text_end
2015-11-12 04:38:57 +00:00
2016-05-10 16:59:34 +00:00
.CheckCanUseSquirtbottle:
2018-01-23 22:39:09 +00:00
ld a, [wMapGroup]
2015-11-12 04:38:57 +00:00
cp GROUP_ROUTE_36
2016-05-10 16:59:34 +00:00
jr nz, .nope
2015-11-12 04:38:57 +00:00
2018-01-23 22:39:09 +00:00
ld a, [wMapNumber]
2015-11-12 04:38:57 +00:00
cp MAP_ROUTE_36
2016-05-10 16:59:34 +00:00
jr nz, .nope
2015-11-12 04:38:57 +00:00
2017-12-24 17:47:30 +00:00
farcall GetFacingObject
2016-05-10 16:59:34 +00:00
jr c, .nope
2015-11-12 04:38:57 +00:00
ld a, d
2016-05-10 16:59:34 +00:00
cp SPRITEMOVEDATA_SUDOWOODO
jr nz, .nope
2015-11-12 04:38:57 +00:00
2016-05-10 16:59:34 +00:00
ld a, 1
2018-01-23 22:39:09 +00:00
ld [wScriptVar], a
2015-11-12 04:38:57 +00:00
ret
2016-05-10 16:59:34 +00:00
.nope
2015-11-12 04:38:57 +00:00
xor a
2018-01-23 22:39:09 +00:00
ld [wScriptVar], a
2015-11-12 04:38:57 +00:00
ret