9
3

DeathSwarm.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : Spells/Priest/Druid/Fury/DeathSwarm.lua
  3. Script Author : John Adams
  4. Script Date : 2013.11.19 07:11:29
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, SkillAmt, DmgType, MinDmgVal, MaxDmgVal)
  9. -- Debuff component
  10. AddSkillBonus(Target, 609880714, SkillAmt) -- Defense
  11. -- Damage component
  12. if MaxDmgVal ~= nil and MinDmgVal < MaxDmgVal then
  13. dmgAmount = math.random(MinDmgVal, MaxDmgVal)
  14. SpellDamage(Target, DDType, dmgAmount)
  15. else
  16. SpellDamage(Target, DDType, MinDmgVal)
  17. end
  18. end
  19. function tick(Caster, Target, DefenseAmt, DmgType, MinDmgVal, MaxDmgVal)
  20. -- DoT component
  21. if MaxDmgVal ~= nil and MinDmgVal < MaxDmgVal then
  22. dmgAmount = math.random(MinDmgVal, MaxDmgVal)
  23. SpellDamage(Target, DDType, dmgAmount)
  24. else
  25. SpellDamage(Target, DDType, MinDmgVal)
  26. end
  27. end
  28. function remove(Caster, Target, DefenseAmt, DmgType, MinDmgVal, MaxDmgVal)
  29. -- Remove debuff when spell expires
  30. RemoveSkillBonus(Target)
  31. end