// content by Luigifan

//----------- ability definition -----------

//main thinker
addHook("ThinkFrame", function()
	for player in players.iterate do
		if player.mo.skin ~= "cassandra_b" then
			continue
		end
	end
end)

//Defining copy power variables
addHook ("PlayerThink", function(player)
	if player.mo and player.mo.valid then
		
		if player.mo.skin == "cassandra_b" then
			player.mo.realskin = "cassandra_b" --recording that the player is actually playing as Cassandra, regardless of who they copy or mimic
		end
		
		if player.mo.realskin == "cassandra_b"
		and (player.mo.copy ~= 0 or player.mo.mimicry ~= 0) then --if the player changed their "skin" via copying or mimicry
			if player.tossflag == 35 then
				player.mo.copy = 0 --discarding skin copy
				player.mo.mimicry = 0 --discarding mimicry
				player.mo.skin = "cassandra_b"
			end
		end
	end
end)

addHook("PlayerThink", function(player)
	if player.mo and player.mo.valid then
	
		if player.mo.skin ~= "cassandra_b" then
			return
		end
	end
end)