9
3

HerosArmor.lua 623 B

1234567891011121314151617181920212223242526
  1. --[[
  2. Script Name : Spells/Commoner/HerosArmor.lua
  3. Script Author : neatz09
  4. Script Date : 2020.03.29 03:03:00
  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 MitAmt = randomFloat(Val1, Val2)
  12. AddSpellBonus(Target, 200, MitAmt)
  13. Say(Caster, "MitAmt = " .. MitAmt)
  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