fixed sorting and run rate calc

This commit is contained in:
tmont 2021-02-21 20:41:27 -08:00
parent 5fe8b2f773
commit 744cc4bab6
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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));
};