Gloom.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/Gloom.lua
  3. Script Author : LordPazuzu
  4. Script Date : 11/5/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 12 - 14 mental damage on target instantly and every 6 seconds
  9. -- Decreases Mitigation of target vs arcane damage by 141
  10. function cast(Caster, Target, DmgType, MinVal, MaxVal, Mit)
  11. damage(Caster,Target, DmgType, MinVal, MaxVal)
  12. AddSpellBonus(Target, 203, Mit)
  13. end
  14. function tick(Caster, Target, DmgType, MinVal, MaxVal, Mit)
  15. damage(Caster, Target, DmgType, MinVal, MaxVal)
  16. end
  17. function damage(Caster,Target, DmgType, MinVal, MaxVal)
  18. Level = GetLevel(Caster)
  19. SpellLevel = 14
  20. Mastery = SpellLevel + 10
  21. StatBonus = GetInt(Caster) / 10
  22. if Level < Mastery then
  23. LvlBonus = Level - SpellLevel
  24. else LvlBonus = Mastery - SpellLevel
  25. end
  26. DmgBonus = LvlBonus + StatBonus
  27. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  28. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  29. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  30. end
  31. function remove(Caster, Target)
  32. RemoveSpellBonus(Target)
  33. end