DaringAdvance.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : Spells/Scout/Rogue/DaringAdvance.lua
  3. Script Author : LordPazuzu
  4. Script Date : 1/3/2023
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DefAmt, SkillAmt, DmgType, DmgAmt)
  9. -- Decreases Defense of caster by 3.9
  10. AddSkillBonus(Target, GetSkillIDByName("Defense"), DefAmt)
  11. -- Increases Slashing of caster by 5.3
  12. -- Increases Piercing, Crushing and Ranged of caster by 5.3
  13. AddSkillBonus(Target, GetSkillIDByName("Slashing"), SkillAmt)
  14. AddSkillBonus(Target, GetSkillIDByName("Piercing"), SkillAmt)
  15. AddSkillBonus(Target, GetSkillIDByName("Crushing"), SkillAmt)
  16. AddSkillBonus(Target, GetSkillIDByName("Ranged"), SkillAmt)
  17. AddProc(Target, 3, 30)
  18. end
  19. function proc(Caster, Target, Type, DefAmt, SkillAmt, DmgType, DmgAmt)
  20. Level = GetLevel(Caster)
  21. SpellLevel = 13
  22. Mastery = SpellLevel + 10
  23. StatBonus = GetStr(Caster) / 10
  24. if Level < Mastery then
  25. LvlBonus = Level - SpellLevel
  26. else LvlBonus = Mastery - SpellLevel
  27. end
  28. DmgBonus = LvlBonus *2 + StatBonus
  29. TotalDmg = DmgAmt + math.floor(DmgBonus)
  30. if Type == 3 then
  31. ProcDamage(Caster, Target, "Interrupt", DmgType, TotalDmg)
  32. Interrupt(Caster, Target)
  33. end
  34. end
  35. function remove(Caster, Target)
  36. RemoveSkillBonus(Target)
  37. RemoveProc(Target)
  38. end