AncientCrucible.lua 798 B

123456789101112131415161718192021222324252627
  1. --[[
  2. Script Name : Spells/Commoner/AncientCrucible.lua
  3. Script Author : neatz09
  4. Script Date : 2020.04.10 08:04:48
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, HealMin, HealMax, PowerMin, PowerMax)
  9. local Val1 = (GetLevel(Caster) * 1.08) * HealMin
  10. local Val2 = (GetLevel(Caster) * 1.08) * HealMax
  11. local Val3 = (GetLevel(Caster) * 1.08) * PowerMin
  12. local Val4 = (GetLevel(Caster) * 1.08) * PowerMax
  13. local HealAmt = randomFloat(Val1, Val2)
  14. local PowerAmt = randomFloat2(Val3, Val4)
  15. SpellHeal("Heal", HealAmt)
  16. SpellHeal("Power", PowerAmt)
  17. end
  18. function randomFloat(Val1, Val2)
  19. return Val1 + math.random() * (Val2 - Val1);
  20. end
  21. function randomFloat2(Val3, Val4)
  22. return Val3 + math.random() * (Val4 - Val3);
  23. end