StingingSwarm.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : Spells/Priest/Druid/StingingSwarm.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/18/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Info from spell_display_effects (remove from script when done)
  9. -- Inflicts 8 - 10 divine damage on target instantly and every 3 seconds
  10. -- Decreases Defense of target by 2.7
  11. function cast(Caster, Target, DmgType, MinVal, MaxVal, SkillAmt)
  12. Level = GetLevel(Caster)
  13. SpellLevel = 14
  14. Mastery = SpellLevel + 10
  15. StatBonus = GetInt(Caster) / 10
  16. if Level < Mastery then
  17. LvlBonus = Level - SpellLevel
  18. else LvlBonus = Mastery - SpellLevel
  19. end
  20. DmgBonus = LvlBonus + StatBonus
  21. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  22. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  23. DebuffBonus = LvlBonus * 0.1
  24. TotalDebuff = SkillAmt - DebuffBonus
  25. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  26. AddSkillBonus(Target, GetSkillIDByName("Defense"), TotalDebuff)
  27. end
  28. function tick(Caster, Target, DmgType, MinVal, MaxVal, SkillAmt)
  29. Level = GetLevel(Caster)
  30. SpellLevel = 14
  31. Mastery = SpellLevel + 10
  32. StatBonus = GetInt(Caster) / 10
  33. if Level < Mastery then
  34. LvlBonus = Level - SpellLevel
  35. else LvlBonus = Mastery - SpellLevel
  36. end
  37. DmgBonus = LvlBonus + StatBonus
  38. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  39. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  40. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  41. end
  42. function remove(Caster, Target)
  43. RemoveSkillBonus(Target)
  44. end