forked from pret/pokecrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEcruteakGym.asm
549 lines (444 loc) · 10.6 KB
/
EcruteakGym.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
EcruteakGym_MapScriptHeader: ; 0x99d49
; trigger count
db 2
; triggers
dw UnknownScript_0x99d53, $0000
dw UnknownScript_0x99d57, $0000
; callback count
db 0
; 0x99d53
UnknownScript_0x99d53: ; 0x99d53
priorityjump UnknownScript_0x99dc6
end
; 0x99d57
UnknownScript_0x99d57: ; 0x99d57
end
; 0x99d58
MortyScript_0x99d58: ; 0x99d58
faceplayer
loadfont
checkevent EVENT_BEAT_MORTY
iftrue UnknownScript_0x99d8c
2writetext UnknownText_0x99e65
closetext
loadmovesprites
winlosstext UnknownText_0x9a00a, $0000
loadtrainer MORTY, 1
startbattle
returnafterbattle
setevent EVENT_BEAT_MORTY
loadfont
2writetext UnknownText_0x9a043
playsound SFX_GET_BADGE
waitbutton
setflag $001e
checkcode $7
2call UnknownScript_0x99db7
domaptrigger GROUP_ECRUTEAK_HOUSE, MAP_ECRUTEAK_HOUSE, $1
setevent $0766
setevent $0767
UnknownScript_0x99d8c: ; 0x99d8c
checkevent EVENT_GOT_TM30_SHADOW_BALL
iftrue UnknownScript_0x99db1
setevent EVENT_BEAT_SAGE_JEFFREY
setevent EVENT_BEAT_SAGE_PING
setevent EVENT_BEAT_MEDIUM_MARTHA
setevent EVENT_BEAT_MEDIUM_GRACE
2writetext UnknownText_0x9a059
keeptextopen
verbosegiveitem TM_30, 1
iffalse UnknownScript_0x99db5
setevent EVENT_GOT_TM30_SHADOW_BALL
2writetext UnknownText_0x9a0ec
closetext
loadmovesprites
end
; 0x99db1
UnknownScript_0x99db1: ; 0x99db1
2writetext UnknownText_0x9a145
closetext
UnknownScript_0x99db5: ; 0x99db5
loadmovesprites
end
; 0x99db7
UnknownScript_0x99db7: ; 0x99db7
if_equal $7, UnknownScript_0x99dc3
if_equal $6, UnknownScript_0x99dc0
end
; 0x99dc0
UnknownScript_0x99dc0: ; 0x99dc0
jumpstd $0012
; 0x99dc3
UnknownScript_0x99dc3: ; 0x99dc3
jumpstd $0013
; 0x99dc6
UnknownScript_0x99dc6: ; 0x99dc6
applymovement $0, MovementData_0x99e5d
applymovement $8, MovementData_0x99e63
loadfont
2writetext UnknownText_0x9a49c
closetext
loadmovesprites
follow $0, $8
applymovement $0, MovementData_0x99e5f
stopfollow
special $002e
playsound SFX_ENTER_DOOR
waitbutton
warp GROUP_ECRUTEAK_CITY, MAP_ECRUTEAK_CITY, $6, $1b
end
; 0x99de9
TrainerSageJeffrey: ; 0x99de9
; bit/flag number
dw $415
; trainer group && trainer id
db SAGE, JEFFREY
; text when seen
dw SageJeffreySeenText
; text when trainer beaten
dw SageJeffreyBeatenText
; script when lost
dw $0000
; script when talk again
dw SageJeffreyScript
; 0x99df5
SageJeffreyScript: ; 0x99df5
talkaftercancel
loadfont
2writetext UnknownText_0x9a263
closetext
loadmovesprites
end
; 0x99dfd
TrainerSagePing: ; 0x99dfd
; bit/flag number
dw $416
; trainer group && trainer id
db SAGE, PING
; text when seen
dw SagePingSeenText
; text when trainer beaten
dw SagePingBeatenText
; script when lost
dw $0000
; script when talk again
dw SagePingScript
; 0x99e09
SagePingScript: ; 0x99e09
talkaftercancel
loadfont
2writetext UnknownText_0x9a2b7
closetext
loadmovesprites
end
; 0x99e11
TrainerMediumMartha: ; 0x99e11
; bit/flag number
dw $58b
; trainer group && trainer id
db MEDIUM, MARTHA
; text when seen
dw MediumMarthaSeenText
; text when trainer beaten
dw MediumMarthaBeatenText
; script when lost
dw $0000
; script when talk again
dw MediumMarthaScript
; 0x99e1d
MediumMarthaScript: ; 0x99e1d
talkaftercancel
loadfont
2writetext UnknownText_0x9a318
closetext
loadmovesprites
end
; 0x99e25
TrainerMediumGrace: ; 0x99e25
; bit/flag number
dw $58c
; trainer group && trainer id
db MEDIUM, GRACE
; text when seen
dw MediumGraceSeenText
; text when trainer beaten
dw MediumGraceBeatenText
; script when lost
dw $0000
; script when talk again
dw MediumGraceScript
; 0x99e31
MediumGraceScript: ; 0x99e31
talkaftercancel
loadfont
2writetext UnknownText_0x9a38a
closetext
loadmovesprites
end
; 0x99e39
EcruteakGymGuyScript: ; 0x99e39
faceplayer
loadfont
checkevent EVENT_BEAT_MORTY
iftrue .EcruteakGymGuyWinScript
2writetext EcruteakGymGuyText
closetext
loadmovesprites
end
.EcruteakGymGuyWinScript
2writetext EcruteakGymGuyWinText
closetext
loadmovesprites
end
; 0x99e4d
MapEcruteakGymSignpost1Script: ; 0x99e4d
checkflag $001e
iftrue UnknownScript_0x99e56
jumpstd $002d
; 0x99e56
UnknownScript_0x99e56: ; 0x99e56
trainertotext MORTY, 1, $1
jumpstd $002e
; 0x99e5d
MovementData_0x99e5d: ; 0x99e5d
step_up
step_end
; 0x99e5f
MovementData_0x99e5f: ; 0x99e5f
fix_facing
slow_step_down
remove_fixed_facing
step_end
; 0x99e63
MovementData_0x99e63: ; 0x99e63
slow_step_down
step_end
; 0x99e65
UnknownText_0x99e65: ; 0x99e65
text "Good of you to"
line "have come."
para "Here in ECRUTEAK,"
line "#MON have been"
cont "revered."
para "It's said that a"
line "rainbow-colored"
para "#MON will come"
line "down to appear"
para "before a truly"
line "powerful trainer."
para "I believed that"
line "tale, so I have"
para "secretly trained"
line "here all my life."
para "As a result, I can"
line "now see what"
cont "others cannot."
para "Just a bit more…"
para "With a little"
line "more, I could see"
para "a future in which"
line "I meet the #MON"
cont "of rainbow colors."
para "You're going to"
line "help me reach that"
cont "level!"
done
; 0x9a00a
UnknownText_0x9a00a: ; 0x9a00a
text "I'm not good"
line "enough yet…"
para "All right. This"
line "BADGE is yours."
done
; 0x9a043
UnknownText_0x9a043: ; 0x9a043
text $52, " received"
line "FOGBADGE."
done
; 0x9a059
UnknownText_0x9a059: ; 0x9a059
text "By having FOG-"
line "BADGE, #MON up"
para "to L50 will obey"
line "you."
para "Also, #MON that"
line "know SURF will be"
para "able to use that"
line "move anytime."
para "I want you to have"
line "this too."
done
; 0x9a0ec
UnknownText_0x9a0ec: ; 0x9a0ec
text "It's SHADOW BALL."
line "It causes damage"
para "and may reduce"
line "SPCL.DEF."
para "Use it if it"
line "appeals to you."
done
; 0x9a145
UnknownText_0x9a145: ; 0x9a145
text "I see…"
para "Your journey has"
line "taken you to far-"
cont "away places."
para "And you have wit-"
line "nessed much more"
cont "than I."
para "I envy you for"
line "that…"
done
; 0x9a1bd
SageJeffreySeenText: ; 0x9a1bd
text "I spent the spring"
line "with my #MON."
para "Then summer, fall"
line "and winter…"
para "Then spring came"
line "again. We have"
para "lived together"
line "for a long time."
done
; 0x9a23d
SageJeffreyBeatenText: ; 0x9a23d
text "Wins and losses, I"
line "experienced both."
done
; 0x9a263
UnknownText_0x9a263: ; 0x9a263
text "Where did #MON"
line "come from?"
done
; 0x9a27e
SagePingSeenText: ; 0x9a27e
text "Can you inflict"
line "any damage on our"
cont "#MON?"
done
; 0x9a2a7
SagePingBeatenText: ; 0x9a2a7
text "Ah! Well done!"
done
; 0x9a2b7
UnknownText_0x9a2b7: ; 0x9a2b7
text "We use only ghost-"
line "type #MON."
para "No normal-type"
line "attack can harm"
cont "them!"
done
; 0x9a2fb
MediumMarthaSeenText: ; 0x9a2fb
text "I shall win!"
done
; 0x9a309
MediumMarthaBeatenText: ; 0x9a309
text "I, I, I lost!"
done
; 0x9a318
UnknownText_0x9a318: ; 0x9a318
text "The one who wants"
line "to win most--will!"
done
; 0x9a33e
MediumGraceSeenText: ; 0x9a33e
text "Stumped by our in-"
line "visible floor?"
para "Defeat me if you"
line "want a hint!"
done
; 0x9a37f
MediumGraceBeatenText: ; 0x9a37f
text "Wha-what?"
done
; 0x9a38a
UnknownText_0x9a38a: ; 0x9a38a
text "Fine. I shall tell"
line "you the secret of"
para "the invisible"
line "floor."
para "The path is right"
line "before our eyes!"
done
; 0x9a3e8
EcruteakGymGuyText: ; 0x9a3e8
text "The trainers here"
line "have secret mo-"
cont "tives."
para "If you win, they"
line "may tell you some"
para "deep secrets about"
line "ECRUTEAK."
done
; 0x9a452
EcruteakGymGuyWinText: ; 0x9a452
text "Whew, ", $52, "."
line "You did great!"
para "I was cowering in"
line "the corner out of"
cont "pure terror!"
done
; 0x9a49c
UnknownText_0x9a49c: ; 0x9a49c
text "MORTY, the GYM"
line "LEADER, is absent."
para "Sorry, but you'll"
line "have to leave."
para "Hohohoho."
done
; 0x9a4e9
EcruteakGym_MapEventHeader: ; 0x9a4e9
; filler
db 0, 0
; warps
db 33
warp_def $11, $4, 10, GROUP_ECRUTEAK_CITY, MAP_ECRUTEAK_CITY
warp_def $11, $5, 10, GROUP_ECRUTEAK_CITY, MAP_ECRUTEAK_CITY
warp_def $e, $4, 4, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $4, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $4, $3, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $4, $4, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $5, $4, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $7, $6, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $4, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $6, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $6, $3, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $6, $4, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $6, $5, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $6, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $7, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $8, $4, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $8, $5, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $8, $6, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $8, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $8, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $9, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $a, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $b, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $a, $4, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $a, $5, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $c, $2, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $c, $3, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $c, $4, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $c, $5, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $a, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $b, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $c, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
warp_def $d, $7, 3, GROUP_ECRUTEAK_GYM, MAP_ECRUTEAK_GYM
; xy triggers
db 0
; signposts
db 2
signpost 15, 3, $0, MapEcruteakGymSignpost1Script
signpost 15, 6, $0, MapEcruteakGymSignpost1Script
; people-events
db 7
person_event SPRITE_MORTY, 5, 9, $6, $0, 255, 255, $b0, 0, MortyScript_0x99d58, $ffff
person_event SPRITE_SAGE, 11, 6, $9, $0, 255, 255, $92, 1, TrainerSageJeffrey, $ffff
person_event SPRITE_SAGE, 17, 7, $9, $0, 255, 255, $92, 3, TrainerSagePing, $ffff
person_event SPRITE_GRANNY, 9, 11, $8, $0, 255, 255, $b2, 1, TrainerMediumMartha, $ffff
person_event SPRITE_GRANNY, 13, 11, $8, $0, 255, 255, $b2, 1, TrainerMediumGrace, $ffff
person_event SPRITE_GYM_GUY, 19, 11, $6, $0, 255, 255, $80, 0, EcruteakGymGuyScript, $ffff
person_event SPRITE_GRAMPS, 18, 8, $6, $0, 255, 255, $a0, 0, ObjectEvent, $07a8
; 0x9a5f9