Maul.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[
  2. Script Name : Spells/Traditions/Maul.lua
  3. Script Author : LordPazuzu
  4. Script Date : 3/8/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 1
  11. Mastery = SpellLevel + 50
  12. StatBonus = GetStr(Caster) / 10
  13. if Level < Mastery then
  14. LvlBonus = Level - SpellLevel
  15. else LvlBonus = Mastery - SpellLevel
  16. end
  17. DmgBonus = LvlBonus + StatBonus
  18. MaxDmg = MaxVal + math.floor(DmgBonus)
  19. MinDmg = MinVal + math.floor(DmgBonus)
  20. CastSpell(Target, 5001, GetSpellTier())
  21. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  22. end
  23. function tick(Caster, Target, DmgType, MinVal, MaxVal)
  24. Level = GetLevel(Caster)
  25. SpellLevel = 1
  26. Mastery = SpellLevel + 50
  27. StatBonus = GetStr(Caster) / 10
  28. if Level < Mastery then
  29. LvlBonus = Level - SpellLevel
  30. else LvlBonus = Mastery - SpellLevel
  31. end
  32. SetInfoStructString(Caster, "visual_state", "persist_damage")
  33. DmgBonus = LvlBonus + StatBonus
  34. MaxDmg = MaxVal + math.floor(DmgBonus)
  35. MinDmg = MinVal + math.floor(DmgBonus)
  36. if IsPlayer(Target) and GetClientVersion(Target) <= 526 then
  37. SpawnSet(Target,"visual_state",2790)
  38. else
  39. SpawnSet(Target,"visual_state",2790)
  40. end
  41. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  42. end
  43. function remove(Caster, Target, DoTType, MinVal, MaxVal)
  44. SpawnSet(Target,"visual_state",35558)
  45. end