9
3

MinorRitual.lua 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : Heal / Buff (Spell Type)
  3. Script Purpose : Generic script for Heal / Buff spells
  4. Script Author : John Adams
  5. Script Date : 2008.12.04
  6. --]]
  7. function cast(Caster, Target, HealType, HealMinVal, HealMaxVal, BuffType, BuffMinVal, BuffMaxVal)
  8. -- Heal component
  9. if HealMinVal < HealMaxVal then
  10. ModifyHP(Caster, math.random(HealMinVal, HealMaxVal))
  11. else
  12. ModifyHP(Caster, HealMinVal)
  13. end
  14. -- Buff component
  15. if BuffType ~= nil then
  16. if BuffType == "Health" then
  17. --SetMaxHP(Caster, GetMaxHP(Target) + BuffMinVal)
  18. AddSpellBonus(Target, 500, BuffMinVal)
  19. end
  20. -- do other buff types here
  21. end
  22. end
  23. function tick(Caster, Target, HealType, HealMinVal, HealMaxVal, BuffType, BuffMinVal, BuffMaxVal)
  24. if BuffType == "Health" then
  25. SetMaxHP(Caster, GetMaxHP(Target) + BuffMinVal)
  26. end
  27. -- do other buff types here
  28. end
  29. function remove(Caster, Target, HealType, HealMinVal, HealMaxVal, BuffType, BuffMinVal, BuffMaxVal)
  30. RemoveSpellBonus(Target)
  31. end