9
3

BoonoftheDamned.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/Warlock/BoonoftheDamned.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.07 07:03:47
  5. Script Purpose :
  6. :
  7. --]]
  8. -- When damaged with a melee weapon this spell has a 10% chance to cast Mana Boon on target. Lasts for 16.0 seconds.
  9. -- Increases power of target by 3 instantly and every 4 seconds
  10. -- Increases power of caster by 3 instantly and every 4 seconds
  11. -- Causes 2% Threat to transfer to target when in combat
  12. -- If Fighter
  13. function cast(Caster, Target, Chance, Pwr, Hate)
  14. local Class = GetArchetypeName(Target)
  15. if Class == "Fighter" then
  16. AddThreatTransfer(Caster, Target, Hate)
  17. end
  18. AddProc(Target, 16, Chance)
  19. end
  20. function proc(Caster, Target, Type, Chance, Pwr, Hate)
  21. Spell = GetSpell(5440, GetSpellTier())
  22. if Type == 16 then
  23. SetSpellDataIndex(Spell, 0, Pwr)
  24. CastCustomSpell(Spell, Caster, Target)
  25. end
  26. end
  27. function remove(Caster, Target)
  28. RemoveThreatTransfer(Caster)
  29. RemoveProc(Target)
  30. end