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
|
Route110_TrickHousePuzzle7_MapScripts::
map_script MAP_SCRIPT_ON_RESUME, Route110_TrickHousePuzzle7_OnResume
map_script MAP_SCRIPT_ON_TRANSITION, Route110_TrickHousePuzzle7_OnTransition
map_script MAP_SCRIPT_ON_LOAD, Route110_TrickHousePuzzle7_OnLoad
map_script MAP_SCRIPT_ON_FRAME_TABLE, Route110_TrickHousePuzzle7_OnFrame
.byte 0
@ Puzzle Room 7 in RSE uses whatever puzzle Mossdeep Gym uses
@ Because Mossdeep Gym was redesigned for Emerald, theres a good deal of leftover script from the old R/S puzzle
Route110_TrickHousePuzzle7_OnResume:
call Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles
end
Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles::
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOn
return
@ Leftover from R/S, none of the below metatile scripts are ever called
Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOn::
setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE
setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOn::
setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE
setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOn::
setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Up, FALSE
setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOn::
setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right_Alt, FALSE
setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOn::
setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE
setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_On, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOff::
setmetatile 13, 17, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE
setmetatile 12, 16, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOff::
setmetatile 12, 13, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left, FALSE
setmetatile 12, 11, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOff::
setmetatile 7, 12, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Down, FALSE
setmetatile 5, 10, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOff::
setmetatile 6, 6, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Left_Alt, FALSE
setmetatile 4, 4, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff::
setmetatile 8, 4, METATILE_TrickHousePuzzle_Arrow_RedOnBlack_Right, FALSE
setmetatile 7, 5, METATILE_TrickHousePuzzle_Lever_Off, TRUE
return
Route110_TrickHousePuzzle7_OnTransition:
goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_TeleportedTransition
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
end
Route110_TrickHousePuzzle7_EventScript_TeleportedTransition::
end
Route110_TrickHousePuzzle7_OnLoad:
call_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_UpdateSwitchMetatiles
end
Route110_TrickHousePuzzle7_OnFrame:
map_script_2 VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1, Route110_TrickHousePuzzle7_EventScript_ClearState2
.2byte 0
Route110_TrickHousePuzzle7_EventScript_ClearState2::
setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 0
end
Route110_TrickHousePuzzle7_EventScript_Scroll::
lockall
goto_if_eq VAR_TRICK_HOUSE_PUZZLE_7_STATE, 0, Route110_TrickHousePuzzle7_EventScript_FoundScroll
goto Route110_TrickHousePuzzle_EventScript_ReadScrollAgain
end
Route110_TrickHousePuzzle7_EventScript_FoundScroll::
setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE, 1
goto Route110_TrickHousePuzzle_EventScript_FoundScroll
end
@ Unused, leftover from R/S
Route110_TrickHousePuzzle7_EventScript_TeleportPad::
lockall
setvar VAR_TRICK_HOUSE_PUZZLE_7_STATE_2, 1
warpteleport MAP_ROUTE110_TRICK_HOUSE_PUZZLE7, 3, 19
waitstate
releaseall
end
@ All the below switch scripts are unused leftover from R/S
Route110_TrickHousePuzzle7_EventScript_Switch1::
lockall
delay 32
call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_SetSwitch1MetatilesOff
special DrawWholeMapView
playse SE_CLICK
goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_SetSwitch1On
goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1, Route110_TrickHousePuzzle7_EventScript_SetSwitch1Off
end
Route110_TrickHousePuzzle7_EventScript_Switch2::
lockall
delay 32
call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_SetSwitch2MetatilesOff
special DrawWholeMapView
playse SE_CLICK
goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_SetSwitch2On
goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2, Route110_TrickHousePuzzle7_EventScript_SetSwitch2Off
end
Route110_TrickHousePuzzle7_EventScript_Switch3::
lockall
delay 32
call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_SetSwitch3MetatilesOff
special DrawWholeMapView
playse SE_CLICK
goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_SetSwitch3On
goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3, Route110_TrickHousePuzzle7_EventScript_SetSwitch3Off
end
Route110_TrickHousePuzzle7_EventScript_Switch4::
lockall
delay 32
call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_SetSwitch4MetatilesOff
special DrawWholeMapView
playse SE_CLICK
goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_SetSwitch4On
goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4, Route110_TrickHousePuzzle7_EventScript_SetSwitch4Off
end
Route110_TrickHousePuzzle7_EventScript_Switch5::
lockall
delay 32
call_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOn
call_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_SetSwitch5MetatilesOff
special DrawWholeMapView
playse SE_CLICK
goto_if_unset FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_SetSwitch5On
goto_if_set FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5, Route110_TrickHousePuzzle7_EventScript_SetSwitch5Off
end
@ All the below switch scripts are unused leftover from R/S
Route110_TrickHousePuzzle7_EventScript_SetSwitch1On::
setflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch1Off::
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_1
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch2On::
setflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch2Off::
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_2
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch3On::
setflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch3Off::
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_3
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch4On::
setflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch4Off::
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_4
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch5On::
setflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
releaseall
end
Route110_TrickHousePuzzle7_EventScript_SetSwitch5Off::
clearflag FLAG_TRICK_HOUSE_PUZZLE_7_SWITCH_5
releaseall
end
@ From here is where the new, actually used puzzle scripts begin
Route110_TrickHousePuzzle7_EventScript_YellowButton::
playse SE_SWITCH
waitse
playse SE_REPEL
initrotatingtilepuzzle TRUE
moverotatingtileobjects 0
waitmovement 0
turnrotatingtileobjects
waitmovement 0
freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_BlueButton::
playse SE_SWITCH
waitse
playse SE_REPEL
initrotatingtilepuzzle TRUE
moverotatingtileobjects 1
waitmovement 0
turnrotatingtileobjects
waitmovement 0
freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_GreenButton::
playse SE_SWITCH
waitse
playse SE_REPEL
initrotatingtilepuzzle TRUE
moverotatingtileobjects 2
waitmovement 0
turnrotatingtileobjects
waitmovement 0
freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_PurpleButton::
playse SE_SWITCH
waitse
playse SE_REPEL
initrotatingtilepuzzle TRUE
moverotatingtileobjects 3
waitmovement 0
turnrotatingtileobjects
waitmovement 0
freerotatingtilepuzzle
end
@ Unused
Route110_TrickHousePuzzle7_EventScript_RedButton::
playse SE_SWITCH
waitse
playse SE_REPEL
initrotatingtilepuzzle TRUE
moverotatingtileobjects 4
waitmovement 0
turnrotatingtileobjects
waitmovement 0
freerotatingtilepuzzle
end
Route110_TrickHousePuzzle7_EventScript_Joshua::
trainerbattle_single TRAINER_JOSHUA, Route110_TrickHousePuzzle7_Text_JoshuaIntro, Route110_TrickHousePuzzle7_Text_JoshuaDefeat
msgbox Route110_TrickHousePuzzle7_Text_JoshuaPostBattle, MSGBOX_AUTOCLOSE
end
Route110_TrickHousePuzzle7_EventScript_Patricia::
trainerbattle_single TRAINER_PATRICIA, Route110_TrickHousePuzzle7_Text_PatriciaIntro, Route110_TrickHousePuzzle7_Text_PatriciaDefeat
msgbox Route110_TrickHousePuzzle7_Text_PatriciaPostBattle, MSGBOX_AUTOCLOSE
end
Route110_TrickHousePuzzle7_EventScript_Alexis::
trainerbattle_single TRAINER_ALEXIS, Route110_TrickHousePuzzle7_Text_AlexisIntro, Route110_TrickHousePuzzle7_Text_AlexisDefeat
msgbox Route110_TrickHousePuzzle7_Text_AlexisPostBattle, MSGBOX_AUTOCLOSE
end
Route110_TrickHousePuzzle7_EventScript_Mariela::
trainerbattle_single TRAINER_MARIELA, Route110_TrickHousePuzzle7_Text_MarielaIntro, Route110_TrickHousePuzzle7_Text_MarielaDefeat
msgbox Route110_TrickHousePuzzle7_Text_MarielaPostBattle, MSGBOX_AUTOCLOSE
end
Route110_TrickHousePuzzle7_EventScript_Alvaro::
trainerbattle_single TRAINER_ALVARO, Route110_TrickHousePuzzle7_Text_AlvaroIntro, Route110_TrickHousePuzzle7_Text_AlvaroDefeat
msgbox Route110_TrickHousePuzzle7_Text_AlvaroPostBattle, MSGBOX_AUTOCLOSE
end
Route110_TrickHousePuzzle7_EventScript_Everett::
trainerbattle_single TRAINER_EVERETT, Route110_TrickHousePuzzle7_Text_EverettIntro, Route110_TrickHousePuzzle7_Text_EverettDefeat
msgbox Route110_TrickHousePuzzle7_Text_EverettPostBattle, MSGBOX_AUTOCLOSE
end
Route110_TrickHousePuzzle7_EventScript_WroteSecretCodeLockOpened::
.string "{PLAYER} wrote down the secret code\n"
.string "on the door.\p"
.string "“TRICK MASTER is huggable.”\n"
.string "… … … … … … … …\p"
.string "The lock clicked open!$"
Route110_TrickHousePuzzle7_Text_JoshuaIntro:
.string "The TRICK MASTER always vanishes\n"
.string "like smoke. How does he do it?$"
Route110_TrickHousePuzzle7_Text_JoshuaDefeat:
.string "Aiyeeeh! You're much too strong!\n"
.string "How do you do it?$"
Route110_TrickHousePuzzle7_Text_JoshuaPostBattle:
.string "I wish I could appear and disappear as\n"
.string "if I were smoke, too.$"
Route110_TrickHousePuzzle7_Text_PatriciaIntro:
.string "Going around the same spot…\n"
.string "It begets ill fortune…$"
Route110_TrickHousePuzzle7_Text_PatriciaDefeat:
.string "Defeated!\n"
.string "It's a bad sign…$"
Route110_TrickHousePuzzle7_Text_PatriciaPostBattle:
.string "I've circled the same spot over ten\n"
.string "times now… It's ill fortune…$"
Route110_TrickHousePuzzle7_Text_AlexisIntro:
.string "Whoever wins will get through here\n"
.string "first. That's the feeling I get.$"
Route110_TrickHousePuzzle7_Text_AlexisDefeat:
.string "Oh!\n"
.string "Well, go ahead, then!$"
Route110_TrickHousePuzzle7_Text_AlexisPostBattle:
.string "You're solving all the puzzles in the\n"
.string "TRICK HOUSE. That's the feeling I get.$"
Route110_TrickHousePuzzle7_Text_MarielaIntro:
.string "Nufufufu, here at last!\n"
.string "Let's get right with it!$"
Route110_TrickHousePuzzle7_Text_MarielaDefeat:
.string "You're so casual about winning!$"
Route110_TrickHousePuzzle7_Text_MarielaPostBattle:
.string "Humph! I'm not upset!\n"
.string "Not me!$"
Route110_TrickHousePuzzle7_Text_AlvaroIntro:
.string "I ever so closely watched you coming!$"
Route110_TrickHousePuzzle7_Text_AlvaroDefeat:
.string "This outcome I didn't see coming…$"
Route110_TrickHousePuzzle7_Text_AlvaroPostBattle:
.string "Well, anyway, we both picked a weird\n"
.string "place to get acquainted.\p"
.string "As one weirdo to another,\n"
.string "let's do our best!$"
Route110_TrickHousePuzzle7_Text_EverettIntro:
.string "It's awfully cramped in here…$"
Route110_TrickHousePuzzle7_Text_EverettDefeat:
.string "Oh, yes, strong you are.$"
Route110_TrickHousePuzzle7_Text_EverettPostBattle:
.string "I was hoping to switch places with you\n"
.string "when I beat you, but…$"
|