From e4d7a42a506c85db24bf831ea011df0805fd72d6 Mon Sep 17 00:00:00 2001 From: hppeng Date: Tue, 5 Jul 2022 23:51:16 -0700 Subject: [PATCH] Remove prints --- js/atree.js | 4 ++-- js/builder_graph.js | 2 -- js/display.js | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/js/atree.js b/js/atree.js index 5be32ca..ba72fca 100644 --- a/js/atree.js +++ b/js/atree.js @@ -564,7 +564,7 @@ const atree_stats = new (class extends ComputeNode { const { type, name, abil = "", value } = effect; // TODO: prop if (type === "stat") { - if (ret_effects.has(name)) { ret_effects.set(name, ret_effect.get(name) + value); } + if (ret_effects.has(name)) { ret_effects.set(name, ret_effects.get(name) + value); } else { ret_effects.set(name, value); } } } @@ -573,7 +573,7 @@ const atree_stats = new (class extends ComputeNode { const { base_spell, cost = 0} = effect; if (cost) { const key = "spRaw"+base_spell; - if (ret_effects.has(key)) { ret_effects.set(key, ret_effect.get(key) + cost); } + if (ret_effects.has(key)) { ret_effects.set(key, ret_effects.get(key) + cost); } else { ret_effects.set(key, cost); } } continue; diff --git a/js/builder_graph.js b/js/builder_graph.js index 5d58368..16b03ec 100644 --- a/js/builder_graph.js +++ b/js/builder_graph.js @@ -861,8 +861,6 @@ class AggregateStatsNode extends ComputeNode { compute_func(input_map) { const output_stats = new Map(); for (const [k, v] of input_map.entries()) { - console.log(k); - console.log(v); for (const [k2, v2] of v.entries()) { if (output_stats.has(k2)) { // TODO: ugly AF diff --git a/js/display.js b/js/display.js index bf50c67..8d83b0a 100644 --- a/js/display.js +++ b/js/display.js @@ -1573,7 +1573,6 @@ function getSpellCost(stats, spell) { function getBaseSpellCost(stats, spell) { // old intelligence: let cost = Math.ceil(spell.cost * (1 - skillPointsToPercentage(stats.get('int')) * skillpoint_final_mult[2])); - console.log(stats); cost += stats.get("spRaw"+spell.base_spell); return Math.floor(cost * (1 + stats.get("spPct"+spell.base_spell) / 100)); }