-- NOTES:

-- play animation > particle explosion > whiteout > flag. In D-07


function onTalk()
	log("pleasefuckingwork")
	disableMovement()
	disableRetry()
	if getFlag("TA_04_Monomon_done") then
		say("CC_XELKHK_CUTS_CoT_C")
	end
	if not getFlag("TA_04_Monomon_done") and getFlag("DreamNail") then
		player.ForceCameraUpdate = true
		walkTo(-3104)
		playSound("event:/CC/CC_HollowKnight/SFX/Scene/HeroDreamNailSlash",player.Position)
		wait(0.1)
		coroutine.yield(getLevel():ZoomTo(vector2(168, 80), 1.12, 0.65))
		setFlag("monomon1",true)
		wait(0.3)
		setFlag("monomon2",true)
		setFlag("TA-04_MonomonSpawned", false)
		wait(1)
		coroutine.yield(getLevel():ZoomAcross(vector2(292,886), 1, 0.5))
		setFlag("monomon1",false)
		setFlag("monomon2",false)
		setFlag("TA-04_MonomonSpawned", false)
		setFlag("Monomon", true)
		setFlag("TA_04_Monomon_done",true)
		setFlag("TAExit", true)
		setFlag("map_Pin_Teacher", false)
	end
	if not getFlag("DreamNail") then
		say("CC_XELKHK_CUTS_TA_A")
		setFlag("TAExit", true)
	end
end

function onEnd()
	enableMovement()
	enableRetry()

end