From 4762f3bae2001e3bfe55d56fd1003765f3b08cf0 Mon Sep 17 00:00:00 2001 From: Soo Kuo-Yi Date: Sun, 28 May 2017 21:53:41 +0800 Subject: [PATCH] Satanic Core tooltip cleanup (#922) * Remove repeated CDR values in Satanic Core KV (Looks silly in tooltip) * Make Satanic Core use its own modifier for active effect --- .../items/modifier_satanic_core_unholy.txt | 5 ++++ game/scripts/npc/items/item_satanic_core.txt | 2 +- .../scripts/npc/items/item_satanic_core_2.txt | 2 +- .../scripts/npc/items/item_satanic_core_3.txt | 2 +- game/scripts/vscripts/items/satanic_core.lua | 25 +++++++++++++++++-- .../modifier_octarine_vampirism_buff.lua | 2 +- 6 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 game/resource/English/modifier/items/modifier_satanic_core_unholy.txt diff --git a/game/resource/English/modifier/items/modifier_satanic_core_unholy.txt b/game/resource/English/modifier/items/modifier_satanic_core_unholy.txt new file mode 100644 index 0000000000..3e90d5b29e --- /dev/null +++ b/game/resource/English/modifier/items/modifier_satanic_core_unholy.txt @@ -0,0 +1,5 @@ +//============================================================================= +// Satanic Core Unholy Rage +//============================================================================= +"DOTA_Tooltip_modifier_satanic_core_unholy" "Unholy Rage" +"DOTA_Tooltip_modifier_satanic_core_unholy_Description" "Lifesteal increased to %dMODIFIER_PROPERTY_TOOLTIP%%%." diff --git a/game/scripts/npc/items/item_satanic_core.txt b/game/scripts/npc/items/item_satanic_core.txt index 52ff138f09..a98fbf91a4 100644 --- a/game/scripts/npc/items/item_satanic_core.txt +++ b/game/scripts/npc/items/item_satanic_core.txt @@ -106,7 +106,7 @@ "09" { "var_type" "FIELD_INTEGER" - "bonus_cooldown" "25 25 25" + "bonus_cooldown" "25" } "10" { diff --git a/game/scripts/npc/items/item_satanic_core_2.txt b/game/scripts/npc/items/item_satanic_core_2.txt index 20cd1a41db..e5b79efb84 100644 --- a/game/scripts/npc/items/item_satanic_core_2.txt +++ b/game/scripts/npc/items/item_satanic_core_2.txt @@ -94,7 +94,7 @@ "09" { "var_type" "FIELD_INTEGER" - "bonus_cooldown" "25 25 25" + "bonus_cooldown" "25" } "10" { diff --git a/game/scripts/npc/items/item_satanic_core_3.txt b/game/scripts/npc/items/item_satanic_core_3.txt index 5a8076a2bc..eef486ad07 100644 --- a/game/scripts/npc/items/item_satanic_core_3.txt +++ b/game/scripts/npc/items/item_satanic_core_3.txt @@ -93,7 +93,7 @@ "09" { "var_type" "FIELD_INTEGER" - "bonus_cooldown" "25 25 25" + "bonus_cooldown" "25" } "10" { diff --git a/game/scripts/vscripts/items/satanic_core.lua b/game/scripts/vscripts/items/satanic_core.lua index f5e291eb62..fb54f24d7a 100644 --- a/game/scripts/vscripts/items/satanic_core.lua +++ b/game/scripts/vscripts/items/satanic_core.lua @@ -1,5 +1,6 @@ LinkLuaModifier( "modifier_octarine_vampirism_buff", "modifiers/modifier_octarine_vampirism_buff.lua", LUA_MODIFIER_MOTION_NONE ) LinkLuaModifier( "modifier_item_satanic_core", "items/satanic_core.lua", LUA_MODIFIER_MOTION_NONE ) +LinkLuaModifier( "modifier_satanic_core_unholy", "items/satanic_core.lua", LUA_MODIFIER_MOTION_NONE ) -------------------------------------------------------------------------------- @@ -14,7 +15,7 @@ function item_satanic_core:OnSpellStart() local unholy_duration = self:GetSpecialValueFor( "unholy_duration" ) EmitSoundOn( "DOTA_Item.Satanic.Activate", hCaster ) - hCaster:AddNewModifier( hCaster, self, "modifier_item_satanic_unholy", { duration = unholy_duration } ) + hCaster:AddNewModifier( hCaster, self, "modifier_satanic_core_unholy", { duration = unholy_duration } ) end -------------------------------------------------------------------------------- @@ -109,7 +110,7 @@ function modifier_item_satanic_core:OnTakeDamage( kv ) -- Assume that no inflictor means damage was dealth from attack if not kv.inflictor and kv.attacker == hCaster then local heal_percent = self.lifesteal_percent; - if hCaster:HasModifier("modifier_item_satanic_unholy") then + if hCaster:HasModifier("modifier_satanic_core_unholy") then heal_percent = self.lifesteal_percent + self.unholy_lifesteal_percent end ParticleManager:CreateParticle( "particles/generic_gameplay/generic_lifesteal.vpcf", PATTACH_ABSORIGIN_FOLLOW, hCaster ) @@ -122,3 +123,23 @@ function modifier_item_satanic_core:OnTakeDamage( kv ) end -------------------------------------------------------------------------------- + +modifier_satanic_core_unholy = class({}) + +function modifier_satanic_core_unholy:DeclareFunctions() + return { + MODIFIER_PROPERTY_TOOLTIP + } +end + +function modifier_satanic_core_unholy:OnTooltip() + return self:GetAbility():GetSpecialValueFor("unholy_lifesteal_total_tooltip") +end + +function modifier_satanic_core_unholy:GetEffectName() + return "particles/items2_fx/satanic_buff.vpcf" +end + +function modifier_satanic_core_unholy:GetEffectAttachType() + return PATTACH_ABSORIGIN_FOLLOW +end diff --git a/game/scripts/vscripts/modifiers/modifier_octarine_vampirism_buff.lua b/game/scripts/vscripts/modifiers/modifier_octarine_vampirism_buff.lua index c97c0e54bc..5f3e5541aa 100644 --- a/game/scripts/vscripts/modifiers/modifier_octarine_vampirism_buff.lua +++ b/game/scripts/vscripts/modifiers/modifier_octarine_vampirism_buff.lua @@ -59,7 +59,7 @@ function modifier_octarine_vampirism_buff:OnTakeDamage(params) local nHeroHeal = self.hero_lifesteal / 100 local nCreepHeal = self.creep_lifesteal / 100 - if self.hero_spellsteal_unholy and hero:HasModifier("modifier_item_satanic_unholy") and hero:HasModifier("modifier_item_satanic_core") then + if self.hero_spellsteal_unholy and hero:HasModifier("modifier_satanic_core_unholy") and hero:HasModifier("modifier_item_satanic_core") then nHeroHeal = (self.hero_lifesteal + self.hero_spellsteal_unholy) / 100 nCreepHeal = (self.creep_lifesteal + self.creep_spellsteal_unholy) / 100 end