diff --git a/src/js/economyJS.tw b/src/js/economyJS.tw index 1286da2dee58a3a0526ad28ab0e50705ab858867..2bde6716221dc24fe55f508e6f4229c4196ec7c2 100644 --- a/src/js/economyJS.tw +++ b/src/js/economyJS.tw @@ -65,7 +65,6 @@ window.predictCost = function(array) { window.getCost = function(array) { var array2 = array; var oldCash = State.variables.cash; - var fee = 0; var costSoFar = 0; cashX(forceNeg(getBrothelCosts()), "brothel"); cashX(forceNeg(getBrothelAdsCosts()), "brothelAds"); @@ -97,13 +96,11 @@ window.getCost = function(array) { //these two apply a multiplicative effect to all costs so far. // Calculate what the deduced expenses would be, then subtract - costSoFar = (oldCash - State.variables.cash); //expected to be positive. - fee = (costSoFar - getEnvironmentCosts(costSoFar)); - cashX(forceNeg(fee), "environment"); + costSoFar = (oldCash - State.variables.cash); //How much we have spent by this point; expected to be positive. + cashX(forceNeg(costSoFar - getEnvironmentCosts(costSoFar), "environment")); //getEnv takes total costs and makes it worse. Figure out how much worse and record it costSoFar = (oldCash - State.variables.cash); - fee = (costSoFar - getPCMultiplierCosts(costSoFar)); - cashX(forceNeg(fee), "PCskills"); + cashX(forceNeg(costSoFar - getPCMultiplierCosts(costSoFar)), "PCskills"); //in the old order these were applied after multiplication. Not sure if deliberate, but I'm leaving it for now. cashX(forceNeg(getSFCosts()), "specialForces");