9
3

Tempest.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : Spells/Priest/Druid/Fury/Tempest.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.01.14 02:01:11
  5. : (Updated by Emagi for elemental damage 2022.07.16)
  6. Script Purpose :
  7. :
  8. --]]
  9. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  10. processDamage(Caster, Target, DmgType, MinVal, MaxVal)
  11. end
  12. function tick(Caster, Target, DmgType, MinVal, MaxVal)
  13. processDamage(Caster, Target, DmgType, MinVal, MaxVal)
  14. end
  15. function processDamage(Caster, Target, DmgType, MinVal, MaxVal)
  16. -- Inflicts 7 - 8 cold damage on target instantly and every 2 seconds
  17. if MaxVal ~= nil and MinVal < MaxVal then
  18. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  19. else
  20. SpellDamage(Target, DmgType, MinVal)
  21. end
  22. -- Inflicts 7 - 8 cold damage on target instantly and every 2 seconds
  23. -- If target is elemental
  24. -- WOODELEMENTAL 154
  25. -- AIRELEMENTAL 242
  26. -- EARTHELEMENTAL 248
  27. -- ELEMENTAL 250
  28. -- FIREELEMENTAL 254
  29. -- WATERELEMENTAL 266
  30. if MaxVal ~= nil and MinVal < MaxVal then
  31. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal), 0, 0, 154, 242, 248, 250, 254, 266)
  32. else
  33. SpellDamage(Target, DmgType, MinVal, 0, 0, 0, 154, 242, 248, 250, 254, 266)
  34. end
  35. end