local audio = require("#Celeste.Audio")

function onBegin()

	makeUnskippable()
	disableMovement()
	player.ForceCameraUpdate = true
	wait(75)

	say("woxens_Lucidity_ohno")
	setFlag("woxens_Lucidity_blackout",false)
	audio.Play("event:/lucidity/sfx/lightson")
	audio.Play("event:/lucidity/sfx/lightson")
	audio.Play("event:/lucidity/sfx/lightson")
	wait(2)

	say("woxens_Lucidity_triviaWelcome")
	audio.SetMusic("event:/lucidity/music/quiz_time")

	say("woxens_Lucidity_question1")
	choiceDialog({

		{ 
		"woxens_Lucidity_q1a1",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q1a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q1a2",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q1a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q1a3",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q1a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q1a4",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q1a1result")
			closeChoiceDialog()
		end
		}

	})


	say("woxens_Lucidity_question2")
	choiceDialog({

		{ 
		"woxens_Lucidity_q2a1",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q2a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q2a2",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q2a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q2a3",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q2a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q2a4",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q2a1result")
			closeChoiceDialog()
		end
		}

	})


	say("woxens_Lucidity_question3")
	setFlag("woxens_Lucidity_tarttv",true)
	say("woxens_Lucidity_question3_2")
	choiceDialog({

		{ 
		"woxens_Lucidity_q3a1",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q3a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q3a2",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q3a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q3a3",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q3a1result")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_q3a4",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_q3a1result")
			closeChoiceDialog()
		end
		}

	})
	
	say("woxens_Lucidity_gettingmad")
	setFlag("woxens_Lucidity_tarttv_angry",true)
	audio.SetMusic("event:/lucidity/music/escape")
	say("woxens_Lucidity_takingover")
	choiceDialog({

		{ 
		"woxens_Lucidity_tarta1",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_tartresult")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_tarta2",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_tartresult")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_tarta3",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_tartresult")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_tarta4",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_tartresult")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_tarta5",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_tartresult")
			closeChoiceDialog()
		end
		},

		{
		"woxens_Lucidity_tarta6",
		onChosen = function ()
			wait(0.5)
			say("woxens_Lucidity_tartresult")
			closeChoiceDialog()
		end
		}

	})
	setFlag("woxens_Lucidity_towerrescue",true)
	say("woxens_Lucidity_towerescape")
	run(120)
	enableMovement()
end