Converge.lua 1009 B

1234567891011121314151617181920212223242526272829303132333435
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/Wizard/Converge.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.10 10:10:56
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Causes 2% Threat to transfer to target when in combat
  9. -- If Fighter
  10. --GetClass(Target) == fighter then AddThreatTransfer
  11. -- When damaged with a melee weapon this spell has a 10% chance to cast Concurrence on target.
  12. -- Increases power of target by 12
  13. -- Increases power of caster by 12
  14. function cast(Caster, Target, Chance, Pwr, Hate)
  15. local Class = GetArchetypeName(Target)
  16. if Class == "Fighter" then
  17. AddThreatTransfer(Caster, Target, Hate)
  18. end
  19. AddProc(Target, 16, Chance)
  20. end
  21. function proc(Caster, Target, Type, Chance, Pwr, Hate)
  22. Spell = GetSpell(5441, GetSpellTier())
  23. if Type == 16 then
  24. SetSpellDataIndex(Spell, 0, Pwr)
  25. CastCustomSpell(Spell, Caster, Target)
  26. end
  27. end
  28. function remove(Caster, Target)
  29. RemoveThreatTransfer(Caster)
  30. RemoveProc(Target)
  31. end