-- Ability Stuff --

-- ABOUT: On land, FL Chan's primary ability will be the Slow Fall which will be upgraded by the Emeralds. Underwater, her ability will be changed to Infinite Swimming.

addHook("ThinkFrame", function()
	for player in players.iterate do
		if player.mo.skin ~= "flchan"
			continue
		end
		if (player.powers[pw_underwater]) // If we're underwater with no water-breathing shield...
			player.charability = CA_SWIM -- Ability will be swimming
			player.charflags = $ & ~SF_MULTIABILITY -- Gets rid of Multi-Ability regardless of Emerald status
		else // Otherwise...
			player.charability = CA_SLOWFALL -- Ability will be Slow Fall
			if player.mo.flchanupgraded == 1 // If she's upgraded...
				player.charflags = $|SF_MULTIABILITY -- Gives Multi-Ability
			else
				player.charflags = $ & ~SF_MULTIABILITY -- Restricts to singular use
			end
		end
	end
end)