9
3

Thorncoat.lua 999 B

123456789101112131415161718192021222324252627282930
  1. --[[
  2. Script Name : Spells/Priest/Druid/Warden/Thorncoat.lua
  3. Script Author : Ememjr
  4. Script Date : 2019.04.28 02:04:52
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Info from spell_display_effects (remove from script when done)
  9. -- When damaged with a melee weapon this spell will cast Thorns on target's attacker.
  10. -- Inflicts 1 piercing damage on target
  11. function cast(Caster, Target)
  12. -- When damaged with a melee weapon this spell will cast Thorns on target's attacker.
  13. AddProc(Target, 4, 100)
  14. end
  15. function proc(Caster, Target, Type, DmgType, MinVal, MaxVal)
  16. if Type == 4 then
  17. -- Inflicts 1 piercing damage on target encounter
  18. if MaxVal ~= nil and MinVal < MaxVal then
  19. ProcDamage(Caster, Target, "Thorns", DmgType, MinVal, MaxVal)
  20. else
  21. ProcDamage(Caster, Target, "Thorns", DmgType, MinVal)
  22. end
  23. end
  24. end
  25. function remove(Caster, Target)
  26. RemoveProc(Target)
  27. end