summaryrefslogtreecommitdiff
path: root/data/scripts/maps/MossdeepCity_Gym.inc
blob: 54a9546c4c918a31aaf2a55c266c4991c9017d6a (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
MossdeepCity_Gym_MapScripts:: @ 815A4D3
	map_script 1, MossdeepCity_Gym_MapScript1_15A4D9
	.byte 0

MossdeepCity_Gym_MapScript1_15A4D9:: @ 815A4D9
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_1
	goto_if_eq MossdeepCity_Gym_EventScript_15A510
	goto MossdeepCity_Gym_EventScript_15A4E8
	end

MossdeepCity_Gym_EventScript_15A4E8:: @ 815A4E8
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_2
	goto_if_eq MossdeepCity_Gym_EventScript_15A528
	goto MossdeepCity_Gym_EventScript_15A4F7
	end

MossdeepCity_Gym_EventScript_15A4F7:: @ 815A4F7
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_3
	goto_if_eq MossdeepCity_Gym_EventScript_15A540
	goto MossdeepCity_Gym_EventScript_15A506
	end

MossdeepCity_Gym_EventScript_15A506:: @ 815A506
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_4
	goto_if_eq MossdeepCity_Gym_EventScript_15A558
	end

MossdeepCity_Gym_EventScript_15A510:: @ 815A510
	setmetatile 5, 5, 516, 0
	setmetatile 2, 7, 569, 1
	goto MossdeepCity_Gym_EventScript_15A4E8
	end

MossdeepCity_Gym_EventScript_15A528:: @ 815A528
	setmetatile 8, 14, 516, 0
	setmetatile 8, 10, 569, 1
	goto MossdeepCity_Gym_EventScript_15A4F7
	end

MossdeepCity_Gym_EventScript_15A540:: @ 815A540
	setmetatile 15, 17, 524, 0
	setmetatile 17, 15, 569, 1
	goto MossdeepCity_Gym_EventScript_15A506
	end

MossdeepCity_Gym_EventScript_15A558:: @ 815A558
	setmetatile 1, 23, 525, 0
	setmetatile 5, 24, 569, 1
	end

MossdeepCity_Gym_EventScript_15A56B:: @ 815A56B
	trainerbattle 8, OPPONENT_TATE_AND_LIZA, 0, MossdeepCity_Gym_Text_18CF02, MossdeepCity_Gym_Text_18D077, MossdeepCity_Gym_Text_18D324, MossdeepCity_Gym_EventScript_15A594
	checkflag FLAG_RECEIVED_TM04
	goto_if 0, MossdeepCity_Gym_EventScript_15A5C6
	msgbox MossdeepCity_Gym_Text_18D273, 4
	release
	end

MossdeepCity_Gym_EventScript_15A594:: @ 815A594
	message MossdeepCity_Gym_Text_18D0F9
	waitmessage
	call MossdeepCity_Gym_EventScript_1A02C5
	msgbox MossdeepCity_Gym_Text_18D128, 4
	setflag FLAG_DEFEATED_MOSSDEEP_GYM
	setflag FLAG_BADGE07_GET
	clearflag FLAG_HIDE_BRINEY_SLATEPORT_SHIPYARD
	clearflag FLAG_UNKNOWN_393
	setvar VAR_SPECIAL_8, 7
	call MossdeepCity_Gym_EventScript_1A01C0
	clearflag FLAG_HIDE_WORKERS_SLATEPORT_HARBOR
	goto MossdeepCity_Gym_EventScript_15A5C6
	end

MossdeepCity_Gym_EventScript_15A5C6:: @ 815A5C6
	giveitem_std ITEM_TM04
	compare RESULT, 0
	goto_if_eq MossdeepCity_Gym_EventScript_1A029B
	msgbox MossdeepCity_Gym_Text_18D1CF, 4
	setflag FLAG_RECEIVED_TM04
	release
	end

MossdeepCity_Gym_EventScript_15A5EA:: @ 815A5EA
	lockall
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_1
	goto_if_eq MossdeepCity_Gym_EventScript_15A621
	setflag FLAG_MOSSDEEP_GYM_SWITCH_1
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 5, 5, 516, 0
	setmetatile 2, 7, 569, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A619:: @ 815A619
	special DrawWholeMapView
	playse 36
	releaseall
	end

MossdeepCity_Gym_EventScript_15A621:: @ 815A621
	clearflag FLAG_MOSSDEEP_GYM_SWITCH_1
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 5, 5, 524, 0
	setmetatile 2, 7, 568, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A646:: @ 815A646
	lockall
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_2
	goto_if_eq MossdeepCity_Gym_EventScript_15A675
	setflag FLAG_MOSSDEEP_GYM_SWITCH_2
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 8, 14, 516, 0
	setmetatile 8, 10, 569, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A675:: @ 815A675
	clearflag FLAG_MOSSDEEP_GYM_SWITCH_2
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 8, 14, 517, 0
	setmetatile 8, 10, 568, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A69A:: @ 815A69A
	lockall
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_3
	goto_if_eq MossdeepCity_Gym_EventScript_15A6C9
	setflag FLAG_MOSSDEEP_GYM_SWITCH_3
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 15, 17, 524, 0
	setmetatile 17, 15, 569, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A6C9:: @ 815A6C9
	clearflag FLAG_MOSSDEEP_GYM_SWITCH_3
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 15, 17, 516, 0
	setmetatile 17, 15, 568, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A6EE:: @ 815A6EE
	lockall
	checkflag FLAG_MOSSDEEP_GYM_SWITCH_4
	goto_if_eq MossdeepCity_Gym_EventScript_15A71D
	setflag FLAG_MOSSDEEP_GYM_SWITCH_4
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 1, 23, 525, 0
	setmetatile 5, 24, 569, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A71D:: @ 815A71D
	clearflag FLAG_MOSSDEEP_GYM_SWITCH_4
	applymovement 255, MossdeepCity_Gym_Movement_15A7F7
	waitmovement 0
	setmetatile 1, 23, 516, 0
	setmetatile 5, 24, 568, 1
	goto MossdeepCity_Gym_EventScript_15A619
	end

MossdeepCity_Gym_EventScript_15A742:: @ 815A742
	lockall
	warpteleport MAP_MOSSDEEP_CITY_GYM, 255, 14, 29
	waitstate
	releaseall
	end

MossdeepCity_Gym_EventScript_15A74E:: @ 815A74E
	trainerbattle 0, OPPONENT_PRESTON, 0, MossdeepCity_Gym_Text_18C96A, MossdeepCity_Gym_Text_18C9BA
	msgbox MossdeepCity_Gym_Text_18C9E1, 6
	end

MossdeepCity_Gym_EventScript_15A765:: @ 815A765
	trainerbattle 0, OPPONENT_VIRGIL, 0, MossdeepCity_Gym_Text_18CA10, MossdeepCity_Gym_Text_18CA28
	msgbox MossdeepCity_Gym_Text_18CA48, 6
	end

MossdeepCity_Gym_EventScript_15A77C:: @ 815A77C
	trainerbattle 0, OPPONENT_FRITZ, 0, MossdeepCity_Gym_Text_18CAC0, MossdeepCity_Gym_Text_18CB46
	msgbox MossdeepCity_Gym_Text_18CB77, 6
	end

MossdeepCity_Gym_EventScript_15A793:: @ 815A793
	trainerbattle 0, OPPONENT_HANNAH, 0, MossdeepCity_Gym_Text_18CC1E, MossdeepCity_Gym_Text_18CC83
	msgbox MossdeepCity_Gym_Text_18CC9B, 6
	end

MossdeepCity_Gym_EventScript_15A7AA:: @ 815A7AA
	trainerbattle 0, OPPONENT_SAMANTHA, 0, MossdeepCity_Gym_Text_18CD14, MossdeepCity_Gym_Text_18CD66
	msgbox MossdeepCity_Gym_Text_18CD73, 6
	end

MossdeepCity_Gym_EventScript_15A7C1:: @ 815A7C1
	trainerbattle 0, OPPONENT_MAURA, 0, MossdeepCity_Gym_Text_18CDE0, MossdeepCity_Gym_Text_18CE47
	msgbox MossdeepCity_Gym_Text_18CE6C, 6
	end

MossdeepCity_Gym_EventScript_15A7D8:: @ 815A7D8
	lock
	faceplayer
	checkflag FLAG_DEFEATED_MOSSDEEP_GYM
	goto_if_eq MossdeepCity_Gym_EventScript_15A7ED
	msgbox MossdeepCity_Gym_Text_18C7E3, 4
	release
	end

MossdeepCity_Gym_EventScript_15A7ED:: @ 815A7ED
	msgbox MossdeepCity_Gym_Text_18C938, 4
	release
	end

MossdeepCity_Gym_Movement_15A7F7:: @ 815A7F7
	step_14
	step_14
	step_end

MossdeepCity_Gym_EventScript_15A7FA:: @ 815A7FA
	lockall
	checkflag FLAG_BADGE07_GET
	goto_if_eq MossdeepCity_Gym_EventScript_15A81A
	goto MossdeepCity_Gym_EventScript_15A824
	end

MossdeepCity_Gym_EventScript_15A80A:: @ 815A80A
	lockall
	checkflag FLAG_BADGE07_GET
	goto_if_eq MossdeepCity_Gym_EventScript_15A81A
	goto MossdeepCity_Gym_EventScript_15A824
	end

MossdeepCity_Gym_EventScript_15A81A:: @ 815A81A
	msgbox MossdeepCity_Gym_Text_18D424, 4
	releaseall
	end

MossdeepCity_Gym_EventScript_15A824:: @ 815A824
	msgbox MossdeepCity_Gym_Text_18D40A, 4
	releaseall
	end