MarkofPawns.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : Spells/Priest/Cleric/MarkofPawns.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/28/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Decreases Mitigation of target vs arcane damage by 168
  9. -- When damaged with a melee weapon this spell has a 20% chance to cast Mark of Nobility on target's attacker. Lasts for 8.0 seconds.
  10. -- Heals target for 6 instantly and every 2 seconds
  11. function cast(Caster, Target, Mit, Healz, Chance)
  12. AddSpellBonus(Target, 203, Mit)
  13. AddProc(Target, 16, Chance)
  14. end
  15. function proc(Caster, Target, Type, Mit, Heal, Chance)
  16. Level = GetLevel(Caster)
  17. SpellLevel = 18
  18. Mastery = SpellLevel + 10
  19. StatBonus = GetWis(Caster) / 10
  20. if Level < Mastery then
  21. LvlBonus = Level - SpellLevel
  22. else LvlBonus = Mastery - SpellLevel
  23. end
  24. HealBonus = LvlBonus + StatBonus
  25. TotalHeal = math.floor(HealBonus) * 2 + Heal
  26. Spell = GetSpell(5449, GetSpellTier())
  27. if Type == 16 then
  28. SetSpellDataIndex(Spell, 0, TotalHeal)
  29. CastCustomSpell(Spell, Caster, Target)
  30. end
  31. end
  32. function remove(Caster, Target)
  33. RemoveSpellBonus(Target)
  34. RemoveProc(Target)
  35. end