-
Notifications
You must be signed in to change notification settings - Fork 0
/
BlackthornGym1F.asm
507 lines (492 loc) · 9.53 KB
/
BlackthornGym1F.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
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
BlackthornGym1F_MapScriptHeader:
.MapTriggers:
db 0
.MapCallbacks:
db 1
dbw MAPCALLBACK_OBJECTS, .InitEvents
.InitEvents
checkevent EVENT_130
iftrue .finish
setevent EVENT_113
setevent EVENT_114
setevent EVENT_115
setevent EVENT_116
setevent EVENT_117
setevent EVENT_118
setevent EVENT_130
.finish
return
BlackthornGym1F_MapEventHeader:
; filler
db 0, 0
.Warps:
db 1
warp_def 15, 3, 2, BLACKTHORN_CITY
.XYTriggers:
db 5
xy_trigger 0, 13, 6, 0, encounterggob1, 0, 0
xy_trigger 0, 12, 5, 0, encounterggob2, 0, 0
xy_trigger 0, 9, 3, 0, encounterggob3, 0, 0
xy_trigger 0, 5, 6, 0, encounterborg, 0, 0
xy_trigger 0, 3, 4, 0, encounterlerp, 0, 0
.Signposts:
db 1
signpost 16, 3, SIGNPOST_READ, .ruins
.PersonEvents:
db 12
person_event SPRITE_CAL, 13, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, dummy, EVENT_110
person_event SPRITE_CAL, 11, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, dummy, EVENT_111
person_event SPRITE_CAL, 9, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, dummy, EVENT_112
person_event SPRITE_FISHING_GURU, 13, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, blood, EVENT_113
person_event SPRITE_FISHING_GURU, 11, 5, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, blood, EVENT_114
person_event SPRITE_FISHING_GURU, 9, 2, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, blood, EVENT_115
person_event SPRITE_FISHING_GURU, 4, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, blood, EVENT_117
person_event SPRITE_FISHING_GURU, 2, 4, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_SCRIPT, 0, blood, EVENT_116
person_event SPRITE_SNES, 3, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_BROWN, PERSONTYPE_SCRIPT, 0, .ItemFragment_MoneySix1actions, EVENT_118
person_event SPRITE_CAL, 4, 6, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, dummy, EVENT_11A
person_event SPRITE_CAL, 2, 4, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, dummy, EVENT_119
person_event SPRITE_BUGSY, 4, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_SILVER, PERSONTYPE_SCRIPT, 0, gem, EVENT_200
.ItemFragment_MoneySix1actions
showemote EMOTE_SAD, LAST_TALKED, 15
callasm StartMenuSecondary
if_equal 1, .ATKitem
if_equal 2, .TCHitem
if_equal 3, .TLKmap
if_equal 4, .LOKitem
if_equal 5, .INGmap
if_equal 6, .TKEitem
if_equal 7, .USEitem
end
.Done
closetext
end
.TLKmap
jumptext .talkmap
.talkmap
text "That cannot talk."
done
.ATKitem
opentext
writetext .destroyItemQuestion
yesorno
iffalse .Done
setevent EVENT_118
disappear 10
jumptext .itemDestroyed
.destroyItemQuestion
text "You're able to"
line "destroy the"
cont "money bag. Do so?"
prompt
.itemDestroyed
text "You destroy"
line "the money bag."
done
.TCHitem
opentext
writetext .touchItemQuestion
yesorno
iffalse .Done
jumptext .touchItemText
.touchItemQuestion
text "The money bag is"
line "within reach."
cont "Touch it?"
prompt
.touchItemText
text "You feel a rough"
line "leather bag and"
para "some soild ¥"
line "coins."
done
.LOKitem
callasm .lookAtMoney
waitbutton
jumptext .lookAtItem
.lookAtItem
text "You see 6 ¥"
line "coins."
done
.USEitem
jumptext .pickUpFirst
.pickUpFirst
text "There is no way"
line "to use that."
done
.TKEitem
opentext
writetext .takeitemquestion
writetext .doSo
yesorno
iffalse .Done
setevent EVENT_118
disappear 10
givemoney 0, 6
iffalse .oops
jumptext .takeitemtext
.takeitemquestion
text "You are able to"
line "take the money."
prompt
.takeitemtext
text "Nothing happens"
line "as you take"
cont "the money."
done
.doSo
text "Do so?"
prompt
.INGmap
jumptext .ingestmapNo
.ingestmapNo
text "That is not"
line "edible."
done
.oops
jumptext .packfull
.packfull
text "But your pack is"
line "full."
done
.MoneyPalette
RGB 31, 31, 31
INCLUDE "gfx/stygian/bones.pal"
RGB 00, 00, 00
.lookAtMoney
lb bc, BANK(BagPic), 6*7
ld hl, BagPic
ld a, h
ld [ItempicPointer], a
ld a, l
ld [ItempicPointer + 1], a
ld hl, .MoneyPalette
ld a, h
ld [wPaletteHighBuffer], a
ld a, l
ld [wPaletteLowBuffer], a
ld a, BANK(.MoneyPalette)
ld [wPaletteBankBuffer], a
callba Itempic
ret
.ruins
jumptext .ruins_
.ruins_
text "Passage to ruins."
done
dummy
end
blood
jumpstd daytotext
LoadDeadGrey
ld hl, DeadGoblinPic
ld a, h
ld [ItempicPointer], a
ld a, l
ld [ItempicPointer + 1], a
ret
encounterggob2
setlasttalked 3
checkevent EVENT_111
iftrue .leave
showemote EMOTE_SHOCK, LAST_TALKED, 30
applymovement PLAYER, .look
faceplayer
showemote EMOTE_FISH, LAST_TALKED, 15
opentext
writetext .huh
winlosstext .enemyloses, .playerloses
closetext
loadtrainer YOUNGSTER, 3
callasm LoadDeadGrey
startbattle
reloadmapafterbattle
disappear 3
setevent EVENT_111
clearevent EVENT_114
appear 6
.leave
end
.look
turn_head_up
step_end
.huh
text "???: [Spien!]"
prompt
.enemyloses
text "???: [Nein so"
line "was!]"
done
.playerloses
text ""
done
encounterggob3
setlasttalked 4
checkevent EVENT_112
iftrue .leave
showemote EMOTE_SHOCK, LAST_TALKED, 30
applymovement PLAYER, .look
faceplayer
showemote EMOTE_FISH, LAST_TALKED, 15
opentext
writetext .huh
winlosstext .enemyloses, .playerloses
closetext
loadtrainer YOUNGSTER, 4
callasm LoadDeadGrey
startbattle
reloadmapafterbattle
disappear 4
setevent EVENT_112
clearevent EVENT_115
appear 7
.leave
end
.look
turn_head_left
step_end
.huh
text "???: [Shutzsta-"
line "ffel.]"
prompt
.enemyloses
text "???: [Mein leben!]"
done
.playerloses
text ""
done
lookAtGGob
lb bc, BANK(GoblinPic), 6*8
ld hl, GoblinPic
ld a, h
ld [ItempicPointer], a
ld a, l
ld [ItempicPointer + 1], a
ld hl, .GGobPalette
ld a, h
ld [wPaletteHighBuffer], a
ld a, l
ld [wPaletteLowBuffer], a
ld a, BANK(.GGobPalette)
ld [wPaletteBankBuffer], a
callba Personpic
ret
.GGobPalette
RGB 31, 31, 31
INCLUDE "gfx/trainers/youngster.pal"
RGB 00, 00, 00
encounterggob1
setlasttalked 2
checkevent EVENT_110
iftrue .leave
showemote EMOTE_SHOCK, LAST_TALKED, 30
applymovement PLAYER, .look
faceplayer
showemote EMOTE_FISH, LAST_TALKED, 15
opentext
writetext .huh
winlosstext .enemyloses, .playerloses
closetext
loadtrainer YOUNGSTER, MIKEY
callasm LoadDeadGrey
startbattle
reloadmapafterbattle
disappear 2
setevent EVENT_110
clearevent EVENT_113
appear 5
.leave
end
.look
turn_head_right
step_end
.huh
text "???: [Achtung!]"
prompt
.enemyloses
text "???: [Aiieee!!]"
done
.playerloses
text ""
done
encounterborg
setlasttalked 11
checkevent EVENT_11A
iftrue .leave
showemote EMOTE_SHOCK, LAST_TALKED, 30
applymovement PLAYER, .look
faceplayer
showemote EMOTE_FISH, LAST_TALKED, 15
opentext
writetext .huh
winlosstext .enemyloses, .playerloses
closetext
loadtrainer YOUNGSTER, 5
callasm LoadDeadGrey
startbattle
reloadmapafterbattle
disappear 11
setevent EVENT_11A
clearevent EVENT_117
appear 8
.leave
end
.look
turn_head_up
step_end
.huh
text "???: [Die,"
line "schweinehund.]"
prompt
.enemyloses
text "???: [Lerp,"
line "auf wiedersehen.]"
done
.playerloses
text ""
done
encounterlerp
setlasttalked 12
checkevent EVENT_119
iftrue .leave
showemote EMOTE_SHOCK, LAST_TALKED, 30
applymovement PLAYER, .look
faceplayer
showemote EMOTE_FISH, LAST_TALKED, 15
opentext
writetext .huh
winlosstext .enemyloses, .playerloses
closetext
loadtrainer YOUNGSTER, 6
callasm LoadDeadGrey
startbattle
reloadmapafterbattle
disappear 12
setevent EVENT_119
clearevent EVENT_116
appear 9
clearevent EVENT_118
appear 10
.leave
end
.look
turn_head_up
step_end
.huh
text "???: [You killed"
line "Borg! Die!!]"
prompt
.enemyloses
text "???: [What a"
line "pity…]"
done
.playerloses
text ""
done
gem
showemote EMOTE_SAD, LAST_TALKED, 15
callasm StartMenuSecondary
if_equal 1, .ATKno
if_equal 2, .TCHitem
if_equal 3, .TLKmap
if_equal 4, .LOKitem
if_equal 5, .INGmap
if_equal 6, .TKEitem
if_equal 7, .USEitem
end
.INGmap
jumptext .ingestmapNo
.ingestmapNo
text "That is not"
line "edible."
done
.Done
closetext
end
.ATKno
jumptext .noAtk
.noAtk
text "No! You may"
line "not! You are"
cont "able, though."
done
.TLKmap
jumptext .talkmap
.talkmap
text "That cannot talk."
done
.TCHitem
opentext
writetext .touchItemQuestion
yesorno
iffalse .Done
jumptext .touchItemText
.touchItemQuestion
text "The gem is within"
line "reach. Touch it?"
prompt
.touchItemText
text "You feel the conf-"
line "using surface of a"
para "gem of greater"
line "travel."
done
.LOKitem
callasm .lookAtMoney
waitbutton
jumptext .lookAtItem
.lookAtItem
text "You see void."
done
.USEitem
jumptext .pickUpFirst
.pickUpFirst
text "There is no way"
line "to use that."
done
.TKEitem
opentext
writetext .takeitemquestion
writetext .doSo
yesorno
iffalse .Done
setevent EVENT_200
disappear 13
callasm .givegem
jumptext .takeitemtext
.takeitemquestion
text "You are able to"
line "take the gem."
prompt
.takeitemtext
text "Nothing happens"
line "as you take"
cont "the gem."
done
.doSo
text "Do so?"
prompt
.givegem
ld hl, SourceGems
set 0, [hl]
ret
.MoneyPalette
RGB 31, 31, 31
RGB 20, 20, 20
RGB 10, 10, 10
RGB 00, 00, 00
.lookAtMoney
lb bc, BANK(GemPic), 6*7
ld hl, GemPic
ld a, h
ld [ItempicPointer], a
ld a, l
ld [ItempicPointer + 1], a
ld hl, .MoneyPalette
ld a, h
ld [wPaletteHighBuffer], a
ld a, l
ld [wPaletteLowBuffer], a
ld a, BANK(.MoneyPalette)
ld [wPaletteBankBuffer], a
callba Itempic
ret