From 091ff24b9f98060e569bf6d4ffb3a3d1e801d87c Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Mon, 5 Oct 2020 21:38:50 -0400 Subject: [PATCH] Fixed bugs with hasMilestone and incr_order --- js/game.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/game.js b/js/game.js index 244722f..5d99cf9 100644 --- a/js/game.js +++ b/js/game.js @@ -162,8 +162,9 @@ function doReset(layer, force=false) { needCanvasUpdate = true; if (layers[layer].incr_order){ - for (lr in layers[layer].incr_order) - if (!player[lr].unl) player[lr].order++ + lrs = layers[layer].incr_order + for (lr in lrs) + if (!player[lrs[lr]].unl) player[lrs[lr]].order++ } } @@ -205,7 +206,7 @@ function hasUpg(layer, id){ } function hasMilestone(layer, id){ - return (player[layer].milestones.includes(toNumber(id))) + return (player[layer].milestones.includes(toNumber(id)) || player[layer].milestones.includes(id)) } function hasChall(layer, id){