mirror of https://github.com/pret/pokecrystal.git
46 lines
703 B
NASM
46 lines
703 B
NASM
_Squirtbottle:
|
|
ld hl, .SquirtbottleScript
|
|
call QueueScript
|
|
ld a, $1
|
|
ld [wItemEffectSucceeded], a
|
|
ret
|
|
|
|
.SquirtbottleScript:
|
|
reloadmappart
|
|
special UpdateTimePals
|
|
callasm .CheckCanUseSquirtbottle
|
|
iffalse .SquirtbottleNothingScript
|
|
farsjump WateredWeirdTreeScript
|
|
|
|
.SquirtbottleNothingScript:
|
|
jumptext .SquirtbottleNothingText
|
|
|
|
.SquirtbottleNothingText:
|
|
text_far _SquirtbottleNothingText
|
|
text_end
|
|
|
|
.CheckCanUseSquirtbottle:
|
|
ld a, [wMapGroup]
|
|
cp GROUP_ROUTE_36
|
|
jr nz, .nope
|
|
|
|
ld a, [wMapNumber]
|
|
cp MAP_ROUTE_36
|
|
jr nz, .nope
|
|
|
|
farcall GetFacingObject
|
|
jr c, .nope
|
|
|
|
ld a, d
|
|
cp SPRITEMOVEDATA_SUDOWOODO
|
|
jr nz, .nope
|
|
|
|
ld a, 1
|
|
ld [wScriptVar], a
|
|
ret
|
|
|
|
.nope
|
|
xor a
|
|
ld [wScriptVar], a
|
|
ret
|