IntroOutside_MapScriptHeader;trigger count
	db 4
	maptrigger .trigger0
	maptrigger .dummy_trigger
	maptrigger .dummy_trigger
	maptrigger .dummy_trigger
;callback count
	db 2
	dbw MAPCALLBACK_NEWMAP, .init_events
	dbw MAPCALLBACK_TILES, .landslide_tiles

.landslide_tiles
	checkevent EVENT_INTRO_LANDSLIDE
	sif true, then
		changeblock 8, 16, $3b
		changeblock 10, 16, $8e
		changeblock 12, 16, $28
	sendif
	return

.init_events
	checkevent EVENT_INITIALIZED_EVENTS
	sif true
		return
	jumpstd initializeevents

.trigger0
	priorityjump .play_music
.dummy_trigger
	end

.play_music
	playmusic MUSIC_NATIONAL_PARK
	dotrigger 1
	spriteface PLAYER, LEFT
	spriteface 2, RIGHT
	jumptext .mom_intro_text

.mom_intro_text
	db TX_COMPRESSED, $75, $78, $a2, $03, $15, $9e, $b5, $63, $c1, $ae
	db $bc, $93, $59, $fe, $0d, $04, $a6, $41, $dd

	db $28, $07, $45, $93, $9e, $ee, $65, $47, $19, $0b, $5d
	db $cb, $c9, $d0, $63, $9b, $16, $7d, $da, $74, $64
	db $e5, $55, $8d, $f3, $96, $1e, $4e, $d2, $6b, $a7

	db $80, $03, $a2, $c8, $80, $ad, $60, $a0, $20, $b5, $13, $b9
	db $7a, $c3, $32, $7b, $d9, $50, $ed, $30, $10, $5a
	db $5a, $ac, $36, $d2, $6b, $8f, $84, $18, $64, $e6, $04, $9e

	db $00, $0f, $0c, $65, $23, $ee, $65, $5a, $4b, $44, $b0
	db $bd, $c8, $65, $a5, $61, $6b, $94, $cb, $4e, $dd, $3c

	db $00, $29, $e3, $fc, $04, $16
	db $96, $f6, $1b, $69, $35, $c4, $ea, $26, $f6, $ad, $04
	db $85, $4a, $cc, $c9, $36, $72, $b3, $db, $8f, $e9
	db $3e, $03, $49, $9f, $ca, $92, $3e, $9c, $49, $e2, $89, $dc
	db $bc, $fe, $90, $14, $c3, $48, $8f, $c0, $41, $68, $b8
	db $d5, $22, $c7, $de, $c4, $8d, $11, $58, $f9, $e4, $d1, $7e

	db $00, $ea, $29, $10, $35, $40, $41, $6a, $55, $a4
	db $b7, $ac, $33, $00, $f7, $a1, $aa, $0c, $91, $23
	db $42, $ac, $02, $1b, $45, $98, $84, $53

	db $c0, $00, $49, $ab, $82, $16, $17, $c6, $83, $8f, $9f
	db $de, $20, $63, $fb, $76, $6b, $95, $24, $d6
	db $6a, $81, $05, $a9, $c8, $60, $c9, $3a, $3c, $0e, $9e
	db $00, $04, $30, $63, $5c, $c0, $2b, $e4, $ee, $6a, $b0, $b5
	db $6f, $02, $0b, $4b, $99, $3d, $5c, $7c, $36, $93, $5f

	db $80, $14, $9d, $22, $92, $26, $01, $5c, $64, $2f, $8c, $9c
	db $bd, $50, $ed, $31, $f3, $fc, $a7, $8f
	db $d4, $d0

StartingGameEarthquake:
	playmusic MUSIC_NONE
	playsound SFX_EMBER
	earthquake 50
	changeblock 08, 16, $3B
	changeblock 10, 16, $8E
	changeblock 12, 16, $28
	spriteface PLAYER, UP
	showemote EMOTE_SHOCK, 0, 16
	waitsfx
	dotrigger 3
	setevent EVENT_INTRO_LANDSLIDE
	end

IntroCampsiteFire:
	db TX_COMPRESSED, $c7, $08, $54, $91, $12, $1b
	db $e2, $f0, $91, $dd, $9a, $e1, $03, $72, $c2, $d3, $29, $a7
	db $82, $9a

IntroCampsiteMom:
	db TX_COMPRESSED, $75, $78, $a2, $03, $15, $9e, $b5, $63, $c1, $ae
	db $bc, $93, $59, $fe, $0d, $04, $a6, $41, $dd

	db $28, $07, $4c, $07, $1f, $1a, $10, $79, $94, $e3, $48
	db $b7, $8d, $0c, $e8, $81, $93, $98, $32, $58, $65, $a4
	db $d5, $54, $3e, $e4, $d6, $43, $42, $29, $e0

	db $00, $52, $74, $8a, $48, $98, $05, $71, $90, $be, $32
	db $72, $f5, $43, $b4, $c7, $cf, $f2, $9e, $3f
	db $53, $40

IntroMomLeavingDialogue:
	spriteface PLAYER, UP
	spriteface 2, DOWN
	playmusic MUSIC_MOM
	showtext .leaving_text_1
	checkcode VAR_XCOORD
	sif =, 4, then
		applymovement 2, .approach_far
	selse
		applymovement 2, .approach_near
	sendif
	showtext .leaving_text_2
	playmusic MUSIC_NATIONAL_PARK
	applymovement 2, .walk_back
	dotrigger 2
	end

.leaving_text_1
	text "<PLAYER>!"
	sdone

.leaving_text_2
	db TX_COMPRESSED, $a7, $81, $da, $7f, $12, $7b, $91, $93
	db $97, $82, $d5, $cc, $02, $b9, $b2, $ad, $ea, $95

	db $28, $06, $d0, $b5, $dc, $c0, $41, $6a, $5a, $c1, $4b
	db $0b, $dc, $9d, $c4, $05, $f3, $98, $0d, $67, $50, $43
	db $95, $58, $05, $71, $a4, $52

	db $80, $29, $27, $30, $1a, $ce, $54, $3e, $f6, $10, $cf
	db $2f, $20, $2f, $9c, $40, $42, $49, $61, $8a, $46, $62
	db $00, $34, $88, $41, $b2, $73, $49, $99, $56, $ad
	db $f7, $ac, $24, $1f, $29, $be

	db $20, $29, $e0, $ac, $99, $fc, $a7, $8e, $9e

	db $00, $14, $f0

	db $00, $a7, $80, $4c, $b4, $8b, $fc, $56, $71, $1b, $81, $f1
	db $a7, $88

.approach_far
	step_down
	step_down
	rept 5
		step_left
	endr
	turn_head_down
	step_end

.approach_near
	step_down
	step_down
	rept 4
		step_left
	endr
	turn_head_down
	step_end

.walk_back
	rept 5
		step_right
	endr
	step_up
	step_up
	turn_head_down
	step_end

IntroOutside_MapEventHeader:: db 0, 0

.Warps
	db 1
	warp_def 31, 14, 1, INTRO_CAVE

.CoordEvents
	db 4
	xy_trigger 1, 9, 4, 0, IntroMomLeavingDialogue, 0, 0
	xy_trigger 1, 9, 5, 0, IntroMomLeavingDialogue, 0, 0
	xy_trigger 2, 22, 10, 0, StartingGameEarthquake, 0, 0
	xy_trigger 2, 22, 11, 0, StartingGameEarthquake, 0, 0

.BGEvents
	db 0

.ObjectEvents
	db 2
	person_event SPRITE_MOM, 6, 9, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 3, -1, -1, PAL_OW_PLAYER + 8, PERSONTYPE_TEXTFP, 0, IntroCampsiteMom, -1
	person_event SPRITE_FIRE, 6, 11, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_RED, PERSONTYPE_TEXT, 0, IntroCampsiteFire, -1

