summaryrefslogtreecommitdiff
path: root/data/scripts/maps/Route111.inc
blob: 99fa29efb7dfdf06dac8ebd327c4ea00e7b1124f (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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
Route111_MapScripts:: @ 814FF91
	map_script 1, Route111_MapScript1_14FF9C
	map_script 3, Route111_MapScript1_14FFB9
	.byte 0

Route111_MapScript1_14FF9C:: @ 814FF9C
	call_if_unset FLAG_REGI_DOORS_OPENED, Route111_EventScript_14FFA6
	end

Route111_EventScript_14FFA6:: @ 814FFA6
	setmetatile 29, 86, 124, 1
	setmetatile 29, 87, 145, 1
	return

Route111_MapScript1_14FFB9:: @ 814FFB9
	call Route111_EventScript_14FFCD
	call Route111_EventScript_1AE313
	goto_if_trainer_not_defeated OPPONENT_VICKY, Route111_EventScript_15000D
	end

Route111_EventScript_14FFCD:: @ 814FFCD
	getplayerxy VAR_TEMP_0, VAR_TEMP_1
	compare VAR_TEMP_1, 34
	goto_if_lt Route111_EventScript_15000C
	compare VAR_TEMP_1, 107
	goto_if_gt Route111_EventScript_15000C
	compare VAR_TEMP_1, 72
	goto_if_gt Route111_EventScript_150009
	compare VAR_TEMP_0, 2000
	goto_if_gt Route111_EventScript_15000C
	compare VAR_TEMP_0, 8
	goto_if_lt Route111_EventScript_15000C

Route111_EventScript_150009:: @ 8150009
	setweather WEATHER_SANDSTORM

Route111_EventScript_15000C:: @ 815000C
	return

Route111_EventScript_15000D:: @ 815000D
	clearflag FLAG_HIDE_VICTOR_WINSTRATE
	setflag FLAG_HIDE_VICTORIA_WINSTRATE
	setflag FLAG_HIDE_VIVI_WINSTRATE
	setflag FLAG_HIDE_VICKI_WINSTRATE
	cleartrainerflag OPPONENT_VICTOR
	cleartrainerflag OPPONENT_VICTORIA
	cleartrainerflag OPPONENT_VIVI
	end

Route111_EventScript_150023:: @ 8150023
	lockall
	msgbox Route111_Text_16FA54, MSGBOX_YESNO
	compare RESULT, NO
	goto_if_eq Route111_EventScript_15005F
	giveitem_std ITEM_ROOT_FOSSIL
	closemessage
	setflag FLAG_HIDE_ROOT_FOSSIL
	setflag FLAG_HIDE_CLAW_FOSSIL
	removeobject 34
	delay 30
	applymovement 35, Route111_Movement_1500AF
	waitmovement 0
	removeobject 35
	releaseall
	end

Route111_EventScript_15005F:: @ 815005F
	msgbox Route111_Text_16FACE, 4
	releaseall
	end

Route111_EventScript_150069:: @ 8150069
	lockall
	msgbox Route111_Text_16FAED, MSGBOX_YESNO
	compare RESULT, NO
	goto_if_eq Route111_EventScript_1500A5
	giveitem_std ITEM_CLAW_FOSSIL
	closemessage
	setflag FLAG_HIDE_CLAW_FOSSIL
	setflag FLAG_HIDE_ROOT_FOSSIL
	removeobject 35
	delay 30
	applymovement 34, Route111_Movement_1500AF
	waitmovement 0
	removeobject 34
	releaseall
	end

Route111_EventScript_1500A5:: @ 81500A5
	msgbox Route111_Text_16FB67, 4
	releaseall
	end

Route111_Movement_1500AF:: @ 81500AF
	step_55
	step_12
	step_54
	step_12
	step_55
	step_12
	step_54
	step_12
	step_55
	step_13
	step_54
	step_13
	step_55
	step_13
	step_54
	step_13
	step_55
	step_14
	step_54
	step_14
	step_55
	step_end

Route111_EventScript_1500C5:: @ 81500C5
	lock
	faceplayer
	dodailyevents
	goto_if_set FLAG_DAILY_RECEIVED_BERRY_ROUTE111, Route111_EventScript_150100
	msgbox Route111_Text_1C56F0, 4
	giveitem_std ITEM_RAZZ_BERRY
	compare RESULT, 0
	goto_if_eq Route111_EventScript_1A029B
	setflag FLAG_DAILY_RECEIVED_BERRY_ROUTE111
	special GetPlayerBigGuyGirlString
	msgbox Route111_Text_1C5781, 4
	release
	end

Route111_EventScript_150100:: @ 8150100
	msgbox Route111_Text_1C57D2, 4
	release
	end

@ 815010A
	lockall
	setvar VAR_SPECIAL_4, 0
	goto Route111_EventScript_15013A
	end

Route111_EventScript_150116:: @ 8150116
	lockall
	setvar VAR_SPECIAL_4, 1
	goto Route111_EventScript_15013A
	end

Route111_EventScript_150122:: @ 8150122
	lockall
	setvar VAR_SPECIAL_4, 2
	goto Route111_EventScript_15013A
	end

@ 815012E
	lockall
	setvar VAR_SPECIAL_4, 3
	goto Route111_EventScript_15013A
	end

Route111_EventScript_15013A:: @ 815013A
	checkitem ITEM_GO_GOGGLES, 1
	compare RESULT, 0
	goto_if_eq Route111_EventScript_150151
	setvar VAR_TEMP_3, 1
	releaseall
	end

Route111_EventScript_150151:: @ 8150151
	msgbox Route111_Text_1A0F93, 4
	closemessage
	compare VAR_SPECIAL_4, 0
	call_if_eq Route111_EventScript_150188
	compare VAR_SPECIAL_4, 1
	call_if_eq Route111_EventScript_150193
	compare VAR_SPECIAL_4, 2
	call_if_eq Route111_EventScript_15019E
	compare VAR_SPECIAL_4, 3
	call_if_eq Route111_EventScript_1501A9
	releaseall
	end

Route111_EventScript_150188:: @ 8150188
	applymovement 255, Route111_Movement_1501B4
	waitmovement 0
	return

Route111_EventScript_150193:: @ 8150193
	applymovement 255, Route111_Movement_1501B6
	waitmovement 0
	return

Route111_EventScript_15019E:: @ 815019E
	applymovement 255, Route111_Movement_1501B8
	waitmovement 0
	return

Route111_EventScript_1501A9:: @ 81501A9
	applymovement 255, Route111_Movement_1501BA
	waitmovement 0
	return

Route111_Movement_1501B4:: @ 81501B4
	step_up
	step_end

Route111_Movement_1501B6:: @ 81501B6
	step_down
	step_end

Route111_Movement_1501B8:: @ 81501B8
	step_left
	step_end

Route111_Movement_1501BA:: @ 81501BA
	step_right
	step_end

Route111_EventScript_1501BC:: @ 81501BC
	setweather WEATHER_SUNNY
	fadenewbgm BGM_DOORO_X1
	doweather
	setvar VAR_TEMP_3, 0
	end

Route111_EventScript_1501C9:: @ 81501C9
	setweather WEATHER_SANDSTORM
	fadenewbgm BGM_ASHROAD
	doweather
	end

Route111_EventScript_1501D1:: @ 81501D1
	lock
	faceplayer
	setflag FLAG_LANDMARK_WINSTRATE_FAMILY
	msgbox Route111_Text_16F705, MSGBOX_YESNO
	compare RESULT, YES
	goto_if_eq Route111_EventScript_1501F3
	msgbox Route111_Text_16F785, 4
	release
	end

Route111_EventScript_1501F3:: @ 81501F3
	msgbox Route111_Text_16F7B3, 4
	trainerbattle 3, OPPONENT_VICTOR, 0, Route111_Text_16F7D2
	applymovement 1, Route111_Movement_1A0841
	waitmovement 0
	call Route111_EventScript_150348
	msgbox Route111_Text_16F7FF, 4
	closemessage
	applymovement 1, Route111_Movement_150356
	waitmovement 0
	removeobject 1
	call Route111_EventScript_15034F
	applymovement 255, Route111_Movement_15035B
	waitmovement 0
	call Route111_EventScript_150348
	addobject 2
	applymovement 2, Route111_Movement_150359
	waitmovement 0
	call Route111_EventScript_15034F
	msgbox Route111_Text_16F82D, 4
	trainerbattle 3, OPPONENT_VICTORIA, 0, Route111_Text_16F8A6
	applymovement 2, Route111_Movement_1A0841
	waitmovement 0
	call Route111_EventScript_150348
	msgbox Route111_Text_16F8D5, 4
	closemessage
	applymovement 2, Route111_Movement_150356
	waitmovement 0
	removeobject 2
	call Route111_EventScript_15034F
	applymovement 255, Route111_Movement_15035B
	waitmovement 0
	call Route111_EventScript_150348
	addobject 3
	applymovement 3, Route111_Movement_150359
	waitmovement 0
	call Route111_EventScript_15034F
	msgbox Route111_Text_16F90E, 4
	trainerbattle 3, OPPONENT_VIVI, 0, Route111_Text_16F956
	applymovement 3, Route111_Movement_1A0841
	waitmovement 0
	call Route111_EventScript_150348
	msgbox Route111_Text_16F96C, 4
	closemessage
	applymovement 3, Route111_Movement_150356
	waitmovement 0
	removeobject 3
	call Route111_EventScript_15034F
	applymovement 255, Route111_Movement_15035B
	waitmovement 0
	call Route111_EventScript_150348
	addobject 4
	applymovement 4, Route111_Movement_150359
	waitmovement 0
	call Route111_EventScript_15034F
	msgbox Route111_Text_16F991, 4
	trainerbattle 3, OPPONENT_VICKY, 0, Route111_Text_16F9EC
	msgbox Route111_Text_16FA22, 4
	closemessage
	applymovement 4, Route111_Movement_1A0841
	waitmovement 0
	call Route111_EventScript_150348
	applymovement 4, Route111_Movement_150356
	waitmovement 0
	removeobject 4
	call Route111_EventScript_15034F
	release
	end

Route111_EventScript_150348:: @ 8150348
	opendoor 13, 113
	waitdooranim
	return

Route111_EventScript_15034F:: @ 815034F
	closedoor 13, 113
	waitdooranim
	return

Route111_Movement_150356:: @ 8150356
	step_26
	step_up
	step_end

Route111_Movement_150359:: @ 8150359
	step_down
	step_end

Route111_Movement_15035B:: @ 815035B
	step_14
	step_14
	step_14
	step_end

Route111_EventScript_15035F:: @ 815035F
	msgbox Route111_Text_16FC9C, 3
	end

Route111_EventScript_150368:: @ 8150368
	msgbox Route111_Text_16FCB6, 3
	end

Route111_EventScript_150371:: @ 8150371
	msgbox Route111_Text_16FCEF, 3
	end

Route111_EventScript_15037A:: @ 815037A
	msgbox Route111_Text_16FD05, 3
	end

Route111_EventScript_150383:: @ 8150383
	msgbox Route111_Text_16FD1B, 3
	end

Route111_EventScript_15038C:: @ 815038C
	msgbox Route111_Text_16FD55, 3
	end

Route111_EventScript_150395:: @ 8150395
	msgbox Route111_Text_16FB86, 2
	end

Route111_EventScript_15039E:: @ 815039E
	msgbox Route111_Text_16FC3A, 2
	end

Route111_EventScript_1503A7:: @ 81503A7
	trainerbattle 0, OPPONENT_DREW, 0, Route111_Text_1BAB4B, Route111_Text_1BABC7
	msgbox Route111_Text_1BAC10, 6
	end

Route111_EventScript_1503BE:: @ 81503BE
	trainerbattle 0, OPPONENT_HEIDI, 0, Route111_Text_1BAC60, Route111_Text_1BACC5
	msgbox Route111_Text_1BACD8, 6
	end

Route111_EventScript_1503D5:: @ 81503D5
	trainerbattle 0, OPPONENT_CLIFF, 0, Route111_Text_1BAD4B, Route111_Text_1BADA3
	msgbox Route111_Text_1BADC2, 6
	end

Route111_EventScript_1503EC:: @ 81503EC
	trainerbattle 0, OPPONENT_BECKY, 0, Route111_Text_1BAE24, Route111_Text_1BAE6E
	msgbox Route111_Text_1BAE81, 6
	end

Route111_EventScript_150403:: @ 8150403
	trainerbattle 0, OPPONENT_DUSTY_1, 0, Route111_Text_1BAEC9, Route111_Text_1BAF14
	specialvar RESULT, ShouldTryRematchBattle
	compare RESULT, 1
	goto_if_eq Route111_EventScript_15042A
	msgbox Route111_Text_1BAF5B, 6
	end

Route111_EventScript_15042A:: @ 815042A
	trainerbattle 5, OPPONENT_DUSTY_1, 0, Route111_Text_1BAFC1, Route111_Text_1BB034
	msgbox Route111_Text_1BB070, 6
	end

Route111_EventScript_150441:: @ 8150441
	trainerbattle 0, OPPONENT_TRAVIS, 0, Route111_Text_1BB111, Route111_Text_1BB140
	msgbox Route111_Text_1BB15B, 6
	end

Route111_EventScript_150458:: @ 8150458
	trainerbattle 0, OPPONENT_IRENE, 0, Route111_Text_1BB199, Route111_Text_1BB1D8
	msgbox Route111_Text_1BB1F6, 6
	end

Route111_EventScript_15046F:: @ 815046F
	trainerbattle 0, OPPONENT_DAISUKE, 0, Route111_Text_1BB250, Route111_Text_1BB27E
	msgbox Route111_Text_1BB290, 6
	end

Route111_EventScript_150486:: @ 8150486
	trainerbattle 0, OPPONENT_WILTON_1, 0, Route111_Text_1BB2E3, Route111_Text_1BB313
	specialvar RESULT, ShouldTryRematchBattle
	compare RESULT, 1
	goto_if_eq Route111_EventScript_1504AD
	msgbox Route111_Text_1BB33E, 6
	end

Route111_EventScript_1504AD:: @ 81504AD
	trainerbattle 5, OPPONENT_WILTON_1, 0, Route111_Text_1BB3A7, Route111_Text_1BB3FA
	msgbox Route111_Text_1BB40E, 6
	end

Route111_EventScript_1504C4:: @ 81504C4
	trainerbattle 0, OPPONENT_BROOKE_1, 0, Route111_Text_1BB44F, Route111_Text_1BB49F
	specialvar RESULT, ShouldTryRematchBattle
	compare RESULT, 1
	goto_if_eq Route111_EventScript_1504EB
	msgbox Route111_Text_1BB4CE, 6
	end

Route111_EventScript_1504EB:: @ 81504EB
	trainerbattle 5, OPPONENT_BROOKE_1, 0, Route111_Text_1BB529, Route111_Text_1BB5A2
	msgbox Route111_Text_1BB5C1, 6
	end