Skip to content

Commit

Permalink
update desc for DK
Browse files Browse the repository at this point in the history
  • Loading branch information
Eroica-cpp committed Jun 26, 2017
1 parent b59ef9b commit e679e61
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions DragonKnight.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-- File: DragonKnight.lua
-- Author: EroicaCpp (https://github.com/Eroica-cpp/dota2scripts)
-- Version: 1.0
-- Release Date: 2017/6/26

local Utility = require("Utility")

local DragonKnight = {}
Expand Down Expand Up @@ -32,13 +37,13 @@ function DragonKnight.OnDraw()
for i = 1, Heroes.Count() do
local enemy = Heroes.Get(i)
if not NPC.IsIllusion(enemy) and not Entity.IsSameTeam(myHero, enemy) and not Entity.IsDormant(enemy) and Entity.IsAlive(enemy) then

local enemyHp = Entity.GetHealth(enemy)
local physical_damage = NPC.GetDamageMultiplierVersus(myHero, enemy) * NPC.GetTrueDamage(myHero) * NPC.GetArmorDamageMultiplier(enemy)
local physical_damage = NPC.GetDamageMultiplierVersus(myHero, enemy) * NPC.GetTrueDamage(myHero) * NPC.GetArmorDamageMultiplier(enemy)
local magical_damage = fire_damage * NPC.GetMagicalArmorDamageMultiplier(enemy)
local enemyHpLeft = enemyHp - magical_damage
local hitsLeft = math.ceil(enemyHpLeft / (physical_damage + 1))

-- draw
local pos = Entity.GetAbsOrigin(enemy)
local x, y, visible = Renderer.WorldToScreen(pos)
Expand Down Expand Up @@ -102,4 +107,4 @@ function DragonKnight.AutoStun()
end
end

return DragonKnight
return DragonKnight

0 comments on commit e679e61

Please sign in to comment.