Chill.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : Spells/Priest/Druid/Chill.lua
  3. Script Author : LordPazuzu
  4. Script Date : 11/30/2022
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 11
  11. Mastery = SpellLevel + 10
  12. StatBonus = GetInt(Caster) / 10
  13. if Level < Mastery then
  14. LvlBonus = Level - SpellLevel
  15. else LvlBonus = Mastery - SpellLevel
  16. end
  17. DmgBonus = LvlBonus + StatBonus
  18. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  19. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  20. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  21. if GetRaceBaseType(Target) == 250 then
  22. Level = GetLevel(Caster)
  23. SpellLevel = 11
  24. Mastery = SpellLevel + 10
  25. StatBonus = GetInt(Caster) / 10
  26. if Level < Mastery then
  27. LvlBonus = Level - SpellLevel
  28. else LvlBonus = Mastery - SpellLevel
  29. end
  30. DmgBonus = LvlBonus + StatBonus
  31. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  32. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  33. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  34. end
  35. end