SpurgeGymB1F_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

SpurgeGymB1FSignpost1:
	checkevent EVENT_SPURGE_GYM_PUSHROCK
	iftrue .alreadyPressed
	opentext
	writetext SpurgeGymB1FSignpost1_Text_2ff25d
	playwaitsfx SFX_EGG_BOMB
	disappear 3
	setevent EVENT_SPURGE_GYM_PUSHROCK
	closetext
	end

.alreadyPressed:
	jumptext SpurgeGymB1FSignpost1_Text_ButtonAlreadyPressed

SpurgeGymB1F_Pokemon:
	setevent EVENT_SPURGE_GYM_POKEMON_3
	jump SpurgeGymGetPokemon

SpurgeGymB1F_Pokemon2:
	setevent EVENT_SPURGE_GYM_POKEMON_6
	jump SpurgeGymGetPokemon

SpurgeGymB1FNPC1:
	jumptext SpurgeGymB1FNPC1_Text_2ff279

SpurgeGymB1FNPC2:
	faceplayer
	checkcode VAR_PARTYCOUNT
	iffalse SpurgeGymB1F_2fdd6d
	opentext
	writetext SpurgeGymB1FNPC2_Text_2fdd71
	waitbutton
	winlosstext SpurgeGymB1FNPC2Text_2fdd94, 0
	setlasttalked 255
	writecode VAR_BATTLETYPE, BATTLETYPE_NORMAL
	loadtrainer CADENCE, 2
	startbattle
	reloadmapafterbattle
	playmapmusic
	opentext
	writetext SpurgeGymB1FNPC2_Text_2fddb6
	waitbutton
	closetext
	setevent EVENT_SPURGE_GYM_B1F_NPC_2
	playsound SFX_WARP_FROM
	applymovement 4, SpurgeGymB1FNPC2_Movement1
	disappear 4
	end

SpurgeGymB1FNPC2_Movement1:
	teleport_from
	remove_person
	step_end

SpurgeGymB1FNPC3:
	faceplayer
	opentext
	checkcode VAR_PARTYCOUNT
	if_less_than 1, SpurgeGymB1F_2ff377
	writetext SpurgeGymB1FNPC3_Text_2ff37d
	waitbutton
	winlosstext SpurgeGymB1FNPC3Text_2ff3b4, 0
	setlasttalked 255
	writecode VAR_BATTLETYPE, BATTLETYPE_NORMAL
	loadtrainer JOSIAH, 2
	startbattle
	reloadmapafterbattle
	playmapmusic
	opentext
	writetext SpurgeGymB1FNPC3_Text_2ff3d0
	waitbutton
	closetext
	setevent EVENT_SPURGE_GYM_B1F_NPC_3
	playsound SFX_WARP_FROM
	applymovement 5, SpurgeGymB1FNPC3_Movement1
	disappear 5
	end

SpurgeGymB1FNPC3_Movement1:
	teleport_from
	remove_person
	step_end

SpurgeGymB1FNPC4:
	faceplayer
	checkcode VAR_PARTYCOUNT
	if_equal 0, SpurgeGymB1F_2fc3f2
	opentext
	writetext SpurgeGymB1FNPC4_Text_2fc3f6
	waitbutton
	winlosstext SpurgeGymB1FNPC4Text_2fc4a8, 0
	setlasttalked 255
	writecode VAR_BATTLETYPE, BATTLETYPE_NORMAL
	loadtrainer EDISON, 2
	startbattle
	reloadmapafterbattle
	playmapmusic
	opentext
	writetext SpurgeGymB1FNPC4_Text_2fc4d1
	waitbutton
	closetext
	setevent EVENT_SPURGE_GYM_B1F_NPC_4
	playsound SFX_WARP_FROM
	applymovement 6, SpurgeGymB1FNPC4_Movement1
	disappear 6
	end

SpurgeGymB1FNPC4_Movement1:
	teleport_from
	remove_person
	step_end

SpurgeGymB1FNPC5:
	faceplayer
	checkcode VAR_PARTYCOUNT
	if_equal 0, SpurgeGymB1F_2fdbc2
	opentext
	writetext SpurgeGymB1FNPC5_Text_2fdbc6
	waitbutton
	winlosstext SpurgeGymB1FNPC5Text_2fdc63, 0
	setlasttalked 255
	writecode VAR_BATTLETYPE, BATTLETYPE_NORMAL
	loadtrainer RINJI, 2
	startbattle
	reloadmapafterbattle
	playmapmusic
	opentext
	writetext SpurgeGymB1FNPC5_Text_2fdc6f
	waitbutton
	closetext
	setevent EVENT_SPURGE_GYM_B1F_NPC_5
	playsound SFX_WARP_FROM
	applymovement 7, SpurgeGymB1FNPC5_Movement1
	disappear 7
	end

SpurgeGymB1FNPC5_Movement1:
	teleport_from
	remove_person
	step_end

SpurgeGymB1FNPC6:
	opentext
	takeitem DYNAMITE
	iftrue SpurgeGymB1F_2ff2b9
	jumptext SpurgeGymB1FNPC6_Text_2ff2cd

SpurgeGymB1F_Item_2:
	db DYNAMITE, 1

SpurgeGymB1F_2fdd6d:
	jumptext SpurgeGymB1F_2fdd6d_Text_2fde02

SpurgeGymB1F_2ff377:
	jumptext SpurgeGymB1F_2ff377_Text_2ff432

SpurgeGymB1F_2fc3f2:
	jumptext SpurgeGymB1F_2fc3f2_Text_2fc521

SpurgeGymB1F_2fdbc2:
	jumptext SpurgeGymB1F_2fdbc2_Text_2fdd11

SpurgeGymB1F_2ff2b9:
	writetext SpurgeGymB1F_2ff2b9_Text_2ff301
	waitbutton
	closetext
	applymovement 0, SpurgeGymB1F_2ff2b9_Movement1
	disappear 8
	playwaitsfx SFX_EGG_BOMB
	setevent EVENT_SPURGE_GYM_SMASHROCK
	end

SpurgeGymB1F_2ff2b9_Movement1:
	run_step_right
	run_step_right
	run_step_right
	run_step_down
	run_step_down
	run_step_down
	run_step_right
	run_step_right
	run_step_right
	step_end

SpurgeGymB1FSignpost1_Text_2ff25d:
	db TX_COMPRESSED, $e1, $59, $a1, $07, $99, $69
	db $37, $95, $b5, $76, $12, $71
	db $a6, $80

SpurgeGymB1FSignpost1_Text_ButtonAlreadyPressed:
	db TX_COMPRESSED, $29, $27, $15, $b5, $76, $12, $44, $ea
	db $1e, $de, $ac, $f7, $20, $a2, $b3, $32
	db $2a, $10, $b3, $42, $0f, $3e
	db $a6, $80

SpurgeGymB1FNPC1_Text_2ff279:
	db TX_COMPRESSED, $29, $26, $b3, $88, $48, $5a, $ee, $62, $b3
	db $9a, $f5, $5a, $0a, $58, $63, $e1, $06, $39, $69, $1a
	db $15, $54, $3b, $48, $5a, $b9, $b0, $1c, $af, $84, $9e
	db $a6, $80

SpurgeGymB1FNPC2_Text_2fdd71:
	db TX_COMPRESSED, $72, $bb, $73, $f1

	db $00, $2e, $06, $35, $82, $96, $37, $ce, $6c, $61, $02
	db $7d, $ec, $73, $dc, $9a, $e7, $42, $83, $47, $e6

	db $80, $56, $3b, $81, $c2, $2c, $d0, $20, $d9
	db $b7, $b9, $09, $a2, $22, $d7, $a3, $e5, $37, $32, $1a
	db $88, $aa, $d2, $73, $2b, $d1, $93

	db $c0, $1d, $16, $3f, $b3, $93, $b8, $08, $2d
	db $3c, $af, $59, $52, $fc, $b4, $8d, $12, $c6, $f9

	db $80, $a8, $76, $98, $2e, $07, $02, $e7, $23, $94, $a6, $2e, $81, $ec
	db $27, $9d, $09, $ac, $f4, $1c, $0b, $a3, $09, $d9, $5c
	db $69, $a0

SpurgeGymB1FNPC2Text_2fdd94:
	db TX_COMPRESSED, $07, $84, $3c, $60, $3c, $37, $37, $9d, $19, $38
	db $d3, $40

SpurgeGymB1FNPC2_Text_2fddb6:
	db TX_COMPRESSED, $76, $46, $4e, $6f, $3a, $32, $40, $41, $69, $80
	db $de, $52, $20, $59, $52, $3c, $cc, $86, $a2, $47, $c1
	db $2a, $61, $02, $7f, $14, $10, $b3, $45, $8f, $93
	db $f5, $34

SpurgeGymB1FNPC3_Text_2ff37d:
	db TX_COMPRESSED, $62, $1a, $a0, $20, $b5, $32, $11, $90, $4d, $67, $b1, $f0
	db $4f, $3f, $a3, $24, $7f, $49

	db $c4, $03, $94, $2d, $47, $f4, $14, $4e, $83
	db $1b, $d6, $1d, $45, $9e, $63, $e7, $15, $eb, $2a

	db $40, $2a, $49, $92, $02, $0b, $52, $a3, $59, $ca, $71, $a4
	db $5b, $db, $08, $75, $2b, $19, $fe, $2b, $6a, $e3

	db $a0, $16, $91, $91, $4a, $0e, $e5, $5a, $89, $4e, $34, $8b
	db $79, $59, $f2, $32, $10, $d7, $8a, $75, $a6, $54

	db $bc, $01, $d1, $64, $11, $ac, $a9, $0c, $9c, $cb, $49
	db $bc, $93, $db, $98, $05, $6b, $3d, $e8, $9b, $96, $91
	db $a1, $55, $8d, $f3, $fc, $56, $77, $02, $48, $3b
	db $e3, $4d

SpurgeGymB1FNPC3Text_2ff3b4:
	db TX_COMPRESSED, $72, $85, $a2, $e3, $82, $35, $95, $21, $92, $20, $2f
	db $9b, $c8, $35, $8c, $2d, $22, $24, $f6, $e6, $5a, $c9, $f1
	db $a6, $80

SpurgeGymB1FNPC3_Text_2ff3d0:
	db TX_COMPRESSED, $ad, $3f, $8a, $da, $59, $0f, $33, $79, $d1, $92, $9e
	db $0a, $68

SpurgeGymB1FNPC4_Text_2fc3f6:
	db TX_COMPRESSED, $ae, $2b, $db, $be, $9c, $1a, $26
	db $bc, $af, $6e, $fa, $73, $49, $99, $b3, $26
	db $05, $56, $07, $b7, $06, $89, $b3, $27, $81, $ed

	db $f8, $03, $a6, $03, $8b, $30, $61, $9d, $47, $9f
	db $bc, $ce, $f5, $96, $bb, $b6, $79, $fc, $d2

	db $64, $00, $8e, $e9, $08, $79, $8a, $d7, $a4, $cc, $21
	db $d4, $f2, $2d, $7b, $67, $c8, $cd, $12, $c3, $15, $9e

	db $d8, $00, $41, $69, $70, $18, $d6, $0a, $34, $41, $8b, $36
	db $8d, $e5, $7b, $77, $d1, $93, $98, $8b, $05, $d3

	db $f0, $07, $52, $a1, $f7, $b0, $81, $b8, $ac
	db $de, $c9, $e0, $7b, $67, $99, $bc, $e8, $c9
	db $c6, $9a

SpurgeGymB1FNPC4Text_2fc4a8:
	db TX_COMPRESSED, $12, $6a, $c0, $a4, $35, $52, $f1
	db $a6, $80

SpurgeGymB1FNPC4_Text_2fc4d1:
	db TX_COMPRESSED, $62, $1a, $a3, $21, $6b, $b9, $8e, $a2, $74, $18
	db $de, $56, $66, $48, $80, $cc, $02, $1e, $8d, $09

	db $e2, $00, $a4, $9a, $ce, $3e, $d2, $2e, $27, $41
	db $8d, $e5, $66, $64, $9a, $48, $11, $06, $41, $93, $9a, $78
	db $22, $a5, $6d, $5c, $a9, $26, $b3, $a5
	db $a6, $80

SpurgeGymB1FNPC5_Text_2fdbc6:
	db TX_COMPRESSED, $61, $2c, $ce, $c6, $4e, $51

	db $e0, $0e, $af, $14, $56, $66, $49, $b2, $a4, $8f, $a7

	db $e0, $0e, $a3, $3a, $49, $67, $de, $c5, $60, $a5, $a4
	db $de, $ab, $41, $4b, $49, $ca, $82, $be, $e6, $03, $0d, $58

	db $10, $0b, $db, $34, $4d, $58, $5a, $26, $60, $20
	db $b4, $f5, $a7, $6e, $02, $0b, $53, $49, $98, $08, $2d

	db $2c, $00, $39, $5f, $09, $22, $74, $18, $e7, $2b, $0d, $44
	db $79, $01, $8f, $b4, $ca, $62, $2d, $61, $27, $26

	db $b0, $0a, $cd, $9d, $69, $07, $03, $84, $04, $16
	db $96, $f3, $44, $18, $b3, $68, $e2, $b0, $93, $3e

	db $01, $8e, $77, $8a, $59, $a2, $e5, $a7
	db $6d, $e5, $61, $26, $60, $85, $84, $41, $af, $a0
	db $bd, $4d

SpurgeGymB1FNPC5Text_2fdc63:
	db TX_COMPRESSED, $50, $66, $32, $73, $2d, $27, $39, $58, $6a, $b4
	db $bc, $1c, $26, $c5, $61, $26, $62, $b3, $ba, $8c

	db $c8, $00, $1c, $af, $84, $93, $49
	db $97, $8a, $5e, $8c, $86, $b8, $34, $44, $34, $ca, $66

	db $90, $00, $df, $7c, $c8, $83, $e8, $28, $96, $9f, $57, $d1, $93
	db $97, $8e, $9d, $10, $6b, $19, $91, $93
	db $e3, $4d

SpurgeGymB1FNPC5_Text_2fdc6f:
	db TX_COMPRESSED, $e1, $e9, $ea, $34, $97, $29, $c0, $b4, $b2, $18, $24
	db $3c, $f8, $29, $82, $c6, $64, $cf
	db $1a, $68

SpurgeGymB1FNPC6_Text_2ff2cd:
	db TX_COMPRESSED, $29, $26, $b3, $88, $48, $5a, $ee, $62, $b3
	db $9a, $f5, $5a, $0a, $58, $63, $e1, $06, $39, $69, $1a
	db $15, $54, $3b, $48, $5a, $b9, $b0, $1c, $af, $84, $9e
	db $a6, $80

SpurgeGymB1F_2fdd6d_Text_2fde02:
	db TX_COMPRESSED, $63, $a4, $e6, $04, $93, $62, $0d, $9e

	db $20, $1c, $a1, $6a, $33, $a4, $a6, $45, $7b, $77, $d3
	db $79, $f3, $95, $0e, $d2, $16, $ae
	db $6a, $a0, $72, $be, $12, $71, $81, $24, $04, $16, $b8
	db $d3, $40

SpurgeGymB1F_2ff377_Text_2ff432:
	db TX_COMPRESSED, $6e, $90, $ec, $48, $7b, $98, $12, $4d
	db $79, $06, $cf, $e0, $20, $b5, $19, $d2, $53
	db $15, $2b, $db, $be, $9c, $7c, $e3, $44, $e9, $a1
	db $0a, $81, $05, $a8, $9d, $06, $39
	db $aa, $81, $ca, $f8, $49, $02, $48, $08, $2d, $71
	db $a6, $80

SpurgeGymB1F_2fc3f2_Text_2fc521:
	db TX_COMPRESSED, $74, $59, $10, $15, $ac, $17, $e2, $b6
	db $ad, $e0, $41, $6a, $10, $cf, $33, $6e, $74, $f5
	db $16, $a8, $24, $38, $0e, $57, $c2, $49, $61
	db $54, $af, $6e, $fa, $72, $a1, $da, $63, $e7
	db $c6, $9a

SpurgeGymB1F_2fdbc2_Text_2fdd11:
	db TX_COMPRESSED, $74, $59, $10, $15, $ac, $17, $e2, $b6
	db $ad, $e0, $41, $6a, $10, $cf, $33, $6e, $74, $f5
	db $16, $a8, $24, $38, $0e, $57, $c2, $49, $61
	db $54, $af, $6e, $fa, $72, $a1, $da, $63, $e7
	db $c6, $9a

SpurgeGymB1F_2ff2b9_Text_2ff301:
	db TX_COMPRESSED, $e1, $ee, $b2, $79, $96, $93, $99, $04, $4d
	db $02, $f3, $e3, $b3, $81, $24, $b4, $9c, $58, $59, $52
	db $55, $a4, $cc, $e8, $ee, $0e, $e3, $42, $38

	db $80, $51, $7a, $4c, $c5, $7a, $ca, $97
	db $1a, $68

SpurgeGymB1F_MapEventHeader:: db 0, 0

.Warps: db 5
	warp_def 37, 25, 1, SPURGE_GYM_HOUSE
	warp_def 29, 9, 1, SPURGE_GYM_B2F_SIDESCROLL
	warp_def 17, 31, 2, SPURGE_GYM_B2F
	warp_def 7, 37, 3, SPURGE_GYM_B2F
	warp_def 5, 7, 4, SPURGE_GYM_B2F

.CoordEvents: db 0

.BGEvents: db 1
	signpost 27, 37, SIGNPOST_READ, SpurgeGymB1FSignpost1

.ObjectEvents: db 9
	person_event SPRITE_POKE_BALL, 10, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SpurgeGymB1F_Pokemon, EVENT_SPURGE_GYM_POKEMON_3
	person_event SPRITE_BOULDER, 29, 19, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_BLUE, 0, 0, SpurgeGymB1FNPC1, EVENT_SPURGE_GYM_PUSHROCK
	person_event SPRITE_PRYCE, 8, 20, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_YELLOW, 0, 0, SpurgeGymB1FNPC2, EVENT_SPURGE_GYM_B1F_NPC_2
	person_event SPRITE_FALKNER, 27, 32, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SpurgeGymB1FNPC3, EVENT_SPURGE_GYM_B1F_NPC_3
	person_event SPRITE_MORTY, 6, 7, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_YELLOW, 0, 0, SpurgeGymB1FNPC4, EVENT_SPURGE_GYM_B1F_NPC_4
	person_event SPRITE_BUGSY, 8, 37, SPRITEMOVEDATA_00, 0, 0, -1, -1, PAL_OW_GREEN, 0, 0, SpurgeGymB1FNPC5, EVENT_SPURGE_GYM_B1F_NPC_5
	person_event SPRITE_ROCK, 33, 15, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_BLUE, 0, 0, SpurgeGymB1FNPC6, EVENT_SPURGE_GYM_SMASHROCK
	person_event SPRITE_POKE_BALL, 26, 19, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_PURPLE, 1, 0, SpurgeGymB1F_Item_2, EVENT_SPURGE_GYM_B1F_ITEM_2
	person_event SPRITE_POKE_BALL, 8, 16, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_RED, 0, 0, SpurgeGymB1F_Pokemon2, EVENT_SPURGE_GYM_POKEMON_6

