From 4c0b5251cab6fcd416eff738f5865d5e29e59843 Mon Sep 17 00:00:00 2001 From: Vehn Date: Tue, 29 Jan 2019 23:25:18 -0600 Subject: [PATCH 1/2] Fix: specifying a skill lag of zero is now used. --- commands/cast.js | 2 +- skills/heal.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/cast.js b/commands/cast.js index 4efdd81..ba8c822 100644 --- a/commands/cast.js +++ b/commands/cast.js @@ -22,6 +22,6 @@ module.exports = { player.emit('useAbility', spell, targetArgs); }, label: `cast ${args}`, - }, spell.lag || state.Config.get('skillLag') || 1000); + }, spell.lag !== null ? spell.lag : (state.Config.get('skillLag') || 1000)); } }; diff --git a/skills/heal.js b/skills/heal.js index b0e3078..dc17efa 100644 --- a/skills/heal.js +++ b/skills/heal.js @@ -23,6 +23,7 @@ module.exports = { cost: energyCost, }, cooldown: 10, + lag: 1000, run: state => function (args, player, target) { const heal = new Heal('health', getHeal(player), player, this); From 0e5654fd4bf679149e9a7abf0d03967df9eaf211 Mon Sep 17 00:00:00 2001 From: Vehn Date: Wed, 30 Jan 2019 01:33:37 -0600 Subject: [PATCH 2/2] Fix: Previous check of null should have been undefined. --- commands/cast.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/cast.js b/commands/cast.js index ba8c822..0eeeed5 100644 --- a/commands/cast.js +++ b/commands/cast.js @@ -22,6 +22,6 @@ module.exports = { player.emit('useAbility', spell, targetArgs); }, label: `cast ${args}`, - }, spell.lag !== null ? spell.lag : (state.Config.get('skillLag') || 1000)); + }, spell.lag !== undefined ? spell.lag : (state.Config.get('skillLag') || 1000)); } };