12345678910111213141516171819202122232425262728293031323334353637 |
- --[[
- Script Name : Spells/Scout/Ambush.lua
- Script Author : LordPazuzu
- Script Date : 12/8/2022
- Script Purpose :
- :
- --]]
- function precast(Caster, Target)
- -- You must be sneaking to use this ability.
- if IsStealthed(Caster) then
- return true
- end
- SendMessage(Caster, "You must be sneaking to use this ability.", "yellow")
- return false
- end
- function cast(Caster, Target, DmgType, MinVal, MaxVal, SpellLevel)
- Level = GetLevel(Caster)
- Mastery = SpellLevel + 10
- StatBonus = GetStr(Caster) / 10
-
- if Level < Mastery then
- LvlBonus = Level - SpellLevel
- else LvlBonus = Mastery - SpellLevel
- end
-
- DmgBonus = LvlBonus + StatBonus
- MaxDmg = MaxVal + math.floor(DmgBonus)
- MinDmg = MinVal + math.floor(DmgBonus)
-
- SpellDamage(Target, DmgType, MinDmg, MaxDmg)
-
- end
|