9
3

InspiringPiety.lua 737 B

1234567891011121314151617181920212223
  1. --[[
  2. Script Name : Spells/Commoner/InspiringPiety.lua
  3. Script Author : neatz09
  4. Script Date : 2020.03.29 03:03:22
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, MinFocus, MaxFocus)
  9. local Val1 = (GetLevel(Caster) * 1.08) * MinFocus
  10. local Val2 = (GetLevel(Caster) * 1.08) * MaxFocus
  11. local FocusAmt = randomFloat(Val1, Val2)
  12. AddSkillBonus(Caster, GetSkillIDByName("Focus"), FocusAmt)
  13. SpellDamage(Target, DmgType, (GetLevel(Caster) * 1.08) * MinVal, (GetLevel(Caster) * 1.08) * MaxVal)
  14. end
  15. function randomFloat(Val1, Val2)
  16. return Val1 + math.random() * (Val2 - Val1);
  17. end
  18. function remove(Caster, Target)
  19. RemoveSkillBonus(Caster)
  20. end