UnholyHunger.lua 1.2 KB

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/UnholyHunger.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.01.08 05:01:11
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target)
  9. -- On a hit this spell may cast Unholy Strike on target of attack. Triggers about 1.6 times per minute.
  10. AddProc(Target, 3, 16, nil, 1)
  11. end
  12. function proc(Caster, Target, Type, DmgType, DmgMin, DmgMax, HealMin, HealMax)
  13. if Type == 3 then
  14. -- Inflicts 19 - 32 disease damage on target
  15. ProcDamage(Caster, Target, "Unholy Strike", DmgType, DmgMin, DmgMax)
  16. -- Heals caster for 6 - 10
  17. -- This effect cannot be critically applied.
  18. -- The healing of this spell cannot be modified except by direct means
  19. -- Old code SpellHeal("Heal", HealMin, HealMax, Caster, 2, 1)
  20. SpellHeal("Heal", HealMin / 100 * GetMaxHP(Caster), HealMax / 100 * GetMaxHP(Caster), Caster, 2, 1)
  21. SendMessage(Caster, "Minimum : " .. round(MinVal *level) .. " Maximum: " .. round(MaxVal*level),"yellow")
  22. end
  23. end
  24. function remove(Caster, Target)
  25. RemoveProc(Target)
  26. end