MoundB3F_MapScriptHeader;trigger count
MoundB3FDark_MapScriptHeader
	db 0
 ;callback count
	db 1
	dbw MAPCALLBACK_NEWMAP, MoundCave_ResetFlash

MoundMinecart: 
	opentext
	writetext .minecart_OK_text
	writetext .where_to_text
	loadmenudata .menu_data
	verticalmenu
	closewindow
	closetext
	sif >, 3
		end
	anonjumptable
	dw .done
	dw .acqua
	dw .clathrite
	dw .firelight

.acqua
	warp ACQUA_START, 28, 35
.done
	end

.clathrite
	warp CLATHRITE_1F, 20, 37
	end

.firelight
	warp FIRELIGHT_MINECART, 12, 13
	end

.menu_data
	db $40 ; flags
	db 02, 00 ; start coords
	db 11, 19 ; end coords
	dw .MenuData2
	db 1 ; default option

.MenuData2
	db $80 ; flags
	db 4 ; items
	db "Acqua Mines@"
	db "Clathrite Tunnel@"
	db "Firelight Caverns@"
	db "Cancel@"

.minecart_OK_text
	db TX_COMPRESSED, $29, $23, $44, $7c, $64, $38, $ce, $ae
	db $de, $41, $9b, $e8, $88, $bd, $57, $d3
	db $e3, $4f, $10

.where_to_text
	db TX_COMPRESSED, $6e, $93, $59, $cc, $86, $02, $0b, $52, $ad, $25
	db $bd, $61, $9c, $86
	db $96, $9a

MoundB3F_PaletteGreen:
	trainer EVENT_MOUND_B3F_TRAINER_1, PATROLLER, 12, .before_battle_text, .battle_won_text, $0000, .Script

.Script
	end_if_just_battled
	jumptextfaceplayer .after_battle_text

.before_battle_text
	db TX_COMPRESSED, $74, $59, $35, $fd, $13, $67, $98, $08, $2d, $30
	db $1b, $cf, $ee, $4e, $0e, $e5, $a4, $68, $98, $6a, $e9, $e0

	db $01, $4f, $05, $3c, $7c

	db $40, $39, $4d, $1f, $8e, $a2, $91, $03, $54, $04, $16
	db $96, $f1, $35, $f3, $a7, $82, $69, $33, $04, $74, $c9, $60
	db $95, $07, $08, $1b, $49, $ae, $5a, $46, $4e, $51

	db $e0, $0e, $50, $b5, $19, $d2, $53, $22, $da, $24, $c1, $61
	db $7d, $e6, $91, $f9, $51, $b8, $7b, $30, $19, $33, $01, $05, $ae

	db $20, $01, $e1, $ab, $f0, $10, $5a, $27, $30, $24, $3f
	db $bd, $d3, $bc, $53, $01, $f2, $9b
	db $e3, $4d

.battle_won_text
	db TX_COMPRESSED, $e0, $d5, $92, $02, $0b, $5c

	db $40, $39, $42, $d4, $7c, $7c, $a6, $e2, $74, $18
	db $de, $a8, $24, $96, $91, $a2, $58, $df, $3a, $78

	db $00, $53, $c0, $ad, $ab, $80, $82, $d4, $67, $49, $4c, $8d, $20
	db $de, $04, $16, $97, $01, $ca, $f8, $49, $35, $13
	db $55, $21, $23, $3e, $e6, $60, $15, $98, $31, $af

	db $88, $01, $23, $48, $c9, $98, $08, $2d, $2e, $74, $20, $b7
	db $af, $03, $95, $f0, $92, $0d, $12, $9c, $69
	db $16, $ab, $62, $4f, $a2, $3a, $68, $44, $65, $23, $ee

	db $7c, $00, $49, $ab, $fc, $e8, $d4, $8e, $25, $a7, $f4, $88
	db $fb, $c0, $e5, $7c, $24, $9a, $b3, $96, $1b, $de, $81
	db $55, $d0, $53, $23, $40, $80, $a3, $55, $f4

	db $fc, $01, $ba, $4c, $90, $77, $06, $88, $d0, $80
	db $91, $e6, $91, $f9, $69, $39, $50, $57, $dc, $ca, $87, $de
	db $80, $41, $9c, $a7, $1a, $45, $c4, $86, $a8, $0c, $d7, $40
	db $bc, $43, $5e, $ab, $e9, $c0, $41, $6a, $6a, $cf
	db $8d, $34

.after_battle_text
	db TX_COMPRESSED, $c7, $08, $54, $bf, $01, $05, $a8, $7a, $b2, $1e
	db $5e, $04, $16, $97, $32, $08, $9a, $f8, $ec
	db $fe, $01, $01, $9c, $86, $72, $77, $07, $73, $49
	db $97, $ba, $7a, $0c, $71, $f3, $9b, $d0, $90

	db $fc, $01, $b9, $b8, $7b, $19, $0b, $e7, $15, $eb, $2a, $52
	db $c2, $f3, $e6, $77, $01, $05, $a9, $bc, $e8, $c9
	db $f0, $15, $24, $c9, $2d, $27, $2c, $6f
	db $9b, $c3, $44, $7c, $2b, $38, $86, $87, $7a, $af, $a7
	db $ea, $68

MoundB3F_PaletteBlue:
	trainer EVENT_MOUND_B3F_TRAINER_2, PATROLLER, 9, .before_battle_text, .battle_won_text, $0000, .Script

.Script
	end_if_just_battled
	jumptextfaceplayer .after_battle_text

.before_battle_text
	db TX_COMPRESSED, $76, $9f, $c1, $de, $28, $08, $2d

	db $78, $03, $94, $2d, $17, $1c, $b4, $9c, $52, $1e
	db $5e, $a8, $cb, $8e, $74, $21, $52, $19, $39, $98, $05, $7e

	db $00, $dc, $fb, $df, $ce, $1d, $b5, $87, $bd, $35
	db $bc, $e4, $3c, $c1, $a3, $f3, $48, $0a, $ad, $04, $8a, $78

	db $00, $3a, $94, $e3, $48, $b8, $43, $3c, $9e, $66
	db $bd, $c8, $f9, $fc, $d2, $66, $5a, $46, $88, $34
	db $2a, $de, $f6, $3a, $8c, $85, $ae, $e6, $72, $77

	db $e0, $0e, $a2, $42, $20, $e3, $a9, $90, $cd
	db $7b, $90, $87, $30, $c8, $16, $b9, $4c, $a7, $02, $af
	db $d4, $d0

.battle_won_text
	db TX_COMPRESSED, $29, $26, $0a, $33, $a4, $a6, $45, $7d, $d7
	db $cd, $e7, $cf, $8c, $75, $78, $a3, $e0, $a6, $03, $5a
	db $2d, $56, $74, $17, $e6, $e1, $66, $b9, $bd, $ef
	db $a9, $a0

.after_battle_text
	db TX_COMPRESSED, $17, $03, $1a, $c1, $2b, $0e, $41, $42, $19, $e5, $13
	db $5e, $ab, $41, $4b, $0c, $7f, $54, $8e, $3e, $12, $18, $2f
	db $aa, $d2, $66, $5a, $46, $88, $34, $47, $c6, $43

	db $f0, $07, $53, $79, $59, $9f, $e0, $ee, $0d
	db $0f, $6c, $56, $3b, $8d, $10, $2b, $b4, $87, $21, $a7
	db $7d, $4d

MoundB3F_PalettePink:
	trainer EVENT_MOUND_B3F_TRAINER_3, PATROLLER, 6, .before_battle_text, .battle_won_text, $0000, .Script

.Script
	end_if_just_battled
	jumptextfaceplayer .after_battle_text

.before_battle_text
	db TX_COMPRESSED, $62, $60

	db $bc, $01, $89, $82

	db $e2, $03, $80, $24, $a6, $41, $f2, $40, $ac, $e3, $e7
	db $c6, $9a

.battle_won_text
	db TX_COMPRESSED, $61, $6a, $7f, $01, $05, $a2, $e3, $94, $e3, $48
	db $b7, $ba, $35, $23, $8e, $43, $cf
	db $1a, $68

.after_battle_text
	db TX_COMPRESSED, $6e, $71, $3a, $0c, $64, $a6, $44, $19
	db $91, $e7, $21, $e6, $70, $ed, $ac, $3d, $e9
	db $ac, $06, $f7, $b3, $3a, $0b, $f1, $01, $95
	db $1b, $c9, $dc, $cb, $0c, $c8, $65, $a4, $68
	db $54, $f8, $d0, $81, $84, $91, $01, $e8

	db $7c, $01, $d6, $10, $10, $5a, $88, $33, $89, $1b, $ff
	db $7a, $cf, $bd, $89, $1b, $f3, $84, $64, $52
	db $01, $56, $92, $d1, $10, $17, $ce, $2c, $f7
	db $af, $70, $8c, $8a, $40, $6c, $20, $5c, $87, $99, $7b, $d5, $2e
	db $34, $d0

MoundB3F_MapEventHeader ;filler
MoundB3FDark_MapEventHeader
	db 0, 0

;warps
	db 69
	warp_def $07, $25, $06, MOUND_F1
	warp_def $11, $17, $02, MOUND_B2F
	warp_def $39, $0D, $03, MOUND_B2F
	warp_def $10, $15, $01, MOUND_B2F
	warp_def $11, $15, $01, MOUND_B2F
	warp_def $12, $16, $01, MOUND_B2F
	warp_def $12, $17, $01, MOUND_B2F
	warp_def $12, $18, $01, MOUND_B2F
	warp_def $12, $19, $01, MOUND_B2F
	warp_def $13, $19, $01, MOUND_B2F
	warp_def $13, $18, $01, MOUND_B2F
	warp_def $13, $17, $01, MOUND_B2F
	warp_def $13, $16, $01, MOUND_B2F
	warp_def $14, $15, $01, MOUND_B2F
	warp_def $15, $15, $01, MOUND_B2F
	warp_def $1C, $14, $10, MOUND_B2F
	warp_def $1C, $15, $11, MOUND_B2F
	warp_def $1C, $16, $12, MOUND_B2F
	warp_def $1C, $17, $13, MOUND_B2F
	warp_def $1C, $18, $14, MOUND_B2F
	warp_def $1C, $19, $15, MOUND_B2F
	warp_def $1D, $1B, $16, MOUND_B2F
	warp_def $1E, $1B, $17, MOUND_B2F
	warp_def $1F, $1B, $18, MOUND_B2F
	warp_def $20, $1B, $19, MOUND_B2F
	warp_def $21, $1B, $1A, MOUND_B2F
	warp_def $22, $1B, $1B, MOUND_B2F
	warp_def $23, $19, $1C, MOUND_B2F
	warp_def $23, $18, $1D, MOUND_B2F
	warp_def $23, $17, $1E, MOUND_B2F
	warp_def $23, $16, $1F, MOUND_B2F
	warp_def $23, $15, $20, MOUND_B2F
	warp_def $23, $14, $21, MOUND_B2F
	warp_def $22, $12, $22, MOUND_B2F
	warp_def $21, $12, $23, MOUND_B2F
	warp_def $20, $12, $24, MOUND_B2F
	warp_def $1F, $12, $25, MOUND_B2F
	warp_def $1E, $12, $26, MOUND_B2F
	warp_def $1D, $12, $27, MOUND_B2F
	warp_def $2A, $1A, $01, MOUND_B2F
	warp_def $2B, $1A, $01, MOUND_B2F
	warp_def $1C, $12, $01, MOUND_B2F
	warp_def $1C, $1B, $01, MOUND_B2F
	warp_def $23, $12, $01, MOUND_B2F
	warp_def $23, $1B, $01, MOUND_B2F
	warp_def $32, $0B, $01, MOUND_B2F
	warp_def $32, $0A, $01, MOUND_B2F
	warp_def $33, $0A, $01, MOUND_B2F
	warp_def $34, $0A, $01, MOUND_B2F
	warp_def $35, $0A, $01, MOUND_B2F
	warp_def $36, $0A, $01, MOUND_B2F
	warp_def $37, $0A, $01, MOUND_B2F
	warp_def $37, $0B, $01, MOUND_B2F
	warp_def $37, $0C, $01, MOUND_B2F
	warp_def $37, $0D, $01, MOUND_B2F
	warp_def $38, $0E, $01, MOUND_B2F
	warp_def $39, $0E, $01, MOUND_B2F
	warp_def $12, $15, $01, MOUND_B2F
	warp_def $13, $15, $01, MOUND_B2F
	warp_def $1C, $13, $3C, MOUND_B2F
	warp_def $1C, $1A, $3D, MOUND_B2F
	warp_def $23, $13, $3E, MOUND_B2F
	warp_def $23, $1A, $3F, MOUND_B2F
	warp_def $31, $0B, $01, MOUND_B2F
	warp_def $37, $0E, $01, MOUND_B2F
	warp_def $2D, $29, $42, MOUND_B2F
	warp_def $05, $0D, $45, MOUND_B3F
	warp_def $01, $0D, $04, SPURGE_CITY
	warp_def $07, $1F, $43, MOUND_B3F

	;xy triggers
	db 0

	;signposts
	db 6
	signpost 15, 21, SIGNPOST_READ, MoundLightSwitch
	signpost 41, 27, SIGNPOST_READ, MoundLightSwitch
	signpost 43, 41, SIGNPOST_READ, MoundLightSwitch
	signpost 33, 23, SIGNPOST_READ, MoundLightSwitch
	signpost 53, 15, SIGNPOST_READ, MoundLightSwitch
	signpost 58, 8, SIGNPOST_READ, MoundMinecart

	;people-events
	db 5
	person_event SPRITE_POKE_BALL, 15, 4, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_PURPLE, PERSONTYPE_ITEMBALL, 0, MoundB2F_Item_Dynamite, EVENT_MOUND_B3F_ITEM_1
	person_event SPRITE_POKE_BALL, 42, 27, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, PAL_OW_PURPLE, PERSONTYPE_ITEMBALL, 0, MoundB2F_Item_Dynamite, EVENT_MOUND_B3F_ITEM_2
	person_event SPRITE_PALETTE_PATROLLER, 47, 40, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_OW_GREEN, PERSONTYPE_TRAINER, 2, MoundB3F_PaletteGreen, EVENT_MOUND_B3F_TRAINER_1
	person_event SPRITE_PALETTE_PATROLLER, 44, 26, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_OW_BLUE, PERSONTYPE_TRAINER, 2, MoundB3F_PaletteBlue, EVENT_MOUND_B3F_TRAINER_2
	person_event SPRITE_PALETTE_PATROLLER, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_OW_PURPLE, PERSONTYPE_TRAINER, 2, MoundB3F_PalettePink, EVENT_MOUND_B3F_TRAINER_3

