ShoulderCharge.lua 1018 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Fighter/Brawler/Bruiser/ShoulderCharge.lua
  3. Script Author : Jabantiz
  4. Script Date : 2014.03.11 05:03:52
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. -- Inflicts 26 - 79 melee damage on target
  10. if MaxVal ~= nil and MinVal < MaxVal then
  11. SpellDamage(Target, DmgType, math.random(MinVal, MaxVal))
  12. else
  13. SpellDamage(Target, DmgType, MinVal)
  14. end
  15. -- Applies Knockdown. Lasts for 2.5 seconds.
  16. -- Blurs vision of target
  17. -- Throws target back
  18. -- Stuns target
  19. -- Does not affect Epic targets
  20. if not IsEpic(Target) and LastSpellAttackHit() then
  21. BlurVision(Target, 1.0)
  22. AddControlEffect(Target, 4)
  23. Knockback(Caster, Target, 2500)
  24. AddSpellTimer(2500, "RemoveKnockback")
  25. end
  26. end
  27. function RemoveKnockback(Caster, Target)
  28. BlurVision(Target, 0.0)
  29. RemoveControlEffect(Target, 4)
  30. end