JaeruGym_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

JaeruGymSignpost16:
	jumptext JaeruGymStatueText

JaeruGymTrash:
	jumptext JaeruGymTrashText

JaeruGymStatueText:
	db TX_COMPRESSED, $13, $3a, $6b, $6a, $14, $1a
	db $88, $f0, $39, $5f, $09, $23, $08, $13

	db $e0, $31, $cf, $72, $6b, $71, $8a, $04, $6a, $d4, $81
	db $53, $40

JaeruGymNPC1:
	faceplayer
	opentext
	checkflag ENGINE_SPARKYBADGE
	iftrue JaeruGym_164c30
	writetext JaeruGymNPC1_Text_164c99
	waitbutton
	closetext
	winlosstext JaeruGymNPC1Text_164d8a, 0
	loadtrainer SPARKY, 1
	startbattle
	reloadmapafterbattle
	opentext
	writetext JaeruGymNPC1_Text_164dc9
	playwaitsfx SFX_TCG2_DIDDLY_5
	playmusic MUSIC_GYM
	waitsfx
	setflag ENGINE_SPARKYBADGE
	jumptext JaeruGym_164c26_Text_164de3

JaeruGym_Trainer_1:
	trainer EVENT_JAERU_GYM_TRAINER_1, GENTLEMAN, 2, JaeruGym_Trainer_1_Text_164ea8, JaeruGym_Trainer_1_Text_164ede, $0000, .Script

.Script:
	end_if_just_battled
	jumptext JaeruGym_Trainer_1_Script_Text_164f02

JaeruGym_Trainer_2:
	trainer EVENT_JAERU_GYM_TRAINER_2, COOLTRAINERM, 8, JaeruGym_Trainer_2_Text_164f3a, JaeruGym_Trainer_2_Text_164f89, $0000, .Script

.Script:
	end_if_just_battled
	jumptext JaeruGym_Trainer_2_Script_Text_164f9d

JaeruGym_Trainer_3:
	trainer EVENT_JAERU_GYM_TRAINER_3, SUPER_NERD, 8, JaeruGym_Trainer_3_Text_164fd9, JaeruGym_Trainer_3_Text_16500c, $0000, .Script

.Script:
	end_if_just_battled
	jumptext JaeruGym_Trainer_3_Script_Text_165028

JaeruGymNPC2:
	faceplayer
	checkflag ENGINE_SPARKYBADGE
	iftrue JaeruGym_164c80
	jumptext JaeruGymNPC2_Text_165069

JaeruGym_164c30:
	jumptext JaeruGym_164c30_Text_164e55

JaeruGym_164c80:
	jumptext JaeruGym_164c80_Text_165131

JaeruGymTrashText:
	db TX_COMPRESSED, $07, $84, $41, $f1, $80, $f0, $da, $46, $4e, $62, $4d
	db $66, $f2, $b6, $ae, $5a, $f5, $09
	db $f5, $34

JaeruGymNPC1_Text_164c99:
	db TX_COMPRESSED, $50, $23, $56, $a4, $09, $c6, $37, $4e, $dc, $c8
	db $5e, $04, $16, $a5, $5a, $4b, $fc, $74

	db $58, $02, $a0, $ad, $48, $64, $e6, $04
	db $8f, $05, $ab, $40, $5a, $5b, $23, $27, $31, $f0
	db $4a, $aa, $0a, $d4, $8d, $68, $f4

	db $01, $c0, $12, $53, $25, $9f, $7b, $2d, $26
	db $fb, $d6, $9d, $b8, $23, $a7, $a8, $3f

	db $00, $76, $99, $b1, $5e, $dd, $f4, $e9

	db $40, $3a, $88, $68, $40, $80, $a0
	db $fd, $4d

JaeruGymNPC1Text_164d8a:
	db TX_COMPRESSED, $53, $19, $0f, $f0, $10, $5a, $9c, $9d, $cb, $49
	db $bc, $a0, $46, $ad, $48, $14, $12, $dc, $f2, $7f, $84, $0d

	db $40, $3a, $77, $1f, $39, $c9, $dc, $57, $ac, $a9, $4b
	db $0b, $d5, $05, $6a, $5e
	db $a6, $80

JaeruGymNPC1_Text_164dc9:
	db TX_COMPRESSED, $a7, $8e, $2c, $d9, $31, $83, $1e
	db $5e, $50, $23, $56, $a4, $0a, $09, $6e, $79
	db $3a, $68

JaeruGym_Trainer_1_Text_164ea8:
	db TX_COMPRESSED, $74, $59, $02, $48, $f8, $28, $ad, $67, $aa, $5e
	db $79, $84, $19, $a9, $3d, $cc, $52, $1e, $78
	db $d3, $40

JaeruGym_Trainer_1_Text_164ede:
	db TX_COMPRESSED, $12, $3b, $b3, $5c, $e4
	db $ed, $e0, $83, $1a, $ec, $6f, $9c, $c0, $2b, $96, $91, $a3
	db $8d, $34

JaeruGym_Trainer_1_Script_Text_164f02:
	db TX_COMPRESSED, $75, $39, $3b, $82, $34, $79, $8f, $85
	db $66, $f5, $a7, $49, $01, $05, $af, $c4, $ea, $75, $3b
	db $c6, $9a

JaeruGym_Trainer_2_Text_164f3a:
	db TX_COMPRESSED, $29, $27, $15, $85, $08, $83, $44, $20
	db $6d, $ed, $65, $93, $11, $63, $27, $31, $f3, $3b, $19, $39

	db $40, $05, $8f, $94, $dc, $20, $6a, $fc, $e4
	db $2f, $6d, $5a, $0b
	db $8d, $34

JaeruGym_Trainer_2_Text_164f89:
	db TX_COMPRESSED, $53, $19, $0f
	db $8d, $34

JaeruGym_Trainer_2_Script_Text_164f9d:
	db TX_COMPRESSED, $29, $27, $15, $85, $08, $95, $04, $94, $c8, $ac
	db $de, $4e, $88, $10, $0a, $6a, $b0, $b5, $72, $d2, $34, $71
	db $a6, $80

JaeruGym_Trainer_3_Text_164fd9:
	db TX_COMPRESSED, $72, $85, $a9, $90, $92, $99, $2a, $0a, $d4
	db $9e, $49, $ac, $f8

	db $80, $12, $3e, $42, $43
	db $e3, $4d

JaeruGym_Trainer_3_Text_16500c:
	db TX_COMPRESSED, $28, $21, $8f, $b4, $ca, $60, $41, $8d, $76, $37, $cf
	db $8d, $34

JaeruGym_Trainer_3_Script_Text_165028:
	db TX_COMPRESSED, $12, $db, $be, $9a, $25, $43, $b4, $c7
	db $cd, $ed, $59, $c2, $06, $a8, $11, $16, $30, $93, $7b

	db $e0, $0e, $72, $0c, $24, $8b, $6b, $a6, $8f
	db $53, $40

JaeruGymNPC2_Text_165069:
	db TX_COMPRESSED, $6e, $9d, $bc, $51, $a1, $1c

	db $40, $28, $11, $ab, $52, $05, $13, $a8, $9c, $ac, $35
	db $11, $e6, $84, $40, $83, $1a, $e5, $a4, $e0, $23, $d5

	db $a0, $06, $93, $31, $90, $90, $18, $d7, $67, $98, $91
	db $a1, $e6, $13, $94, $56, $0c, $96, $19, $a4
	db $54, $1c, $30, $1b, $27

	db $e0, $00, $f0, $dc, $43, $4b, $39, $52, $76, $e2, $46
	db $87, $92, $17, $ce, $2b, $69, $03, $21, $a1

	db $00, $32, $13, $47, $e2, $b6, $ae, $3a, $99, $09, $29
	db $8f, $55, $a4, $b9, $61, $98, $0c, $99, $81, $6a
	db $fd, $4d

JaeruGym_164c30_Text_164e55:
	db TX_COMPRESSED, $50, $23, $56, $a4, $09, $c6, $37, $4e, $dd

	db $28, $07, $45, $91, $5b, $48, $05
	db $c6, $9a

JaeruGym_164c80_Text_165131:
	db TX_COMPRESSED, $6e, $93, $ab, $8c, $29, $3b, $72, $ad, $44, $d2
	db $3c, $7d, $36, $6d, $63, $c0, $10, $c9, $cc, $56, $16, $af

	db $88, $07, $57, $10, $d2, $ce, $3f, $b9, $38, $f9
	db $bc, $43, $58, $30, $5a, $47
	db $a9, $a0

JaeruGym_164c26_Text_164de3:
	db TX_COMPRESSED, $29, $23, $44, $57, $b9, $e4
	db $de, $19, $19, $59, $ea, $0d, $12, $d2
	db $60, $10, $20, $cf, $30, $38, $40, $41, $69
	db $6f, $03, $95, $f0, $93

	db $c0, $1c, $e8, $39, $69, $db, $96, $19, $c9
	db $db, $c1, $6a, $e0, $70, $89, $35, $9f
	db $a9, $a0

JaeruGym_MapEventHeader ;filler
	db 0, 0

;warps
	db 2
	warp_def $11, $4, 3, JAERU_CITY
	warp_def $11, $5, 3, JAERU_CITY

	;xy triggers
	db 0

	;signposts
	db 5
	signpost 11, 9, SIGNPOST_READ, JaeruGymTrash
	signpost 9, 3, SIGNPOST_READ, JaeruGymTrash
	signpost 0, 9, SIGNPOST_READ, JaeruGymTrash
	signpost 15, 3, SIGNPOST_READ, JaeruGymSignpost16
	signpost 15, 6, SIGNPOST_READ, JaeruGymSignpost16

	;people-events
	db 5
	person_event SPRITE_SPARKY, 2, 0, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 8 + PAL_OW_BROWN, 0, 0, JaeruGymNPC1, -1
	person_event SPRITE_GENTLEMAN, 10, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 8 + PAL_OW_BLUE, 2, 4, JaeruGym_Trainer_1, -1
	person_event SPRITE_COOLTRAINER_M, 7, 2, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_RED, 2, 3, JaeruGym_Trainer_2, -1
	person_event SPRITE_SUPER_NERD, 11, 4, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 8 + PAL_OW_BROWN, 2, 4, JaeruGym_Trainer_3, -1
	person_event SPRITE_GYM_GUY, 15, 7, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 8 + PAL_OW_BLUE, 0, 1, JaeruGymNPC2, -1

