Route86_MapScriptHeader;trigger count
	db 0
 ;callback count
	db 2
	dbw 5, .set_fly_flag
	dbw MAPCALLBACK_TILES, .set_route_block
	
.set_fly_flag
	setflag ENGINE_FLYPOINT_BATTLE_ARCADE
	return

.set_route_block
	checkevent EVENT_FARAWAY_UNLOCKED
	sif false
		changeblock 8, 40, $f4
	return

Route86HiddenItem:
	dw EVENT_ROUTE_86_HIDDENITEM_FULL_RESTORE
	db FULL_RESTORE

Route86BattleArcadeSign:
	db TX_COMPRESSED, $12, $db, $be, $9c, $ad, $6c, $ee
	db $4e, $9a
	
Route86LockedDoor:
	checkevent EVENT_FARAWAY_UNLOCKED
	sif true
		end
	checkitem PRISM_KEY
	sif false
		jumptext .locked_text
	opentext
	writetext .opened_text
	changeblock 8, 40, $77
	playsound SFX_ENTER_DOOR
	waitbutton
	closetext
	reloadmappart
	setevent EVENT_FARAWAY_UNLOCKED
	end
	
.locked_text
	db TX_COMPRESSED, $29, $27, $32, $10, $ae, $0d
	db $0f, $74, $2c, $a9, $1e
	db $7d, $4d
	
.opened_text
	db TX_COMPRESSED, $76, $20, $c8, $79, $96, $93, $99, $08
	db $56, $f5, $43, $b4, $cb, $49, $ce, $15, $8d, $0f
	db $aa, $13, $06, $0b
	db $8d, $34

Route86_MapEventHeader:: db 0, 0

.Warps: db 5
	warp_def 9, 10, 1, BATTLE_ARCADE_LOBBY
	warp_def 3, 2, 1, ROUTE_86_POKECENTER
	warp_def 21, 9, 1, ROUTE_86_DOCK_EXIT
	warp_def 21, 10, 2, ROUTE_86_DOCK_EXIT
	warp_def 41, 8, 1, ROUTE_86_UNDERGROUND_PATH

.CoordEvents: db 0

.BGEvents: db 3
	signpost 11, 13, SIGNPOST_TEXT, Route86BattleArcadeSign
	signpost 11, 16, SIGNPOST_ITEM, Route86HiddenItem
	signpost 41, 8, SIGNPOST_READ, Route86LockedDoor

.ObjectEvents: db 0

