forked from mid-kid/pokecrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoute29.asm
429 lines (354 loc) · 8.69 KB
/
Route29.asm
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
object_const_def ; object_event constants
const ROUTE29_COOLTRAINER_M1
const ROUTE29_YOUNGSTER
const ROUTE29_TEACHER1
const ROUTE29_FRUIT_TREE
const ROUTE29_FISHER
const ROUTE29_COOLTRAINER_M2
const ROUTE29_TUSCANY
const ROUTE29_POKE_BALL
Route29_MapScripts:
db 2 ; scene scripts
scene_script .DummyScene0 ; SCENE_ROUTE29_NOTHING
scene_script .DummyScene1 ; SCENE_ROUTE29_CATCH_TUTORIAL
db 1 ; callbacks
callback MAPCALLBACK_OBJECTS, .Tuscany
.DummyScene0:
end
.DummyScene1:
end
.Tuscany:
checkflag ENGINE_ZEPHYRBADGE
iftrue .DoesTuscanyAppear
.TuscanyDisappears:
disappear ROUTE29_TUSCANY
return
.DoesTuscanyAppear:
readvar VAR_WEEKDAY
ifnotequal TUESDAY, .TuscanyDisappears
appear ROUTE29_TUSCANY
return
Route29Tutorial1:
turnobject ROUTE29_COOLTRAINER_M1, UP
showemote EMOTE_SHOCK, ROUTE29_COOLTRAINER_M1, 15
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1a
turnobject PLAYER, LEFT
setevent EVENT_DUDE_TALKED_TO_YOU
opentext
writetext CatchingTutorialIntroText
yesorno
iffalse Script_RefusedTutorial1
closetext
follow ROUTE29_COOLTRAINER_M1, PLAYER
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1b
stopfollow
loadwildmon RATTATA, 5
catchtutorial BATTLETYPE_TUTORIAL
turnobject ROUTE29_COOLTRAINER_M1, UP
opentext
writetext CatchingTutorialDebriefText
waitbutton
closetext
setscene SCENE_ROUTE29_NOTHING
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
Route29Tutorial2:
turnobject ROUTE29_COOLTRAINER_M1, UP
showemote EMOTE_SHOCK, ROUTE29_COOLTRAINER_M1, 15
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2a
turnobject PLAYER, LEFT
setevent EVENT_DUDE_TALKED_TO_YOU
opentext
writetext CatchingTutorialIntroText
yesorno
iffalse Script_RefusedTutorial2
closetext
follow ROUTE29_COOLTRAINER_M1, PLAYER
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2b
stopfollow
loadwildmon RATTATA, 5
catchtutorial BATTLETYPE_TUTORIAL
turnobject ROUTE29_COOLTRAINER_M1, UP
opentext
writetext CatchingTutorialDebriefText
waitbutton
closetext
setscene SCENE_ROUTE29_NOTHING
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
Script_RefusedTutorial1:
writetext CatchingTutorialDeclinedText
waitbutton
closetext
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1b
setscene SCENE_ROUTE29_NOTHING
end
Script_RefusedTutorial2:
writetext CatchingTutorialDeclinedText
waitbutton
closetext
applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2b
setscene SCENE_ROUTE29_NOTHING
end
CatchingTutorialDudeScript:
faceplayer
opentext
readvar VAR_BOXSPACE
ifequal 0, .BoxFull
checkevent EVENT_LEARNED_TO_CATCH_POKEMON
iftrue .BoxFull
checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM
iffalse .BoxFull
writetext CatchingTutorialRepeatText
yesorno
iffalse .Declined
closetext
loadwildmon RATTATA, 5
catchtutorial BATTLETYPE_TUTORIAL
opentext
writetext CatchingTutorialDebriefText
waitbutton
closetext
setevent EVENT_LEARNED_TO_CATCH_POKEMON
end
.BoxFull:
writetext CatchingTutorialBoxFullText
waitbutton
closetext
end
.Declined:
writetext CatchingTutorialDeclinedText
waitbutton
closetext
end
Route29YoungsterScript:
jumptextfaceplayer Route29YoungsterText
Route29TeacherScript:
jumptextfaceplayer Route29TeacherText
Route29FisherScript:
jumptextfaceplayer Route29FisherText
Route29CooltrainerMScript:
faceplayer
opentext
checktime DAY
iftrue .day_morn
checktime NITE
iftrue .nite
.day_morn
writetext Route29CooltrainerMText_WaitingForNight
waitbutton
closetext
end
.nite
writetext Route29CooltrainerMText_WaitingForMorning
waitbutton
closetext
end
TuscanyScript:
faceplayer
opentext
checkevent EVENT_GOT_PINK_BOW_FROM_TUSCANY
iftrue TuscanyTuesdayScript
readvar VAR_WEEKDAY
ifnotequal TUESDAY, TuscanyNotTuesdayScript
checkevent EVENT_MET_TUSCANY_OF_TUESDAY
iftrue .MetTuscany
writetext MeetTuscanyText
promptbutton
setevent EVENT_MET_TUSCANY_OF_TUESDAY
.MetTuscany:
writetext TuscanyGivesGiftText
promptbutton
verbosegiveitem PINK_BOW
iffalse TuscanyDoneScript
setevent EVENT_GOT_PINK_BOW_FROM_TUSCANY
writetext TuscanyGaveGiftText
waitbutton
closetext
end
TuscanyTuesdayScript:
writetext TuscanyTuesdayText
waitbutton
TuscanyDoneScript:
closetext
end
TuscanyNotTuesdayScript:
writetext TuscanyNotTuesdayText
waitbutton
closetext
end
Route29Sign1:
jumptext Route29Sign1Text
Route29Sign2:
jumptext Route29Sign2Text
Route29FruitTree:
fruittree FRUITTREE_ROUTE_29
Route29Potion:
itemball POTION
DudeMovementData1a:
step UP
step UP
step UP
step UP
step RIGHT
step RIGHT
step_end
DudeMovementData2a:
step UP
step UP
step UP
step RIGHT
step RIGHT
step_end
DudeMovementData1b:
step LEFT
step LEFT
step DOWN
step DOWN
step DOWN
step DOWN
step_end
DudeMovementData2b:
step LEFT
step LEFT
step DOWN
step DOWN
step DOWN
step_end
CatchingTutorialBoxFullText:
text "#MON hide in"
line "the grass. Who"
para "knows when they'll"
line "pop out…"
done
CatchingTutorialIntroText:
text "I've seen you a"
line "couple times. How"
para "many #MON have"
line "you caught?"
para "Would you like me"
line "to show you how to"
cont "catch #MON?"
done
CatchingTutorialDebriefText:
text "That's how you do"
line "it."
para "If you weaken them"
line "first, #MON are"
cont "easier to catch."
done
CatchingTutorialDeclinedText:
text "Oh. Fine, then."
para "Anyway, if you"
line "want to catch"
para "#MON, you have"
line "to walk a lot."
done
CatchingTutorialRepeatText:
text "Huh? You want me"
line "to show you how to"
cont "catch #MON?"
done
Route29YoungsterText:
text "Yo. How are your"
line "#MON?"
para "If they're weak"
line "and not ready for"
para "battle, keep out"
line "of the grass."
done
Route29TeacherText:
text "See those ledges?"
line "It's scary to jump"
cont "off them."
para "But you can go to"
line "NEW BARK without"
para "walking through"
line "the grass."
done
Route29FisherText:
text "I wanted to take a"
line "break, so I saved"
para "to record my"
line "progress."
done
Route29CooltrainerMText_WaitingForNight:
text "I'm waiting for"
line "#MON that"
para "appear only at"
line "night."
done
Route29CooltrainerMText_WaitingForMorning:
text "I'm waiting for"
line "#MON that"
para "appear only in the"
line "morning."
done
MeetTuscanyText:
text "TUSCANY: I do be-"
line "lieve that this is"
para "the first time"
line "we've met?"
para "Please allow me to"
line "introduce myself."
para "I am TUSCANY of"
line "Tuesday."
done
TuscanyGivesGiftText:
text "By way of intro-"
line "duction, please"
para "accept this gift,"
line "a PINK BOW."
done
TuscanyGaveGiftText:
text "TUSCANY: Wouldn't"
line "you agree that it"
cont "is most adorable?"
para "It strengthens"
line "normal-type moves."
para "I am certain it"
line "will be of use."
done
TuscanyTuesdayText:
text "TUSCANY: Have you"
line "met MONICA, my"
cont "older sister?"
para "Or my younger"
line "brother, WESLEY?"
para "I am the second of"
line "seven children."
done
TuscanyNotTuesdayText:
text "TUSCANY: Today is"
line "not Tuesday. That"
cont "is unfortunate…"
done
Route29Sign1Text:
text "ROUTE 29"
para "CHERRYGROVE CITY -"
line "NEW BARK TOWN"
done
Route29Sign2Text:
text "ROUTE 29"
para "CHERRYGROVE CITY -"
line "NEW BARK TOWN"
done
Route29_MapEvents:
db 0, 0 ; filler
db 1 ; warp events
warp_event 27, 1, ROUTE_29_ROUTE_46_GATE, 3
db 2 ; coord events
coord_event 53, 8, SCENE_ROUTE29_CATCH_TUTORIAL, Route29Tutorial1
coord_event 53, 9, SCENE_ROUTE29_CATCH_TUTORIAL, Route29Tutorial2
db 2 ; bg events
bg_event 51, 7, BGEVENT_READ, Route29Sign1
bg_event 3, 5, BGEVENT_READ, Route29Sign2
db 8 ; object events
object_event 50, 12, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CatchingTutorialDudeScript, -1
object_event 27, 16, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29YoungsterScript, -1
object_event 15, 11, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29TeacherScript, -1
object_event 12, 2, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route29FruitTree, -1
object_event 25, 3, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route29FisherScript, -1
object_event 13, 4, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route29CooltrainerMScript, -1
object_event 29, 12, SPRITE_TEACHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TuscanyScript, EVENT_ROUTE_29_TUSCANY_OF_TUESDAY
object_event 48, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route29Potion, EVENT_ROUTE_29_POTION