SoutherlyGym_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

SoutherlyGymSignpost1:
	jumptext SoutherlyGymSignpost1_Text_2fa015

SoutherlyGym_Item_1:
	db FIRE_RING, 1

SoutherlyGymNPC1:
	jumptext SoutherlyGymNPC1_Text_2f9ef0

SoutherlyGymNPC4:
	faceplayer
	opentext
	checkflag ENGINE_BLAZEBADGE
	iffalse SoutherlyGym_2f9f3b
	jumptext SoutherlyGymNPC4_Text_2f9f41

SoutherlyGym_Trainer_1:
	trainer EVENT_SOUTHERLY_GYM_TRAINER_1, HIKER, 12, SoutherlyGym_Trainer_1_Text_2fa0fd, SoutherlyGym_Trainer_1_Text_2fa116, $0000, .Script

.Script:
	opentext
	checkevent EVENT_SOUTHERLY_GYM_NPC_2
	iftrue SoutherlyGym_2fa0f6
	writetext SoutherlyGym_Trainer_1_Script_Text_2fa134
	waitbutton
	disappear 4
	setevent EVENT_SOUTHERLY_GYM_NPC_2
	jumptext SoutherlyGym_Trainer_1_Script_Text_2fa163

SoutherlyGym_Trainer_2:
	trainer EVENT_SOUTHERLY_GYM_TRAINER_2, FIREBREATHER, 6, SoutherlyGym_Trainer_2_Text_2f86fe, SoutherlyGym_Trainer_2_Text_2f8742, $0000, .Script

.Script:
	opentext
	checkevent EVENT_SOUTHERLY_GYM_NPC_1
	iftrue SoutherlyGym_2f86f7
	writetext SoutherlyGym_Trainer_2_Script_Text_2f8751
	waitbutton
	disappear 3
	setevent EVENT_SOUTHERLY_GYM_NPC_1
	jumptext SoutherlyGym_Trainer_2_Script_Text_2f8773

SoutherlyGym_Trainer_3:
	trainer EVENT_SOUTHERLY_GYM_TRAINER_3, CAMPER, 7, SoutherlyGym_Trainer_3_Text_2fa047, SoutherlyGym_Trainer_3_Text_2fa07b, $0000, .Script

.Script:
	end_if_just_battled
	jumptext SoutherlyGym_Trainer_3_Script_Text_2fa099

SoutherlyGym_Trainer_4:
	trainer EVENT_SOUTHERLY_GYM_TRAINER_4, FIREBREATHER, 5, SoutherlyGym_Trainer_4_Text_2f864d, SoutherlyGym_Trainer_4_Text_2f867d, $0000, .Script

.Script:
	opentext
	checkevent EVENT_SOUTHERLY_GYM_NPC_3
	iftrue SoutherlyGym_2f8646
	writetext SoutherlyGym_Trainer_4_Script_Text_2f8695
	waitbutton
	disappear 5
	setevent EVENT_SOUTHERLY_GYM_NPC_3
	jumptext SoutherlyGym_Trainer_4_Script_Text_2f86b1

SoutherlyGymNPC5:
	faceplayer
	opentext
	checkflag ENGINE_BLAZEBADGE
	iffalse SoutherlyGym_2fa19d
	jumptext SoutherlyGymNPC5_Text_2fa1cd

SoutherlyGym_2f9f3b:
	jumptext SoutherlyGym_2f9f3b_Text_2f9f89

SoutherlyGym_2fa0f6:
	jumptext SoutherlyGym_Trainer_1_Script_Text_2fa163

SoutherlyGym_2f86f7:
	jumptext SoutherlyGym_Trainer_2_Script_Text_2f8773

SoutherlyGym_2f8646:
	jumptext SoutherlyGym_Trainer_4_Script_Text_2f86b1

SoutherlyGym_2fa19d:
	writetext SoutherlyGym_2fa19d_Text_2fa2ad
	waitbutton
	winlosstext SoutherlyGym_2fa19dText_2fa363, 0
	setlasttalked 255
	writecode VAR_BATTLETYPE, BATTLETYPE_NORMAL
	loadtrainer ERNEST, 1
	startbattle
	reloadmapafterbattle
	playmapmusic
	opentext
	writetext SoutherlyGym_2fa19d_Text_2fa3d0
	playwaitsfx SFX_TCG2_DIDDLY_5
	playmusic MUSIC_GYM
	writetext SoutherlyGym_2fa19d_Text_2fa3eb
	waitbutton
	givetm 38 + RECEIVED_TM
	setflag ENGINE_BLAZEBADGE
	jumptext SoutherlyGym_2fa19d_Text_2fa406

SoutherlyGymSignpost1_Text_2fa015:
	db TX_COMPRESSED, $50, $16, $ad, $26, $be, $82, $8c, $20, $4f

	db $80, $c7, $3d, $c9, $ad, $c6, $0b, $96, $43, $45
	db $d3, $40

SoutherlyGymNPC1_Text_2f9ef0:
	db TX_COMPRESSED, $29, $23, $44, $c3, $ba, $f9, $c1
	db $a1, $e5, $9e, $f7, $a0, $a2, $43, $7e

	db $00, $ea, $f1, $a2, $b3, $8d, $12, $a1, $a0, $e5
	db $85, $ea, $b7, $aa, $52, $d2, $b0, $b5, $ca, $60, $ef
	db $d4, $d0

SoutherlyGymNPC4_Text_2f9f41:
	db TX_COMPRESSED, $72, $85, $a8, $ce, $be, $73, $05, $85
	db $f7, $81, $fb, $da, $70, $31, $2d, $26

	db $94, $03, $a4, $41, $dc, $59, $ef, $7a, $0a, $6a
	db $1e, $10, $68, $40, $df, $1a, $2c, $6c, $cd
	db $42, $a3, $06, $35, $82, $09, $0e, $23, $41, $22
	db $96, $9a

SoutherlyGym_Trainer_1_Text_2fa0fd:
	db TX_COMPRESSED, $6d, $d2, $40, $41, $6a, $22, $f4, $99, $96, $93
	db $79, $27, $b7
	db $4b, $4d

SoutherlyGym_Trainer_1_Text_2fa116:
	db TX_COMPRESSED, $72, $85, $a2, $e3, $96, $16, $b9, $49
	db $ad, $eb, $4e, $92, $02, $0b, $53, $a1, $0a, $97
	db $a9, $a0

SoutherlyGym_Trainer_1_Script_Text_2fa134:
	db TX_COMPRESSED, $6e, $7d, $ec, $49, $ac, $ff, $3a, $77, $1f
	db $37, $99, $59, $ed, $9c, $d8, $84, $85
	db $76, $a9, $96, $ae, $60, $15, $c0, $41, $6b
	db $d4, $d0

SoutherlyGym_Trainer_1_Script_Text_2fa163:
	db TX_COMPRESSED, $29, $3b, $71, $09, $0b, $5d, $cc, $49, $f4
	db $43, $c0, $82, $d4, $e4, $ee, $2b, $d6, $54
	db $95, $24, $d6, $70, $f5, $03, $35
	db $fa, $9a

SoutherlyGym_Trainer_2_Text_2f86fe:
	db TX_COMPRESSED, $74, $59, $2d, $27, $11, $6b, $09, $39, $34
	db $5b, $cc, $20, $4f, $c7, $c6, $41, $84, $9c

	db $40, $09, $1e, $dc, $7c, $e6, $93, $31, $d3, $87
	db $af, $74, $ee, $02, $0b, $53, $01, $f2, $9b
	db $54, $2e, $59, $0d, $17
	db $ea, $68

SoutherlyGym_Trainer_2_Text_2f8742:
	db TX_COMPRESSED, $e0, $0d, $44, $9a, $4c, $c0, $b5, $7c
	db $69, $a0

SoutherlyGym_Trainer_2_Script_Text_2f8751:
	db TX_COMPRESSED, $74, $e1, $ec, $e4, $ee, $2c, $79, $81
	db $c1, $eb, $49, $cc, $06, $b3, $98, $05
	db $6a, $81, $05, $af
	db $53, $40

SoutherlyGym_Trainer_2_Script_Text_2f8773:
	db TX_COMPRESSED, $72, $85, $a8, $8b, $1f, $7b, $2a, $09, $29
	db $8f, $2b, $39, $aa, $fa, $72
	db $c2, $ab, $27, $81, $ed, $c1, $72, $c8, $68, $be
	db $34, $d0

SoutherlyGym_Trainer_3_Text_2fa047:
	db TX_COMPRESSED, $ad, $67, $01, $05, $a8, $21, $66, $23, $56, $79
	db $7a, $c3, $0e, $9d, $10, $6b, $19, $91, $93
	db $01, $69, $1a, $f3, $32, $7c, $ac
	db $cd, $e5, $6d, $2c, $88, $a5
	db $a6, $80

SoutherlyGym_Trainer_3_Text_2fa07b:
	db TX_COMPRESSED, $6e, $90, $ef, $e1, $03, $08, $67, $99, $80
	db $56, $f2, $42, $8b, $1f, $47, $60, $b8
	db $d3, $40

SoutherlyGym_Trainer_3_Script_Text_2fa099:
	db TX_COMPRESSED, $e1, $30, $88, $e9, $c1, $92, $5a, $46
	db $87, $b5, $67, $b3, $56, $71, $f0, $ac
	db $c0, $60, $b1, $99, $33, $d0, $52, $d3, $a4
	db $7a, $a4, $9a, $ce, $02, $0b, $51, $9d, $7c
	db $d5, $60, $b0, $bf
	db $ea, $68

SoutherlyGym_Trainer_4_Text_2f864d:
	db TX_COMPRESSED, $74, $e1, $ec, $49, $f4, $44, $04, $16, $a7, $27
	db $6f, $58, $65, $a4, $e7, $4f, $72, $6b, $83
	db $c1, $50, $20, $b5, $15, $9e, $dc, $7c
	db $fd, $4d

SoutherlyGym_Trainer_4_Text_2f867d:
	db TX_COMPRESSED, $29, $3b, $72, $ad, $44, $d8, $90
	db $db, $ca, $f6, $ef, $a7
	db $c6, $9a

SoutherlyGym_Trainer_4_Script_Text_2f8695:
	db TX_COMPRESSED, $74, $e1, $ec, $c8, $5a, $41, $cb, $49
	db $bc, $43, $d5, $ab, $05, $30, $1a, $cf
	db $d4, $d0

SoutherlyGym_Trainer_4_Script_Text_2f86b1:
	db TX_COMPRESSED, $61, $04, $39, $9d, $69, $95, $29, $50, $ed
	db $2f, $5a, $4e, $2c, $d1, $70, $38, $40, $41, $69
	db $6a, $95, $ed, $df, $4d, $1c
	db $69, $a0

SoutherlyGymNPC5_Text_2fa1cd:
	db TX_COMPRESSED, $75, $84, $04, $16, $8b, $8e, $74, $21, $52, $19, $39
	db $7b, $00, $ae, $3e, $15, $9c, $0e, $13
	db $40, $32, $9d, $ef, $4c, $9c, $9f, $e5, $a4
	db $de, $d1, $ac, $40, $57, $71, $f1, $f2, $9b, $8a
	db $cc, $06, $ab, $e9, $cb, $0c, $bd, $52, $38, $08, $2d
	db $3d, $61, $9b, $04, $77, $59, $39, $50, $ed
	db $2a, $91, $6b, $09, $39, $35, $c2, $97, $a3, $21, $ad, $1e

	db $00, $e5, $0b, $4e, $1e, $c2, $19, $e6
	db $6b, $c8, $10, $6c, $8f, $7b, $2c, $6c, $a9, $1d
	db $80, $b0, $ce, $4e, $e5, $a4, $d6
	db $6f, $5a, $42, $d7, $29

	db $f0, $02, $92, $73, $56, $7b, $06, $88, $80
	db $bc, $74, $eb, $3d, $69, $03, $06, $3f, $cb, $4e
	db $d8, $03, $06, $32, $47, $53, $21, $25, $32, $29, $10, $35
	db $3d, $52, $4d, $67, $07, $70, $68
	db $f5, $34

SoutherlyGym_2f9f3b_Text_2f9f89:
	db TX_COMPRESSED, $6e, $10, $fe, $0d, $10, $77, $12, $1b, $83
	db $23, $c9, $35, $9c, $0a, $e5, $49, $db, $a5

	db $00, $eb, $08, $08, $2d, $46, $42, $d7, $72, $4a
	db $63, $d6, $7d, $ef, $e0, $b9, $64, $34
	db $58, $06, $90, $68, $96, $93, $98, $0d
	db $66, $f5, $82, $10, $7c

	db $40, $39, $d0, $32, $73, $36, $72, $bd, $42, $20
	db $56, $f2, $b6, $b9, $96, $08, $41, $ca, $82, $d7
	db $72, $00, $81, $b9, $50, $56, $a5, $2a, $3e
	db $f5, $e4, $9a, $cf
	db $d4, $d0

SoutherlyGym_2fa19d_Text_2fa2ad:
	db TX_COMPRESSED, $62, $7d, $e8, $60, $20, $b4, $4e, $51, $66, $be

	db $20, $1d, $4b, $48, $c8, $a5, $1d, $30
	db $1b, $c9, $3d, $5e, $60, $70, $80, $82
	db $d2, $a5, $67, $80, $56, $7e

	db $01, $8f, $a4, $64, $f1, $40, $41, $69
	db $6f, $61, $b6, $93, $5c, $58, $f9, $4d, $d2

	db $80, $6e, $7d, $ec, $74, $59, $2d, $27, $18, $40, $9f
	db $7b, $1c, $f7, $26, $b9, $ab, $0b, $44
	db $ca, $ab, $49, $a0, $e0, $8d, $5d, $a3

	db $c0, $1d, $61, $01, $05, $a9, $93, $c0, $f6, $e3
	db $e6, $f3, $a7, $0f, $62, $74, $99, $81, $06, $35
	db $aa, $b4, $9c, $12, $ee, $89, $b3, $82, $5b, $9e, $4f

	db $c0, $31, $ce, $f1, $4c, $86, $5a, $46, $8e
	db $34, $d0

SoutherlyGym_2fa19dText_2fa363:
	db TX_COMPRESSED, $29, $27, $30, $1a, $cd, $10, $24, $8f, $82
	db $78, $1c, $af, $84, $98, $a6, $03, $e5, $36, $32
	db $72, $01, $02, $06, $b1, $dc, $4e, $a2, $2b, $33
	db $23, $cb, $3c, $b4, $c9, $e6, $58, $63, $e6, $b3
	db $54, $6f, $ab, $35, $a3

	db $c0, $1c, $a1, $6a, $6a, $ce, $5a, $da, $e8
	db $27, $aa, $0a, $ed, $20, $a0, $70, $96, $91
	db $a1, $52, $bd, $cf, $27
	db $c6, $9a

SoutherlyGym_2fa19d_Text_2fa3d0:
	db TX_COMPRESSED, $76, $ae, $f4, $64, $3c, $cb, $49
	db $bc, $25, $dd, $13, $67, $04, $b7, $3c, $9f
	db $1a, $68

SoutherlyGym_2fa19d_Text_2fa3eb:
	db TX_COMPRESSED, $62, $6b, $3c, $53, $62, $b0, $91, $a4, $42, $85
	db $5e, $c0, $2b, $80, $82, $d7
	db $1a, $68

SoutherlyGym_2fa19d_Text_2fa406:
	db TX_COMPRESSED, $28, $54, $59, $53, $e8, $c8, $49, $7a, $32
	db $21, $e5, $31, $ac, $e0, $97, $75, $17

	db $c4, $03, $ab, $c5, $36, $2b, $69, $64, $19, $39, $89, $0d
	db $bd, $80, $d6, $71, $f0, $83, $1c, $b4, $ed, $c4, $ea
	db $00, $6c, $65, $3a, $46, $4e, $58, $62, $b6, $96
	db $47, $ad, $27, $02, $20, $40, $48, $64, $bf

	db $00, $75, $78, $a0, $df, $7c, $c8, $83, $e8
	db $27, $91, $6b, $09, $39, $fc, $a7, $1a, $45, $ce, $8d, $48
	db $c0, $02, $0b, $53, $49, $98, $08, $2d
	db $2d, $ec, $36, $d2, $6b, $9a, $b3
	db $f5, $34

SoutherlyGym_MapEventHeader ;filler
	db 0, 0

;warps
	db 2
	warp_def 19, 8, 5, SOUTHERLY_CITY
	warp_def 19, 9, 5, SOUTHERLY_CITY

	;xy triggers
	db 0

	;signposts
	db 2
	signpost 17, 11, SIGNPOST_READ, SoutherlyGymSignpost1
	signpost 17, 6, SIGNPOST_READ, SoutherlyGymSignpost1

	;people-events
	db 10
	person_event SPRITE_P0, -3, -3, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_RED, 1, 1, SoutherlyGym_Item_1, EVENT_SOUTHERLY_GYM_ITEM_1
	person_event SPRITE_FIRE, 3, 11, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SoutherlyGymNPC1, EVENT_SOUTHERLY_GYM_NPC_1
	person_event SPRITE_FIRE, 12, 10, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SoutherlyGymNPC1, EVENT_SOUTHERLY_GYM_NPC_2
	person_event SPRITE_FIRE, 8, 7, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SoutherlyGymNPC1, EVENT_SOUTHERLY_GYM_NPC_3
	person_event SPRITE_GYM_GUY, 17, 10, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SoutherlyGymNPC4, -1
	person_event SPRITE_FISHER, 13, 13, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_OW_BLUE, 2, 1, SoutherlyGym_Trainer_1, -1
	person_event SPRITE_FISHER, 0, 13, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 2, 1, SoutherlyGym_Trainer_2, -1
	person_event SPRITE_YOUNGSTER, 6, 6, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_RED, 2, 1, SoutherlyGym_Trainer_3, -1
	person_event SPRITE_FISHER, 4, 5, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, 2, 1, SoutherlyGym_Trainer_4, -1
	person_event SPRITE_COOLTRAINER_M, 0, 8, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_BROWN, 0, 0, SoutherlyGymNPC5, -1

