function onTalk() -- enemy is the flag that spawns enemies, e is the flag that activates indicators
-- 6.857143
-- 3.428571
-- 1.714285
-- 0.857143
-- 0.428571
	-- INTRO
	
	if getFlag("celesteisleswitch1") and getFlag("celesteisleswitch2") and getFlag("celesteisleswitch3") and getFlag("celesteisleswitch4") and getFlag("celesteisleswitch5") and getFlag("celesteisleswitch6") and getFlag("celesteisleswitch7") then
	
		playMusic("event:/CC/CC_KoseiDiamond_Boss")
		setFlag("floppyfight", true)
		playSound("event:/CC/CC_KoseiDiamond_sounds/Roar")
		disableMovement()
		--coroutine.yield(engine.Scene:ZoomTo(vector2(164, 90), 1.5, 0.55))
		wait(0.428571)
		getLevel():ResetZoom()
		enableMovement()
		wait(0.55)
		-- Fight starts
		wait(0.83325)
		wait(0.83325)
		wait(0.428571)
		setFlag("e00", true)				-- ZOMBIE
		wait(0.428571)
		playSound("event:/classic/sfx6")
		setFlag("e00", false)
		setFlag("enemy00", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch0",true)
		wait(1.614285)
		
		setFlag("e01", true)				-- ANT
		wait(0.48)
		playSound("event:/classic/sfx6")
		setFlag("e01", false)
		setFlag("enemy01", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch1",true)
		wait(1.6)
		
		setFlag("e02", true)  				-- EYE
		wait(0.5)
		playSound("event:/classic/sfx6")
		setFlag("e02", false)
		setFlag("enemy02", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch2",true)
		wait(1.47)
		
		setFlag("e03", true)				-- FIRE DISK
		wait(0.538)
		playSound("event:/classic/sfx6")
		setFlag("e03", false)
		setFlag("enemy03", true)
		wait(0.445)
		wait(0.857143)
		setFlag("floppytorch3",true)
		wait(1.46)
		
		setFlag("e04", true)				-- BLACK SLIME
		wait(0.54)
		playSound("event:/classic/sfx6")
		setFlag("e04", false)
		setFlag("enemy04", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch4",true)
		wait(1.44)
		
		setFlag("e05", true)				-- HORNET + GROUND SPIKES
		wait(0.53)
		playSound("event:/classic/sfx6")
		setFlag("e05", false)
		setFlag("enemy05", true)
		wait(0.628571)
		wait(0.857143)
		setFlag("floppytorch5",true)
		wait(1.44)
		
		setFlag("e06", true)				-- MIDDLE SPIKES + NO SHIELD
		wait(0.52)
		playSound("event:/classic/sfx6")
		setFlag("e06", false)
		setFlag("enemy06", true)
		wait(0.328571)
		wait(0.857143)
		setFlag("floppytorch6",true)
		wait(1.49)
		
		setFlag("e07", true)				-- HARPY
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e07", false)
		setFlag("enemy07", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch7",true)
		wait(1.52)
		
		setFlag("e08", true)				-- SNATCHER + BEEHIVES
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e08", false)
		setFlag("enemy08", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch8",true)
		wait(1.46)
		
		setFlag("e09", true)				-- PARASYTE MELVIN
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e09", false)
		setFlag("enemy09", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch9",true)
		wait(1.5125)
		
		setFlag("e10", true)				-- JUNGLE SLIME
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e10", false)
		setFlag("enemy10", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch10",true)
		wait(1.45)
		
		setFlag("e11", true)				-- SPIDER
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e11", false)
		setFlag("enemy11", true)
		wait(0.476)
		wait(0.857143)
		setFlag("floppytorch11",true)
		wait(1.53)
		
		setFlag("e12", true)				-- CRIMSON FISH
		setFlag("risePetroleum",true)
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e12", false)
		setFlag("enemy12", true)
		wait(0.428571)
		wait(0.85)
		setFlag("floppytorch12",true)
		wait(1.514285)
		
		setFlag("e13", true)				-- PIRANHA
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e13", false)
		setFlag("enemy13", true)
		setFlag("risePetroleum",false)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch13",true)
		wait(1.52)
		
		setFlag("e14", true)				-- DEMON
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e14", false)
		setFlag("enemy14", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch14",true)
		wait(1.51)
		
		setFlag("e15", true)				-- ICE ZOMBIE
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e15", false)
		setFlag("enemy15", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch15",true)
		wait(1.48)
		
		setFlag("e16", true)				-- ICE GOLEM
		wait(0.55)
		playSound("event:/classic/sfx6")
		setFlag("e16", false)
		setFlag("enemy16", true)
		wait(0.428571)
		wait(0.857143)
		setFlag("floppytorch16",true)
		wait(1.7)
	
		setFlag("moonberryON", true)
		endCutscene()
	else
		playSound("event:/classic/sfx15")
		miniTextbox("CC_KoseiDiamond_floppyfight")
	end
end


function onEnd() -- finishes the cutscene
	setFlag("floppyfight", false)
end