PoisonWeb.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : Spells/Traditions/PoisonWeb.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.08.30 01:08:44
  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. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  21. AddControlEffect(Target, 5)
  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. DmgBonus = LvlBonus + StatBonus
  33. MaxDmg = MaxVal + math.floor(DmgBonus)
  34. MinDmg = MinVal + math.floor(DmgBonus)
  35. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  36. end
  37. function remove(Caster, Target)
  38. RemoveControlEffect(Target, 5)
  39. end