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
|
object_const_def
const TRAINERHOUSEB1F_RECEPTIONIST
const TRAINERHOUSEB1F_CHRIS
TrainerHouseB1F_MapScripts:
def_scene_scripts
scene_script .DummyScene ; SCENE_DEFAULT
def_callbacks
.DummyScene:
end
TrainerHouseReceptionistScript:
turnobject PLAYER, UP
opentext
checkflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
iftrue .FoughtTooManyTimes
writetext TrainerHouseB1FIntroText
promptbutton
special TrainerHouse
iffalse .GetCal3Name
gettrainername STRING_BUFFER_3, CAL, CAL2
sjump .GotName
.GetCal3Name:
gettrainername STRING_BUFFER_3, CAL, CAL3
.GotName:
writetext TrainerHouseB1FYourOpponentIsText
promptbutton
writetext TrainerHouseB1FAskWantToBattleText
yesorno
iffalse .Declined
setflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
writetext TrainerHouseB1FGoRightInText
waitbutton
closetext
applymovement PLAYER, Movement_EnterTrainerHouseBattleRoom
opentext
writetext TrainerHouseB1FCalBeforeText
waitbutton
closetext
special TrainerHouse
iffalse .NoSpecialBattle
winlosstext TrainerHouseB1FCalBeatenText, 0
setlasttalked TRAINERHOUSEB1F_CHRIS
loadtrainer CAL, CAL2
startbattle
reloadmapafterbattle
iffalse .End
.NoSpecialBattle:
winlosstext TrainerHouseB1FCalBeatenText, 0
setlasttalked TRAINERHOUSEB1F_CHRIS
loadtrainer CAL, CAL3
startbattle
reloadmapafterbattle
.End:
applymovement PLAYER, Movement_ExitTrainerHouseBattleRoom
end
.Declined:
writetext TrainerHouseB1FPleaseComeAgainText
waitbutton
closetext
applymovement PLAYER, Movement_TrainerHouseTurnBack
end
.FoughtTooManyTimes:
writetext TrainerHouseB1FSecondChallengeDeniedText
waitbutton
closetext
applymovement PLAYER, Movement_TrainerHouseTurnBack
end
Movement_EnterTrainerHouseBattleRoom:
step LEFT
step LEFT
step LEFT
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step DOWN
step LEFT
turn_head RIGHT
step_end
Movement_ExitTrainerHouseBattleRoom:
step UP
step UP
step UP
step RIGHT
step UP
step UP
step UP
step UP
step UP
step RIGHT
step RIGHT
step RIGHT
step RIGHT
step_end
Movement_TrainerHouseTurnBack:
step RIGHT
turn_head LEFT
step_end
TrainerHouseB1FIntroText:
text "Hi. Welcome to our"
line "TRAINING HALL."
para "You may battle a"
line "trainer once per"
cont "day."
done
TrainerHouseB1FYourOpponentIsText:
text_ram wStringBuffer3
text " is your"
line "opponent today."
done
TrainerHouseB1FAskWantToBattleText:
text "Would you like to"
line "battle?"
done
TrainerHouseB1FGoRightInText:
text "Please go right"
line "through."
para "You may begin"
line "right away."
done
TrainerHouseB1FPleaseComeAgainText:
text "Sorry. Only those"
line "trainers who will"
para "be battling are"
line "allowed to go in."
done
TrainerHouseB1FSecondChallengeDeniedText:
text "I'm sorry."
line "This would be your"
para "second time today."
line "You're permitted"
para "to enter just once"
line "a day."
done
TrainerHouseB1FCalBeatenText:
text "I lost…"
line "Darn…"
done
TrainerHouseB1FCalBeforeText:
text "I traveled out"
line "here just so I"
cont "could battle you."
done
TrainerHouseB1F_MapEvents:
db 0, 0 ; filler
def_warp_events
warp_event 9, 4, TRAINER_HOUSE_1F, 3
def_coord_events
coord_event 7, 3, SCENE_DEFAULT, TrainerHouseReceptionistScript
def_bg_events
def_object_events
object_event 7, 1, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
object_event 6, 11, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1
|