local ____lualib = require("lualib_bundle") local __TS__Class = ____lualib.__TS__Class local __TS__ClassExtends = ____lualib.__TS__ClassExtends local __TS__Decorate = ____lualib.__TS__Decorate local __TS__StringStartsWith = ____lualib.__TS__StringStartsWith local __TS__StringIncludes = ____lualib.__TS__StringIncludes local ____exports = {} local ____dota_ts_adapter = require("lib.dota_ts_adapter") local BaseItem = ____dota_ts_adapter.BaseItem local BaseModifier = ____dota_ts_adapter.BaseModifier local registerAbility = ____dota_ts_adapter.registerAbility local registerModifier = ____dota_ts_adapter.registerModifier --- Холодный дебафф Corrosion (как Cold Attack у Skadi). local ZOMBIE_SLAYER_SKADI_DEBUFF_PARTICLE = "particles/generic_gameplay/generic_slowed_cold.vpcf" ____exports.item_zombie_slayer = __TS__Class() local item_zombie_slayer = ____exports.item_zombie_slayer item_zombie_slayer.name = "item_zombie_slayer" item_zombie_slayer.____file_path = "scripts/vscripts/items/default_items/item_zombie_slayer copy.lua" __TS__ClassExtends(item_zombie_slayer, BaseItem) function item_zombie_slayer.prototype.Precache(self, context) PrecacheResource("particle", "particles/units/heroes/hero_skeletonking/wraith_king_curse_debuff_slash.vpcf", context) PrecacheResource("particle", "particles/items2_fx/mage_slayer_debuff.vpcf", context) PrecacheResource("particle", ZOMBIE_SLAYER_SKADI_DEBUFF_PARTICLE, context) end function item_zombie_slayer.prototype.GetIntrinsicModifierName(self) return "modifier_item_zombie_slayer" end item_zombie_slayer = __TS__Decorate( item_zombie_slayer, item_zombie_slayer, {registerAbility(nil)}, {kind = "class", name = "item_zombie_slayer"} ) ____exports.item_zombie_slayer = item_zombie_slayer ____exports.modifier_item_zombie_slayer = __TS__Class() local modifier_item_zombie_slayer = ____exports.modifier_item_zombie_slayer modifier_item_zombie_slayer.name = "modifier_item_zombie_slayer" modifier_item_zombie_slayer.____file_path = "scripts/vscripts/items/default_items/item_zombie_slayer copy.lua" __TS__ClassExtends(modifier_item_zombie_slayer, BaseModifier) function modifier_item_zombie_slayer.prototype.IsHidden(self) return true end function modifier_item_zombie_slayer.prototype.IsPurgable(self) return false end function modifier_item_zombie_slayer.prototype.DeclareFunctions(self) return { MODIFIER_PROPERTY_PREATTACK_BONUS_DAMAGE, MODIFIER_PROPERTY_STATS_AGILITY_BONUS, MODIFIER_PROPERTY_MANA_REGEN_CONSTANT, MODIFIER_PROPERTY_HEALTH_BONUS, MODIFIER_EVENT_ON_ATTACK_LANDED } end function modifier_item_zombie_slayer.prototype.GetModifierHealthBonus(self) return self:GetAbility():GetSpecialValueFor("bonus_health") end function modifier_item_zombie_slayer.prototype.GetModifierConstantManaRegen(self) return self:GetAbility():GetSpecialValueFor("bonus_mana_regen") end function modifier_item_zombie_slayer.prototype.GetModifierPreAttack_BonusDamage(self) return self:GetAbility():GetSpecialValueFor("bonus_damage") end function modifier_item_zombie_slayer.prototype.GetModifierBonusStats_Agility(self) return self:GetAbility():GetSpecialValueFor("bonus_agility") end function modifier_item_zombie_slayer.prototype.OnAttackLanded(self, event) if not IsServer() then return end if event.attacker ~= self:GetParent() then return end if not event.target or event.target:IsBuilding() or event.target:IsOther() then return end if event.target ~= nil then local ____self_4 = event.target local ____self_4_AddNewModifier_5 = ____self_4.AddNewModifier local ____temp_2 = self:GetParent() local ____temp_3 = self:GetAbility() local ____opt_0 = self:GetAbility() ____self_4_AddNewModifier_5( ____self_4, ____temp_2, ____temp_3, "modifier_item_zombie_slayer_debuff_2", {duration = ____opt_0 and ____opt_0:GetSpecialValueFor("debuff_duration")} ) local ____this_7 ____this_7 = event.target local ____opt_6 = ____this_7.GetUnitName local targetName = ____opt_6 and ____opt_6(____this_7) or "" if __TS__StringStartsWith(targetName, "npc_wave") and not __TS__StringIncludes( string.lower(targetName), "boss" ) then ParticleManager:CreateParticle("particles/units/heroes/hero_skeletonking/wraith_king_curse_debuff_slash.vpcf", PATTACH_ABSORIGIN_FOLLOW, event.target) local ____self_12 = event.target local ____self_12_AddNewModifier_13 = ____self_12.AddNewModifier local ____temp_10 = self:GetParent() local ____temp_11 = self:GetAbility() local ____opt_8 = self:GetAbility() ____self_12_AddNewModifier_13( ____self_12, ____temp_10, ____temp_11, "modifier_item_zombie_slayer_debuff", {duration = ____opt_8 and ____opt_8:GetSpecialValueFor("debuff_duration")} ) return end end end modifier_item_zombie_slayer = __TS__Decorate( modifier_item_zombie_slayer, modifier_item_zombie_slayer, {registerModifier(nil)}, {kind = "class", name = "modifier_item_zombie_slayer"} ) ____exports.modifier_item_zombie_slayer = modifier_item_zombie_slayer ____exports.modifier_item_zombie_slayer_debuff = __TS__Class() local modifier_item_zombie_slayer_debuff = ____exports.modifier_item_zombie_slayer_debuff modifier_item_zombie_slayer_debuff.name = "modifier_item_zombie_slayer_debuff" modifier_item_zombie_slayer_debuff.____file_path = "scripts/vscripts/items/default_items/item_zombie_slayer copy.lua" __TS__ClassExtends(modifier_item_zombie_slayer_debuff, BaseModifier) function modifier_item_zombie_slayer_debuff.prototype.IsDebuff(self) return true end function modifier_item_zombie_slayer_debuff.prototype.IsPurgable(self) return true end function modifier_item_zombie_slayer_debuff.prototype.IsHidden(self) return true end function modifier_item_zombie_slayer_debuff.prototype.GetEffectName(self) return "particles/items2_fx/mage_slayer_debuff.vpcf" end function modifier_item_zombie_slayer_debuff.prototype.GetEffectAttachType(self) return PATTACH_ABSORIGIN_FOLLOW end function modifier_item_zombie_slayer_debuff.prototype.DeclareFunctions(self) return {MODIFIER_PROPERTY_INCOMING_DAMAGE_PERCENTAGE} end function modifier_item_zombie_slayer_debuff.prototype.GetModifierIncomingDamage_Percentage(self, event) return self:GetAbility():GetSpecialValueFor("incress_damage") end modifier_item_zombie_slayer_debuff = __TS__Decorate( modifier_item_zombie_slayer_debuff, modifier_item_zombie_slayer_debuff, {registerModifier(nil)}, {kind = "class", name = "modifier_item_zombie_slayer_debuff"} ) ____exports.modifier_item_zombie_slayer_debuff = modifier_item_zombie_slayer_debuff --- Corrosion: броня / реген / скорость / атакспид — визуал и логика как у Cold Attack (Skadi). ____exports.modifier_item_zombie_slayer_debuff_2 = __TS__Class() local modifier_item_zombie_slayer_debuff_2 = ____exports.modifier_item_zombie_slayer_debuff_2 modifier_item_zombie_slayer_debuff_2.name = "modifier_item_zombie_slayer_debuff_2" modifier_item_zombie_slayer_debuff_2.____file_path = "scripts/vscripts/items/default_items/item_zombie_slayer copy.lua" __TS__ClassExtends(modifier_item_zombie_slayer_debuff_2, BaseModifier) function modifier_item_zombie_slayer_debuff_2.prototype.IsDebuff(self) return true end function modifier_item_zombie_slayer_debuff_2.prototype.IsPurgable(self) return true end function modifier_item_zombie_slayer_debuff_2.prototype.IsHidden(self) return false end function modifier_item_zombie_slayer_debuff_2.prototype.DeclareFunctions(self) return {MODIFIER_PROPERTY_PHYSICAL_ARMOR_BONUS, MODIFIER_PROPERTY_HEALTH_REGEN_PERCENTAGE, MODIFIER_PROPERTY_MOVESPEED_BONUS_PERCENTAGE, MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT} end function modifier_item_zombie_slayer_debuff_2.prototype.GetModifierMoveSpeedBonus_Percentage(self) return self:GetAbility():GetSpecialValueFor("movespeed_reduction") end function modifier_item_zombie_slayer_debuff_2.prototype.GetModifierAttackSpeedBonus_Constant(self) return self:GetAbility():GetSpecialValueFor("attackspeed_reduction") end function modifier_item_zombie_slayer_debuff_2.prototype.GetModifierHealthRegenPercentage(self) local healReductionPct = self:GetAbility():GetSpecialValueFor("health_reduction") return 1 + healReductionPct * 0.01 end function modifier_item_zombie_slayer_debuff_2.prototype.GetModifierPhysicalArmorBonus(self) return self:GetAbility():GetSpecialValueFor("armor_reduction") end function modifier_item_zombie_slayer_debuff_2.prototype.GetEffectName(self) return ZOMBIE_SLAYER_SKADI_DEBUFF_PARTICLE end function modifier_item_zombie_slayer_debuff_2.prototype.GetEffectAttachType(self) return PATTACH_ABSORIGIN_FOLLOW end function modifier_item_zombie_slayer_debuff_2.prototype.GetTexture(self) return "item_skadi" end modifier_item_zombie_slayer_debuff_2 = __TS__Decorate( modifier_item_zombie_slayer_debuff_2, modifier_item_zombie_slayer_debuff_2, {registerModifier(nil)}, {kind = "class", name = "modifier_item_zombie_slayer_debuff_2"} ) ____exports.modifier_item_zombie_slayer_debuff_2 = modifier_item_zombie_slayer_debuff_2 return ____exports