65 lines
2.0 KiB
Lua
65 lines
2.0 KiB
Lua
local ____lualib = require("lualib_bundle")
|
|
local __TS__Class = ____lualib.__TS__Class
|
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
local ____exports = {}
|
|
local ____dota_ts_adapter = require("lib.dota_ts_adapter")
|
|
local BaseModifier = ____dota_ts_adapter.BaseModifier
|
|
local registerModifier = ____dota_ts_adapter.registerModifier
|
|
____exports.modifier_overheating = __TS__Class()
|
|
local modifier_overheating = ____exports.modifier_overheating
|
|
modifier_overheating.name = "modifier_overheating"
|
|
modifier_overheating.____file_path = "scripts/vscripts/abilities/heroes/sargatanas/modifier_overheating.lua"
|
|
__TS__ClassExtends(modifier_overheating, BaseModifier)
|
|
function modifier_overheating.prototype.IsHidden(self)
|
|
return false
|
|
end
|
|
function modifier_overheating.prototype.IsPurgable(self)
|
|
return false
|
|
end
|
|
function modifier_overheating.prototype.IsPurgeException(self)
|
|
return false
|
|
end
|
|
function modifier_overheating.prototype.IsDebuff(self)
|
|
return true
|
|
end
|
|
function modifier_overheating.prototype.IsBuff(self)
|
|
return false
|
|
end
|
|
function modifier_overheating.prototype.RemoveOnDeath(self)
|
|
return true
|
|
end
|
|
function modifier_overheating.prototype.OnCreated(self)
|
|
if not IsServer() then
|
|
return
|
|
end
|
|
self:StartIntervalThink(1)
|
|
end
|
|
function modifier_overheating.prototype.OnIntervalThink(self)
|
|
if not IsServer() then
|
|
return
|
|
end
|
|
local stackCount = self:GetStackCount()
|
|
local parent = self:GetParent()
|
|
if stackCount >= 100 then
|
|
if IsServer() then
|
|
parent:SetRenderColor(72, 6, 7)
|
|
end
|
|
elseif stackCount >= 25 then
|
|
if IsServer() then
|
|
parent:SetRenderColor(255, 36, 0)
|
|
end
|
|
end
|
|
end
|
|
function modifier_overheating.prototype.GetTexture(self)
|
|
return "overhell"
|
|
end
|
|
modifier_overheating = __TS__Decorate(
|
|
modifier_overheating,
|
|
modifier_overheating,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_overheating"}
|
|
)
|
|
____exports.modifier_overheating = modifier_overheating
|
|
return ____exports
|