ChaliceofLife.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --[[
  2. Script Name : Spells/Commoner/ChaliceofLife.lua
  3. Script Author : neatz09
  4. Script Date : 2020.04.10 01:04:32
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Wards target against 5118 points of all damage
  9. function cast(Caster, Target, Ward, 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. AddWard((GetLevel(Caster) * 1.08) * Ward, 0, 0)
  17. SpellHeal("Heal", HealAmt)
  18. end
  19. function tick(Caster, Target, Ward, HealMin, HealMax, TickMin, TickMax)
  20. SpellHeal("Heal", TickAmt)
  21. end
  22. function randomFloat(Val1, Val2)
  23. return Val1 + math.random() * (Val2 - Val1);
  24. end
  25. function randomFloat2(Val3, Val4)
  26. return Val3 + math.random() * (Val4 - Val3);
  27. end
  28. function remove(Caster, Target)
  29. RemoveWard()
  30. end