Painbringer.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/Painbringer.lua
  3. Script Author : John Adams
  4. Script Date : 2013.11.17 05:11:19
  5. Script Purpose : DD, DoT and Heal
  6. :
  7. --]]
  8. function cast(Caster, Target, MinHeal, DmgType, MinDmg, MaxDmg, DoTType, DoT)
  9. -- DD component
  10. if MaxDmg ~= nil and MinDmg < MaxDmg then
  11. dmgAmount = math.random(MinDmg, MaxDmg)
  12. SpellDamage(Target, DDType, dmgAmount)
  13. else
  14. SpellDamage(Target, DDType, MinDmg)
  15. end
  16. -- Painbringer Component (instant heal)
  17. if MinHeal ~= nil then
  18. SpellHeal("Heal", MinHeal, 0, Caster)
  19. -- ModifyHP(Caster, MinHeal) -- heals 2 every 3 seconds for 9 seconds
  20. end
  21. end
  22. function tick(Caster, Target, MinHeal, DmgType, MinDmg, MaxDmg, DoTType, DoTAmt)
  23. -- Heal component
  24. if MinHeal ~= nil then
  25. SpellHeal("Heal", MinHeal, 0, Caster)
  26. -- ModifyHP(Caster, MinHeal) -- heals 2 every 3 seconds for 9 seconds
  27. end
  28. -- DoT component
  29. if DoTAmt ~= nil then
  30. SpellDamage(Target, DoTType, DoTAmt) -- Disease 1 every 3 seconds for 9 seconds
  31. end
  32. end