9
3

Freeze.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --[[
  2. Script Name : Spells/Mage/Sorcerer/Freeze.lua
  3. Script Author : neatz09
  4. Script Date : 2020.11.05 02:11:24
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 133 - 162 cold damage on target
  9. -- Stuns target
  10. -- If Target is not Epic
  11. -- Resistibility increases against targets higher than level 29.
  12. function cast(Caster, Target, DmgType, MinVal, MaxVal, SpellLevel)
  13. Say(Caster, "Resistability not implemented.")
  14. if not IsEpic() then
  15. AddControlEffect(Target, 4)
  16. end
  17. Level = GetLevel(Caster)
  18. Mastery = SpellLevel + 10
  19. StatBonus = GetInt(Caster) / 10
  20. if Level < Mastery then
  21. LvlBonus = Level - SpellLevel
  22. else LvlBonus = Mastery - SpellLevel
  23. end
  24. DmgBonus = LvlBonus + StatBonus
  25. MaxDmg = math.floor(DmgBonus) * 2 + MaxVal
  26. MinDmg = math.floor(DmgBonus) * 2 + MinVal
  27. SpellDamage(Target, DmgType, MinDmg, MaxDmg)
  28. end
  29. function remove(Caster, Target)
  30. RemoveControlEffect(Target, 4)
  31. end