215 lines
7.9 KiB
Lua
215 lines
7.9 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 BaseAbility = ____dota_ts_adapter.BaseAbility
|
|
local BaseModifier = ____dota_ts_adapter.BaseModifier
|
|
local registerAbility = ____dota_ts_adapter.registerAbility
|
|
local registerModifier = ____dota_ts_adapter.registerModifier
|
|
require("utils.store_effects")
|
|
____exports.ability_effects = __TS__Class()
|
|
local ability_effects = ____exports.ability_effects
|
|
ability_effects.name = "ability_effects"
|
|
ability_effects.____file_path = "scripts/vscripts/abilities/modifiers/ability_effects.lua"
|
|
__TS__ClassExtends(ability_effects, BaseAbility)
|
|
function ability_effects.prototype.GetIntrinsicModifierName(self)
|
|
return "modifier_effect_manager"
|
|
end
|
|
function ability_effects.prototype.IsHidden(self)
|
|
return false
|
|
end
|
|
ability_effects = __TS__Decorate(
|
|
ability_effects,
|
|
ability_effects,
|
|
{registerAbility(nil)},
|
|
{kind = "class", name = "ability_effects"}
|
|
)
|
|
____exports.ability_effects = ability_effects
|
|
____exports.modifier_effect_manager = __TS__Class()
|
|
local modifier_effect_manager = ____exports.modifier_effect_manager
|
|
modifier_effect_manager.name = "modifier_effect_manager"
|
|
modifier_effect_manager.____file_path = "scripts/vscripts/abilities/modifiers/ability_effects.lua"
|
|
__TS__ClassExtends(modifier_effect_manager, BaseModifier)
|
|
function modifier_effect_manager.prototype.IsHidden(self)
|
|
return true
|
|
end
|
|
function modifier_effect_manager.prototype.IsPurgable(self)
|
|
return false
|
|
end
|
|
function modifier_effect_manager.prototype.OnCreated(self, params)
|
|
if not IsServer() then
|
|
return
|
|
end
|
|
local parent = self:GetParent()
|
|
if not parent or parent:IsNull() or not IsValidEntity(parent) then
|
|
return
|
|
end
|
|
local hero = parent
|
|
if not hero or not hero:IsRealHero() then
|
|
return
|
|
end
|
|
local wings = GetEffect(nil, hero, "wings")
|
|
if wings then
|
|
hero:AddNewModifier(
|
|
hero,
|
|
self:GetAbility(),
|
|
____exports.modifier_effects_wings.name,
|
|
{}
|
|
)
|
|
end
|
|
local effect = GetEffect(nil, hero, "effect")
|
|
if effect then
|
|
hero:AddNewModifier(
|
|
hero,
|
|
self:GetAbility(),
|
|
____exports.modifier_effects_effect.name,
|
|
{}
|
|
)
|
|
end
|
|
local model = GetEffect(nil, hero, "model")
|
|
if model then
|
|
hero:AddNewModifier(
|
|
hero,
|
|
self:GetAbility(),
|
|
____exports.modifier_effects_model.name,
|
|
{}
|
|
)
|
|
end
|
|
end
|
|
modifier_effect_manager = __TS__Decorate(
|
|
modifier_effect_manager,
|
|
modifier_effect_manager,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_effect_manager"}
|
|
)
|
|
____exports.modifier_effect_manager = modifier_effect_manager
|
|
____exports.modifier_effects_wings = __TS__Class()
|
|
local modifier_effects_wings = ____exports.modifier_effects_wings
|
|
modifier_effects_wings.name = "modifier_effects_wings"
|
|
modifier_effects_wings.____file_path = "scripts/vscripts/abilities/modifiers/ability_effects.lua"
|
|
__TS__ClassExtends(modifier_effects_wings, BaseModifier)
|
|
function modifier_effects_wings.prototype.IsHidden(self)
|
|
return true
|
|
end
|
|
function modifier_effects_wings.prototype.IsPurgable(self)
|
|
return false
|
|
end
|
|
function modifier_effects_wings.prototype.RemoveOnDeath(self)
|
|
return false
|
|
end
|
|
function modifier_effects_wings.prototype.GetEffectAttachType(self)
|
|
return PATTACH_ABSORIGIN_FOLLOW
|
|
end
|
|
modifier_effects_wings = __TS__Decorate(
|
|
modifier_effects_wings,
|
|
modifier_effects_wings,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_effects_wings"}
|
|
)
|
|
____exports.modifier_effects_wings = modifier_effects_wings
|
|
____exports.modifier_effects_effect = __TS__Class()
|
|
local modifier_effects_effect = ____exports.modifier_effects_effect
|
|
modifier_effects_effect.name = "modifier_effects_effect"
|
|
modifier_effects_effect.____file_path = "scripts/vscripts/abilities/modifiers/ability_effects.lua"
|
|
__TS__ClassExtends(modifier_effects_effect, BaseModifier)
|
|
function modifier_effects_effect.prototype.IsHidden(self)
|
|
return true
|
|
end
|
|
function modifier_effects_effect.prototype.IsPurgable(self)
|
|
return false
|
|
end
|
|
function modifier_effects_effect.prototype.RemoveOnDeath(self)
|
|
return false
|
|
end
|
|
function modifier_effects_effect.prototype.GetEffectName(self)
|
|
local parent = self:GetParent()
|
|
if not parent or parent:IsNull() or not IsValidEntity(parent) then
|
|
return ""
|
|
end
|
|
local hero = parent
|
|
if not hero or not hero:IsRealHero() then
|
|
return ""
|
|
end
|
|
local current_effect = GetEffect(nil, hero, "effect")
|
|
if current_effect == "skin_effect_ice" then
|
|
return "particles/econ/items/omniknight/omniknight_fall20_immortal/omniknight_fall20_immortal_degen_aura_debuff.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_fire" then
|
|
return "particles/econ/items/omniknight/omni_crimson_witness_2021/omniknight_crimson_witness_2021_degen_aura_debuff.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_heaven" then
|
|
return "particles/units/heroes/hero_omniknight/omniknight_heavenly_grace_buff.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_fall_2021_emblem" then
|
|
return "particles/econ/events/fall_2021/fall_2021_emblem_game_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_blue_gems" then
|
|
return "particles/blue_gems_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_sponsor" then
|
|
return "particles/sponsor_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_lotus" then
|
|
return "particles/lotus_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_bp_red" then
|
|
return "particles/effect_battlepass_red.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_bp_garden" then
|
|
return "particles/battlepass_garden_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_bp_golden" then
|
|
return "particles/battlepass_golden_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_bp_diretide_emblem" then
|
|
return "particles/econ/events/diretide_2020/emblem/fall20_emblem_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_bp_diretide_emblem_v1" then
|
|
return "particles/econ/events/diretide_2020/emblem/fall20_emblem_v1_effect.vpcf"
|
|
end
|
|
if current_effect == "skin_effect_bp_diretide_emblem_v3" then
|
|
return "particles/econ/events/diretide_2020/emblem/fall20_emblem_v3_effect.vpcf"
|
|
end
|
|
return ""
|
|
end
|
|
function modifier_effects_effect.prototype.GetEffectAttachType(self)
|
|
return PATTACH_ABSORIGIN_FOLLOW
|
|
end
|
|
modifier_effects_effect = __TS__Decorate(
|
|
modifier_effects_effect,
|
|
modifier_effects_effect,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_effects_effect"}
|
|
)
|
|
____exports.modifier_effects_effect = modifier_effects_effect
|
|
____exports.modifier_effects_model = __TS__Class()
|
|
local modifier_effects_model = ____exports.modifier_effects_model
|
|
modifier_effects_model.name = "modifier_effects_model"
|
|
modifier_effects_model.____file_path = "scripts/vscripts/abilities/modifiers/ability_effects.lua"
|
|
__TS__ClassExtends(modifier_effects_model, BaseModifier)
|
|
function modifier_effects_model.prototype.IsHidden(self)
|
|
return true
|
|
end
|
|
function modifier_effects_model.prototype.IsPurgable(self)
|
|
return false
|
|
end
|
|
function modifier_effects_model.prototype.RemoveOnDeath(self)
|
|
return false
|
|
end
|
|
function modifier_effects_model.prototype.GetEffectName(self)
|
|
return "particles/units/heroes/hero_omniknight/omniknight_guardian_angel_wings.vpcf"
|
|
end
|
|
function modifier_effects_model.prototype.GetEffectAttachType(self)
|
|
return PATTACH_ABSORIGIN_FOLLOW
|
|
end
|
|
modifier_effects_model = __TS__Decorate(
|
|
modifier_effects_model,
|
|
modifier_effects_model,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_effects_model"}
|
|
)
|
|
____exports.modifier_effects_model = modifier_effects_model
|
|
return ____exports
|