Commit 8b3850d6 authored by JoyJ's avatar JoyJ

fix necrolyte ult calculate damage reduction twice

parent 547a7d40
...@@ -511,30 +511,6 @@ function X.GetEstDamage( bot, npcTarget, nDamagePerHealth ) ...@@ -511,30 +511,6 @@ function X.GetEstDamage( bot, npcTarget, nDamagePerHealth )
if AroundTargetAllyCount >= 2 then EstDamage = EstDamage + targetMaxHealth * 0.08 * ( AroundTargetAllyCount - 1 ) end if AroundTargetAllyCount >= 2 then EstDamage = EstDamage + targetMaxHealth * 0.08 * ( AroundTargetAllyCount - 1 ) end
if npcTarget:HasModifier( "modifier_medusa_mana_shield" )
then
local EstDamageMaxReduce = EstDamage * 0.6
if npcTarget:GetMana() * 2.5 >= EstDamageMaxReduce
then
EstDamage = EstDamage * 0.4
else
EstDamage = EstDamage * 0.4 + EstDamageMaxReduce - npcTarget:GetMana() * 2.5
end
end
if npcTarget:GetUnitName() == "npc_dota_hero_bristleback"
and not npcTarget:IsFacingLocation( GetBot():GetLocation(), 120 )
then
EstDamage = EstDamage * 0.7
end
if npcTarget:HasModifier( "modifier_kunkka_ghost_ship_damage_delay" )
then
local buffTime = J.GetModifierTime( npcTarget, "modifier_kunkka_ghost_ship_damage_delay" )
if buffTime > 2.0 then EstDamage = EstDamage * 0.55 end
end
if npcTarget:HasModifier( "modifier_templar_assassin_refraction_absorb" ) then EstDamage = 0 end
return EstDamage return EstDamage
......
...@@ -868,12 +868,12 @@ function J.WillMagicKillTarget( bot, npcTarget, dmg, nDelay ) ...@@ -868,12 +868,12 @@ function J.WillMagicKillTarget( bot, npcTarget, dmg, nDelay )
if npcTarget:HasModifier( "modifier_medusa_mana_shield" ) if npcTarget:HasModifier( "modifier_medusa_mana_shield" )
then then
local EstDamageMaxReduce = EstDamage * 0.6 local EstDamageMaxReduce = EstDamage * 0.98
if npcTarget:GetMana() * 2.5 >= EstDamageMaxReduce if npcTarget:GetMana() * 3.2 >= EstDamageMaxReduce
then then
EstDamage = EstDamage * 0.4 EstDamage = EstDamage * 0.02
else else
EstDamage = EstDamage * 0.4 + EstDamageMaxReduce - npcTarget:GetMana() * 2.5 EstDamage = EstDamage - (npcTarget:GetMana() * 3.2) * 0.98
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment