You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
703 B

  1. let combat = require('../../combat/combat');
  2. module.exports = {
  3. type: 'lifeDrain',
  4. amount: 0,
  5. scaleDamage: {
  6. isAttack: false,
  7. damage: 1,
  8. element: undefined,
  9. noScale: false,
  10. noMitigate: false,
  11. noCrit: false
  12. },
  13. events: {
  14. afterTick: function () {
  15. const { isAttack, damage, element, noScale, noMitigate, noCrit } = this.scaleDamage;
  16. const damageEvent = combat.getDamage({
  17. source: this.caster,
  18. target: this.obj,
  19. isAttack,
  20. damage,
  21. element,
  22. noScale,
  23. noMitigate,
  24. noCrit
  25. });
  26. this.obj.stats.takeDamage({
  27. damage: damageEvent,
  28. threatMult: 1,
  29. source: this.caster,
  30. target: this.obj,
  31. effectName: 'lifeDrain'
  32. });
  33. }
  34. }
  35. };