function OnSpellStartKisume01(keys)
	local caster = EntIndexToHScript(keys.caster_entindex)
	
	local powerDamage = 0
	local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
	if pv ~= nil then powerDamage = pv[1] end

	local targets = THTD_FindUnitsInRadius(caster,caster:GetAbsOrigin(),keys.range) 
	local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage)

	for k,v in pairs(targets) do
		local effectIndex = ParticleManager:CreateParticle("particles/units/heroes/heroes_underlord/abyssal_underlord_firestorm_wave.vpcf",PATTACH_CUSTOMORIGIN,caster)
		ParticleManager:SetParticleControl(effectIndex, 0, v:GetOrigin())	
		ParticleManager:DestroyParticleSystem(effectIndex,false)			

		local DamageTable = {
			ability = keys.ability,
			victim = v, 
			attacker = caster, 
			damage = damage, 
			damage_type = keys.ability:GetAbilityDamageType(), 
			damage_flags = DOTA_DAMAGE_FLAG_NONE
		   }
		UnitDamageTarget(DamageTable)			
	end	
end

function OnSpellStartKisume02(keys)
	local caster = EntIndexToHScript(keys.caster_entindex)
	local target = keys.target
	keys.ability:ApplyDataDrivenModifier(caster, target, "modifier_kisume_02_debuff", nil)	

	local powerCount = 0
	local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
	if pv ~= nil then powerCount = pv[2] end

	if powerCount > 0 then
		local targets = THTD_FindUnitsInRadius(caster,target:GetAbsOrigin(), 600)
		local addTargets = {}
		local count = 0
		for k,v in pairs(targets) do
			if v ~= target then
				table.insert(addTargets, v)
				count = count + 1
			end
			if count >= powerCount then break end
		end
		targets = {}
		for k,v in pairs(addTargets) do
			keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_kisume_02_debuff", nil)	
		end
	end
end


function OnKisume02Think(keys)
	local caster = EntIndexToHScript(keys.caster_entindex)
	local target = keys.target

	local powerHp = 0
	local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
	if pv ~= nil then powerHp = pv[1] end

	local DamageTable = {
		ability = keys.ability,
		victim = target, 
		attacker = caster, 
		damage = caster:THTD_GetAbilityPowerDamage(keys.ability), 
		damage_type = keys.ability:GetAbilityDamageType(), 
		damage_flags = DOTA_DAMAGE_FLAG_NONE
	   }
	
	DamageTable.damage = DamageTable.damage + target:GetHealth() * (keys.damage_hp + powerHp) / 100	
	UnitDamageTarget(DamageTable)		
end