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
717 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 amount = this.getDamage(target, true);
  15. target.stats.getHp(amount, this.obj);
  16. const effect = {
  17. x,
  18. y,
  19. components: [{
  20. type: 'particles',
  21. //This ttl is in frames (each frame is roughly 1000 / 60 ms)
  22. ttl: (1000 / 60) * this.particleDuration,
  23. destroyObject: true,
  24. blueprint: this.particles
  25. }]
  26. };
  27. this.obj.instance.syncer.queue('onGetObject', effect, -1);
  28. this.sendBump(target);
  29. return true;
  30. }
  31. };