Distract.lua 782 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : Spells/Priest/Cleric/Distract.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2022.12.01 09:12:33
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, Hate, MinVal, MaxVal)
  9. Level = GetLevel(Caster)
  10. SpellLevel = 13
  11. Mastery = SpellLevel + 10
  12. StatBonus = GetWis(Caster) / 10
  13. if Level < Mastery then
  14. LvlBonus = Level - SpellLevel
  15. else LvlBonus = Mastery - SpellLevel
  16. end
  17. HealBonus = LvlBonus *2 + StatBonus
  18. MinHeal = MinVal + math.floor(HealBonus)
  19. MaxHeal = MaxVal + math.floor(HealBonus)
  20. --SpellHeal("Heal", MinHeal, MaxHeal)
  21. ModifyHP(Caster, math.random(MinVal, MaxVal))
  22. AddHate(Caster, Target, Hate, 1)
  23. end