function modifier_item_void_gem_active:DeclareFunctions()
local funcs = {
MODIFIER_PROPERTY_REFLECT_SPELL
}
return funcs
end
function modifier_item_void_gem_active:GetReflectSpell(kv)
if self.stored ~= nil then
self.stored:RemoveSelf() --we make sure to remove previous spell.
end
local hCaster = self:GetParent()
local hAbility = hCaster:AddAbility(kv.ability:GetAbilityName())
hAbility:SetStolen(true) --just to be safe with some interactions.
hAbility:SetHidden(true) --hide the ability.
hAbility:SetLevel(kv.ability:GetLevel()) --same level of ability as the origin.
hCaster:SetCursorCastTarget(kv.ability:GetCaster()) --lets send this spell back.
hAbility:OnSpellStart() --cast the spell.
self.stored = hAbility --store the spell reference for future use.
ParticleManager:CreateParticle("particles/items3_fx/lotus_orb_reflect.vpcf" , PATTACH_POINT_FOLLOW, self:GetParent())
if IsServer() then
EmitSoundOn( "Hero_AbyssalUnderlord.Firestorm.Target", self:GetParent( ))
EmitSoundOn( "Hero_AbyssalUnderlord.Pit.TargetHero", self:GetParent( ))
EmitSoundOn ("Hero_AbyssalUnderlord.Firestorm.Start", self:GetParent())
EmitSoundOn ("Hero_AbyssalUnderlord.Firestorm.Cast", self:GetParent())
end
end