34 lines
935 B
Lua
Executable File
34 lines
935 B
Lua
Executable File
function OnCreatedMystia01Debuff(keys)
|
|
local target = keys.target
|
|
|
|
target:AddPhysicalArmor(-keys.penetration)
|
|
end
|
|
|
|
function OnDestroyMystia01Debuff(keys)
|
|
local target = keys.target
|
|
|
|
target:AddPhysicalArmor(keys.penetration)
|
|
end
|
|
|
|
function OnThinkMystia02Buff(keys)
|
|
local caster = keys.caster
|
|
|
|
local targets = THTD_FindFriendlyUnitsInRadius(caster,caster:GetAbsOrigin(),keys.radius)
|
|
for k,v in pairs(targets) do
|
|
local modifier = v:FindModifierByName("modifier_mystia_02_buff")
|
|
-- 持续时间比think大一点
|
|
if modifier == nil then
|
|
keys.ability:ApplyDataDrivenModifier(caster, v, "modifier_mystia_02_buff", {Duration = 0.3})
|
|
else
|
|
modifier:SetDuration(0.3, false)
|
|
end
|
|
end
|
|
end
|
|
|
|
function OnCreatedMystia02Buff(keys)
|
|
keys.target:THTD_AddAttackPercentage(keys.critdamage, "thtd_mystia_02_bonus")
|
|
end
|
|
|
|
function OnDestroyMystia02Buff(keys)
|
|
keys.target:THTD_AddAttackPercentage("thtd_mystia_02_bonus")
|
|
end |