Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Structure After Version 7.20 #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 deletions game/scripts/vscripts/heroes/hero_bounty_hunter/jinada.lua
Original file line number Diff line number Diff line change
@@ -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
ability:ApplyDataDrivenModifier(caster, caster, modifier, {})
end)
end