diff --git a/game/scripts/vscripts/heroes/hero_bounty_hunter/jinada.lua b/game/scripts/vscripts/heroes/hero_bounty_hunter/jinada.lua index 1d1ef6cd..f6b148ea 100644 --- a/game/scripts/vscripts/heroes/hero_bounty_hunter/jinada.lua +++ b/game/scripts/vscripts/heroes/hero_bounty_hunter/jinada.lua @@ -1,18 +1,34 @@ --[[Jinada - Author: Pizzalol - Date: 1.1.2015.]] -function Jinada( keys ) + Author: Pizzalol/DDSuper + Date: 11.03.2019.]] +function JinadaStart(keys) + local ability = keys.ability local level = ability:GetLevel() - 1 local cooldown = ability:GetCooldown(level) - local caster = keys.caster - local modifierName = "modifier_jinada_datadriven" - - ability:StartCooldown(cooldown) + local caster = keys.caster + local modifier = keys.modifier - caster:RemoveModifierByName(modifierName) + local midas_particle = ParticleManager:CreateParticle("particles/items2_fx/hand_of_midas.vpcf", PATTACH_ABSORIGIN_FOLLOW, keys.target) -- Эффекты, частиц мидаса + if keys.target:IsRealHero() then + ability:StartCooldown(cooldown) + keys.target:ModifyGold(keys.StealGold, false, 0) + caster:ModifyGold(keys.GetGoldSelf, true, 0) + caster:RemoveModifierByName(modifier) + ParticleManager:SetParticleControlEnt(midas_particle, 1, keys.caster, PATTACH_POINT_FOLLOW, "attach_hitloc", keys.caster:GetAbsOrigin(), false) -- Контроль как и сказано + keys.target:EmitSound("Hero_BountyHunter.Jinata") + keys.target:EmitSound("DOTA_Item.Hand_Of_Midas") + end + if keys.target:IsCreep() then + caster:RemoveModifierByName(modifier) + keys.target:EmitSound("Hero_BountyHunter.Jinada") + ability:StartCooldown(cooldown) + ParticleManager:DestroyParticle(midas_particle, true) + end Timers:CreateTimer(cooldown, function() - ability:ApplyDataDrivenModifier(caster, caster, modifierName, {}) - end) -end \ No newline at end of file + ability:ApplyDataDrivenModifier(caster, caster, modifier, {}) + end) +end + +