MastersSmite.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --[[
  2. Script Name : dd_debuff.lua
  3. Script Purpose : Generic damage + 1 effect script
  4. Script Author : John Adams
  5. Script Date : 2008.12.04
  6. Script Notes : Parameter 4 and 5 are the debuff type and value (param 6 if value is a range)
  7. --]]
  8. function cast(Caster, Target, DDType, MinDDVal, MaxDDVal, DebuffType, MinDebuffVal, MaxDebuffVal)
  9. -- Debuff component
  10. -- Determine if there is a range to effect values
  11. if MaxDebuffVal ~= nil and MinDebuffVal < MaxDebuffVal then
  12. -- JA: for debuff randoms (if any), need to to math.random with precision - I think this function rounds up?
  13. DebuffValue = math.random(MinDebuffVal, MaxDebuffVal)
  14. else
  15. DebuffValue = MinDebuffVal
  16. end
  17. -- Determine DebuffType - either a DamageType or a String value passed as param 4
  18. if DebuffType == "Attack" then
  19. -- ModifyAttackSpeed(Target, -DebuffValue)
  20. elseif DebuffType == "DPS" then
  21. -- ModifyDPS(Target, -DebuffValue)
  22. elseif DebuffType == "Disease" then
  23. -- ModifyDisease(Target, -DebuffValue)
  24. elseif DebuffType == "Power" then
  25. ModifyPower(Target, -DebuffValue)
  26. elseif DebuffType == "Knockback" then
  27. SpawnSet(Target, "visual_state", "10900")
  28. end
  29. -- DD component (instant damage)
  30. if MaxDDVal ~= nil and MinDDVal < MaxDDVal then
  31. SpellDamage(Target, DDType, math.random(MinDDVal, MaxDDVal))
  32. else
  33. SpellDamage(Target, DDType, MinDDVal)
  34. end
  35. end
  36. function tick(Caster, Target, DDType, MinDDVal, MaxDDVal, DebuffType, MinDebuffVal, MaxDebuffVal)
  37. end
  38. function remove(Caster, Target, DDType, MinDDVal, MaxDDVal, DebuffType, MinDebuffVal, MaxDebuffVal)
  39. end