summaryrefslogtreecommitdiff
path: root/maps/Route46.asm
blob: 72ae49260d1a213e970a3baabeced638416d5d98 (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
Route46_MapScriptHeader: ; 0x1a967e
	; trigger count
	db 0

	; callback count
	db 0
; 0x1a9680

TrainerCamperTed: ; 0x1a9680
	; bit/flag number
	dw $424

	; trainer group && trainer id
	db CAMPER, TED

	; text when seen
	dw CamperTedSeenText

	; text when trainer beaten
	dw CamperTedBeatenText

	; script when lost
	dw $0000

	; script when talk again
	dw CamperTedScript
; 0x1a968c

CamperTedScript: ; 0x1a968c
	talkaftercancel
	loadfont
	2writetext UnknownText_0x1a9851
	closetext
	loadmovesprites
	end
; 0x1a9694

TrainerPicnickerErin1: ; 0x1a9694
	; bit/flag number
	dw $487

	; trainer group && trainer id
	db PICNICKER, ERIN1

	; text when seen
	dw PicnickerErin1SeenText

	; text when trainer beaten
	dw PicnickerErin1BeatenText

	; script when lost
	dw $0000

	; script when talk again
	dw PicnickerErin1Script
; 0x1a96a0

PicnickerErin1Script: ; 0x1a96a0
	writecode $17, $24
	talkaftercancel
	loadfont
	checkflag $007c
	iftrue UnknownScript_0x1a96da
	checkcellnum $24
	iftrue UnknownScript_0x1a975b
	checkevent $029d
	iftrue UnknownScript_0x1a96c3
	2writetext UnknownText_0x1a98c6
	keeptextopen
	setevent $029d
	2call UnknownScript_0x1a974f
	2jump UnknownScript_0x1a96c6
; 0x1a96c3

UnknownScript_0x1a96c3: ; 0x1a96c3
	2call UnknownScript_0x1a9753
UnknownScript_0x1a96c6: ; 0x1a96c6
	askforphonenumber $24
	if_equal $1, UnknownScript_0x1a9763
	if_equal $2, UnknownScript_0x1a975f
	trainertotext PICNICKER, ERIN1, $0
	2call UnknownScript_0x1a9757
	2jump UnknownScript_0x1a975b
; 0x1a96da

UnknownScript_0x1a96da: ; 0x1a96da
	2call UnknownScript_0x1a9767
	winlosstext PicnickerErin1BeatenText, $0000
	copybytetovar $da0d
	if_equal $2, UnknownScript_0x1a96f1
	if_equal $1, UnknownScript_0x1a96f7
	if_equal $0, UnknownScript_0x1a96fd
UnknownScript_0x1a96f1: ; 0x1a96f1
	checkevent EVENT_RESTORED_POWER_TO_KANTO
	iftrue UnknownScript_0x1a9717
UnknownScript_0x1a96f7: ; 0x1a96f7
	checkevent $0044
	iftrue UnknownScript_0x1a970a
UnknownScript_0x1a96fd: ; 0x1a96fd
	loadtrainer PICNICKER, ERIN1
	startbattle
	returnafterbattle
	loadvar $da0d, $1
	clearflag $007c
	end
; 0x1a970a

UnknownScript_0x1a970a: ; 0x1a970a
	loadtrainer PICNICKER, ERIN2
	startbattle
	returnafterbattle
	loadvar $da0d, $2
	clearflag $007c
	end
; 0x1a9717

UnknownScript_0x1a9717: ; 0x1a9717
	loadtrainer PICNICKER, ERIN3
	startbattle
	returnafterbattle
	clearflag $007c
	checkevent EVENT_ERIN_CALCIUM
	iftrue UnknownScript_0x1a973b
	checkevent $0269
	iftrue UnknownScript_0x1a973a
	2call UnknownScript_0x1a9772
	verbosegiveitem CALCIUM, 1
	iffalse UnknownScript_0x1a976b
	setevent $0269
	2jump UnknownScript_0x1a975b
; 0x1a973a

UnknownScript_0x1a973a: ; 0x1a973a
	end
; 0x1a973b

UnknownScript_0x1a973b: ; 0x1a973b
	loadfont
	2writetext UnknownText_0x1a9927
	closetext
	verbosegiveitem CALCIUM, 1
	iffalse UnknownScript_0x1a976b
	clearevent EVENT_ERIN_CALCIUM
	setevent $0269
	2jump UnknownScript_0x1a975b
; 0x1a974f

UnknownScript_0x1a974f: ; 0x1a974f
	jumpstd $0023
	end
; 0x1a9753

UnknownScript_0x1a9753: ; 0x1a9753
	jumpstd $0024
	end
; 0x1a9757

UnknownScript_0x1a9757: ; 0x1a9757
	jumpstd $0025
	end
; 0x1a975b

UnknownScript_0x1a975b: ; 0x1a975b
	jumpstd $0026
	end
; 0x1a975f

UnknownScript_0x1a975f: ; 0x1a975f
	jumpstd $0027
	end
; 0x1a9763

UnknownScript_0x1a9763: ; 0x1a9763
	jumpstd $0028
	end
; 0x1a9767

UnknownScript_0x1a9767: ; 0x1a9767
	jumpstd $0029
	end
; 0x1a976b

UnknownScript_0x1a976b: ; 0x1a976b
	setevent EVENT_ERIN_CALCIUM
	jumpstd $002b
	end
; 0x1a9772

UnknownScript_0x1a9772: ; 0x1a9772
	jumpstd $002c
	end
; 0x1a9776

TrainerHikerBailey: ; 0x1a9776
	; bit/flag number
	dw $52e

	; trainer group && trainer id
	db HIKER, BAILEY

	; text when seen
	dw HikerBaileySeenText

	; text when trainer beaten
	dw HikerBaileyBeatenText

	; script when lost
	dw $0000

	; script when talk again
	dw HikerBaileyScript
; 0x1a9782

HikerBaileyScript: ; 0x1a9782
	talkaftercancel
	loadfont
	2writetext UnknownText_0x1a97e8
	closetext
	loadmovesprites
	end
; 0x1a978a

MapRoute46Signpost0Script: ; 0x1a978a
	jumptext UnknownText_0x1a99be
; 0x1a978d

ItemFragment_0x1a978d: ; 0x1a978d
	db X_SPEED, 1
; 0x1a978f

FruitTreeScript_0x1a978f: ; 0x1a978f
	fruittree $4
; 0x1a9791

FruitTreeScript_0x1a9791: ; 0x1a9791
	fruittree $a
; 0x1a9793

HikerBaileySeenText: ; 0x1a9793
	text "Awright! I'll show"
	line "you the power of"
	cont "mountain #MON!"
	done
; 0x1a97c6

HikerBaileyBeatenText: ; 0x1a97c6
	text "Mercy! You showed"
	line "me your power!"
	done
; 0x1a97e8

UnknownText_0x1a97e8: ; 0x1a97e8
	text "It's over. I don't"
	line "mind. We HIKERS"
	cont "are like that."
	done
; 0x1a9819

CamperTedSeenText: ; 0x1a9819
	text "I'm raising #-"
	line "MON too!"

	para "Will you battle"
	line "with me?"
	done
; 0x1a984a

CamperTedBeatenText: ; 0x1a984a
	text "Wha…?"
	done
; 0x1a9851

UnknownText_0x1a9851: ; 0x1a9851
	text "I did my best but"
	line "came up short."

	para "No excuses--I"
	line "admit I lost."
	done
; 0x1a988f

PicnickerErin1SeenText: ; 0x1a988f
	text "I raise #MON"
	line "too!"

	para "Will you battle"
	line "with me?"
	done
; 0x1a98bb

PicnickerErin1BeatenText: ; 0x1a98bb
	text "Oh, rats!"
	done
; 0x1a98c6

UnknownText_0x1a98c6: ; 0x1a98c6
	text "I've been to many"
	line "GYMS, but the GYM"

	para "in GOLDENROD is my"
	line "favorite."

	para "It's filled with"
	line "pretty flowers!"
	done
; 0x1a9927

UnknownText_0x1a9927: ; 0x1a9927
	text "Aww… I keep losing"
	line "all the time!"

	para "I'll just have to"
	line "try harder!"

	para "Anyway, thanks for"
	line "battling me again"

	para "and again. Here's"
	line "that present from"
	cont "the other time."
	done
; 0x1a99be

UnknownText_0x1a99be: ; 0x1a99be
	text "ROUTE 46"
	line "MOUNTAIN RD. AHEAD"
	done
; 0x1a99db

Route46_MapEventHeader: ; 0x1a99db
	; filler
	db 0, 0

	; warps
	db 3
	warp_def $21, $7, 1, GROUP_ROUTE_29_46_GATE, MAP_ROUTE_29_46_GATE
	warp_def $21, $8, 2, GROUP_ROUTE_29_46_GATE, MAP_ROUTE_29_46_GATE
	warp_def $5, $e, 3, GROUP_DARK_CAVE_VIOLET_ENTRANCE, MAP_DARK_CAVE_VIOLET_ENTRANCE

	; xy triggers
	db 0

	; signposts
	db 1
	signpost 27, 9, $0, MapRoute46Signpost0Script

	; people-events
	db 6
	person_event SPRITE_POKEFAN_M, 23, 16, $8, $0, 255, 255, $b2, 2, TrainerHikerBailey, $ffff
	person_event SPRITE_YOUNGSTER, 18, 8, $7, $0, 255, 255, $a2, 2, TrainerCamperTed, $ffff
	person_event SPRITE_LASS, 17, 6, $6, $0, 255, 255, $a2, 2, TrainerPicnickerErin1, $ffff
	person_event SPRITE_FRUIT_TREE, 9, 11, $1, $0, 255, 255, $0, 0, FruitTreeScript_0x1a978f, $ffff
	person_event SPRITE_FRUIT_TREE, 10, 12, $1, $0, 255, 255, $0, 0, FruitTreeScript_0x1a9791, $ffff
	person_event SPRITE_POKE_BALL, 19, 5, $1, $0, 255, 255, $1, 0, ItemFragment_0x1a978d, $06bc
; 0x1a9a43