-
Notifications
You must be signed in to change notification settings - Fork 817
/
DragonsDenB1F.asm
432 lines (345 loc) · 9.38 KB
/
DragonsDenB1F.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
object_const_def
const DRAGONSDENB1F_POKE_BALL1
const DRAGONSDENB1F_CLAIR
const DRAGONSDENB1F_RIVAL
const DRAGONSDENB1F_COOLTRAINER_M
const DRAGONSDENB1F_COOLTRAINER_F
const DRAGONSDENB1F_TWIN1
const DRAGONSDENB1F_TWIN2
const DRAGONSDENB1F_POKE_BALL2
const DRAGONSDENB1F_POKE_BALL3
DragonsDenB1F_MapScripts:
def_scene_scripts
scene_script DragonsDenB1FNoop1Scene, SCENE_DRAGONSDENB1F_NOOP
scene_script DragonsDenB1FNoop2Scene, SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM
def_callbacks
callback MAPCALLBACK_NEWMAP, DragonsDenB1FCheckRivalCallback
DragonsDenB1FNoop1Scene:
end
DragonsDenB1FNoop2Scene:
end
DragonsDenB1FCheckRivalCallback:
checkevent EVENT_BEAT_RIVAL_IN_MT_MOON
iftrue .CheckDay
disappear DRAGONSDENB1F_RIVAL
endcallback
.CheckDay:
readvar VAR_WEEKDAY
ifequal TUESDAY, .AppearRival
ifequal THURSDAY, .AppearRival
disappear DRAGONSDENB1F_RIVAL
endcallback
.AppearRival:
appear DRAGONSDENB1F_RIVAL
endcallback
DragonsDenB1F_ClairScene:
; BUG: Clair can give TM24 Dragonbreath twice (see docs/bugs_and_glitches.md)
appear DRAGONSDENB1F_CLAIR
opentext
writetext ClairText_Wait
pause 30
closetext
showemote EMOTE_SHOCK, PLAYER, 15
turnobject PLAYER, LEFT
playmusic MUSIC_CLAIR
applymovement DRAGONSDENB1F_CLAIR, MovementDragonsDen_ClairWalksToYou
opentext
writetext ClairText_GiveDragonbreathDragonDen
promptbutton
giveitem TM_DRAGONBREATH
iffalse .BagFull
getitemname STRING_BUFFER_3, TM_DRAGONBREATH
writetext Text_ReceivedTM24
playsound SFX_ITEM
waitsfx
itemnotify
setevent EVENT_GOT_TM24_DRAGONBREATH
writetext ClairText_DescribeDragonbreathDragonDen
promptbutton
writetext ClairText_WhatsTheMatterDragonDen
waitbutton
closetext
sjump .FinishClair
.BagFull:
writetext ClairText_NoRoom
waitbutton
closetext
.FinishClair:
applymovement DRAGONSDENB1F_CLAIR, MovementDragonsDen_ClairWalksAway
special FadeOutMusic
pause 30
special RestartMapMusic
disappear DRAGONSDENB1F_CLAIR
setscene SCENE_DRAGONSDENB1F_NOOP
end
TrainerCooltrainermDarin:
trainer COOLTRAINERM, DARIN, EVENT_BEAT_COOLTRAINERM_DARIN, CooltrainermDarinSeenText, CooltrainermDarinBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext CooltrainermDarinAfterBattleText
waitbutton
closetext
end
TrainerCooltrainerfCara:
trainer COOLTRAINERF, CARA, EVENT_BEAT_COOLTRAINERF_CARA, CooltrainerfCaraSeenText, CooltrainerfCaraBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext CooltrainerfCaraAfterBattleText
waitbutton
closetext
end
TrainerTwinsLeaandpia1:
trainer TWINS, LEAANDPIA1, EVENT_BEAT_TWINS_LEA_AND_PIA, TwinsLeaandpia1SeenText, TwinsLeaandpia1BeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext TwinsLeaandpia1AfterBattleText
waitbutton
closetext
end
TrainerTwinsLeaandpia2:
trainer TWINS, LEAANDPIA1, EVENT_BEAT_TWINS_LEA_AND_PIA, TwinsLeaandpia2SeenText, TwinsLeaandpia2BeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext TwinsLeaandpia2AfterBattleText
waitbutton
closetext
end
DragonsDenB1FDragonFangScript:
; This whole script is written out rather than as an itemball
; because it's left over from the GS event.
giveitem DRAGON_FANG
iffalse .BagFull
disappear DRAGONSDENB1F_POKE_BALL1
opentext
getitemname STRING_BUFFER_3, DRAGON_FANG
writetext Text_FoundDragonFang
playsound SFX_ITEM
waitsfx
itemnotify
closetext
end
.BagFull:
opentext
getitemname STRING_BUFFER_3, DRAGON_FANG
writetext Text_FoundDragonFang
promptbutton
writetext Text_NoRoomForDragonFang
waitbutton
closetext
end
DragonsDenB1FRivalScript:
playmusic MUSIC_RIVAL_ENCOUNTER
faceplayer
opentext
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
iftrue .RivalTalkAgain
writetext RivalText_Training1
waitbutton
closetext
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
special RestartMapMusic
end
.RivalTalkAgain:
writetext RivalText_Training2
waitbutton
closetext
special RestartMapMusic
end
DragonShrineSignpost:
jumptext DragonShrineSignpostText
DragonsDenB1FCalcium:
itemball CALCIUM
DragonsDenB1FMaxElixer:
itemball MAX_ELIXER
DragonsDenB1FHiddenRevive:
hiddenitem REVIVE, EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE
DragonsDenB1FHiddenMaxPotion:
hiddenitem MAX_POTION, EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION
DragonsDenB1FHiddenMaxElixer:
hiddenitem MAX_ELIXER, EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER
MovementDragonsDen_ClairWalksToYou:
slow_step RIGHT
slow_step RIGHT
slow_step RIGHT
slow_step RIGHT
step_end
MovementDragonsDen_ClairWalksAway:
slow_step LEFT
slow_step LEFT
slow_step LEFT
slow_step LEFT
step_end
ClairText_Wait:
text "Wait!"
done
ClairText_GiveDragonbreathDragonDen:
text "CLAIR: I'm sorry"
line "about this."
para "Here, take this as"
line "my apology."
done
Text_ReceivedTM24:
text "<PLAYER> received"
line "TM24."
done
ClairText_DescribeDragonbreathDragonDen:
text "That contains"
line "DRAGONBREATH."
para "No, it doesn't"
line "have anything to"
cont "do with my breath."
para "If you don't want"
line "it, you don't have"
cont "to take it."
done
ClairText_NoRoom:
text "Oh? You don't have"
line "any room for this."
para "I'm going back to"
line "the GYM, so make"
para "room, then come"
line "see me there."
done
ClairText_WhatsTheMatterDragonDen:
text "CLAIR: What's the"
line "matter? Aren't you"
para "going on to the"
line "#MON LEAGUE?"
para "Do you know how to"
line "get there?"
para "From here, go to"
line "NEW BARK TOWN."
para "Then SURF east to"
line "#MON LEAGUE."
para "The route there is"
line "very tough."
para "Don't you dare"
line "lose at the #-"
cont "MON LEAGUE!"
para "If you do, I'll"
line "feel even worse"
para "about having lost"
line "to you!"
para "Give it everything"
line "you've got."
done
DragonShrineSignpostText:
text "DRAGON SHRINE"
para "A shrine honoring"
line "the dragon #MON"
para "said to have lived"
line "in DRAGON'S DEN."
done
RivalText_Training1:
text "…"
line "What? <PLAYER>?"
para "…No, I won't"
line "battle you now…"
para "My #MON aren't"
line "ready to beat you."
para "I can't push them"
line "too hard now."
para "I have to be dis-"
line "ciplined to become"
para "the greatest #-"
line "MON trainer…"
done
RivalText_Training2:
text "…"
para "Whew…"
para "Learn to stay out"
line "of my way…"
done
CooltrainermDarinSeenText:
text "You! How dare you"
line "enter uninvited!"
done
CooltrainermDarinBeatenText:
text "S-strong!"
done
CooltrainermDarinAfterBattleText:
text "The SHRINE ahead"
line "is home to the"
para "MASTER of our"
line "dragon-user clan."
para "You're not allowed"
line "to just go in!"
done
CooltrainerfCaraSeenText:
text "You shouldn't be"
line "in here!"
done
CooltrainerfCaraBeatenText:
text "Oh yikes, I lost!"
done
CooltrainerfCaraAfterBattleText:
text "Soon I'm going to"
line "get permission"
para "from our MASTER to"
line "use dragons."
para "When I do, I'm"
line "going to become an"
para "admirable dragon"
line "trainer and gain"
para "our MASTER's"
line "approval."
done
TwinsLeaandpia1SeenText:
text "It's a stranger we"
line "don't know."
done
TwinsLeaandpia1BeatenText:
text "Ouchies."
done
TwinsLeaandpia1AfterBattleText:
text "It was like having"
line "to battle LANCE."
done
TwinsLeaandpia2SeenText:
text "Who are you?"
done
TwinsLeaandpia2BeatenText:
text "Meanie."
done
TwinsLeaandpia2AfterBattleText:
text "We'll tell on you."
para "MASTER will be"
line "angry with you."
done
Text_FoundDragonFang:
text "<PLAYER> found"
line "@"
text_ram wStringBuffer3
text "!"
done
Text_NoRoomForDragonFang:
text "But <PLAYER> can't"
line "carry any more"
cont "items."
done
DragonsDenB1F_MapEvents:
db 0, 0 ; filler
def_warp_events
warp_event 20, 3, DRAGONS_DEN_1F, 3
warp_event 19, 29, DRAGON_SHRINE, 1
def_coord_events
coord_event 19, 30, SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM, DragonsDenB1F_ClairScene
def_bg_events
bg_event 18, 24, BGEVENT_READ, DragonShrineSignpost
bg_event 33, 29, BGEVENT_ITEM, DragonsDenB1FHiddenRevive
bg_event 21, 17, BGEVENT_ITEM, DragonsDenB1FHiddenMaxPotion
bg_event 31, 15, BGEVENT_ITEM, DragonsDenB1FHiddenMaxElixer
def_object_events
object_event 35, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonsDenB1FDragonFangScript, EVENT_DRAGONS_DEN_B1F_DRAGON_FANG
object_event 14, 30, SPRITE_CLAIR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGONS_DEN_CLAIR
object_event 20, 23, SPRITE_RIVAL, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonsDenB1FRivalScript, EVENT_RIVAL_DRAGONS_DEN
object_event 20, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainermDarin, -1
object_event 8, 8, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfCara, -1
object_event 4, 17, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsLeaandpia1, -1
object_event 4, 18, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsLeaandpia2, -1
object_event 30, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DragonsDenB1FCalcium, EVENT_DRAGONS_DEN_B1F_CALCIUM
object_event 5, 20, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DragonsDenB1FMaxElixer, EVENT_DRAGONS_DEN_B1F_MAX_ELIXER