1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- --[[
- Script Name : Spells/Priest/Cleric/BestowalofVitae.lua
- Script Author : LordPazuzu
- Script Date : 12/1/2022
- Script Purpose :
- :
- --]]
- -- When any damage is received this spell will cast Vitae on target.
- -- Heals target for 34 - 42
- -- Grants a total of 5 triggers of the spell.
- function cast(Caster, Target, MinVal, MaxVal, Triggers, SpellLevel)
- AddProc(Target, 15, 100)
- SetSpellTriggerCount(Triggers, 1)
- end
- function proc(Caster, Target, Type, MinVal, MaxVal, Triggers, SpellLevel)
-
- Level = GetLevel(Caster)
- Mastery = SpellLevel + 10
- StatBonus = GetWis(Caster) / 10
-
- if Level < Mastery then
- LvlBonus = Level - SpellLevel
- else LvlBonus = Mastery - SpellLevel
- end
- HealBonus = LvlBonus + StatBonus
- MinHeal = math.floor(HealBonus) * 2 + MinVal
- MaxHeal = math.floor(HealBonus) * 2 + MaxVal
-
-
-
- if Type == 15 then
- Spell = GetSpell(5455, GetSpellTier())
- SetSpellDataIndex(Spell, 0, MinHeal)
- SetSpellDataIndex(Spell, 1, MaxHeal)
- CastCustomSpell(Spell, Caster, Target)
- RemoveTriggerFromSpell()
- end
- end
- function remove(Caster, Target)
- RemoveProc(Target)
- end
|