SiphonStrike.lua 1010 B

123456789101112131415161718192021222324
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Shadowknight/SiphonStrike.lua
  3. Script Author : neatz09
  4. Script Date : 2019.10.11 07:10:15
  5. Script Purpose :
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, pctHealMin, pctHealMax, DmgType2, Minval2, MaxVal2)
  9. -- Inflicts 46 - 77 disease damage on target
  10. SpellDamage(Target, DmgType, MinVal, MaxVal)
  11. if LastSpellAttackHit() then
  12. -- Applies Life Draw on termination.
  13. -- Heals caster for 1.0 - 1.2% of max health
  14. -- This effect cannot be critically applied.
  15. -- The healing of this spell cannot be modified except by direct means
  16. Say(Caster, "Heal Min: " .. GetPCTOfHP(Caster, pctHealMin))
  17. local min2 = GetMaxHP(Caster) * (pctHealMin / 100)
  18. Say(Caster, "Heal Min2: " .. min2)
  19. SpellHeal("Heal", GetPCTOfHP(Caster, pctHealMin), GetPCTOfHP(Caster, pctHealMax),Caster, 2, 1)
  20. -- Inflicts 13 - 22 disease damage on target
  21. SpellDamage(Target, DmgType2, MinVal2, MaxVal2)
  22. end
  23. end