ClathriteKyogre_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 0

ClathriteKyogreSignpost1:
	opentext
	checkitem BLUE_ORB
	sif false
		jumptext .no_orb_text
	writetext .ask_place_orb_text
	yesorno
	sif false
		closetextend
	musicfadeout MUSIC_NONE, 47
	closetext
	playsound SFX_EMBER
	earthquake 31
	playsound SFX_EMBER
	earthquake 31
	special ClearBGPalettes
	playsound SFX_EMBER
	earthquake 31
	special Special_ReloadSpritesNoPalettes
	pause 48
	takeitem BLUE_ORB, 1
	scall .step_and_thunder
	scall .step_and_thunder
	scall .step_and_thunder
	special Special_FadeInQuickly
	cry KYOGRE
	writecode VAR_BATTLETYPE, BATTLETYPE_NORMAL
	loadwildmon KYOGRE, 50
	startbattle
	dontrestartmapmusic
	disappear 2
	reloadmapafterbattle
	playmapmusic
	end

.no_orb_text
	db TX_COMPRESSED, $75, $73, $a1, $0a, $92, $27, $46, $a4
	db $6f, $6c, $40, $84, $9a, $ce, $33, $a4, $8a
	db $cd, $50, $8e, $eb, $27, $98, $93, $59, $d3
	db $c1, $4d

.ask_place_orb_text
	db TX_COMPRESSED, $75, $73, $a1, $0a, $92, $27, $46, $a4, $70, $10, $5a
	db $5b, $c2, $5d, $68, $e3, $b5, $ab, $95, $0f, $bd, $98, $0e
	db $d5, $24, $d6, $7e

	db $00, $dc, $7d, $ec, $04, $16, $a0, $8e, $eb, $27, $07, $74
	db $b4, $d0

.step_and_thunder
	applymovement 2, .step_down_movement
	playsound SFX_THUNDER
	special ClearBGPalettes
	pause 8
	special Special_ReloadSpritesNoPalettes
	pause 32
	end

.step_down_movement
	slow_step_down
	step_end

ClathriteKyogre_MapEventHeader:: db 0, 0

.Warps
	db 1
	warp_def $25, $2, 9, CLATHRITE_B2F

.CoordEvents
	db 0

.BGEvents
	db 1
	signpost 8, 10, SIGNPOST_READ, ClathriteKyogreSignpost1

.ObjectEvents
	db 1
	person_event SPRITE_KYOGRE, 4, 10, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, -1

