BetaHeal.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : Spells/Commoner/BetaHeal.lua
  3. Script Purpose : Fast / High healing for Beta testers
  4. Script Author : John Adams
  5. Script Date : 2008.12.03
  6. Script Note : This heal has an instand heal + HoT
  7. --]]
  8. function cast(Caster, Target, HealType, HealMinVal, HealMaxVal, EffectType, EffectMinVal, EffectMaxVal)
  9. if HealType == "complete" then
  10. ModifyHP(Target, GetMaxHP(Target))
  11. else
  12. if HealMaxVal ~= nil and HealMinVal < HealMaxVal then
  13. ModifyHP(Target, math.random(HealMinVal, HealMaxVal))
  14. else
  15. ModifyHP(Target, HealMinVal)
  16. end
  17. end
  18. if EffectType ~= nil then
  19. if EffectType == "hot" then
  20. if EffectMaxVal ~= nil and EffectMinVal < EffectMaxVal then
  21. ModifyHP(Target, math.random(EffectMinVal, EffectMaxVal))
  22. else
  23. ModifyHP(Target, EffectMinVal)
  24. end
  25. end
  26. end
  27. end
  28. function tick(Caster, Target, HealType, HealMinVal, HealMaxVal, EffectType, EffectMinVal, EffectMaxVal)
  29. if EffectType ~= nil then
  30. if EffectType == "hot" then
  31. if EffectMaxVal ~= nil and EffectMinVal < EffectMaxVal then
  32. ModifyHP(Target, math.random(EffectMinVal, EffectMaxVal))
  33. else
  34. ModifyHP(Target, EffectMinVal)
  35. end
  36. end
  37. end
  38. end