restructure

This commit is contained in:
2021-11-10 08:48:00 -05:00
parent d3eac6b70e
commit aaa089715d
12018 changed files with 6424 additions and 135034 deletions

View File

@@ -0,0 +1,40 @@
function OnMugiyousei01AttackLanded(keys)
local caster = EntIndexToHScript(keys.caster_entindex)
local target = keys.target
local powerDamage = 0
local powerDuration = 0
local pv = caster:GetAbilityPowerValue(keys.ability:GetAbilityName())
if pv ~= nil then
powerDamage = pv[1]
powerDuration = pv[2]
end
local damage = caster:THTD_GetAbilityPowerDamage(keys.ability) * (1 + powerDamage)
local time = keys.damage_duration + powerDuration
target:AddPoison(1, caster)
target:SetContextThink(DoUniqueString("thtd_mugiyousei01_attack"),
function()
if GameRules:IsGamePaused() then return 0.03 end
if time <= 0 or THTD_IsValid(target) == false then
if target ~= nil and target:IsNull() == false then
target:AddPoison(-1)
end
return nil
end
local DamageTable = {
ability = keys.ability,
victim = target,
attacker = caster,
damage = damage,
damage_type = keys.ability:GetAbilityDamageType(),
damage_flags = DOTA_DAMAGE_FLAG_NONE
}
UnitDamageTarget(DamageTable)
time = time - 1.0
return 1.0
end,
0)
end