9
3

ArcaneTrickery.lua 756 B

123456789101112131415161718192021222324
  1. --[[
  2. Script Name : Spells/Commoner/ArcaneTrickery.lua
  3. Script Author : neatz09
  4. Script Date : 2020.03.22 05:03:34
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, MitMin, MitMax)
  9. local Val1 = (GetLevel(Caster) * 1.08) * MitMin
  10. local Val2 = (GetLevel(Caster) * 1.08) * MitMax
  11. local MitAmt = randomFloat(Val1, Val2)
  12. SpellDamage(Target, DmgType, (GetLevel(Caster) * 1.08) * MinVal, (GetLevel(Caster) * 1.08) * MaxVal)
  13. AddSpellBonus(Caster, 200, MitAmt)
  14. AddSpellBonus(Caster, 203, MitAmt)
  15. end
  16. function randomFloat(Val1, Val2)
  17. return Val1 + math.random() * (Val2 - Val1);
  18. end
  19. function remove(Caster, Target)
  20. RemoveSpellBonus(Caster)
  21. end