HolyCircle.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : Spells/Fighter/Crusader/Paladin/HolyCircle.lua
  3. Script Author : Jabantiz(revamp Neatz09)
  4. Script Date : 2013.12.05 09:12:58
  5. Script Purpose : Revamped for pct heal 12/27/2020
  6. :
  7. --]]
  8. function cast(Caster, Target, DmgType, MinVal, MaxVal, HealMin, HealMax)
  9. local Val1 = HealMin
  10. local Val2 = HealMax
  11. local HealAmt = randomFloat(Val1, Val2)
  12. -- Inflicts 25 - 43 divine damage on targets in Area of Effect
  13. SpellDamage(Target, DmgType, MinVal, MaxVal)
  14. -- Heals group members (AE) for 13
  15. -- This effect cannot be critically applied.
  16. -- The healing of this spell cannot be modified except by direct means
  17. local group = GetGroup(Caster)
  18. if group == nil then
  19. SpellHealPct("Heal", HealAmt, false, true, Caster, 1, true)
  20. else
  21. for key,value in pairs(group) do
  22. if value ~= nil then
  23. if GetDistance(Caster, value) <= 5 then
  24. SpellHealPct("Heal", HealAmt, false, true, Caster, 1, true)
  25. end
  26. end
  27. end
  28. end
  29. end
  30. function randomFloat(Val1, Val2)
  31. return Val1 + math.random() * (Val2 - Val1);
  32. end