local FEEDBACK_DEFS = {	
	flash = {
		decay_speed = 3,
		apply = function(ent, amt)
			ent.r = 1
			local tint = math.max(0,1-amt)
			ent.g = tint
			ent.b = tint
		end,
		cleanup = function(ent, amt)
			ent:restore_tint_color()
		end,
	},
	dead = {
		decay_speed = 5,
		apply = function(ent, amt)
			ent.r = 1
			local tint = math.max(0,amt*amt*amt)
			ent.g = tint
			ent.b = tint
			if ent.out_r then
				local target = ent.outline_tint or TINTS.black					
				local a,r,g,b = target:fade_variables(1,1,0.0,0.0,tint)
				ent.out_r = r
				ent.out_g = g
				ent.out_b = b
			end
		end,
		cleanup = function(ent, amt)			
		end,
	},
	heal = {
		decay_speed = 1,
		apply = function(ent, amt)
			if ent.out_r then
				local target = ent.outline_tint or TINTS.black				
				local a,r,g,b = target:fade_variables(1,0.2,1,0.2,amt)
				ent.out_r = r
				ent.out_g = g
				ent.out_b = b
				ent.r = r			
				ent.g = g
				ent.b = b
			end
		end,
		cleanup = function(ent, amt)
			ent:restore_tint_color()
		end,
	},
	craft = {
		decay_speed = 2,
		apply = function(ent, amt)
			if ent.out_r then
				local target = ent.outline_tint or TINTS.black				
				local a,r,g,b = target:fade_variables(1,0.4,0.8,0.8,amt)
				ent.out_r = r
				ent.out_g = g
				ent.out_b = b
				ent.r = r			
				ent.g = g
				ent.b = b
			end
		end,
		cleanup = function(ent, amt)
			ent:restore_tint_color()
		end,
	},
	deflect = {
		decay_speed = 5,
		apply = function(ent, amt)
			if ent.out_r then
				local target = ent.outline_tint or TINTS.black				
				local a,r,g,b = target:fade_variables(1,1,0.8,0.6,amt)
				ent.out_r = r
				ent.out_g = g
				ent.out_b = b
			end
		end,
		cleanup = function(ent, amt)
			ent:restore_tint_color()
		end,
	},
	spinup = {
		decay_speed = 5,
		apply = function(ent, amt)
			if ent.out_r then
				local tcol = ent.attack_tint
				local target = ent.outline_tint or TINTS.white
				local camt = tcol.a*0.5
				local inv_camt = 1-camt
				local a,r,g,b = target:fade_variables(1,tcol.r,tcol.g,tcol.b,1-amt*tcol.a)
				ent.out_r = r
				ent.out_g = g
				ent.out_b = b
				ent.r = inv_camt+r*camt
				ent.g = inv_camt+g*camt
				ent.b = inv_camt+b*camt
			end
		end,
		cleanup = function(ent, amt)
			ent:restore_tint_color()
		end,
	}
}

return FEEDBACK_DEFS