summaryrefslogtreecommitdiff
path: root/data/scripts/maps/RusturfTunnel.inc
blob: 7c715b6c2d57291c71677d2ee06a66ca3f1d92e8 (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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
RusturfTunnel_MapScripts:: @ 815C745
	map_script 3, RusturfTunnel_MapScript1_15C762
	map_script 2, RusturfTunnel_MapScript2_15C750
	.byte 0

RusturfTunnel_MapScript2_15C750:: @ 815C750
	map_script_2 VAR_RUSTURF_TUNNEL_STATE, 4, RusturfTunnel_EventScript_15C7D1
	map_script_2 VAR_RUSTURF_TUNNEL_STATE, 5, RusturfTunnel_EventScript_15C7D1
	.2byte 0

RusturfTunnel_MapScript1_15C762:: @ 815C762
	call RusturfTunnel_EventScript_1A0196
	compare VAR_RUSTURF_TUNNEL_STATE, 2
	call_if_eq RusturfTunnel_EventScript_15C773
	end

RusturfTunnel_EventScript_15C773:: @ 815C773
	setobjectxyperm 7, 13, 4
	setobjectxyperm 6, 13, 5
	return

RusturfTunnel_EventScript_15C782:: @ 815C782
	lock
	faceplayer
	msgbox RusturfTunnel_Text_194766, 4
	closemessage
	applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D
	waitmovement 0
	release
	end

RusturfTunnel_EventScript_15C799:: @ 815C799
	lock
	faceplayer
	goto_if_set FLAG_TEMP_1, RusturfTunnel_EventScript_15C7BC
	setflag FLAG_TEMP_1
	msgbox RusturfTunnel_Text_1944C5, 4
	closemessage
	applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D
	waitmovement 0
	release
	end

RusturfTunnel_EventScript_15C7BC:: @ 815C7BC
	msgbox RusturfTunnel_Text_1945B2, 4
	closemessage
	applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D
	waitmovement 0
	release
	end

RusturfTunnel_EventScript_15C7D1:: @ 815C7D1
	lockall
	compare VAR_TEMP_1, 1
	call_if_eq RusturfTunnel_EventScript_15C8CA
	compare VAR_TEMP_1, 2
	call_if_eq RusturfTunnel_EventScript_15C8DF
	compare VAR_TEMP_1, 3
	call_if_eq RusturfTunnel_EventScript_15C8EA
	call RusturfTunnel_EventScript_15C92D
	msgbox RusturfTunnel_Text_19461D, 4
	compare VAR_TEMP_1, 2
	call_if_eq RusturfTunnel_EventScript_15C8EB
	compare VAR_TEMP_1, 3
	call_if_eq RusturfTunnel_EventScript_15C8EB
	giveitem_std ITEM_HM04
	setflag FLAG_RECEIVED_HM04
	msgbox RusturfTunnel_Text_194693, 4
	closemessage
	compare VAR_TEMP_1, 1
	call_if_eq RusturfTunnel_EventScript_15C880
	compare VAR_TEMP_1, 2
	call_if_eq RusturfTunnel_EventScript_15C892
	compare VAR_TEMP_1, 3
	call_if_eq RusturfTunnel_EventScript_15C8AE
	msgbox RusturfTunnel_Text_194706, 4
	closemessage
	compare VAR_TEMP_1, 1
	call_if_eq RusturfTunnel_EventScript_15C8F7
	compare VAR_TEMP_1, 2
	call_if_eq RusturfTunnel_EventScript_15C909
	compare VAR_TEMP_1, 3
	call_if_eq RusturfTunnel_EventScript_15C91B
	call RusturfTunnel_EventScript_1A0442
	releaseall
	end

RusturfTunnel_EventScript_15C880:: @ 815C880
	applymovement 255, RusturfTunnel_Movement_15C96A
	applymovement 1, RusturfTunnel_Movement_15C98F
	waitmovement 0
	return

RusturfTunnel_EventScript_15C892:: @ 815C892
	applymovement 255, RusturfTunnel_Movement_15C96D
	applymovement 1, RusturfTunnel_Movement_15C994
	waitmovement 0
	applymovement 10, RusturfTunnel_Movement_1A0845
	waitmovement 0
	return

RusturfTunnel_EventScript_15C8AE:: @ 815C8AE
	applymovement 255, RusturfTunnel_Movement_15C96D
	applymovement 1, RusturfTunnel_Movement_15C994
	waitmovement 0
	applymovement 10, RusturfTunnel_Movement_1A0845
	waitmovement 0
	return

RusturfTunnel_EventScript_15C8CA:: @ 815C8CA
	applymovement 1, RusturfTunnel_Movement_1A0841
	waitmovement 0
	applymovement 255, RusturfTunnel_Movement_1A0845
	waitmovement 0
	return

RusturfTunnel_EventScript_15C8DF:: @ 815C8DF
	applymovement 1, RusturfTunnel_Movement_15C970
	waitmovement 0
	return

RusturfTunnel_EventScript_15C8EA:: @ 815C8EA
	return

RusturfTunnel_EventScript_15C8EB:: @ 815C8EB
	closemessage
	applymovement 1, RusturfTunnel_Movement_15C98D
	waitmovement 0
	return

RusturfTunnel_EventScript_15C8F7:: @ 815C8F7
	applymovement 10, RusturfTunnel_Movement_15C945
	applymovement 1, RusturfTunnel_Movement_15C973
	waitmovement 0
	return

RusturfTunnel_EventScript_15C909:: @ 815C909
	applymovement 10, RusturfTunnel_Movement_15C951
	applymovement 1, RusturfTunnel_Movement_15C980
	waitmovement 0
	return

RusturfTunnel_EventScript_15C91B:: @ 815C91B
	applymovement 10, RusturfTunnel_Movement_15C951
	applymovement 1, RusturfTunnel_Movement_15C980
	waitmovement 0
	return

RusturfTunnel_EventScript_15C92D:: @ 815C92D
	playse SE_PIN
	applymovement 1, RusturfTunnel_Movement_1A0833
	waitmovement 0
	applymovement 1, RusturfTunnel_Movement_1A0835
	waitmovement 0
	return

RusturfTunnel_Movement_15C945:: @ 815C945
	step_right
	step_right
	step_right
	step_right
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_end

RusturfTunnel_Movement_15C951:: @ 815C951
	step_right
	step_right
	step_right
	step_right
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_end

@ 815C95D
	step_left
	step_28
	step_end

@ 815C960
	step_down
	step_26
	step_13
	step_28
	step_end

@ 815C965
	step_up
	step_25
	step_13
	step_28
	step_end

RusturfTunnel_Movement_15C96A:: @ 815C96A
	step_left
	step_28
	step_end

RusturfTunnel_Movement_15C96D:: @ 815C96D
	step_right
	step_27
	step_end

RusturfTunnel_Movement_15C970:: @ 815C970
	step_up
	step_28
	step_end

RusturfTunnel_Movement_15C973:: @ 815C973
	step_right
	step_right
	step_right
	step_right
	step_right
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_end

RusturfTunnel_Movement_15C980:: @ 815C980
	step_up
	step_right
	step_right
	step_right
	step_right
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_down
	step_end

RusturfTunnel_Movement_15C98D:: @ 815C98D
	step_right
	step_end

RusturfTunnel_Movement_15C98F:: @ 815C98F
	step_22
	step_22
	step_16
	step_18
	step_end

RusturfTunnel_Movement_15C994:: @ 815C994
	step_24
	step_24
	step_18
	step_26
	step_end

RusturfTunnel_EventScript_15C999:: @ 815C999
	setvar VAR_TEMP_1, 1
	end

RusturfTunnel_EventScript_15C99F:: @ 815C99F
	setvar VAR_TEMP_1, 2
	end

RusturfTunnel_EventScript_15C9A5:: @ 815C9A5
	setvar VAR_TEMP_1, 3
	end

RusturfTunnel_EventScript_15C9AB:: @ 815C9AB
	lockall
	msgbox RusturfTunnel_Text_194159, 4
	closemessage
	applymovement 6, RusturfTunnel_Movement_15C9D3
	applymovement 7, RusturfTunnel_Movement_15C9D3
	waitmovement 0
	moveobjectoffscreen 6
	moveobjectoffscreen 7
	setvar VAR_RUSTURF_TUNNEL_STATE, 3
	releaseall
	end

RusturfTunnel_Movement_15C9D3:: @ 815C9D3
	step_40
	step_right
	step_41
	step_end

RusturfTunnel_EventScript_15C9D7:: @ 815C9D7
	lock
	faceplayer
	waitse
	playmoncry SPECIES_WINGULL, 0
	msgbox RusturfTunnel_Text_194188, 4
	waitmoncry
	release
	end

RusturfTunnel_EventScript_15C9EA:: @ 815C9EA
	lock
	faceplayer
	playbgm BGM_EVIL_TEAM, FALSE
	msgbox RusturfTunnel_Text_19419B, 4
	trainerbattle 3, OPPONENT_RUSTURF_TUNNEL_GRUNT, 0, RusturfTunnel_Text_194243
	msgbox RusturfTunnel_Text_194274, 4
	giveitem_std ITEM_DEVON_GOODS
	closemessage
	applymovement 255, RusturfTunnel_Movement_15CA99
	applymovement 6, RusturfTunnel_Movement_15CAA2
	waitmovement 0
	removeobject 6
	delay 50
	addobject 5
	applymovement 5, RusturfTunnel_Movement_15CAAC
	waitmovement 0
	applymovement 255, RusturfTunnel_Movement_15CA9F
	applymovement 5, RusturfTunnel_Movement_15CAC0
	waitmovement 0
	msgbox RusturfTunnel_Text_19432A, 4
	applymovement 5, RusturfTunnel_Movement_1A0839
	waitmovement 0
	message RusturfTunnel_Text_19434F
	waitmessage
	waitse
	playmoncry SPECIES_WINGULL, 0
	waitbuttonpress
	waitmoncry
	closemessage
	applymovement 5, RusturfTunnel_Movement_15CAB4
	applymovement 7, RusturfTunnel_Movement_15CAC3
	waitmovement 0
	removeobject 5
	removeobject 7
	clearflag FLAG_DEVON_GOODS_STOLEN
	setflag FLAG_RECOVERED_DEVON_GOODS
	setvar VAR_RUSTBORO_STATE, 4
	setvar VAR_BRINEY_HOUSE_STATE, 1
	setflag FLAG_HIDE_BRINEY_ROUTE116
	release
	end

RusturfTunnel_Movement_15CA99:: @ 815CA99
	step_00
	step_40
	step_up
	step_41
	step_27
	step_end

RusturfTunnel_Movement_15CA9F:: @ 815CA9F
	step_down
	step_26
	step_end

RusturfTunnel_Movement_15CAA2:: @ 815CAA2
	step_17
	step_17
	step_17
	step_17
	step_17
	step_17
	step_17
	step_17
	step_17
	step_end

RusturfTunnel_Movement_15CAAC:: @ 815CAAC
	step_right
	step_right
	step_right
	step_right
	step_right
	step_right
	step_right
	step_end

RusturfTunnel_Movement_15CAB4:: @ 815CAB4
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

RusturfTunnel_Movement_15CAC0:: @ 815CAC0
	step_14
	step_right
	step_end

RusturfTunnel_Movement_15CAC3:: @ 815CAC3
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

RusturfTunnel_EventScript_15CACD:: @ 815CACD
	trainerbattle 0, OPPONENT_MIKE_2, 0, RusturfTunnel_Text_194814, RusturfTunnel_Text_1948A2
	msgbox RusturfTunnel_Text_1948C4, 6
	end