IntroOutside_MapScriptHeader;trigger count
	db 4
	maptrigger .Trigger0
	maptrigger .Trigger1
	maptrigger .Trigger2
	maptrigger .Trigger3
 ;callback count
	db 2
	dbw MAPCALLBACK_TILES, .LandslideTiles
	dbw MAPCALLBACK_NEWMAP, .Callback

.LandslideTiles
	checkevent EVENT_INTRO_LANDSLIDE
	sif false
		return
	changeblock 8, 16, $3b
	changeblock 10, 16, $8e
	changeblock 12, 16, $28
	return

.Callback
	;playmusic 2
	checkevent EVENT_INITIALIZED_EVENTS
	sif true
		return
	jumpstd initializeevents

.Trigger0
	priorityjump .PlayMusic
.Trigger1
.Trigger2
.Trigger3
	end

.PlayMusic
	playmusic MUSIC_NATIONAL_PARK
	dotrigger 1
	spriteface PLAYER, LEFT
	spriteface $2, RIGHT
	jumptext .MomIntroText

.MomIntroText:
	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, $99, $52, $47, $d3, $89, $3c, $51, $3b
	db $97, $9f, $d2, $02, $98, $69, $11, $f8, $08, $2d, $17
	db $1a, $a4, $58, $fb, $d8, $91, $a2, $2b, $1f, $3c, $9a, $2f

	db $c0, $1d, $45, $22, $06, $a8, $08, $2d, $4a, $b4
	db $96, $f5, $86, $60, $1e, $f4, $35, $41, $92, $24, $68
	db $55, $80, $43, $68, $b3, $10, $8a, $78

	db $00, $09, $35, $70, $42, $c2, $f8, $d0, $71, $f3
	db $fb, $c4, $0c, $7f, $6e, $cd, $72, $a4, $9a
	db $cd, $50, $20, $b5, $39, $0c, $19, $27, $47, $81, $d3

	db $c0, $00, $86, $0c, $6b, $98, $05, $7c, $9d, $cd, $56, $16
	db $ad, $e0, $41, $69, $73, $27, $ab, $8f, $86, $d2, $6b

	db $f0, $02, $93, $a4, $52, $44, $c0, $2b, $8c, $85, $f1, $93
	db $97, $aa, $1d, $a6, $3e, $72, $9e, $3f
	db $53, $40

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

MomCampsiteFireScript:
	jumptext .text

.text
	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

MomCampsiteTextScript:
	jumptextfaceplayer .text

.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, $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, $ce, $53, $c7
	db $ea, $68

IntroMomLeavingDialogue:
	spriteface PLAYER, UP
	spriteface $2, DOWN
	playmusic MUSIC_MOM
	opentext
	writetext .leaving_text_1
	closetext
	checkcode VAR_XCOORD
	sif =, 4, then
		applymovement 2, .approach_far
	selse
		applymovement 2, .approach_near
	sendif
	opentext
	writetext .leaving_text_2
	closetext
	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 $15, $34, $88, $41, $b2, $73, $49, $99, $56, $ad
	db $f5, $56, $12, $0f, $94, $df

	db $10, $14, $f0, $56, $4c, $ca, $78, $e9, $e0

	db $01, $4f

	db $00, $0a, $78, $04, $cb, $48, $bf, $c5, $67, $11, $b8, $1f
	db $1a, $78, $80

.approach_far
	step_down
	step_down
	step_left
	step_left
	step_left
	step_left
	step_left
	turn_head_down
	step_end

.approach_near
	step_down
	step_down
	step_left
	step_left
	step_left
	step_left
	turn_head_down
	step_end

.walk_back
	step_right
	step_right
	step_right
	step_right
	step_right
	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, 0, 0, MomCampsiteTextScript, -1
	person_event SPRITE_FIRE, 6, 11, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_OW_RED, 0, 0, MomCampsiteFireScript, -1

