9
3

InsidiousWhisper.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/InsidiousWhisper.lua
  3. Script Author : John Adams
  4. Script Date : 2013.08.11 06:08:28
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MinTauntVal, MaxTauntVal, MinTauntTick, MaxTauntTick, DDType, MinDDVal, MaxDDVal, DoTType, MinDoTVal, MaxDoTVal)
  9. -- Taunt component
  10. if MaxTauntVal ~= nil and MinTauntVal < MaxTauntVal then
  11. hateAmount = math.random(MinTauntVal, MaxTauntVal)
  12. AddHate(Caster, Target, hateAmount)
  13. else
  14. AddHate(Caster, Target, MinTauntVal)
  15. end
  16. -- Disease component
  17. if MaxDDVal ~= nil and MinDDVal < MaxDDVal then
  18. dmgAmount = math.random(MinDDVal, MaxDDVal)
  19. SpellDamage(Target, DDType, dmgAmount)
  20. else
  21. SpellDamage(Target, DDType, MinDDVal)
  22. end
  23. end
  24. function tick(Caster, Target, MinTauntVal, MaxTauntVal, MinTauntTick, MaxTauntTick, DDType, MinDDVal, MaxDDVal, DoTType, MinDoTVal, MaxDoTVal)
  25. -- Taunt component
  26. if MaxTauntTick ~= nil and MinTauntTick < MaxTauntTick then
  27. hateAmount = math.random(MinTauntTick, MaxTauntTick)
  28. AddHate(Caster, Target, hateAmount)
  29. else
  30. AddHate(Caster, Target, MinTauntTick)
  31. end
  32. -- Disease component
  33. if MaxDoTVal ~= nil and MinDoTVal < MaxDoTVal then
  34. dmgAmount = math.random(MinDoTVal, MaxDoTVal)
  35. SpellDamage(Target, DoTType, dmgAmount)
  36. else
  37. SpellDamage(Target, DoTType, MinDoTVal)
  38. end
  39. end