summaryrefslogtreecommitdiff
path: root/data/maps/Route16/scripts.inc
blob: 0bc8d6c8a1a91cbec4d207a5940246a82c3a2c52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Route16_MapScripts:: @ 81680E5
	map_script 5, Route16_MapScript1_1680F5
	map_script 3, Route16_MapScript2_168103
	map_script 4, Route16_MapScript3_168113
	.byte 0

Route16_MapScript1_1680F5:: @ 81680F5
	checkflag FLAG_SYS_SPECIAL_WILD_BATTLE
	call_if TRUE, EventScript_1680FF
	end

EventScript_1680FF:: @ 81680FF
	removeobject VAR_LAST_TALKED
	return

Route16_MapScript2_168103:: @ 8168103
	compare_var_to_value VAR_MAP_SCENE_ROUTE16, 1
	call_if eq, EventScript_16810F
	end

EventScript_16810F:: @ 816810F
	setflag FLAG_SYS_ON_CYCLING_ROAD
	return

Route16_MapScript3_168113:: @ 8168113
	map_script_2 VAR_MAP_SCENE_ROUTE16, 1, EventScript_16811D
	.2byte 0

EventScript_16811D:: @ 816811D
	special Special_ForcePlayerOntoBike
	end

Route16_EventScript_168121:: @ 8168121
	lock
	faceplayer
	checkflag FLAG_GOT_POKE_FLUTE
	goto_if FALSE, EventScript_1681A3
	special sub_8110AB4
	compare_var_to_value VAR_RESULT, 2
	goto_if eq, EventScript_1A7AE0
	special sub_8112364
	msgbox gUnknown_81853CC, MSGBOX_YESNO
	compare_var_to_value VAR_RESULT, 0
	goto_if eq, EventScript_168197
	call EventScript_1A924B
	setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE
	waitse
	playmoncry SPECIES_SNORLAX, 2
	delay 40
	waitmoncry
	setflag FLAG_HIDE_ROUTE_16_SNORLAX
	setflag FLAG_SYS_SPECIAL_WILD_BATTLE
	dowildbattle
	clearflag FLAG_SYS_SPECIAL_WILD_BATTLE
	specialvar VAR_RESULT, Special_GetBattleOutcome
	compare_var_to_value VAR_RESULT, B_OUTCOME_WON
	goto_if eq, EventScript_168199
	compare_var_to_value VAR_RESULT, B_OUTCOME_RAN
	goto_if eq, EventScript_168199
	compare_var_to_value VAR_RESULT, B_OUTCOME_PLAYER_TELEPORTED
	goto_if eq, EventScript_168199
	release
	end

EventScript_168197:: @ 8168197
	release
	end

EventScript_168199:: @ 8168199
	msgbox gUnknown_8185383
	release
	end

EventScript_1681A3:: @ 81681A3
	msgbox gUnknown_8186F3D
	release
	end

Route16_EventScript_1681AD:: @ 81681AD
	msgbox gUnknown_8186F7A, 3
	end

Route16_EventScript_1681B6:: @ 81681B6
	msgbox gUnknown_8186F98, 3
	end