SeashoreGym_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

SeashoreGymHiddenItem_1:
	dw EVENT_SEASHORE_GYM_HIDDENITEM_PRISM_KEY
	db PRISM_KEY

SeashoreGymHiddenItem_2:
	dw EVENT_SEASHORE_GYM_HIDDENITEM_GOLD_TOKEN
	db GOLD_TOKEN

SeashoreGymNPC1:
	faceplayer
	opentext
	checkflag ENGINE_PSIBADGE
	iftrue SeashoreGym_184106
	writetext SeashoreGymNPC1_Text_184180
	waitbutton
	closetext
	winlosstext SeashoreGymNPC1Text_184295, 0
	loadtrainer SHERYL, 1
	startbattle
	reloadmapafterbattle
	opentext
	writetext SeashoreGym_1840f5_Text_184336
	playwaitsfx SFX_TCG2_DIDDLY_5
	playmusic MUSIC_GYM
	setflag ENGINE_PSIBADGE
	jumptext SeashoreGym_1840f5_Text_18434e

SeashoreGym_Trainer_1:
	trainer EVENT_SEASHORE_GYM_TRAINER_1, MEDIUM, 4, SeashoreGym_Trainer_1_Text_18448a, SeashoreGym_Trainer_1_Text_1844bc, $0000, .Script

.Script:
	end_if_just_battled
	jumptext SeashoreGym_Trainer_1_Script_Text_1844d5

SeashoreGym_Trainer_2:
	trainer EVENT_SEASHORE_GYM_TRAINER_2, PSYCHIC_T, 5, SeashoreGym_Trainer_2_Text_1844f8, SeashoreGym_Trainer_2_Text_184522, $0000, .Script

.Script:
	end_if_just_battled
	jumptext SeashoreGym_Trainer_2_Script_Text_184547

SeashoreGym_Trainer_3:
	trainer EVENT_SEASHORE_GYM_TRAINER_3, MEDIUM, 7, SeashoreGym_Trainer_3_Text_18457e, SeashoreGym_Trainer_3_Text_1845b5, $0000, .Script

.Script:
	end_if_just_battled
	jumptext SeashoreGym_Trainer_3_Script_Text_1845d7

SeashoreGym_Trainer_4:
	trainer EVENT_SEASHORE_GYM_TRAINER_4, PSYCHIC_T, 4, SeashoreGym_Trainer_4_Text_18460d, SeashoreGym_Trainer_4_Text_184643, $0000, .Script

.Script:
	end_if_just_battled
	jumptext SeashoreGym_Trainer_4_Script_Text_184654

SeashoreGymNPC2:
	jumptextfaceplayer SeashoreGymNPC2_Text_18669d

SeashoreGym_184106:
	jumptext SeashoreGym_184106_Text_18440d

SeashoreGymNPC1_Text_184180:
	db TX_COMPRESSED, $50, $93, $58, $2e, $b8, $c7, $64, $64
	db $de, $de, $74, $64, $fc, $d2, $06, $d2, $6b

	db $00, $52, $f4, $64, $35, $c4, $19, $a9, $0c, $9c
	db $bc, $f8, $29, $c2, $81, $c1, $2d, $cf, $27

	db $e0, $0e, $a6, $06, $7d, $96, $9d, $b8, $08, $2d
	db $3c, $9d, $06, $39, $69, $38, $93, $d5

	db $d8, $0d, $26, $62, $02, $d7, $60, $70
	db $9a, $f1, $4b, $d1, $90, $d7

	db $e0, $05, $24, $e2, $02, $d7, $67, $46, $a4
	db $6f, $09, $2c, $35, $13, $f2, $d2, $70, $24, $38

	db $e8, $06, $01, $6b, $94, $dc, $7f, $48, $0a, $02, $3d, $5a
	db $1e, $de, $43, $4f

	db $00, $02, $92, $34, $4a, $87, $de, $c5, $67, $30, $68
	db $8f, $0c, $99, $33, $cd, $3c
	db $14, $d0

SeashoreGymNPC1Text_184295:
	db TX_COMPRESSED, $50, $93, $58, $2e, $b8, $c1, $32, $d2, $2e, $6a
	db $1e, $75, $2d, $21, $6b, $94, $df

	db $10, $05, $27, $48, $a5, $01, $05, $a9, $80
	db $56, $f5, $a4, $e2, $bd, $bb, $e9, $fe, $72

	db $10, $1a, $93, $dc, $cd, $26, $65, $ea, $91, $c7, $c1
	db $3d, $c2, $81, $c1, $2d, $cf, $27
	db $c6, $9a

SeashoreGym_Trainer_1_Text_18448a:
	db TX_COMPRESSED, $50, $94, $d3

	db $c0, $00, $4d, $4d, $0c, $ee, $64, $35
	db $11, $e6, $52, $3e, $e6, $9e
	db $0a, $68

SeashoreGym_Trainer_1_Text_1844bc:
	db TX_COMPRESSED, $51, $6b, $09, $39, $a7
	db $81, $e5, $3d, $5c, $b0, $86, $22, $d6, $12, $73, $4f
	db $05, $34

SeashoreGym_Trainer_1_Script_Text_1844d5:
	db TX_COMPRESSED, $50, $77, $36, $20, $41, $f7, $b3, $00
	db $ad, $e0, $91, $93
	db $e3, $4d

SeashoreGym_Trainer_2_Text_1844f8:
	db TX_COMPRESSED, $72, $85, $a8, $43, $3c, $cb, $0c, $67, $a7, $ab
	db $78, $10, $5a, $5c, $7c, $64, $cc, $cb, $59, $3e
	db $34, $d0

SeashoreGym_Trainer_2_Text_184522:
	db TX_COMPRESSED, $15, $d0, $4a, $ce, $3a, $88, $48, $5a, $ee, $69, $e0
	db $e3, $4d

SeashoreGym_Trainer_2_Script_Text_184547:
	db TX_COMPRESSED, $51, $6b, $34, $22, $04, $9d, $05, $1f, $d5, $23
	db $43, $cd, $22, $25, $a7, $f4, $88, $95, $1e, $a9, $1a
	db $fd, $4d

SeashoreGym_Trainer_3_Text_18457e:
	db TX_COMPRESSED, $e0, $37, $c2, $44, $7e, $2b, $3e, $42, $43
	db $e3, $4d

SeashoreGym_Trainer_3_Text_1845b5:
	db TX_COMPRESSED, $29, $27, $32, $6f, $84, $88, $95, $04, $9c
	db $69, $a0

SeashoreGym_Trainer_3_Script_Text_1845d7:
	db TX_COMPRESSED, $e1, $e9, $ea, $0e, $74, $ee, $3e, $71, $59, $f1
	db $a6, $80

SeashoreGym_Trainer_4_Text_18460d:
	db TX_COMPRESSED, $af, $ab, $1f, $29, $bf, $ce, $9d
	db $a1, $e5, $21, $b2, $a5, $07, $71, $a1, $13
	db $55, $10, $36, $ca, $78
	db $d3, $40

SeashoreGym_Trainer_4_Text_184643:
	db TX_COMPRESSED, $75, $2a, $d4, $42, $06, $3f, $b6, $ca, $69, $e0
	db $a6, $80

SeashoreGym_Trainer_4_Script_Text_184654:
	db TX_COMPRESSED, $62, $d2, $7f, $2a, $48, $29, $91, $e4, $94
	db $c7, $ad, $3b, $72, $a0, $ad, $4a
	db $96, $9a

SeashoreGymNPC2_Text_18669d:
	db TX_COMPRESSED, $62, $60, $b7

	db $88, $02, $92, $34, $41, $a2, $28, $49, $ac, $17, $71
	db $3c, $c2, $04, $ff

	db $80, $70, $04, $94, $c8, $ac, $e6, $01, $0f, $4f
	db $2f, $2b, $05, $12, $6b, $8f, $8c, $99

	db $01, $6b, $1b, $2a, $48, $fc, $04, $16, $8b
	db $8d, $e1, $92, $5a, $4e, $30, $81, $3f

	db $c4, $02, $84, $9c, $69, $06, $89, $c2, $80, $4c, $a4, $6c
	db $bc, $0e, $57, $c2, $4f, $c4

	db $04, $06, $88, $10, $b0, $eb, $29, $95, $0e
	db $d2, $f3, $3a, $d5, $8c, $24
	db $f5, $34

SeashoreGym_184106_Text_18440d:
	db TX_COMPRESSED, $07, $98, $31, $ae, $72, $30, $63, $8d, $08, $9a, $4c
	db $bc, $84, $86, $a9, $69, $39, $50, $57, $dc

	db $80, $48, $6a, $95, $1f, $7b, $01, $05
	db $a7, $ad, $7a, $32, $71
	db $a6, $80

SeashoreGym_1840f5_Text_184336:
	db TX_COMPRESSED, $a7, $8e, $2c, $d9, $31, $83, $1e
	db $5e, $e1, $40, $e0, $96, $e7, $93
	db $f5, $34

SeashoreGym_1840f5_Text_18434e:
	db TX_COMPRESSED, $50, $93, $58, $2e, $b8, $c7, $51, $3a, $0c, $73
	db $5e, $c0, $cf, $a3, $27, $30, $10, $5a, $5c, $57, $b9, $e4

	db $c0, $21, $9d, $06, $32, $72, $6b, $89, $68
	db $96, $f5, $43, $ef, $61, $0c, $18, $d7, $0c, $99

	db $f0, $07, $52, $a1, $f7, $b1, $0d, $08, $10, $15
	db $db, $c0, $82, $d2, $e0, $b3, $68, $d1, $7f, $84, $30, $63
	db $5a, $ae, $46, $0c, $71, $a1, $1c
	db $69, $a0

SeashoreGym_MapEventHeader ;filler
	db 0, 0

;warps
	db 3
	warp_def $d, $20, 5, SEASHORE_CITY
	warp_def $19, $17, 3, SEASHORE_GYM
	warp_def $f, $19, 2, SEASHORE_GYM

	;xy triggers
	db 0

	;signposts
	db 2
	signpost 14, 29, SIGNPOST_ITEM, SeashoreGymHiddenItem_1
	signpost 17, 21, SIGNPOST_ITEM, SeashoreGymHiddenItem_2

	;people-events
	db 6
	person_event SPRITE_SHERAL, 6, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 0, 0, SeashoreGymNPC1, -1
	person_event SPRITE_GRANNY, 19, 24, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 8 + PAL_OW_BROWN, 2, 3, SeashoreGym_Trainer_1, -1
	person_event SPRITE_YOUNGSTER, 5, 19, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 8 + PAL_OW_BLUE, 2, 3, SeashoreGym_Trainer_2, -1
	person_event SPRITE_GRANNY, 20, 14, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 8 + PAL_OW_BROWN, 2, 2, SeashoreGym_Trainer_3, -1
	person_event SPRITE_PSYCHIC, 24, 32, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 8 + PAL_OW_BLUE, 2, 4, SeashoreGym_Trainer_4, -1
	person_event SPRITE_GYM_GUY, 14, 31, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 8 + PAL_OW_BLUE, 0, 0, SeashoreGymNPC2, -1

