From 6024c1014a727c5627ed0d0c5b919094361c6dfe Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 20 Aug 2018 11:14:03 -0300 Subject: Don't let Cure or Curasa cause knockback --- index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index d9796ed..693b5e3 100644 --- a/index.js +++ b/index.js @@ -19,9 +19,9 @@ const actionDatabase = { fira: {id: 'fira', chain: 'fire', label: 'Fira', size: 2, target: 'enemy', color: '#F77', damage: 40, stun: 0.2}, firaga: {id: 'firaga', chain: 'fire', label: 'Firaga', size: 3, target: 'enemy', color: '#F77', damage: 60, stun: 0.3}, - cure: {id: 'cure', chain: 'cure', label: 'Cure', size: 1, target: 'ally', color: '#AFA', heal: 80}, + cure: {id: 'cure', chain: 'cure', label: 'Cure', size: 1, target: 'ally', color: '#AFA', heal: 80, knockbackMultiplier: 0}, - curasa: {id: 'curasa', chain: 'curasa', label: 'Curasa', size: 1, target: 'ally', color: '#AFA', healRelativeToDamageTaken: 0.25}, + curasa: {id: 'curasa', chain: 'curasa', label: 'Curasa', size: 1, target: 'ally', color: '#AFA', healRelativeToDamageTaken: 0.25, knockbackMultiplier: 0}, blizz: {id: 'blizz', chain: 'blizz', label: 'Blizz', size: 1, target: 'enemy', color: '#AAF', damage: 15, stun: 0.2}, blizzara: {id: 'blizzara', chain: 'blizz', label: 'Blizzara', size: 2, target: 'enemy', color: '#AAF', damage: 30, stun: 0.35}, @@ -1315,8 +1315,10 @@ class MagicProjectile { if (rel) this.target.recoverHP(rel * (this.target.maxHP - this.target.hp)) } - this.target.xvel += 2 * xvel * this.target.knockbackMultiplier - this.target.yvel += 2 * yvel * this.target.knockbackMultiplier + const actionKB = 'knockbackMultiplier' in this.action ? this.action.knockbackMultiplier : 1 + + this.target.xvel += 2 * xvel * this.target.knockbackMultiplier * actionKB + this.target.yvel += 2 * yvel * this.target.knockbackMultiplier * actionKB this.discarded = true } -- cgit 1.3.0-6-gf8a5