pokecrystal/engine/events/squirtbottle.asm

47 lines
724 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 .NothingHappenedScript
2015-11-12 04:38:57 +00:00
farjump WateredWeirdTreeScript
2016-05-10 16:59:34 +00:00
.NothingHappenedScript:
jumptext .NothingHappenedText
2015-11-12 04:38:57 +00:00
2016-05-10 16:59:34 +00:00
.NothingHappenedText:
2015-11-12 04:38:57 +00:00
; sprinkled water. But nothing happened…
text_far UnknownText_0x1c0b3b
2015-11-12 04:38:57 +00:00
db "@"
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