
modifier_bosses_random_aura_dark_effect = class({})

local public = modifier_bosses_random_aura_dark_effect

--------------------------------------------------------------------------------

function public:IsHidden()
	return false
end

function public:IsDebuff()
	return true
end

function public:IsPurgable()
	return true
end

function public:GetEffectName()
	return "particles/units/towers/aura_dark.vpcf"
end

function public:GetEffectAttachType()
	return PATTACH_ABSORIGIN_FOLLOW
end

function public:GetTexture()
	return "touhoutd/thtd_suika_02"
end

function public:OnCreated( kv )
	if not IsServer() then
		return
	end
	
	local target = self:GetParent()
	local bonus = -25	
	target:THTD_AddPowerPercentage(bonus, "thtd_boss_random_dark_aura")
	target:THTD_AddAttackPercentage(bonus, "thtd_boss_random_dark_aura")
	target:THTD_AddCritDamage(bonus, "thtd_boss_random_dark_aura")
	target:THTD_AddCritChance(bonus, "thtd_boss_random_dark_aura")
end

function public:OnDestroy()
	if not IsServer() then
		return
	end

	local target = self:GetParent()
	target:THTD_AddPowerPercentage("thtd_boss_random_dark_aura")
	target:THTD_AddAttackPercentage("thtd_boss_random_dark_aura")
	target:THTD_AddCritDamage("thtd_boss_random_dark_aura")
	target:THTD_AddCritChance("thtd_boss_random_dark_aura")
end
