9
3

CerebralSpasm.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/CerebralSpasm.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.11.26 09:11:22
  5. Script Purpose :
  6. :
  7. --]]
  8. --[[ Info from spell_display_effects (remove from script when done)
  9. *Applies Migraine on termination.
  10. *Inflicts 24 - 32 mental damage on target
  11. *Inflicts 8 - 10 mental damage on target instantly and every 6 seconds
  12. --]]
  13. function cast(Caster, Target, DoTType, DoTMin, DoTMax, DDType, DDMin, DDMax)
  14. damage(Caster, Target, DoTType, DoTMin, DoTMax)
  15. AddTimer(Caster, 23850, "migraine")
  16. end
  17. function tick(Caster, Target, DoTType, DoTMin, DoTMax)
  18. damage(Caster, Target, DoTType, DoTMin, DoTMax)
  19. end
  20. function damage(Caster, Target, DoTType, DoTMin, DoTMax, DDType, DDMin, DDMax)
  21. Level = GetLevel(Caster)
  22. SpellLevel = 15
  23. Mastery = SpellLevel + 10
  24. StatBonus = GetInt(Caster) / 10
  25. if Level < Mastery then
  26. LvlBonus = Level - SpellLevel
  27. else LvlBonus = Mastery - SpellLevel
  28. end
  29. DmgBonus = LvlBonus + StatBonus
  30. MaxDmg = math.floor(DmgBonus) * 2 + DoTMax
  31. MinDmg = math.floor(DmgBonus) * 2 + DoTMin
  32. SpellDamage(Target, DoTType, MinDmg, MaxDmg)
  33. end
  34. function migraine(Caster, Target, DoTType, DoTMin, DoTMax, DDType, DDMin, DDMax)
  35. Level = GetLevel(Caster)
  36. Mastery = SpellLevel + 15
  37. StatBonus = GetInt(Caster) / 10
  38. if Level < Mastery then
  39. LvlBonus = Level - SpellLevel
  40. else LvlBonus = Mastery - SpellLevel
  41. end
  42. DmgBonus = LvlBonus + StatBonus
  43. DDMaxDmg = math.floor(DmgBonus) * 2 + DDMax
  44. DDMinDmg = math.floor(DmgBonus) * 2 + DDMin
  45. Spell = GetSpell(5505, GetSpellTier())
  46. SetSpellDataIndex(Spell, 0, DDType)
  47. SetSpellDataIndex(Spell, 1, DDMinDmg)
  48. SetSpellDataIndex(Spell, 2, DDMaxDmg)
  49. CastCustomSpell(Spell, Caster, Target)
  50. end
  51. function remove(Caster, Target)
  52. end