VenomousBite.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : Spells/Traditions/VenomousBite.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.08.27 02:08:03
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, MainVal, DoTVal)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 3
  11. Mastery = SpellLevel + 50
  12. if Level < Mastery then
  13. LvlBonus = Level - SpellLevel
  14. else LvlBonus = Mastery - SpellLevel
  15. end
  16. TotalDmg = MainVal + LvlBonus
  17. SpellDamage(Target, 2, TotalDmg, TotalDmg)
  18. end
  19. function tick(Caster, Target, MainVal, DoTVal)
  20. SetInfoStructString(Target, "visual_state", "result_poison_rain_damage")
  21. Level = GetLevel(Caster)
  22. SpellLevel = 4
  23. Mastery = SpellLevel + 3
  24. if Level < Mastery then
  25. LvlBonus = Level - SpellLevel
  26. else LvlBonus = Mastery - SpellLevel
  27. end
  28. PowerDrain = 0 - DoTVal - LvlBonus
  29. ModifyPower(Target, PowerDrain)
  30. if IsPlayer(Target) and GetClientVersion(Target) <= 526 then
  31. SpawnSet(Target,"visual_state",3227)
  32. else
  33. SpawnSet(Target,"visual_state",3227)
  34. end
  35. --SpellHeal("Power", PowerDrain, PowerDrain, Target)
  36. end
  37. function remove(Caster, Target, DoTType, MinVal, MaxVal)
  38. SpawnSet(Target,"visual_state",0)
  39. end