MindBlast.lua 734 B

1234567891011121314151617181920212223242526
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/MindBlast.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.03 11:11:41
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 31 - 41 mental damage on target
  9. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  10. Level = GetLevel(Caster)
  11. SpellLevel = 17
  12. Mastery = SpellLevel + 10
  13. StatBonus = GetInt(Caster) / 10
  14. if Level < Mastery then
  15. LvlBonus = Level - SpellLevel
  16. else LvlBonus = Mastery - SpellLevel
  17. end
  18. DmgBonus = LvlBonus + StatBonus
  19. MaxDmg = MaxVal + math.floor(DmgBonus)
  20. MinDmg = MinVal + math.floor(DmgBonus)
  21. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  22. end