summaryrefslogtreecommitdiff
path: root/data/scripts/maps/MauvilleCity.inc
blob: 6861e46c8cec56347b95156ca7d8ee890c4e9c5e (plain)
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
MauvilleCity_MapScripts:: @ 814C032
	map_script 3, MauvilleCity_MapScript1_14C038
	.byte 0

MauvilleCity_MapScript1_14C038:: @ 814C038
	setflag FLAG_VISITED_MAUVILLE_CITY
	clearflag FLAG_HIDE_OCEANIC_MUSEUM_VISITORS
	setflag FLAG_SYS_TV_START
	clearflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
	setvar VAR_MAUVILLE_GYM_STATE, 0
	checkflag FLAG_RECEIVED_TM24
	call_if 1, MauvilleCity_EventScript_14C053
	end

MauvilleCity_EventScript_14C053:: @ 814C053
	clearflag FLAG_HIDE_WATTSON_MAUVILLE_GYM
	setflag FLAG_HIDE_WATTSON_MAUVILLE
	return

MauvilleCity_EventScript_14C05A:: @ 814C05A
	msgbox MauvilleCity_Text_1664DF, 2
	end

MauvilleCity_EventScript_14C063:: @ 814C063
	msgbox MauvilleCity_Text_16655C, 2
	end

MauvilleCity_EventScript_14C06C:: @ 814C06C
	msgbox MauvilleCity_Text_1665DB, 2
	end

MauvilleCity_EventScript_14C075:: @ 814C075
	msgbox MauvilleCity_Text_16662A, 2
	end

MauvilleCity_EventScript_14C07E:: @ 814C07E
	msgbox MauvilleCity_Text_166665, 3
	end

MauvilleCity_EventScript_14C087:: @ 814C087
	msgbox MauvilleCity_Text_166697, 3
	end

MauvilleCity_EventScript_14C090:: @ 814C090
	msgbox MauvilleCity_Text_1666E4, 3
	end

MauvilleCity_EventScript_14C099:: @ 814C099
	msgbox MauvilleCity_Text_16671C, 3
	end

MauvilleCity_EventScript_14C0A2:: @ 814C0A2
	lock
	faceplayer
	checkflag FLAG_TV_EXPLAINED
	goto_if_eq MauvilleCity_EventScript_14C0BA
	msgbox MauvilleCity_Text_16674A, 4
	setflag FLAG_TV_EXPLAINED
	release
	end

MauvilleCity_EventScript_14C0BA:: @ 814C0BA
	msgbox MauvilleCity_Text_166879, 4
	release
	end

MauvilleCity_EventScript_14C0C4:: @ 814C0C4
	lock
	faceplayer
	checkflag FLAG_DECLINED_WALLY_BATTLE_MAUVILLE
	goto_if_eq MauvilleCity_EventScript_14C0E4
	msgbox MauvilleCity_Text_165B76, 4
	closemessage
	applymovement 7, MauvilleCity_Movement_1A083D
	waitmovement 0
	release
	end

MauvilleCity_EventScript_14C0E4:: @ 814C0E4
	msgbox MauvilleCity_Text_165E45, 4
	closemessage
	applymovement 7, MauvilleCity_Movement_1A083D
	waitmovement 0
	release
	end

MauvilleCity_EventScript_14C0F9:: @ 814C0F9
	lockall
	checkflag FLAG_DECLINED_WALLY_BATTLE_MAUVILLE
	goto_if_eq MauvilleCity_EventScript_14C292
	applymovement 6, MauvilleCity_Movement_1A0843
	waitmovement 0
	msgbox MauvilleCity_Text_165BE3, 4
	msgbox MauvilleCity_Text_165C57, 4
	msgbox MauvilleCity_Text_165D01, 4
	applymovement 6, MauvilleCity_Movement_1A0839
	waitmovement 0
	playse 21
	applymovement 6, MauvilleCity_Movement_1A0833
	waitmovement 0
	applymovement 6, MauvilleCity_Movement_1A0835
	waitmovement 0
	msgbox MauvilleCity_Text_165D50, 5
	goto MauvilleCity_EventScript_14C154
	end

MauvilleCity_EventScript_14C154:: @ 814C154
	compare RESULT, 1
	call_if 1, MauvilleCity_EventScript_14C23C
	compare RESULT, 0
	goto_if_eq MauvilleCity_EventScript_14C285
	closemessage
	switch FACING
	case 2, MauvilleCity_EventScript_14C187
	case 4, MauvilleCity_EventScript_14C1D9
	end

MauvilleCity_EventScript_14C187:: @ 814C187
	applymovement 6, MauvilleCity_Movement_14C2AA
	applymovement 7, MauvilleCity_Movement_14C2CC
	waitmovement 0
	applymovement 6, MauvilleCity_Movement_1A0843
	waitmovement 0
	delay 30
	applymovement 7, MauvilleCity_Movement_14C2D8
	waitmovement 0
	applymovement 255, MauvilleCity_Movement_1A0845
	waitmovement 0
	msgbox MauvilleCity_Text_1660FA, 4
	closemessage
	applymovement 6, MauvilleCity_Movement_14C2B6
	applymovement 7, MauvilleCity_Movement_14C2DF
	waitmovement 0
	goto MauvilleCity_EventScript_14C22B
	end

MauvilleCity_EventScript_14C1D9:: @ 814C1D9
	applymovement 6, MauvilleCity_Movement_14C2B0
	applymovement 7, MauvilleCity_Movement_14C2D2
	waitmovement 0
	applymovement 6, MauvilleCity_Movement_1A0843
	waitmovement 0
	delay 30
	applymovement 7, MauvilleCity_Movement_14C2DC
	waitmovement 0
	applymovement 255, MauvilleCity_Movement_1A0845
	waitmovement 0
	msgbox MauvilleCity_Text_1660FA, 4
	closemessage
	applymovement 6, MauvilleCity_Movement_14C2C1
	applymovement 7, MauvilleCity_Movement_14C2E8
	waitmovement 0
	goto MauvilleCity_EventScript_14C22B
	end

MauvilleCity_EventScript_14C22B:: @ 814C22B
	removeobject 6
	removeobject 7
	clearflag FLAG_HIDE_WALLY_WANDAS_HOUSE
	clearflag FLAG_HIDE_WALLY_FATHER_WANDAS_HOUSE
	setflag FLAG_DEFEATED_WALLY_MAUVILLE
	releaseall
	end

MauvilleCity_EventScript_14C23C:: @ 814C23C
	msgbox MauvilleCity_Text_165F0D, 4
	trainerbattle 3, OPPONENT_WALLY_2, 0, MauvilleCity_Text_165F38
	applymovement 6, MauvilleCity_Movement_1A0843
	waitmovement 0
	msgbox MauvilleCity_Text_165F85, 4
	applymovement 6, MauvilleCity_Movement_1A0839
	waitmovement 0
	msgbox MauvilleCity_Text_165FB3, 4
	applymovement 6, MauvilleCity_Movement_1A0843
	waitmovement 0
	msgbox MauvilleCity_Text_166050, 4
	return

MauvilleCity_EventScript_14C285:: @ 814C285
	setflag FLAG_DECLINED_WALLY_BATTLE_MAUVILLE
	msgbox MauvilleCity_Text_165DE8, 4
	release
	end

MauvilleCity_EventScript_14C292:: @ 814C292
	applymovement 6, MauvilleCity_Movement_1A0839
	waitmovement 0
	msgbox MauvilleCity_Text_165EE2, 5
	goto MauvilleCity_EventScript_14C154
	end

MauvilleCity_Movement_14C2AA:: @ 814C2AA
	step_left
	step_left
	step_down
	step_down
	step_left
	step_end

MauvilleCity_Movement_14C2B0:: @ 814C2B0
	step_down
	step_down
	step_left
	step_left
	step_left
	step_end

MauvilleCity_Movement_14C2B6:: @ 814C2B6
	step_14
	step_14
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

MauvilleCity_Movement_14C2C1:: @ 814C2C1
	step_14
	step_14
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

MauvilleCity_Movement_14C2CC:: @ 814C2CC
	step_left
	step_left
	step_left
	step_down
	step_down
	step_end

MauvilleCity_Movement_14C2D2:: @ 814C2D2
	step_left
	step_down
	step_down
	step_left
	step_left
	step_end

MauvilleCity_Movement_14C2D8:: @ 814C2D8
	step_right
	step_right
	step_26
	step_end

MauvilleCity_Movement_14C2DC:: @ 814C2DC
	step_right
	step_up
	step_end

MauvilleCity_Movement_14C2DF:: @ 814C2DF
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

MauvilleCity_Movement_14C2E8:: @ 814C2E8
	step_down
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_left
	step_end

MauvilleCity_EventScript_14C2F2:: @ 814C2F2
	lock
	faceplayer
	checkflag FLAG_RECEIVED_TM24
	goto_if_eq MauvilleCity_EventScript_14C368
	compare VAR_NEW_MAUVILLE_STATE, 2
	goto_if_eq MauvilleCity_EventScript_14C33C
	checkflag FLAG_RECEIVED_BASEMENT_KEY
	goto_if_eq MauvilleCity_EventScript_14C332
	msgbox MauvilleCity_Text_1661C1, 4
	giveitem_std ITEM_BASEMENT_KEY
	setflag FLAG_RECEIVED_BASEMENT_KEY
	msgbox MauvilleCity_Text_166331, 4
	release
	end

MauvilleCity_EventScript_14C332:: @ 814C332
	msgbox MauvilleCity_Text_166331, 4
	release
	end

MauvilleCity_EventScript_14C33C:: @ 814C33C
	msgbox MauvilleCity_Text_1663EB, 4
	giveitem_std ITEM_TM24
	compare RESULT, 0
	goto_if_eq MauvilleCity_EventScript_1A029B
	setflag FLAG_RECEIVED_TM24
	msgbox MauvilleCity_Text_166488, 4
	release
	end

MauvilleCity_EventScript_14C368:: @ 814C368
	msgbox MauvilleCity_Text_166488, 4
	release
	end