9
3

Asylum.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : Spells/Mage/Enchanter/Coercer/Asylum.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.14 07:03:01
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, DmgMin, DmgMax, DoTType, MinVal, MaxVal, BonusAmt)
  9. -- Inflicts 41 - 51 mental damage on target instantly and every 6 seconds
  10. if MaxVal ~= nil and MinVal < MaxVal then
  11. SpellDamage(Target, DoTType, math.random(MinVal, MaxVal))
  12. else
  13. SpellDamage(Target, DoTType, MinVal)
  14. end
  15. -- Decreases Mitigation of target vs arcane damage by 141
  16. AddSpellBonus(Target, 203, BonusAmt)
  17. end
  18. function tick(Caster, Target, DmgType, DmgMin, DmgMax, DoTType, MinVal, MaxVal, BonusAmt)
  19. if MaxVal ~= nil and MinVal < MaxVal then
  20. SpellDamage(Target, DoTType, math.random(MinVal, MaxVal))
  21. else
  22. SpellDamage(Target, DoTType, MinVal)
  23. end
  24. end
  25. function remove(Caster, Target, DmgType, DmgMin, DmgMax, DoTType, MinVal, MaxVal, BonusAmt)
  26. RemoveSpellBonus(Target)
  27. -- Applies Forceful Headache on termination.
  28. -- Inflicts 103 - 172 mental damage on target
  29. -- If over 50% power
  30. if (GetCurrentHP(Target) / GetMaxHP(Target)) >= 0.5 then
  31. -- Used ProcDamage() so I could override the spell name
  32. ProcDamage(Caster, Target, "Forceful Headache", DmgType, DmgMin, DmgMax)
  33. end
  34. end