9
3

BravosDance.lua 862 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : Spells/Commoner/BravosDance.lua
  3. Script Author : neatz09
  4. Script Date : 2020.03.29 05:03:42
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinHaste, MaxHaste, MinDPS, MaxDPS)
  9. local Val1 = (GetLevel(Caster) * 1.08) * MinHaste
  10. local Val2 = (GetLevel(Caster) * 1.08) * MaxHaste
  11. local Val3 = (GetLevel(Caster) * 1.08) * MinDPS
  12. local Val4 = (GetLevel(Caster) * 1.08) * MaxDPS
  13. local Haste = randomFloat(Val1, Val2)
  14. local DPS = randomFloat2(Val3, Val4)
  15. AddSpellBonus(Target, 617, Haste)
  16. AddSpellBonus(Target, 629, DPS)
  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() * (Val3 - Val4);
  23. end
  24. function remove(Caster, Target)
  25. RemoveSpellBonus(Target)
  26. end