MinorFlorescence.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --[[
  2. Script Name : HoT (Spell Type)
  3. Script Purpose : Generic script for heal-over-time spells
  4. Script Author : John Adams
  5. Script Date : 2008.12.04
  6. Script Notes : JA: Need to determine if HoT's land instantly with the initial heal, or wait til tick()
  7. --]]
  8. function cast(Caster, Target, HealType, HealMinVal, HealMaxVal, HOTType, HOTMinVal, HOTMaxVal)
  9. -- Heal component
  10. if HealMinVal < HealMaxVal then
  11. ModifyHP(Caster, math.random(HealMinVal, HealMaxVal))
  12. else
  13. ModifyHP(Caster, HealMinVal)
  14. end
  15. -- HoT component
  16. if HOTType ~= nil then
  17. -- Determine if there is a range to HoT values
  18. if HOTMaxVal ~= nil and HOTMinVal < HOTMaxVal then
  19. ModifyHP(Caster, math.random(HOTMinVal, HOTMaxVal))
  20. else
  21. ModifyHP(Caster, HOTMinVal)
  22. end
  23. end
  24. end
  25. function tick(Caster, Target, HealType, HealMinVal, HealMaxVal, HOTType, HOTMinVal, HOTMaxVal)
  26. if HOTMaxVal ~= nil and HOTMinVal < HOTMaxVal then
  27. ModifyHP(Caster, math.random(HOTMinVal, HOTMaxVal))
  28. else
  29. ModifyHP(Caster, HOTMinVal)
  30. end
  31. end
  32. function remove(Caster, Target)
  33. -- code to remove the spell
  34. end