diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index 64e5a67637416d778bd47e55cd912fe639c764c7..33b41f9455292d71d1a12cfe0c399ea36d0313db 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -106,20 +106,20 @@ App.EndWeek.arcManagement = function() { V.ACitizens = V.lowerClass + V.middleClass + V.upperClass + V.topClass; if (V.cheatMode === 1 || V.debugMode === 1) { appendDiv(`${V.arcologies[0].prosperity} Prosperity | ${_FSScore} FS Score | ${_honeymoon} Honeymoon | ${_transportHub} Transporthub | ${_terrain} Terrain | ${_crime} Crime`); - appendDiv(`${_LSCD} Lower + Slave Class Demand | ${_SCD} Slave Class Demand | ${_slaveProductivity} Slave Productivity`); - appendDiv(`${_LCD} Lower Class Demand | ${_lowerClassP} LC Multiplier`); - appendDiv(`${_MCD} Middle Class Demand | ${_middleClassP} MC Multiplier`); - appendDiv(`${_UCD} Upper Class Demand | ${_upperClassP} UC Multiplier`); - appendDiv(`${_TCD} Top Class Demand | ${_topClassP} TC Multiplier`); + appendDiv(`${num(_LSCD)} Lower + Slave Class Demand | ${num(_SCD)} Slave Class Demand | ${num(_slaveProductivity)} Slave Productivity`); + appendDiv(`${num(_LCD)} Lower Class Demand | ${num(_lowerClassP)} LC Multiplier`); + appendDiv(`${num(_MCD)} Middle Class Demand | ${num(_middleClassP)} MC Multiplier`); + appendDiv(`${num(_UCD)} Upper Class Demand | ${num(_upperClassP)} UC Multiplier`); + appendDiv(`${num(_TCD_} Top Class Demand | ${num(_topClassP)} TC Multiplier`); } const percOfPop = (n) => Math.trunc((n / (V.ACitizens + V.ASlaves)) * 1000) / 10; appendDiv(`${V.arcologies[0].name} is home to the following:`); - appendDiv(`Citizens | ${V.ACitizens} | ${percOfPop(V.ACitizens)}%`); - appendDiv(`Lower Class Citizens | ${V.lowerClass} | ${percOfPop(V.lowerClass)}%`); - appendDiv(`Middle Class Citizens | ${V.middleClass} | ${percOfPop(V.middleClass)}%`); - appendDiv(`Upper Class Citizens | ${V.upperClass} | ${percOfPop(V.upperClass)}%`); - appendDiv(`Millionaires | ${V.topClass} | ${percOfPop(V.topClass)}%`); - appendDiv(`Slaves | ${V.ASlaves} | ${percOfPop(V.ASlaves)}%`); + appendDiv(`Citizens | ${num(V.ACitizens)} | ${percOfPop(V.ACitizens)}%`); + appendDiv(`Lower Class Citizens | ${num(V.lowerClass)} | ${percOfPop(V.lowerClass)}%`); + appendDiv(`Middle Class Citizens | ${num(V.middleClass)} | ${percOfPop(V.middleClass)}%`); + appendDiv(`Upper Class Citizens | ${num(V.upperClass)} | ${percOfPop(V.upperClass)}%`); + appendDiv(`Millionaires | ${num(V.topClass)} | ${percOfPop(V.topClass)}%`); + appendDiv(`Slaves | ${num(V.ASlaves)} | ${percOfPop(V.ASlaves)}%`); r = []; if (V.arcologies[0].FSSupremacistLawME === 1) { @@ -256,8 +256,7 @@ App.EndWeek.arcManagement = function() { r.push(`Food vendors are offered subsidized rent and operating expenses to set up shop in your arcology.`); } if (V.secExpEnabled > 0) { - if (V.SecExp.edicts.alternativeRents === 1) { - /* A silly policy*/ + if (V.SecExp.edicts.alternativeRents === 1) { // A silly policy r.push(`Your citizens are allowed to pay their rents in slaves rather than cash and a few financially challenged individuals make use of this.`); _rentMultiplier *= 0.95; const _movement = random(0, 3); @@ -411,8 +410,7 @@ App.EndWeek.arcManagement = function() { if (V.arcologies[0].prosperity < (V.rep / 100)) { r.push(`Your impressive reputation relative to ${V.arcologies[0].name}'s prosperity <span class="green">drives an increase in business.</span>`); _AWeekGrowth++; - } else if (V.rep > 18000) { - /* no growth penalty if PC is at high rep, no matter how high prosperity goes */ + } else if (V.rep > 18000) { // no growth penalty if PC is at high rep, no matter how high prosperity goes } else if (V.arcologies[0].prosperity > (V.rep / 60)) { r.push(`Your low reputation relative to ${V.arcologies[0].name}'s prosperity <span class="red">seriously impedes business growth.</span>`); _AWeekGrowth -= 2; @@ -530,7 +528,7 @@ App.EndWeek.arcManagement = function() { _AWeekGrowth--; } - /* deactivated with sec Exp as they are modifiers for the trade mechanic */ + // deactivated with sec Exp as they are modifiers for the trade mechanic if (V.secExpEnabled === 0) { if (V.terrain === "urban") { r.push(`Since your arcology is located in the heart of an urban area, its commerce is naturally vibrant.`); @@ -656,7 +654,6 @@ App.EndWeek.arcManagement = function() { let _popCap = menialPopCap(); let _menialSlaveValue = menialSlaveCost(); const {HeM, heM} = getPronouns(assistant.pronouns().market).appendSuffix('M'); - // <br> r.push(`Your <span class="bold">business assistant</span> manages the menial slave market.`); if (_menialSlaveValue <= 900 + V.assistant.market.aggressiveness) { /* BUY */ let _bulkMax = _popCap.value - V.menials - V.fuckdolls - V.menialBioreactors; @@ -1453,8 +1450,8 @@ App.EndWeek.arcManagement = function() { V.menials += _enslavedPC; V.NPCSlaves += _enslavedNPC; if (_enslaved > 1) { - appendDiv(`In total <span class="green">${_enslaved} lower class citizens</span> were enslaved for failing to pay their debts.`); - appendDiv(`<span class="green">You enslaved ${_enslavedPC}</span> of them while other debtholders in the arcology enslaved the remaining ${_enslavedNPC}.`); + appendDiv(`In total <span class="green">${num(_enslaved)} lower class citizens</span> were enslaved for failing to pay their debts.`); + appendDiv(`<span class="green">You enslaved ${num(_enslavedPC)}</span> of them while other debtholders in the arcology enslaved the remaining ${num(_enslavedNPC)}.`); } else { appendDiv(`<span class="green">As arcology owner you claimed the slave.</span>`); } @@ -1493,7 +1490,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`<span class="red">Visitors is NaN, report this issue!</span>`); V.visitors = _oldVisitors; } - appendDiv(`<span class="green">${V.visitors} traders and tourists</span> visited your arcology this week.`); + appendDiv(`<span class="green">${num(V.visitors)} traders and tourists</span> visited your arcology this week.`); appendDiv(App.SecExp.propagandaEffects("enslavement").text); _enslaved += App.SecExp.propagandaEffects("enslavement").effect; @@ -1506,7 +1503,7 @@ App.EndWeek.arcManagement = function() { if (_weeklyRetiredMenials > 1) { _weeklyRetiredMenials = Math.trunc(_weeklyRetiredMenials); if (_weeklyRetiredMenials > 1) { - appendDiv(`<span class="red">${_weeklyRetiredMenials} of your menial slaves</span> retired as free citizens this week.`); + appendDiv(`<span class="red">${num(_weeklyRetiredMenials)} of your menial slaves</span> retired as free citizens this week.`); } else { appendDiv(`<span class="red">One of your menial slaves</span> retired as a free citizen this week.`); } @@ -1522,7 +1519,7 @@ App.EndWeek.arcManagement = function() { if (_weeklyRetiredNPCMenials > 1) { _weeklyRetiredNPCMenials = Math.trunc(_weeklyRetiredNPCMenials); if (_weeklyRetiredNPCMenials > 1) { - appendDiv(`<span class="red">${_weeklyRetiredNPCMenials} menial slaves</span> were retired as free citizens by other slave owners in your arcology this week.`); + appendDiv(`<span class="red">${num(_weeklyRetiredNPCMenials)} menial slaves</span> were retired as free citizens by other slave owners in your arcology this week.`); } else { appendDiv(`<span class="red">One menial slave</span> was retired as a free citizen by another slave owner in your arcology this week.`); } @@ -1554,7 +1551,7 @@ App.EndWeek.arcManagement = function() { V.menialDemandFactor -= _NPCSlavesSold; V.NPCSlaves = Math.trunc(_SCD * 1.6); if (_NPCSlavesSold > 1) { - appendDiv(`<span class="red">${_NPCSlavesSold}</span> slaves were sold by your inhabitants. They've got more than enough of them already.`); + appendDiv(`<span class="red">${num(_NPCSlavesSold)}</span> slaves were sold by your inhabitants. They've got more than enough of them already.`); } else if (_NPCSlavesSold > 0) { appendDiv(`<span class="red">One slave</span> was sold by your inhabitants. They've got more than enough of them already.`); } @@ -1564,7 +1561,7 @@ App.EndWeek.arcManagement = function() { V.menialDemandFactor -= _NPCSlavesSold; V.NPCSlaves = Math.trunc(_LSCD / _slaveProductivity); if (_NPCSlavesSold > 1) { - appendDiv(`<span class="red">${_NPCSlavesSold}</span> slaves were sold by your inhabitants. There was so little work that they failed to earn their keep.`); + appendDiv(`<span class="red">${num(_NPCSlavesSold)}</span> slaves were sold by your inhabitants. There was so little work that they failed to earn their keep.`); } else if (_NPCSlavesSold > 0) { appendDiv(`<span class="red">One slave</span> was sold by your inhabitants. There was so little work that it failed to earn its keep.`); } @@ -1575,7 +1572,7 @@ App.EndWeek.arcManagement = function() { V.menialDemandFactor -= _NPCSlavesSold; V.NPCSlaves -= _NPCSlavesSold; if (_NPCSlavesSold > 1) { - appendDiv(`<span class="red">${_NPCSlavesSold}</span> slaves were sold by your inhabitants. They've got more than enough of them already.`); + appendDiv(`<span class="red">${num(_NPCSlavesSold)}</span> slaves were sold by your inhabitants. They've got more than enough of them already.`); } else if (_NPCSlavesSold > 0) { appendDiv(`<span class="red">One slave</span> was sold by your inhabitants. They've got more than enough of them already.`); } @@ -1587,7 +1584,7 @@ App.EndWeek.arcManagement = function() { V.menialDemandFactor -= _NPCSlavesSold; V.NPCSlaves -= _NPCSlavesSold; if (_NPCSlavesSold > 1) { - appendDiv(`<span class="red">${_NPCSlavesSold}</span> were sold by your inhabitants. They saw an opportunity for profit.`); + appendDiv(`<span class="red">${num(_NPCSlavesSold)}</span> were sold by your inhabitants. They saw an opportunity for profit.`); } else if (_NPCSlavesSold > 0) { appendDiv(`<span class="red">One slave</span> was sold by your inhabitants. They saw an opportunity for profit.`); } @@ -1600,7 +1597,7 @@ App.EndWeek.arcManagement = function() { V.menialSupplyFactor -= _NPCSlavesBought; V.NPCSlaves += _NPCSlavesBought; if (_NPCSlavesBought > 1) { - appendDiv(`<span class="green">${_NPCSlavesBought} slaves</span> were bought by your inhabitants. They were too cheap to pass up on.`); + appendDiv(`<span class="green">${num(_NPCSlavesBought)} slaves</span> were bought by your inhabitants. They were too cheap to pass up on.`); } /* there's no way this ever ends up needing a 1 slave version*/ } } @@ -1630,12 +1627,12 @@ App.EndWeek.arcManagement = function() { const _intellectualDependencyEnslaved = Math.trunc(_LCImmigration * 0.25); _LCImmigration -= _intellectualDependencyEnslaved; _enslaved += _intellectualDependencyEnslaved; - r.push(`<span class="green">${_intellectualDependencyEnslaved} dumb immigrants</span> were enslaved for their own good.`); + r.push(`<span class="green">${num(_intellectualDependencyEnslaved)} dumb immigrants</span> were enslaved for their own good.`); } V.lowerClass += _LCImmigration; if (_LCImmigration > 1) { - r.push(`<span class="green">${_LCImmigration} lower class citizens</span> moved to your arcology.`); + r.push(`<span class="green">${num(_LCImmigration)} lower class citizens</span> moved to your arcology.`); } else if (_LCImmigration > 0) { r.push(`<span class="green">One lower class citizen</span> moved to your arcology.`); } @@ -1646,9 +1643,9 @@ App.EndWeek.arcManagement = function() { V.lowerClass -= _LCEmigration; _enslaved += _enslavedEmigrants; if (_LCEmigration > 1) { - r.push(`<span class="red">${_LCEmigration} lower class citizens</span> had no work and tried to leave your arcology.`); + r.push(`<span class="red">${num(_LCEmigration)} lower class citizens</span> had no work and tried to leave your arcology.`); if (_enslavedEmigrants > 1) { - r.push(`<span class="green">${_enslavedEmigrants} of them were enslaved instead.</span>`); + r.push(`<span class="green">${num(_enslavedEmigrants)} of them were enslaved instead.</span>`); } else if (_enslavedEmigrants > 0) { r.push(`<span class="green">One of them was enslaved instead.</span>`); } @@ -1664,7 +1661,7 @@ App.EndWeek.arcManagement = function() { V.menialSupplyFactor -= _NPCSlavesBought; V.NPCSlaves += _NPCSlavesBought; if (_NPCSlavesBought > 1) { - appendDiv(`<span class="green">${_NPCSlavesBought} slaves</span> were bought by your inhabitants. They did not have enough of them to satisfy their needs.`); + appendDiv(`<span class="green">${num(_NPCSlavesBought)} slaves</span> were bought by your inhabitants. They did not have enough of them to satisfy their needs.`); } else if (_NPCSlavesBought > 0) { appendDiv(`<span class="green">One slave</span> was bought by your inhabitants. They did not quite have enough of them to satisfy their needs.`); } @@ -1693,7 +1690,7 @@ App.EndWeek.arcManagement = function() { const _MCImmigration = Math.trunc((_MCD - V.middleClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; V.middleClass += _MCImmigration; if (_MCImmigration > 1) { - appendDiv(`<span class="green">${_MCImmigration} middle class citizens</span> moved to your arcology.`); + appendDiv(`<span class="green">${num(_MCImmigration)} middle class citizens</span> moved to your arcology.`); } else if (_MCImmigration > 0) { appendDiv(`<span class="green">One middle class citizen</span> moved to your arcology.`); } @@ -1702,7 +1699,7 @@ App.EndWeek.arcManagement = function() { const _MCEmigration = Math.trunc((V.middleClass - _MCD) * 0.4); V.middleClass -= _MCEmigration; if (_MCEmigration > 1) { - appendDiv(`<span class="red">${_MCEmigration} middle class citizens</span> left your arcology.`); + appendDiv(`<span class="red">${num(_MCEmigration)} middle class citizens</span> left your arcology.`); } else if (_MCEmigration > 0) { appendDiv(`<span class="red">One middle class citizen</span> left your arcology.`); } @@ -1731,7 +1728,7 @@ App.EndWeek.arcManagement = function() { const _UCImmigration = Math.trunc((_UCD - V.upperClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; V.upperClass += _UCImmigration; if (_UCImmigration > 1) { - appendDiv(`<span class="green">${_UCImmigration} upper class citizens</span> moved to your arcology.`); + appendDiv(`<span class="green">${num(_UCImmigration)} upper class citizens</span> moved to your arcology.`); } else if (_UCImmigration > 0) { appendDiv(`<span class="green">One upper class citizen</span> moved to your arcology.`); } @@ -1740,7 +1737,7 @@ App.EndWeek.arcManagement = function() { const _UCEmigration = Math.trunc((V.upperClass - _UCD) * 0.4); V.upperClass -= _UCEmigration; if (_UCEmigration > 1) { - appendDiv(`<span class="red">${_UCEmigration} upper class citizens</span> left your arcology.`); + appendDiv(`<span class="red">${num(_UCEmigration)} upper class citizens</span> left your arcology.`); } else if (_UCEmigration > 0) { appendDiv(`<span class="red">One upper class citizen</span> left your arcology.`); } @@ -1775,7 +1772,7 @@ App.EndWeek.arcManagement = function() { const _TCImmigration = Math.trunc((_TCD - V.topClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus.effect; V.topClass += _TCImmigration; if (_TCImmigration > 1) { - appendDiv(`<span class="green">${_TCImmigration} millionaires</span> moved to your arcology.`); /* Fat Cat? One-Percenter? */ + appendDiv(`<span class="green">${num(_TCImmigration)} millionaires</span> moved to your arcology.`); /* Fat Cat? One-Percenter? */ } else if (_TCImmigration > 0) { appendDiv(`<span class="green">One millionaire</span> moved to your arcology.`); } @@ -1784,7 +1781,7 @@ App.EndWeek.arcManagement = function() { const _TCEmigration = Math.trunc((V.topClass - _TCD) * 0.4) + 1; V.topClass -= _TCEmigration; if (_TCEmigration > 1) { - appendDiv(`<span class="red">${_TCEmigration} millionaires</span> left your arcology.`); + appendDiv(`<span class="red">${num(_TCEmigration)} millionaires</span> left your arcology.`); } else if (_TCEmigration > 0) { appendDiv(`<span class="red">One millionaire</span> left your arcology.`); } @@ -1815,12 +1812,12 @@ App.EndWeek.arcManagement = function() { V.citizenRetirementTrigger = 2; r.push(`You have enacted citizen retirement, the slaves of eligible age are granted freedom.`); if (_menialsRetirement > 1) { - r.push(`<span class="red">${_menialsRetirement} of your menial slaves</span> were retired.`); + r.push(`<span class="red">${num(_menialsRetirement)} of your menial slaves</span> were retired.`); } else if (_menialsRetirement > 0) { r.push(`<span class="red">One of your menial slaves</span> was retired.`); } if (_ASlavesRetirement > 1) { - r.push(`<span class="red">${_ASlavesRetirement} slaves</span> in your arcology were given a citizen retirement.`); + r.push(`<span class="red">${num(_ASlavesRetirement)} slaves</span> in your arcology were given a citizen retirement.`); } /* I could bother with a single slave retirement message, but that's never going to get used*/ } @@ -1874,7 +1871,7 @@ App.EndWeek.arcManagement = function() { r.push(`<span class="red">${capFirstChar(numberWithPluralOne(_expiration, "slave"))} died</span> due to the tough working conditions in your arcology.`); } if (_expirationPC > 1) { - r.push(`Of which <span class="red">${_expirationPC} were yours.</span>`); + r.push(`Of which <span class="red">${num(_expirationPC)} were yours.</span>`); } else if (_expirationPC > 0) { r.push(`<span class="red">One of them was yours.</span>`); }