local result
local vector2 = require("#microsoft.xna.framework.vector2")
local monocle = require("#monocle")
local coroutineEntity = monocle.Entity()

function onTalk()
  makeUnskippable()
  disablePause()
  disableRetry()
  disableMovement()
  player.ForceCameraUpdate = true
  getLevel():add(coroutineEntity)
  coroutineEntity:add(monocle.Coroutine(getLevel():ZoomTo(vector2(160, 85), 1.5, 1.25)))
  --walkTo(0, false, 0.5, false)
  player.Facing = getEnum("Celeste.Facings", "Right")


  say("DonkSolaris_FGR_Jash_Question1")
  result = choice("DonkSolaris_FGR_Jash_1A", "DonkSolaris_FGR_Jash_1B", "DonkSolaris_FGR_Jash_1B","DonkSolaris_FGR_Jash_1B")
			if result == 1 then
				setFlag("donkSolaris_FGR_QuestionRightYay")
				say("DonkSolaris_FCG_ThatsRight")
			elseif result == 2 then
				say("DonkSolaris_FCG_IThinkThatsRight")
			elseif result == 3 then
                                say("DonkSolaris_FCG_IThinkThatsRight")
                        elseif result == 4 then
				say("DonkSolaris_FCG_IThinkThatsRight")
				result = 9
  setFlag("donkSolaris_FGR_QuestionRightYay", False)

  coroutine.yield(getLevel():ZoomBack(0.5))
end

function onEnd()
  getLevel():remove(coroutineEntity)
  player.ForceCameraUpdate = false
  celeste.Audio.SetMusicParam("dialog", 0.0)
  enableRetry()
  enablePause()
  enableMovement()
end