GrislyProtection.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. --[[
  2. Script Name : Spells/Mage/Summoner/Necromancer/GrislyProtection.lua
  3. Script Author : Jabantiz
  4. Script Date : 2013.12.08 12:12:05
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, agg, procDmgType, procDmg, procHeal, atkSpeed, maxHP, hateGain, spellMit, procHateMin, procHateMax)
  9. -- Increases Aggression of target by 1.9
  10. AddSkillBonus(Target, GetSkillByName("Aggression"), agg)
  11. -- Decreases Attack Speed of target by 25.0
  12. AddSpellBonus(Target, 617, atkSpeed)
  13. -- Increases Max Health of target by 9.0%
  14. AddSpellBonus(Target, 607, maxHP)
  15. -- Increases Hate Gain of target by 11.9%
  16. AddSpellBonus(Target, 624, hateGain)
  17. -- Increases Mitigation of target vs elemental and noxious damage by 126
  18. -- Increases Mitigation of target vs arcane damage by 126
  19. AddSpellBonus(Target, 201, spellMit)
  20. AddSpellBonus(Target, 202, spellMit)
  21. AddSpellBonus(Target, 203, spellMit)
  22. AddProc(Target, 1, 100)
  23. AddProc(Target, 2, 100)
  24. end
  25. function proc(Caster, Target, Type, agg, procDmgType, procDmg, procHeal, atkSpeed, maxHP, hateGain, spellMit, procHateMin, procHateMax)
  26. if Type == 1 then
  27. -- 1 = offensive
  28. -- On any combat or spell hit this spell will cast Shout on target of attack.
  29. -- Increases Threat to target encounter by 35 - 42
  30. if procHateMax ~= nil and procHateMin < procHateMax then
  31. AddHate(Target, math.random(procHateMin, procHateMax))
  32. else
  33. AddHate(Target, procHateMin)
  34. end
  35. elseif Type == 2 then
  36. -- 2 = defensive
  37. -- When damaged this spell will cast Grisly Feedback on target's attacker.
  38. -- Inflicts 7 disease damage on target
  39. -- Heals caster for 3
  40. ProcDamage(Caster, Target, "Grisly Feedback", procDmgType, procDmg)
  41. SpellHeal("Heal", procHeal, 0, Caster)
  42. end
  43. end
  44. function remove(Caster, Target)
  45. RemoveSpellBonus(Target)
  46. RemoveSkillBonus(Target)
  47. RemoveProc(Target)
  48. end