DevourVitae.lua 806 B

1234567891011121314151617181920212223
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/DevourVitae.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.12 08:10:36
  5. Script Purpose :
  6. :
  7. --]]
  8. -- Inflicts 97 - 119 disease damage on target
  9. function cast(Caster, Target, DmgType, MinVal, MaxVal, pctHealMin, pctHealMax)
  10. local Val1 = pctHealMin
  11. local Val2 = pctHealMax
  12. local HealAmt = randomFloat(Val1, Val2)
  13. SpellDamage(Target, DmgType, MinVal, MaxVal)
  14. -- Heals caster for 3.4 - 4.2% of max health
  15. -- This effect cannot be critically applied.
  16. -- The healing of this spell cannot be modified except by direct means
  17. SpellHealPct("Heal", HealAmt, false, true, Caster, 1, true)
  18. end
  19. function randomFloat(Val1, Val2)
  20. return Val1 + math.random() * (Val2 - Val1);
  21. end