Repentance.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : Spells/Priest/Cleric/Inquisitor/Repentance.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.13 09:03:13
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target)
  9. -- Grants a total of 3 triggers of the spell.
  10. SetSpellTriggerCount(3, 1)
  11. -- On any combat or spell hit this spell will cast Repenting Strike on caster. Lasts for 2.5 seconds.
  12. AddProc(Target, 1, 100)
  13. end
  14. function proc(Caster, Target, Type, DmgType, DmgMin, DmgMax)
  15. if Type == 1 then
  16. -- Inflicts 88 - 147 divine damage on target
  17. ProcDamage(Target, Caster, "Repenting Strike", DmgType, DmgMin, DmgMax)
  18. -- Stuns target
  19. -- If Target is not Epic
  20. if not IsEpic(Caster) then
  21. AddControlEffect(Caster, 4)
  22. AddSpellTimer(2500, "RemoveStun", Caster, Target)
  23. end
  24. RemoveTriggerFromSpell(1)
  25. end
  26. end
  27. function RemoveStun(Caster, Target)
  28. RemoveControlEffect(Caster, 4)
  29. end
  30. function remove(Caster, Target)
  31. RemoveProc(Target)
  32. end