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.
 
 
 

52 lines
852 B

  1. module.exports = {
  2. type: 'singleTargetHeal',
  3. cdMax: 20,
  4. manaCost: 0,
  5. range: 9,
  6. healing: 1,
  7. needLos: true,
  8. targetFriendly: true,
  9. spellType: 'heal',
  10. particleDuration: 10,
  11. cast: function (action) {
  12. const target = action.target;
  13. const { x, y } = target;
  14. const heal = this.getDamage(target, true);
  15. heal.noEvents = this.noEvents;
  16. const event = {
  17. heal,
  18. source: this.obj,
  19. target,
  20. spellName: 'singleTargetHeal',
  21. spell: this
  22. };
  23. target.stats.getHp(event);
  24. const effect = {
  25. x,
  26. y,
  27. components: [{
  28. type: 'particles',
  29. //This ttl is in frames (each frame is roughly 1000 / 60 ms)
  30. ttl: (1000 / 60) * this.particleDuration,
  31. destroyObject: true,
  32. blueprint: this.particles
  33. }]
  34. };
  35. this.obj.instance.syncer.queue('onGetObject', effect, -1);
  36. this.sendBump(target);
  37. return true;
  38. }
  39. };