DivineNobility.lua 920 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Commoner/DivineNobility.lua
  3. Script Author : neatz09
  4. Script Date : 2020.04.09 06:04:00
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Heals caster for x - y instantly based on Clevel.
  9. function cast(Caster, Target, HealMin, HealMax, TickMin, TickMax)
  10. local Val1 = (GetLevel(Caster) * 1.08) * HealMin
  11. local Val2 = (GetLevel(Caster) * 1.08) * HealMax
  12. local Val3 = (GetLevel(Caster) * 1.08) * TickMin
  13. local Val4 = (GetLevel(Caster) * 1.08) * TickMax
  14. local HealAmt = randomFloat(Val1, Val2)
  15. local TickAmt = randomFloat2(Val3, Val4)
  16. SpellHeal("Heal", HealAmt)
  17. end
  18. function tick(Caster, Target, MinVal, MaxVal, TickMin, TickMax)
  19. SpellHeal("Heal", TickAmt)
  20. end
  21. function randomFloat(Val1, Val2)
  22. return Val1 + math.random() * (Val2 - Val1);
  23. end
  24. function randomFloat2(Val3, Val4)
  25. return Val3 + math.random() * (Val4 - Val3);
  26. end