LaserGoggles.lua 662 B

1234567891011121314151617181920212223
  1. --[[
  2. Script Name : ItemScripts/LaserGoggles.lua
  3. Script Purpose :
  4. Script Author : fearfx
  5. Script Date : 6/15/2016
  6. Script Notes :
  7. --]]
  8. function used(Item, Player)
  9. local target = GetTarget(Player)
  10. if target ~= nil and IsEntity(target) then
  11. local encounter = GetEncounter(target)
  12. if encounter ~= nil then
  13. doDamage(Player, target, damage)
  14. else
  15. doDamage(Player, target, damage)
  16. end
  17. end
  18. end
  19. function doDamage(Player, Target, damage)
  20. local damage = math.floor(((GetHP(Target) / 100) * 50) + GetHP(Target))
  21. ProcDamage(Player, Target, " Dev AE Slay", 4, damage)
  22. end