From 744cc4bab6251e64d3b920c310006f1709618aa4 Mon Sep 17 00:00:00 2001 From: tmont Date: Sun, 21 Feb 2021 20:41:27 -0800 Subject: [PATCH] fixed sorting and run rate calc --- web/server.js | 2 +- web/static/calc.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/server.js b/web/server.js index 6f8afd9..71acfc7 100644 --- a/web/server.js +++ b/web/server.js @@ -18,7 +18,7 @@ const render = (res, view, params) => { res.render(view, { ...params, charSpells: spells.spells.concat([]).sort((a, b) => { - if (a.power && b.power) { + if (a.power && !b.power) { return -1; } if (!a.power && b.power) { diff --git a/web/static/calc.js b/web/static/calc.js index a75ba56..e0ae798 100644 --- a/web/static/calc.js +++ b/web/static/calc.js @@ -177,7 +177,7 @@ targetSpeed += 30; } - const runRate = 0.25 + (1.6 * (attackerSpeed - targetSpeed)); + const runRate = 25 + (1.6 * (attackerSpeed - targetSpeed)); return Math.max(10, Math.min(80, runRate)); };