ArdentChallenge.lua 633 B

1234567891011121314151617181920212223
  1. --[[
  2. Script Name : Spells/Commoner/ArdentChallenge.lua
  3. Script Author : neatz09
  4. Script Date : 2020.04.02 12:04:03
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinVal, MaxVal)
  9. local Val1 = (GetLevel(Caster) * 1.08) * MinVal
  10. local Val2 = (GetLevel(Caster) * 1.08) * MaxVal
  11. local StatAmt = randomFloat(Val1, Val2)
  12. AddSpellBonus(Target, 0, StatAmt)
  13. AddSpellBonus(Target, 2, StatAmt)
  14. end
  15. function randomFloat(Val1, Val2)
  16. return Val1 + math.random() * (Val2 - Val1);
  17. end
  18. function remove(Caster, Target)
  19. RemoveSpellBonus(Target)
  20. end