9
3

Curse.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : debuff.lua
  3. Script Purpose : Generic Debuff script
  4. Script Author : John Adams
  5. Script Date : 2008.12.05
  6. --]]
  7. function cast(Caster, Target, DebuffType, MinDebuffVal, MaxDebuffVal)
  8. -- Debuff component
  9. -- Determine if there is a range to effect values
  10. if MaxDebuffVal ~= nil and MinDebuffVal < MaxDebuffVal then
  11. -- JA: for debuff randoms (if any), need to to math.random with precision - I think this function rounds up?
  12. DebuffValue = math.random(MinDebuffVal, MaxDebuffVal)
  13. else
  14. DebuffValue = MinDebuffVal
  15. end
  16. -- Determine DebuffType - either a DamageType or a String value passed as param 1
  17. -- Need functionality to buff/debuff
  18. if DebuffType == "Defense" then
  19. -- ModifyDefense(Target, -DebuffValue)
  20. end
  21. if DebuffType == "Elemental" then
  22. -- ModifyHeat(Target, -DebuffValue)
  23. -- ModifyCold(Target, -DebuffValue)
  24. end
  25. if DebuffType == "Noxious" then
  26. -- ModifyPoison(Target, -DebuffValue)
  27. -- ModifyDisease(Target, -DebuffValue)
  28. end
  29. end
  30. function tick(Caster, Target, DebuffType, MinDebuffVal, MaxDebuffVal)
  31. end
  32. function remove(Caster, Target, DebuffType, MinDebuffVal, MaxDebuffVal)
  33. -- Need functionality to restore original mitigations
  34. if DebuffType == "Defense" then
  35. -- ModifyDefense(Target, Original)
  36. end
  37. if DebuffType == "Elemental" then
  38. -- ModifyHeat(Target, Original)
  39. -- ModifyCold(Target, Original)
  40. end
  41. if DebuffType == "Noxious" then
  42. -- ModifyPoison(Target, Original)
  43. -- ModifyDisease(Target, Original)
  44. end
  45. end