restructure
This commit is contained in:
58
game/scripts/vscripts/modifiers/bosses/modifier_bosses_minoriko.lua
Executable file
58
game/scripts/vscripts/modifiers/bosses/modifier_bosses_minoriko.lua
Executable file
@@ -0,0 +1,58 @@
|
||||
modifier_bosses_minoriko = class({})
|
||||
|
||||
local public = modifier_bosses_minoriko
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function public:IsDebuff()
|
||||
return false
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function public:IsHidden()
|
||||
return true
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function public:IsPurgable()
|
||||
return false
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function public:OnCreated(kv)
|
||||
if IsServer() then
|
||||
local caster = self:GetParent()
|
||||
local count = 100
|
||||
local max_health = caster:GetMaxHealth()
|
||||
caster:SetContextThink(DoUniqueString("thtd_bosses_minoriko_buff"),
|
||||
function()
|
||||
if GameRules:IsGamePaused() then return 0.03 end
|
||||
if caster==nil or caster:IsNull() or caster:IsAlive()==false then return nil end
|
||||
|
||||
count = count - 1
|
||||
if count == 0 then
|
||||
caster:SetHealth(math.min(caster:GetHealth() + max_health * 0.3, max_health))
|
||||
local effectIndex = ParticleManager:CreateParticle("particles/heroes/minoriko/ability_minoriko_04.vpcf", PATTACH_CUSTOMORIGIN, caster)
|
||||
ParticleManager:SetParticleControl(effectIndex, 0, caster:GetOrigin())
|
||||
ParticleManager:DestroyParticleSystem(effectIndex,false)
|
||||
count = 100
|
||||
end
|
||||
|
||||
return 0.1
|
||||
end,
|
||||
0.1)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function public:OnDestroy(kv)
|
||||
if IsServer() then
|
||||
local caster = self:GetParent()
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user