From 870b68a66f0a9752dae0ac37a12a92b4ccee9de3 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Mon, 1 Mar 2021 06:30:18 -0500 Subject: [PATCH] unfuck incubator costs --- src/js/economyJS.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/js/economyJS.js b/src/js/economyJS.js index bd40f80198d..84275319232 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -572,22 +572,21 @@ globalThis.calculateCosts = (function() { } function getIncubatorCosts() { - let costs = 0; - if (V.incubator > 0) { - costs += ((V.incubatorUpgradeWeight + V.incubatorUpgradeMuscles + V.incubatorUpgradeReproduction + V.incubatorUpgradeGrowthStims + V.incubatorUpgradeOrgans) * 500); - if (V.incubatorUpgradePregAdaptation === 1) { - costs += 5000 * V.incubator; - } - } + const facIncMultiplier = V.facilityCost * V.incubator; + let costs = (facIncMultiplier * 10) + + 0.2 * V.incubatorUpgradeWeight * facIncMultiplier + + 0.2 * V.incubatorUpgradeMuscles * facIncMultiplier + + 0.2 * V.incubatorUpgradeReproduction * facIncMultiplier + + 0.2 * V.incubatorUpgradeGrowthStims * facIncMultiplier + + 0.2 * V.incubatorUpgradeOrgans * facIncMultiplier + + 0.5 * V.incubatorUpgradePregAdaptation * facIncMultiplier + + 0.5 * V.incubatorUpgradeSpeed * facIncMultiplier; return costs; } function getIncubatorSlavesCosts() { - const facIncMultiplier = V.facilityCost * V.tanks.length; - let costs = (facIncMultiplier * 10); - costs += (0.2 * V.incubatorWeightSetting + 0.2 * V.incubatorMusclesSetting + - 0.2 * V.incubatorReproductionSetting + 0.2 * V.incubatorGrowthStimsSetting + - 0.2 * V.incubatorPregAdaptationPower + 0.5 * V.incubatorUpgradeSpeed) * facIncMultiplier; + let costs = 0; + costs += ((V.incubatorUpgradeWeight + V.incubatorUpgradeMuscles + V.incubatorUpgradeReproduction + V.incubatorUpgradeGrowthStims + V.incubatorUpgradeOrgans + V.incubatorPregAdaptationPower) * 500 * V.tanks.length); return costs; } -- GitLab