-
Notifications
You must be signed in to change notification settings - Fork 806
/
CherrygroveCity.asm
572 lines (481 loc) · 11 KB
/
CherrygroveCity.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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
object_const_def
const CHERRYGROVECITY_GRAMPS
const CHERRYGROVECITY_RIVAL
const CHERRYGROVECITY_TEACHER
const CHERRYGROVECITY_YOUNGSTER
const CHERRYGROVECITY_FISHER
CherrygroveCity_MapScripts:
def_scene_scripts
scene_script CherrygroveCityNoop1Scene, SCENE_CHERRYGROVECITY_NOOP
scene_script CherrygroveCityNoop2Scene, SCENE_CHERRYGROVECITY_MEET_RIVAL
def_callbacks
callback MAPCALLBACK_NEWMAP, CherrygroveCityFlypointCallback
CherrygroveCityNoop1Scene:
end
CherrygroveCityNoop2Scene:
end
CherrygroveCityFlypointCallback:
setflag ENGINE_FLYPOINT_CHERRYGROVE
endcallback
CherrygroveCityGuideGent:
faceplayer
opentext
writetext GuideGentIntroText
yesorno
iffalse .No
sjump .Yes
.Yes:
writetext GuideGentTourText1
waitbutton
closetext
playmusic MUSIC_SHOW_ME_AROUND
follow CHERRYGROVECITY_GRAMPS, PLAYER
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement1
opentext
writetext GuideGentPokecenterText
waitbutton
closetext
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement2
turnobject PLAYER, UP
opentext
writetext GuideGentMartText
waitbutton
closetext
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement3
turnobject PLAYER, UP
opentext
writetext GuideGentRoute30Text
waitbutton
closetext
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement4
turnobject PLAYER, LEFT
opentext
writetext GuideGentSeaText
waitbutton
closetext
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement5
turnobject PLAYER, UP
pause 60
turnobject CHERRYGROVECITY_GRAMPS, LEFT
turnobject PLAYER, RIGHT
opentext
writetext GuideGentGiftText
promptbutton
getstring STRING_BUFFER_4, .mapcardname
scall .JumpstdReceiveItem
setflag ENGINE_MAP_CARD
writetext GotMapCardText
promptbutton
writetext GuideGentPokegearText
waitbutton
closetext
stopfollow
special RestartMapMusic
turnobject PLAYER, UP
applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement6
playsound SFX_ENTER_DOOR
disappear CHERRYGROVECITY_GRAMPS
clearevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
waitsfx
end
.JumpstdReceiveItem:
jumpstd ReceiveItemScript
end
.mapcardname
db "MAP CARD@"
.No:
writetext GuideGentNoText
waitbutton
closetext
end
CherrygroveRivalSceneSouth:
moveobject CHERRYGROVECITY_RIVAL, 39, 7
CherrygroveRivalSceneNorth:
turnobject PLAYER, RIGHT
showemote EMOTE_SHOCK, PLAYER, 15
special FadeOutMusic
pause 15
appear CHERRYGROVECITY_RIVAL
applymovement CHERRYGROVECITY_RIVAL, CherrygroveCity_RivalWalksToYou
turnobject PLAYER, RIGHT
playmusic MUSIC_RIVAL_ENCOUNTER
opentext
writetext CherrygroveRivalText_Seen
waitbutton
closetext
checkevent EVENT_GOT_TOTODILE_FROM_ELM
iftrue .Totodile
checkevent EVENT_GOT_CHIKORITA_FROM_ELM
iftrue .Chikorita
winlosstext RivalCherrygroveWinText, RivalCherrygroveLossText
setlasttalked CHERRYGROVECITY_RIVAL
loadtrainer RIVAL1, RIVAL1_1_TOTODILE
loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
reloadmap
iftrue .AfterVictorious
sjump .AfterYourDefeat
.Totodile:
winlosstext RivalCherrygroveWinText, RivalCherrygroveLossText
setlasttalked CHERRYGROVECITY_RIVAL
loadtrainer RIVAL1, RIVAL1_1_CHIKORITA
loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
reloadmap
iftrue .AfterVictorious
sjump .AfterYourDefeat
.Chikorita:
winlosstext RivalCherrygroveWinText, RivalCherrygroveLossText
setlasttalked CHERRYGROVECITY_RIVAL
loadtrainer RIVAL1, RIVAL1_1_CYNDAQUIL
loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE
startbattle
dontrestartmapmusic
reloadmap
iftrue .AfterVictorious
sjump .AfterYourDefeat
.AfterVictorious:
playmusic MUSIC_RIVAL_AFTER
opentext
writetext CherrygroveRivalText_YouWon
waitbutton
closetext
sjump .FinishRival
.AfterYourDefeat:
playmusic MUSIC_RIVAL_AFTER
opentext
writetext CherrygroveRivalText_YouLost
waitbutton
closetext
.FinishRival:
playsound SFX_TACKLE
applymovement PLAYER, CherrygroveCity_RivalPushesYouOutOfTheWay
turnobject PLAYER, LEFT
applymovement CHERRYGROVECITY_RIVAL, CherrygroveCity_RivalExitsStageLeft
disappear CHERRYGROVECITY_RIVAL
setscene SCENE_CHERRYGROVECITY_NOOP
special HealParty
playmapmusic
end
CherrygroveTeacherScript:
faceplayer
opentext
checkflag ENGINE_MAP_CARD
iftrue .HaveMapCard
writetext CherrygroveTeacherText_NoMapCard
waitbutton
closetext
end
.HaveMapCard:
writetext CherrygroveTeacherText_HaveMapCard
waitbutton
closetext
end
CherrygroveYoungsterScript:
faceplayer
opentext
checkflag ENGINE_POKEDEX
iftrue .HavePokedex
writetext CherrygroveYoungsterText_NoPokedex
waitbutton
closetext
end
.HavePokedex:
writetext CherrygroveYoungsterText_HavePokedex
waitbutton
closetext
end
MysticWaterGuy:
faceplayer
opentext
checkevent EVENT_GOT_MYSTIC_WATER_IN_CHERRYGROVE
iftrue .After
writetext MysticWaterGuyTextBefore
promptbutton
verbosegiveitem MYSTIC_WATER
iffalse .Exit
setevent EVENT_GOT_MYSTIC_WATER_IN_CHERRYGROVE
.After:
writetext MysticWaterGuyTextAfter
waitbutton
.Exit:
closetext
end
CherrygroveCitySign:
jumptext CherrygroveCitySignText
GuideGentsHouseSign:
jumptext GuideGentsHouseSignText
CherrygroveCityPokecenterSign:
jumpstd PokecenterSignScript
CherrygroveCityMartSign:
jumpstd MartSignScript
GuideGentMovement1:
step LEFT
step LEFT
step UP
step LEFT
turn_head UP
step_end
GuideGentMovement2:
step LEFT
step LEFT
step LEFT
step LEFT
step LEFT
step LEFT
turn_head UP
step_end
GuideGentMovement3:
step LEFT
step LEFT
step LEFT
step LEFT
step LEFT
step LEFT
step LEFT
turn_head UP
step_end
GuideGentMovement4:
step LEFT
step LEFT
step LEFT
step DOWN
step LEFT
step LEFT
step LEFT
step DOWN
turn_head LEFT
step_end
GuideGentMovement5:
step DOWN
step DOWN
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step DOWN
step DOWN
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step RIGHT
turn_head UP
step_end
GuideGentMovement6:
step UP
step UP
step_end
CherrygroveCity_RivalWalksToYou:
step LEFT
step LEFT
step LEFT
step LEFT
step LEFT
step_end
CherrygroveCity_RivalPushesYouOutOfTheWay:
big_step DOWN
turn_head UP
step_end
CherrygroveCity_UnusedMovementData: ; unreferenced
step LEFT
turn_head DOWN
step_end
CherrygroveCity_RivalExitsStageLeft:
big_step LEFT
big_step LEFT
big_step LEFT
big_step LEFT
big_step UP
big_step UP
big_step LEFT
big_step LEFT
step_end
GuideGentIntroText:
text "You're a rookie"
line "trainer, aren't"
cont "you? I can tell!"
para "That's OK! Every-"
line "one is a rookie"
cont "at some point!"
para "If you'd like, I"
line "can teach you a"
cont "few things."
done
GuideGentTourText1:
text "OK, then!"
line "Follow me!"
done
GuideGentPokecenterText:
text "This is a #MON"
line "CENTER. They heal"
para "your #MON in no"
line "time at all."
para "You'll be relying"
line "on them a lot, so"
para "you better learn"
line "about them."
done
GuideGentMartText:
text "This is a #MON"
line "MART."
para "They sell BALLS"
line "for catching wild"
para "#MON and other"
line "useful items."
done
GuideGentRoute30Text:
text "ROUTE 30 is out"
line "this way."
para "Trainers will be"
line "battling their"
para "prized #MON"
line "there."
done
GuideGentSeaText:
text "This is the sea,"
line "as you can see."
para "Some #MON are"
line "found only in"
cont "water."
done
GuideGentGiftText:
text "Here…"
para "It's my house!"
line "Thanks for your"
cont "company."
para "Let me give you a"
line "small gift."
done
GotMapCardText:
text "<PLAYER>'s #GEAR"
line "now has a MAP!"
done
GuideGentPokegearText:
text "#GEAR becomes"
line "more useful as you"
cont "add CARDS."
para "I wish you luck on"
line "your journey!"
done
GuideGentNoText:
text "Oh… It's something"
line "I enjoy doing…"
para "Fine. Come see me"
line "when you like."
done
CherrygroveRivalText_Seen:
text "<……> <……> <……>"
para "You got a #MON"
line "at the LAB."
para "What a waste."
line "A wimp like you."
para "<……> <……> <……>"
para "Don't you get what"
line "I'm saying?"
para "Well, I too, have"
line "a good #MON."
para "I'll show you"
line "what I mean!"
done
RivalCherrygroveWinText:
text "Humph. Are you"
line "happy you won?"
done
CherrygroveRivalText_YouLost:
text "<……> <……> <……>"
para "My name's ???."
para "I'm going to be"
line "the world's great-"
cont "est #MON"
cont "trainer."
done
RivalCherrygroveLossText:
text "Humph. That was a"
line "waste of time."
done
CherrygroveRivalText_YouWon:
text "<……> <……> <……>"
para "My name's ???."
para "I'm going to be"
line "the world's great-"
cont "est #MON"
cont "trainer."
done
CherrygroveTeacherText_NoMapCard:
text "Did you talk to"
line "the old man by the"
cont "#MON CENTER?"
para "He'll put a MAP of"
line "JOHTO on your"
cont "#GEAR."
done
CherrygroveTeacherText_HaveMapCard:
text "When you're with"
line "#MON, going"
cont "anywhere is fun."
done
CherrygroveYoungsterText_NoPokedex:
text "MR.#MON's house"
line "is still farther"
cont "up ahead."
done
CherrygroveYoungsterText_HavePokedex:
text "I battled the"
line "trainers on the"
cont "road."
para "My #MON lost."
line "They're a mess! I"
para "must take them to"
line "a #MON CENTER."
done
MysticWaterGuyTextBefore:
text "A #MON I caught"
line "had an item."
para "I think it's"
line "MYSTIC WATER."
para "I don't need it,"
line "so do you want it?"
done
MysticWaterGuyTextAfter:
text "Back to fishing"
line "for me, then."
done
CherrygroveCitySignText:
text "CHERRYGROVE CITY"
para "The City of Cute,"
line "Fragrant Flowers"
done
GuideGentsHouseSignText:
text "GUIDE GENT'S HOUSE"
done
CherrygroveCity_MapEvents:
db 0, 0 ; filler
def_warp_events
warp_event 23, 3, CHERRYGROVE_MART, 2
warp_event 29, 3, CHERRYGROVE_POKECENTER_1F, 1
warp_event 17, 7, CHERRYGROVE_GYM_SPEECH_HOUSE, 1
warp_event 25, 9, GUIDE_GENTS_HOUSE, 1
warp_event 31, 11, CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 1
def_coord_events
coord_event 33, 6, SCENE_CHERRYGROVECITY_MEET_RIVAL, CherrygroveRivalSceneNorth
coord_event 33, 7, SCENE_CHERRYGROVECITY_MEET_RIVAL, CherrygroveRivalSceneSouth
def_bg_events
bg_event 30, 8, BGEVENT_READ, CherrygroveCitySign
bg_event 23, 9, BGEVENT_READ, GuideGentsHouseSign
bg_event 24, 3, BGEVENT_READ, CherrygroveCityMartSign
bg_event 30, 3, BGEVENT_READ, CherrygroveCityPokecenterSign
def_object_events
object_event 32, 6, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveCityGuideGent, EVENT_GUIDE_GENT_IN_HIS_HOUSE
object_event 39, 6, SPRITE_RIVAL, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_CHERRYGROVE_CITY
object_event 27, 12, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CherrygroveTeacherScript, -1
object_event 23, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveYoungsterScript, -1
object_event 7, 12, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MysticWaterGuy, -1