WaltsSingingBlade.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --[[
  2. Script Name : Spells/Scout/Bard/WaltsSingingBlade.lua
  3. Script Author : LordPazuzu
  4. Script Date : 4/1/2024
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 27 - 46 mental damage on target
  9. -- Decreases power of target by 10 - 17
  10. function cast(Caster, Target, DmgType, MinVal, MaxVal, MinPwr, MaxPwr)
  11. damage(Caster, Target, DmgType, MinVal, MaxVal, MinPwr, MaxPwr)
  12. end
  13. function tick(Caster, Target, DmgType, MinVal, MaxVal, MinPwr, MaxPwr)
  14. damage(Caster, Target, DmgType, MinVal, MaxVal, MinPwr, MaxPwr)
  15. end
  16. function remove(Caster, Target)
  17. end
  18. function damage(Caster, Target, DmgType, MinVal, MaxVal, MinPwr, MaxPwr)
  19. Level = GetLevel(Caster)
  20. SpellLevel = 15
  21. Mastery = SpellLevel + 10
  22. StrBonus = GetStr(Caster) / 10
  23. IntBonus = GetInt(Caster) / 10
  24. if Level < Mastery then
  25. LvlBonus = Level - SpellLevel
  26. else LvlBonus = Mastery - SpellLevel
  27. end
  28. DmgBonus = LvlBonus + StrBonus
  29. DrainBonus = LvlBonus + IntBonus
  30. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  31. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  32. MinDrain = MinPwr + DrainBonus
  33. MaxDrain = MaxPwr + DrainBonus
  34. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  35. SpellDamageExt(Target, 5, MinDrain, MaxDrain, 0, 0, 0, 1)
  36. end