diff --git a/src/events/intro/initNationalities.tw b/src/events/intro/initNationalities.tw index 289aa70bc9e01632044bfcba89647272b057a259..e01e8a82ddcb63281fadc52e906fbe0f845aebe9 100644 --- a/src/events/intro/initNationalities.tw +++ b/src/events/intro/initNationalities.tw @@ -62,9 +62,9 @@ <<run repX(2000, "event")>> <<elseif $PC.visualAge < 35>> <<if $rep >= 2000>> - <<run repX(-2000, "event")>> + <<run repX(-2000, "event")>> <<else>> - <<set $rep = 0>> + <<run repX(-Math.abs($rep), "event")>> /*set rep to zero */ <</if>> <</if>> diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 999ac5010b9482d4f40e0aebcdfa2c28333b4d4f..3ed33fe7b2f07831c60a078402abd37f704dabdc 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -1105,7 +1105,8 @@ You should have received a copy of the GNU General Public License along with thi <<set $minimumSlaveCost = 2500>> <<set $facilityCost = 100>> <<set $enduringRep = 1000>> -<<set $rep = 1000>> +<<set $rep = 0>> +<<run repX(1000, "event")>> <<set $cashLastWeek = 0>> <<set $repLastWeek = 0>> diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 1ff71a07f7fc65e1bd222e0dac5eddb8f4bcbb1c..f90c1ca74f04cd1715ae2f916035370d829a407a 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -269,21 +269,21 @@ window.getSecurityExpansionCost = function() { } if (State.variables.militiaUnits != null) { for (var i = 0; i < State.variables.militiaUnits.length; i++) { - if( !(State.variables.militiaUnits[i] === null) ){ + if( !(State.variables.militiaUnits[i] === null) ) { secExpCost += State.variables.militiaUnits[i].troops * State.variables.soldierUpkeep * soldierMod; } } } if (State.variables.slaveUnits != null) { for (var i = 0; i < State.variables.slaveUnits.length; i++) { - if( !( State.variables.slaveUnits[i] === null) ){ + if( !( State.variables.slaveUnits[i] === null) ) { secExpCost += State.variables.slaveUnits[i].troops * State.variables.soldierUpkeep * 0.5 * soldierMod; } } } if (State.variables.mercUnits != null) { for (var i = 0; i < State.variables.mercUnits.length; i++) { - if( !(State.variables.mercUnits[i] === null) ){ + if( !(State.variables.mercUnits[i] === null) ) { secExpCost += State.variables.mercUnits[i].troops * State.variables.soldierUpkeep * 1.5 * soldierMod; } } @@ -1122,7 +1122,7 @@ window.cashX = function(cost, what, who) { } //record the slave, if available - if (typeof who !== 'undefined'){ + if (typeof who !== 'undefined') { who.lastWeeksCashIncome += cost; who.lifetimeCashIncome += cost; } @@ -1139,8 +1139,8 @@ window.cashX = function(cost, what, who) { } //record the slave, if available - if (typeof who !== 'undefined'){ - if (what === "slaveTransfer"){ + if (typeof who !== 'undefined') { + if (what === "slaveTransfer") { who.slaveCost = cost; } else { who.lifetimeCashExpenses += cost; @@ -1166,13 +1166,16 @@ window.repX = function(rep, what, who) { if(rep > 0) { //record the slave, if available - if (typeof who !== 'undefined'){ + if (typeof who !== 'undefined') { who.lastWeeksRepIncome += rep; who.lifetimeRepIncome += rep; } //record the action - if (typeof V.lastWeeksRepIncome[what] !== 'undefined') { + if (what === "cheating" || passage() == "init" || passage() == "init Nationalities") { + /*we don't want to curve anything on startup or for cheating.*/ + V.lastWeeksRepIncome[what] += rep; + } else if (typeof V.lastWeeksRepIncome[what] !== 'undefined') { rep = Math.round(Math.pow(1000 * rep + Math.pow(V.rep, 2), 0.5) - V.rep)* (V.corpEasy + 1); V.lastWeeksRepIncome[what] += rep; } else { @@ -1191,7 +1194,7 @@ window.repX = function(rep, what, who) { } //record the slave, if available - if (typeof who !== 'undefined'){ + if (typeof who !== 'undefined') { who.lastWeeksRepExpenses += rep; who.lifetimeRepExpenses += rep; }