From a24dfa3e493ba72d5343dd6a8a8c0baa9bd51b12 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 22 Oct 2020 20:28:18 -0400 Subject: [PATCH] tweaks --- src/endWeek/economics/arcmgmt.js | 114 ++++++++++++++----------------- 1 file changed, 53 insertions(+), 61 deletions(-) diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index 7e04d58cc66..f3017efe54f 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -127,26 +127,7 @@ globalThis.arcmgmt = function() { expiration(); - /* Citizens turning into slaves*/ - if (V.policies.retirement.menial2Citizen === 1) { - if (V.customMenialRetirementAge >= 65) { - _banishedRatio = 0.475 - Math.clamp(V.customMenialRetirementAge / 200, 0.325, 0.475); - } else { - _banishedRatio = 0.9 - Math.clamp(V.customMenialRetirementAge / 100, 0.2, 0.65); - } - if (V.arcologies[0].FSSupremacistLawME + V.arcologies[0].FSSubjugationistLawME > 0) { - _banishedRatio *= 2 / 3; - } - _banished = Math.trunc((V.lowerClass * _welfareFS) * (0.05 + _banishedRatio)); - _enslaved = Math.trunc(V.lowerClass * _welfareFS) - _banished; - V.lowerClass -= _banished; - - // <br> - r.push(`<span class="red"> ${_banished} citizens were banished</span> from your arcology, they committed enslavable offenses but were too old to be enslaved.`); - } else { - _enslaved = Math.trunc(V.lowerClass * _welfareFS); - } - V.lowerClass -= _enslaved; + citizenToSlave(); updateWeather(); @@ -176,11 +157,11 @@ globalThis.arcmgmt = function() { } appendDiv(`${V.arcologies[0].name} is home to the following:`); appendDiv(`Lower Class Citizens | ${V.lowerClass} | ${_percLowerClass}%`); - appendDiv(`Middle Class Citizens | ${V.middleClass} | ${_percMiddleClass}% `); - appendDiv(`Upper Class Citizens | ${V.upperClass} | ${_percUpperClass}% `); + appendDiv(`Middle Class Citizens | ${V.middleClass} | ${_percMiddleClass}%`); + appendDiv(`Upper Class Citizens | ${V.upperClass} | ${_percUpperClass}%`); appendDiv(`Millionaires | ${V.topClass} | ${_percTopClass}%`); appendDiv(`Slaves | ${V.ASlaves} | ${_percASlaves}%`); - // <br> + r = []; if (V.arcologies[0].FSSupremacistLawME === 1) { r.push(`The citizenry is entirely ${V.arcologies[0].FSSupremacistRace}.`); @@ -216,14 +197,14 @@ globalThis.arcmgmt = function() { r.push(`The average slave is quite healthy.`); } else if (V.arcologies[0].FSTransformationFetishistSMR === 1) { if (V.arcologies[0].FSTransformationFetishistResearch === 1) { - r.push(`Breast implants are almost universal; `); + r.push(`Breast implants are almost universal;`); if (V.arcologies[0].FSSlimnessEnthusiast === "unset") { r.push(`an M-cup bust is below average among the slave population.`); } else { r.push(`even the most lithe slave sports a pair of overly round chest balloons.`); } } else { - r.push(`Breast implants are almost universal; `); + r.push(`Breast implants are almost universal;`); if (V.arcologies[0].FSSlimnessEnthusiast === "unset") { r.push(`a D-cup bust is below average among the slave population.`); } else { @@ -244,7 +225,7 @@ globalThis.arcmgmt = function() { if (V.arcologies[0].FSPetiteAdmirationSMR === 1) { r.push(`Slaves are both easy to identify, but hard to find in a crowd given their short stature.`); } else if (V.arcologies[0].FSStatuesqueGlorificationSMR === 1) { - r.push(`${V.arcologies[0].name}'s `); + r.push(`${V.arcologies[0].name}'s`); if (V.arcologies[0].FSStatuesqueGlorificationLaw === 1) { r.push(`entire`); } else { @@ -351,7 +332,6 @@ globalThis.arcmgmt = function() { cashX(_rents, "rents"); } - r.push(`This week, rents from ${V.arcologies[0].name} came to <span class="yellowgreen"> ${cashFormat(_rents)}.</span>`); if (V.difficultySwitch === 0) { if (V.localEcon < 100) { @@ -389,19 +369,9 @@ globalThis.arcmgmt = function() { Math.trunc(_menialEarnings *= 1.5); } if (V.menials > 1) { - r.push(`${num(V.menials)} menial slaves`); - if ((V.menialBioreactors > 0) && (V.fuckdolls === 0)) { - r.push(` and`); - } else { - r.push(`,`); - } + r.push(`${num(V.menials)} menial slaves${((V.menialBioreactors > 0) && (V.fuckdolls === 0)) ? ` and`:`,`}`); } else { - r.push(`one menial slave`); - if ((V.menialBioreactors > 0) && (V.fuckdolls === 0)) { - r.push(` and`); - } else { - r.push(`,`); - } + r.push(`one menial slave${((V.menialBioreactors > 0) && (V.fuckdolls === 0)) ? ` and`:`,`}`); } cashX(_menialEarnings, "menialTrades"); } @@ -690,13 +660,13 @@ globalThis.arcmgmt = function() { } if (V.garrison.reactorTime > 0) { r.push(`The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators.`); - r.push(`It will still take `); + r.push(`It will still take`); if (V.garrison.reactorTime > 1) { r.push(`${V.garrison.reactorTime} weeks`); } else { r.push(`a week`); } - r.push(` to finish repair works.`); + r.push(`to finish repair works.`); _AWeekGrowth -= random(1, 2); V.garrison.reactorTime--; IncreasePCSkills('engineering', 0.1); @@ -1447,7 +1417,7 @@ globalThis.arcmgmt = function() { let r; if (V.TSS.schoolPresent === 1) { r = []; - r.push(`The Slave School has a `); + r.push(`The Slave School has a`); if (V.TSS.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.TSS.schoolProsperity < -4) { @@ -1455,7 +1425,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch campus in ${V.arcologies[0].name}.`); + r.push(`branch campus in ${V.arcologies[0].name}.`); if (V.TSS.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -1479,7 +1449,7 @@ globalThis.arcmgmt = function() { if (V.TUO.schoolPresent === 1) { r = []; - r.push(`The Utopian Orphanage has a `); + r.push(`The Utopian Orphanage has a`); if (V.TUO.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.TUO.schoolProsperity < -4) { @@ -1487,7 +1457,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch campus in ${V.arcologies[0].name}.`); + r.push(`branch campus in ${V.arcologies[0].name}.`); if (V.TUO.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -1511,7 +1481,7 @@ globalThis.arcmgmt = function() { if (V.GRI.schoolPresent === 1) { r = []; - r.push(`The Growth Research Institute has a `); + r.push(`The Growth Research Institute has a`); if (V.GRI.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.GRI.schoolProsperity < -4) { @@ -1519,7 +1489,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` subsidiary lab in ${V.arcologies[0].name}.`); + r.push(`subsidiary lab in ${V.arcologies[0].name}.`); if (V.GRI.schoolProsperity >= 10) { r.push(`It is one of the finest research facilities in the world`); if (V.rep > 19000) { @@ -1543,7 +1513,7 @@ globalThis.arcmgmt = function() { if (V.TCR.schoolPresent === 1) { r = []; - r.push(`The Cattle Ranch has a `); + r.push(`The Cattle Ranch has a`); if (V.TCR.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.TCR.schoolProsperity < -4) { @@ -1551,7 +1521,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` local pasture in ${V.arcologies[0].name}.`); + r.push(`local pasture in ${V.arcologies[0].name}.`); if (V.TCR.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -1575,7 +1545,7 @@ globalThis.arcmgmt = function() { if (V.SCP.schoolPresent === 1) { r = []; - r.push(`St. Claver Preparatory has a `); + r.push(`St. Claver Preparatory has a`); if (V.SCP.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.SCP.schoolProsperity < -4) { @@ -1583,7 +1553,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch campus in ${V.arcologies[0].name}.`); + r.push(`branch campus in ${V.arcologies[0].name}.`); if (V.SCP.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -1607,7 +1577,7 @@ globalThis.arcmgmt = function() { if (V.LDE.schoolPresent === 1) { r = []; - r.push(`L'École des Enculées has a `); + r.push(`L'École des Enculées has a`); if (V.LDE.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.LDE.schoolProsperity < -4) { @@ -1615,7 +1585,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch campus in ${V.arcologies[0].name}.`); + r.push(`branch campus in ${V.arcologies[0].name}.`); if (V.LDE.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -1639,7 +1609,7 @@ globalThis.arcmgmt = function() { if (V.TGA.schoolPresent === 1) { r = []; - r.push(`The Gymnasium-Academy has a `); + r.push(`The Gymnasium-Academy has a`); if (V.TGA.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.TGA.schoolProsperity < -4) { @@ -1647,7 +1617,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch campus in ${V.arcologies[0].name}.`); + r.push(`branch campus in ${V.arcologies[0].name}.`); if (V.TGA.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -1671,7 +1641,7 @@ globalThis.arcmgmt = function() { if (V.TFS.schoolPresent === 1) { r = []; - r.push(`The Futanari Sisters have a `); + r.push(`The Futanari Sisters have a`); if (V.TFS.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.TFS.schoolProsperity < -4) { @@ -1679,7 +1649,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` community in ${V.arcologies[0].name}.`); + r.push(`community in ${V.arcologies[0].name}.`); if (V.TFS.schoolProsperity >= 10) { r.push(`They are one of the most renowned futa societies in the world`); if (V.rep > 19000) { @@ -1708,7 +1678,7 @@ globalThis.arcmgmt = function() { if (V.HA.schoolPresent === 1) { r = []; - r.push(`The Hippolyta Academy has a `); + r.push(`The Hippolyta Academy has a`); if (V.HA.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.HA.schoolProsperity < -4) { @@ -1716,7 +1686,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch in ${V.arcologies[0].name}.`); + r.push(`branch in ${V.arcologies[0].name}.`); if (V.HA.schoolProsperity >= 10) { r.push(`It is one of the most famous schools in the world`); if (V.rep > 19000) { @@ -1740,7 +1710,7 @@ globalThis.arcmgmt = function() { if (V.NUL.schoolPresent === 1) { r = []; - r.push(`Nueva Universidad de Libertad has a `); + r.push(`Nueva Universidad de Libertad has a`); if (V.NUL.schoolProsperity > 4) { r.push(`very prosperous`); } else if (V.NUL.schoolProsperity < -4) { @@ -1748,7 +1718,7 @@ globalThis.arcmgmt = function() { } else { r.push(`thriving`); } - r.push(` branch campus in ${V.arcologies[0].name}.`); + r.push(`branch campus in ${V.arcologies[0].name}.`); if (V.NUL.schoolProsperity >= 10) { r.push(`It is one of the finest slave schools in the world`); if (V.rep > 19000) { @@ -2246,6 +2216,28 @@ globalThis.arcmgmt = function() { App.Events.addParagraph(el, r); } + function citizenToSlave() { + /* Citizens turning into slaves*/ + if (V.policies.retirement.menial2Citizen === 1) { + if (V.customMenialRetirementAge >= 65) { + _banishedRatio = 0.475 - Math.clamp(V.customMenialRetirementAge / 200, 0.325, 0.475); + } else { + _banishedRatio = 0.9 - Math.clamp(V.customMenialRetirementAge / 100, 0.2, 0.65); + } + if (V.arcologies[0].FSSupremacistLawME + V.arcologies[0].FSSubjugationistLawME > 0) { + _banishedRatio *= 2 / 3; + } + _banished = Math.trunc((V.lowerClass * _welfareFS) * (0.05 + _banishedRatio)); + _enslaved = Math.trunc(V.lowerClass * _welfareFS) - _banished; + V.lowerClass -= _banished; + + appendDiv(`<span class="red"> ${_banished} citizens were banished</span> from your arcology, they committed enslavable offenses but were too old to be enslaved.`); + } else { + _enslaved = Math.trunc(V.lowerClass * _welfareFS); + } + V.lowerClass -= _enslaved; + } + function appendDiv(text) { const div = document.createElement("div"); $(div).append(text); -- GitLab