From 59f28f695650b1772e4f66c2384a46ac850ad0a1 Mon Sep 17 00:00:00 2001 From: hppeng Date: Thu, 30 Jun 2022 20:35:34 -0700 Subject: [PATCH] HOTFIX: fix spellparts that don't already exist --- js/atree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/atree.js b/js/atree.js index f82511c..3c954d3 100644 --- a/js/atree.js +++ b/js/atree.js @@ -487,7 +487,8 @@ const atree_collect_spells = new (class extends ComputeNode { } else if ('hits' in effect) { for (const [idx, v] of Object.entries(effect.hits)) { // looks kinda similar to multipliers case... hmm... can we unify all of these three? (make healpower a list) - part.hits[idx] += v; + if (idx in part.hits) { part.hits[idx] += v; } + else { part.hits[idx] = v; } } } else {