// content by Luigifan

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

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

//Defining variables
addHook ("PlayerThink", function(player)
	if player.mo and player.mo.valid then
	
		if player.mo.skin ~= "annie_belnades" then
			return
		end
		
		if player.custom1down == nil then --if the player does not have this variable yet
			player.custom1down = 0 --give it a starting number
		end
		
		if player.cmd.buttons & BT_CUSTOM1 > 0 then --if the player is pressing Custom 1
			player.custom1down = $1 + 1 --increment custom1 variable
		else
			player.custom1down = 0 --reset custom1 variable
		end
		
		if player.custom2down == nil then --if the player does not have this variable yet
			player.custom2down = 0 --give it a starting number
		end
		
		if player.cmd.buttons & BT_CUSTOM2 > 0 then --if the player is pressing Custom 2
			player.custom2down = $1 + 1 --increment custom2 variable
		else
			player.custom2down = 0 --reset custom2 variable
		end
		
		if player.custom3down == nil then --if the player does not have this variable yet
			player.custom3down = 0 --give it a starting number
		end
		
		if player.cmd.buttons & BT_CUSTOM3 > 0 then --if the player is pressing Custom 3
			player.custom3down = $1 + 1 --increment custom3 variable
		else
			player.custom3down = 0 --reset custom3 variable
		end
		
		if player.tossflagdown == nil then --if the player does not have this variable yet
			player.tossflagdown = 0 --give it a starting number
		end
		
		if player.cmd.buttons & BT_TOSSFLAG > 0 then --if the player is pressing Toss Flag
			player.tossflagdown = $1 + 1 --increment tossflag variable
		else
			player.tossflagdown = 0 --reset tossflag variable
		end
		
		if player.firenormaldown == nil then --if the player does not have this variable yet
			player.firenormaldown = 0 --give it a starting number
		end
		
		if player.cmd.buttons & BT_FIRENORMAL > 0 then --if the player is pressing Fire Normal
			player.firenormaldown = $1 + 1 --increment firenormal variable
		else
			player.firenormaldown = 0 --reset firenormal variable
		end
		
		if player.cmd.buttons & BT_ATTACK > 0 then --if the player is pressing Fire
			player.firedown = $1 + 1 --increment fire variable
		else
			player.firedown = 0 --reset fire variable
		end
		
		if player.mo.vixenvortexed == nil then
			player.mo.vixenvortexed = 0
		end
		
		if player.mo.energy == nil then
			player.mo.energy = 100*FRACUNIT
		end
		
		if player.mo.holyboltcharge == nil then
			player.mo.holyboltcharge = 0
		end
		
		if player.mo.holyboltcooldown == nil then
			player.mo.holyboltcooldown = 0
		end
	end
end)

addHook("PlayerThink", function(player)
	if player.mo and player.mo.valid then
	
		if player.mo.skin ~= "annie_belnades" then
			return
		end
		
		if player.mo.ringretention == nil then
			player.mo.ringretention = 0
		end
		
		if player.mo.ringreturndelay == nil then
			player.mo.ringreturndelay = 0
		end
		
		if player.mo.deathdefiance == nil then
			player.mo.deathdefiance = 0
		end
		
		if player.mo.drowndelay == nil then
			player.mo.drowndelay = 0
		end
		
		if player.mo.suffocatedelay == nil then
			player.mo.suffocatedelay = 0
		end
		
		if player.mo.squished == nil then
			player.mo.squished = 0
		end
		
		if player.mo.rebound == nil then
			player.mo.rebound = 0
		end
		
		if player.mo.pzpaintime == nil then
			player.mo.pzpaintime = 0
		end
		
		if player.mo.phazonexposure == nil then
			player.mo.phazonexposure = 0
		end
	end
end)