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
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
|
object_const_def
const BATTLETOWER1F_RECEPTIONIST
const BATTLETOWER1F_YOUNGSTER
const BATTLETOWER1F_COOLTRAINER_F
const BATTLETOWER1F_BUG_CATCHER
const BATTLETOWER1F_GRANNY
BattleTower1F_MapScripts:
def_scene_scripts
scene_script .Scene0 ; SCENE_DEFAULT
scene_script .Scene1 ; SCENE_FINISHED
def_callbacks
.Scene0:
setval BATTLETOWERACTION_CHECKSAVEFILEISYOURS
special BattleTowerAction
iffalse .SkipEverything
setval BATTLETOWERACTION_GET_CHALLENGE_STATE ; readmem sBattleTowerChallengeState
special BattleTowerAction
ifequal $0, .SkipEverything
ifequal $2, .LeftWithoutSaving
ifequal $3, .SkipEverything
ifequal $4, .SkipEverything
opentext
writetext Text_WeveBeenWaitingForYou
waitbutton
closetext
sdefer Script_ResumeBattleTowerChallenge
end
.LeftWithoutSaving
sdefer BattleTower_LeftWithoutSaving
setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
setval BATTLETOWERACTION_06
special BattleTowerAction
.SkipEverything:
setscene SCENE_FINISHED
.Scene1:
end
BattleTower1FRulesSign:
opentext
writetext Text_ReadBattleTowerRules
yesorno
iffalse .skip
writetext Text_BattleTowerRules
waitbutton
.skip:
closetext
end
BattleTower1FReceptionistScript:
setval BATTLETOWERACTION_GET_CHALLENGE_STATE ; readmem sBattleTowerChallengeState
special BattleTowerAction
ifequal $3, Script_BeatenAllTrainers2 ; maps/BattleTowerBattleRoom.asm
opentext
writetext Text_BattleTowerWelcomesYou
promptbutton
setval BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [sBattleTowerSaveFileFlags]
special BattleTowerAction
ifnotequal $0, Script_Menu_ChallengeExplanationCancel
sjump Script_BattleTowerIntroductionYesNo
Script_Menu_ChallengeExplanationCancel:
writetext Text_WantToGoIntoABattleRoom
setval TRUE
special Menu_ChallengeExplanationCancel
ifequal 1, Script_ChooseChallenge
ifequal 2, Script_BattleTowerExplanation
sjump Script_BattleTowerHopeToServeYouAgain
Script_ChooseChallenge:
setval BATTLETOWERACTION_RESETDATA ; ResetBattleTowerTrainerSRAM
special BattleTowerAction
special CheckForBattleTowerRules
ifnotequal FALSE, Script_WaitButton
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_DEFAULT
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_FINISHED
setval BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [sBattleTowerSaveFileFlags]
special BattleTowerAction
special BattleTowerRoomMenu
ifequal $a, Script_Menu_ChallengeExplanationCancel
ifnotequal $0, Script_MobileError
setval BATTLETOWERACTION_11
special BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
closetext
setval BATTLETOWERACTION_CHOOSEREWARD
special BattleTowerAction
sjump Script_WalkToBattleTowerElevator
Script_ResumeBattleTowerChallenge:
closetext
setval BATTLETOWERACTION_LOADLEVELGROUP ; load choice of level group
special BattleTowerAction
Script_WalkToBattleTowerElevator:
musicfadeout MUSIC_NONE, 8
setmapscene BATTLE_TOWER_BATTLE_ROOM, SCENE_DEFAULT
setmapscene BATTLE_TOWER_ELEVATOR, SCENE_DEFAULT
setmapscene BATTLE_TOWER_HALLWAY, SCENE_DEFAULT
follow BATTLETOWER1F_RECEPTIONIST, PLAYER
applymovement BATTLETOWER1F_RECEPTIONIST, MovementData_BattleTower1FWalkToElevator
setval BATTLETOWERACTION_0A
special BattleTowerAction
warpsound
disappear BATTLETOWER1F_RECEPTIONIST
stopfollow
applymovement PLAYER, MovementData_BattleTowerHallwayPlayerEntersBattleRoom
warpcheck
end
Script_GivePlayerHisPrize:
setval BATTLETOWERACTION_1C
special BattleTowerAction
setval BATTLETOWERACTION_GIVEREWARD
special BattleTowerAction
ifequal POTION, Script_YourPackIsStuffedFull
getitemname STRING_BUFFER_4, USE_SCRIPT_VAR
giveitem ITEM_FROM_MEM, 5
writetext Text_PlayerGotFive
setval BATTLETOWERACTION_1D
special BattleTowerAction
closetext
end
Script_YourPackIsStuffedFull:
writetext Text_YourPackIsStuffedFull
waitbutton
closetext
end
Script_BattleTowerIntroductionYesNo:
writetext Text_WouldYouLikeToHearAboutTheBattleTower
yesorno
iffalse Script_BattleTowerSkipExplanation
Script_BattleTowerExplanation:
writetext Text_BattleTowerIntroduction_2
Script_BattleTowerSkipExplanation:
setval BATTLETOWERACTION_SET_EXPLANATION_READ
special BattleTowerAction
sjump Script_Menu_ChallengeExplanationCancel
Script_BattleTowerHopeToServeYouAgain:
writetext Text_WeHopeToServeYouAgain
waitbutton
closetext
end
Script_MobileError2: ; unreferenced
special BattleTowerMobileError
closetext
end
Script_WaitButton:
waitbutton
closetext
end
Script_ChooseChallenge2: ; unreferenced
writetext Text_SaveBeforeEnteringBattleRoom
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setval BATTLETOWERACTION_SET_EXPLANATION_READ
special BattleTowerAction
special Function1700ba
ifequal $a, Script_Menu_ChallengeExplanationCancel
ifnotequal $0, Script_MobileError
writetext Text_ReceivedAListOfLeadersOnTheHonorRoll
turnobject BATTLETOWER1F_RECEPTIONIST, LEFT
writetext Text_PleaseConfirmOnThisMonitor
waitbutton
turnobject BATTLETOWER1F_RECEPTIONIST, DOWN
closetext
end
Script_StartChallenge: ; unreferenced
setval BATTLETOWERACTION_LEVEL_CHECK
special BattleTowerAction
ifnotequal $0, Script_AMonLevelExceeds
setval BATTLETOWERACTION_UBERS_CHECK
special BattleTowerAction
ifnotequal $0, Script_MayNotEnterABattleRoomUnderL70
special CheckForBattleTowerRules
ifnotequal FALSE, Script_WaitButton
setval BATTLETOWERACTION_05
special BattleTowerAction
ifequal $0, .zero
writetext Text_CantBeRegistered_PreviousRecordDeleted
sjump .continue
.zero
writetext Text_CantBeRegistered
.continue
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
writetext Text_SaveBeforeReentry
yesorno
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_DEFAULT
special TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
setscene SCENE_FINISHED
setval BATTLETOWERACTION_06
special BattleTowerAction
setval BATTLETOWERACTION_12
special BattleTowerAction
writetext Text_RightThisWayToYourBattleRoom
waitbutton
sjump Script_ResumeBattleTowerChallenge
Script_ReachedBattleLimit: ; unreferenced
writetext Text_FiveDayBattleLimit_Mobile
waitbutton
sjump Script_BattleTowerHopeToServeYouAgain
Script_AMonLevelExceeds:
writetext Text_AMonLevelExceeds
waitbutton
sjump Script_Menu_ChallengeExplanationCancel
Script_MayNotEnterABattleRoomUnderL70:
writetext Text_MayNotEnterABattleRoomUnderL70
waitbutton
sjump Script_Menu_ChallengeExplanationCancel
Script_MobileError:
special BattleTowerMobileError
closetext
end
BattleTower_LeftWithoutSaving:
opentext
writetext Text_BattleTower_LeftWithoutSaving
waitbutton
sjump Script_BattleTowerHopeToServeYouAgain
BattleTower1FYoungsterScript:
faceplayer
opentext
writetext Text_BattleTowerYoungster
waitbutton
closetext
turnobject BATTLETOWER1F_YOUNGSTER, RIGHT
end
BattleTower1FCooltrainerFScript:
jumptextfaceplayer Text_BattleTowerCooltrainerF
BattleTower1FBugCatcherScript:
jumptextfaceplayer Text_BattleTowerBugCatcher
BattleTower1FGrannyScript:
jumptextfaceplayer Text_BattleTowerGranny
MovementData_BattleTower1FWalkToElevator:
step UP
step UP
step UP
step UP
step UP
MovementData_BattleTowerHallwayPlayerEntersBattleRoom:
step UP
step_end
MovementData_BattleTowerElevatorExitElevator:
step DOWN
step_end
MovementData_BattleTowerHallwayWalkTo1020Room:
step RIGHT
step RIGHT
MovementData_BattleTowerHallwayWalkTo3040Room:
step RIGHT
step RIGHT
step UP
step RIGHT
turn_head LEFT
step_end
MovementData_BattleTowerHallwayWalkTo90100Room:
step LEFT
step LEFT
MovementData_BattleTowerHallwayWalkTo7080Room:
step LEFT
step LEFT
MovementData_BattleTowerHallwayWalkTo5060Room:
step LEFT
step LEFT
step UP
step LEFT
turn_head RIGHT
step_end
MovementData_BattleTowerBattleRoomPlayerWalksIn:
step UP
step UP
step UP
step UP
turn_head RIGHT
step_end
MovementData_BattleTowerBattleRoomOpponentWalksIn:
slow_step DOWN
slow_step DOWN
slow_step DOWN
turn_head LEFT
step_end
MovementData_BattleTowerBattleRoomOpponentWalksOut:
turn_head UP
slow_step UP
slow_step UP
slow_step UP
step_end
MovementData_BattleTowerBattleRoomReceptionistWalksToPlayer:
slow_step RIGHT
slow_step RIGHT
slow_step UP
slow_step UP
step_end
MovementData_BattleTowerBattleRoomReceptionistWalksAway:
slow_step DOWN
slow_step DOWN
slow_step LEFT
slow_step LEFT
turn_head RIGHT
step_end
MovementData_BattleTowerBattleRoomPlayerTurnsToFaceReceptionist:
turn_head DOWN
step_end
MovementData_BattleTowerBattleRoomPlayerTurnsToFaceNextOpponent:
turn_head RIGHT
step_end
Text_BattleTowerWelcomesYou:
text "BATTLE TOWER"
line "welcomes you!"
para "I could show you"
line "to a BATTLE ROOM."
done
Text_WantToGoIntoABattleRoom:
text "Want to go into a"
line "BATTLE ROOM?"
done
Text_RightThisWayToYourBattleRoom:
text "Right this way to"
line "your BATTLE ROOM."
done
Text_BattleTowerIntroduction_1: ; unreferenced
text "BATTLE TOWER is a"
line "facility made for"
cont "#MON battles."
para "Countless #MON"
line "trainers gather"
para "from all over to"
line "hold battles in"
para "specially designed"
line "BATTLE ROOMS."
para "There are many"
line "BATTLE ROOMS in"
cont "the BATTLE TOWER."
para "Each ROOM holds"
line "seven trainers."
para "If you defeat the"
line "seven in a ROOM,"
para "and you have a"
line "good record, you"
para "could become the"
line "ROOM's LEADER."
para "All LEADERS will"
line "be recorded in the"
para "HONOR ROLL for"
line "posterity."
para "You may challenge"
line "in up to five"
para "BATTLE ROOMS each"
line "day."
para "However, you may"
line "battle only once a"
para "day in any given"
line "ROOM."
para "To interrupt a"
line "session, you must"
para "SAVE. If not, you"
line "won't be able to"
para "resume your ROOM"
line "challenge."
para ""
done
Text_BattleTowerIntroduction_2:
text "BATTLE TOWER is a"
line "facility made for"
cont "#MON battles."
para "Countless #MON"
line "trainers gather"
para "from all over to"
line "hold battles in"
para "specially designed"
line "BATTLE ROOMS."
para "There are many"
line "BATTLE ROOMS in"
cont "the BATTLE TOWER."
para "Each ROOM holds"
line "seven trainers."
para "Beat them all, and"
line "win a prize."
para "To interrupt a"
line "session, you must"
para "SAVE. If not, you"
line "won't be able to"
para "resume your ROOM"
line "challenge."
para ""
done
Text_ReceivedAListOfLeadersOnTheHonorRoll:
text "Received a list of"
line "LEADERS on the"
cont "HONOR ROLL."
para ""
done
Text_PleaseConfirmOnThisMonitor:
text "Please confirm on"
line "this monitor."
done
Text_ThankYou: ; unreferenced
text "Thank you!"
para ""
done
Text_ThanksForVisiting:
text "Thanks for"
line "visiting!"
done
Text_BeatenAllTheTrainers_Mobile: ; unreferenced
text "Congratulations!"
para "You've beaten all"
line "the trainers!"
para "Your feat may be"
line "worth registering,"
para "<PLAYER>. With your"
line "results, you may"
para "be chosen as a"
line "ROOM LEADER."
para ""
done
Text_CongratulationsYouveBeatenAllTheTrainers:
text "Congratulations!"
para "You've beaten all"
line "the trainers!"
para "For that, you get"
line "this great prize!"
para ""
done
Text_AskRegisterRecord_Mobile: ; unreferenced
text "Would you like to"
line "register your"
para "record with the"
line "CENTER?"
done
Text_PlayerGotFive:
text "<PLAYER> got five"
line "@"
text_ram wStringBuffer4
text "!@"
sound_item
text_promptbutton
text_end
Text_YourPackIsStuffedFull:
text "Oops, your PACK is"
line "stuffed full."
para "Please make room"
line "and come back."
done
Text_YourRegistrationIsComplete: ; unreferenced
text "Your registration"
line "is complete."
para "Please come again!"
done
Text_WeHopeToServeYouAgain:
text "We hope to serve"
line "you again."
done
Text_PleaseStepThisWay:
text "Please step this"
line "way."
done
Text_WouldYouLikeToHearAboutTheBattleTower:
text "Would you like to"
line "hear about the"
cont "BATTLE TOWER?"
done
Text_CantBeRegistered:
text "Your record from"
line "the previous"
para "BATTLE ROOM can't"
line "be registered. OK?"
done
Text_CantBeRegistered_PreviousRecordDeleted:
text "Your record from"
line "the previous"
para "BATTLE ROOM can't"
line "be registered."
para "Also, the existing"
line "record will be"
cont "deleted. OK?"
done
Text_CheckTheLeaderHonorRoll: ; unreferenced
text "Check the LEADER"
line "HONOR ROLL?"
done
Text_ReadBattleTowerRules:
text "BATTLE TOWER rules"
line "are written here."
para "Read the rules?"
done
Text_BattleTowerRules:
text "Three #MON may"
line "enter battles."
para "All three must be"
line "different."
para "The items they"
line "hold must also be"
cont "different."
para "Certain #MON"
line "may also have"
para "level restrictions"
line "placed on them."
done
Text_BattleTower_LeftWithoutSaving:
text "Excuse me!"
line "You didn't SAVE"
para "before exiting"
line "the BATTLE ROOM."
para "I'm awfully sorry,"
line "but your challenge"
para "will be declared"
line "invalid."
done
Text_YourMonWillBeHealedToFullHealth:
text "Your #MON will"
line "be healed to full"
cont "health."
done
Text_NextUpOpponentNo:
text "Next up, opponent"
line "no.@"
text_ram wStringBuffer3
text ". Ready?"
done
Text_SaveBeforeConnecting_Mobile: ; unreferenced
text "Your session will"
line "be SAVED before"
para "connecting with"
line "the CENTER."
done
Text_SaveBeforeEnteringBattleRoom:
text "Before entering"
line "the BATTLE ROOM,"
para "your progress will"
line "be saved."
done
Text_SaveAndEndTheSession:
text "SAVE and end the"
line "session?"
done
Text_SaveBeforeReentry:
text "Your record will"
line "be SAVED before"
para "you go back into"
line "the previous ROOM."
done
Text_CancelYourBattleRoomChallenge:
text "Cancel your BATTLE"
line "ROOM challenge?"
done
Text_RegisterRecordOnFile_Mobile: ; unreferenced
text "We have your"
line "previous record on"
para "file. Would you"
line "like to register"
cont "it at the CENTER?"
done
Text_WeveBeenWaitingForYou:
text "We've been waiting"
line "for you. This way"
para "to a BATTLE ROOM,"
line "please."
done
Text_FiveDayBattleLimit_Mobile:
text "You may enter only"
line "five BATTLE ROOMS"
cont "each day."
para "Please come back"
line "tomorrow."
done
Text_TooMuchTimeElapsedNoRegister:
text "Sorry, but it's"
line "not possible to"
para "register your"
line "current record at"
para "the CENTER because"
line "too much time has"
para "elapsed since the"
line "start of your"
cont "challenge."
done
Text_RegisterRecordTimedOut_Mobile: ; unreferenced
; duplicate of Text_TooMuchTimeElapsedNoRegister
text "Sorry, but it's"
line "not possible to"
para "register your most"
line "recent record at"
para "the CENTER because"
line "too much time has"
para "elapsed since the"
line "start of your"
cont "challenge."
done
Text_AMonLevelExceeds:
text "One or more of"
line "your #MON's"
cont "levels exceeds @"
text_decimal wScriptVar, 1, 3
text "."
done
Text_MayNotEnterABattleRoomUnderL70:
text_ram wcd49
text " may not"
line "enter a BATTLE"
cont "ROOM under L70."
para "This BATTLE ROOM"
line "is for L@"
text_decimal wScriptVar, 1, 3
text "."
done
Text_BattleTowerYoungster:
text "Destroyed by the"
line "first opponent in"
para "no time at all…"
line "I'm no good…"
done
Text_BattleTowerCooltrainerF:
text "There are lots of"
line "BATTLE ROOMS, but"
para "I'm going to win"
line "them all!"
done
Text_BattleTowerGranny:
text "It's a grueling"
line "task, not being"
para "able to use items"
line "in battle."
para "Making your"
line "#MON hold items"
para "is the key to"
line "winning battles."
done
Text_BattleTowerBugCatcher:
text "I'm trying to see"
line "how far I can go"
para "using just bug"
line "#MON."
para "Don't let there be"
line "any fire #MON…"
done
BattleTower1F_MapEvents:
db 0, 0 ; filler
def_warp_events
warp_event 7, 9, BATTLE_TOWER_OUTSIDE, 3
warp_event 8, 9, BATTLE_TOWER_OUTSIDE, 4
warp_event 7, 0, BATTLE_TOWER_ELEVATOR, 1
def_coord_events
def_bg_events
bg_event 6, 6, BGEVENT_READ, BattleTower1FRulesSign
def_object_events
object_event 7, 6, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTower1FReceptionistScript, -1
object_event 14, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BattleTower1FYoungsterScript, -1
object_event 4, 9, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BattleTower1FCooltrainerFScript, -1
object_event 1, 3, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BattleTower1FBugCatcherScript, -1
object_event 14, 3, SPRITE_GRANNY, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTower1FGrannyScript, -1
|