modifier_item_2011_attack_stun = class({})

local public = modifier_item_2011_attack_stun

local m_modifier_funcs = {
	MODIFIER_EVENT_ON_ATTACK_LANDED,
}

function public:IsHidden()
	return true
end

function public:IsDebuff()
	return false
end

function public:IsPurgable()
	return false
end

function public:DeclareFunctions()
	return m_modifier_funcs
end

function public:OnAttackLanded(kv)
	if IsServer() then
		if kv.attacker ~= self:GetParent() or self:GetParent():IsIllusion() then 
			return 
		end

		local caster = self:GetCaster()
		local target = kv.target

		local targets = THTD_FindUnitsInRadius(caster,target:GetOrigin(),400)	
		local damage = caster:THTD_GetAttack()
		for k,v in pairs(targets) do
			local DamageTable_aoe = {
				ability = nil,
				victim = v, 
				attacker = caster, 
				damage = damage, 
				damage_type = DAMAGE_TYPE_PHYSICAL, 
				damage_flags = DOTA_DAMAGE_FLAG_NONE
			}
			UnitDamageTarget(DamageTable_aoe)	   	
		end	
	end
end