UnholyBlessing.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/UnholyBlessing.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.11 06:03:11
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, DmgMin, DmgMax, HealMin, HealMax)
  9. -- Grants a total of 5 triggers of the spell.
  10. SetSpellTriggerCount(5, 1)
  11. -- When damaged this spell will cast Voracious Soul on target's attacker.
  12. AddProc(Target, 2, 100)
  13. end
  14. function proc(Caster, Target, Type, DmgType, DmgMin, DmgMax, pctHealMin, pctHealMax)
  15. if Type == 2 then
  16. -- Inflicts 19 - 24 disease damage on target
  17. ProcDamage(Caster, Target, "Voraciocus Soul", DmgType, DmgMin, DmgMax)
  18. -- Heals caster for 24 - 30
  19. -- This effect cannot be critically applied.
  20. -- The healing of this spell cannot be modified except by direct means
  21. SpellHeal(Heal, GetPCTOfHP(Caster, pctHealMin), GetPCTOfHP(Caster, pctHealMax),Caster, 2, 1)
  22. RemoveTriggerFromSpell(1)
  23. end
  24. end
  25. function remove(Caster, Target)
  26. RemoveProc(Target)
  27. end