diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js index 564534e390935d1a6a8509d96614c84d8dacef89..7a17f071a096725c51081b4ce3d8e397a79f3171 100644 --- a/js/003-data/miscData.js +++ b/js/003-data/miscData.js @@ -1950,7 +1950,18 @@ App.Data.misc = { secExCombatPrestige: ["$He is well known for being a great commander.", "$He is famous for being an incredible commander.", "$He is known as a legendary commander all over the world."], - schools: ["GRI", "HA", "NUL", "SCP", "TCR", "TFS", "TGA", "TSS", "LDE", "TUO"], + schools: new Map([ + ["GRI", {title:"Growth Research Institute", branchName:"subsidiary lab"}], + ["HA", {title:"The Hippolyta Academy", branchName:"branch campus"}], + ["NUL", {title:"Nueva Universidad de Libertad", branchName:"branch campus"}], + ["SCP", {title:"St. Claver Preparatory", branchName:"branch campus"}], + ["TCR", {title:"The Cattle Ranch", branchName:"local pasture"}], + ["TFS", {title:"The Futanari Sisters", branchName:"community"}], + ["TGA", {title:"The Gymnasium-Academy", branchName:"branch campus"}], + ["TSS", {title:"The Slavegirl School", branchName:"branch campus"}], + ["LDE", {title:"L'École des Enculées", branchName:"branch campus"}], + ["TUO", {title:"The Utopian Orphanage", branchName:"branch campus"}] + ]), bioreactorFluids: { XX: { @@ -2000,7 +2011,7 @@ App.Data.misc.lawlessMarkets = [ "neighbor", "wetware", "white collar", - ...App.Data.misc.schools + ...App.Data.misc.schools.keys() ]; App.Data.weather = { diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index c8f624d907f92acde7465de2cf5e652b123c45ea..343085d31545b0c84174454f7aeac1188c458c12 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -95,9 +95,9 @@ globalThis.arcmgmt = function() { el.append(fsImpact()); el.append(policiesImpact()); - const schoolSubsidy = App.Data.misc.schools.reduce((acc, current) => acc + V[current].subsidize, 0); + const schoolSubsidy = Array.from(App.Data.misc.schools.keys()).reduce((acc, current) => acc + V[current].subsidize, 0); _middleClass += (schoolSubsidy) * 40; - _middleClass *= 1 + (schoolSubsidy) * 0.005; + _middleClassP *= 1 + (schoolSubsidy) * 0.005; slaveRetirement(); @@ -132,6 +132,7 @@ globalThis.arcmgmt = function() { appendDiv(`${_TCD} Top Class Demand | ${_topClassP} TC Multiplier`); } appendDiv(`${V.arcologies[0].name} is home to the following:`); + appendDiv(`Citizens | ${V.ACitizens} | ${_percACitizens}%`); appendDiv(`Lower Class Citizens | ${V.lowerClass} | ${_percLowerClass}%`); appendDiv(`Middle Class Citizens | ${V.middleClass} | ${_percMiddleClass}%`); appendDiv(`Upper Class Citizens | ${V.upperClass} | ${_percUpperClass}%`); @@ -344,9 +345,9 @@ globalThis.arcmgmt = function() { _menialEarnings = Math.trunc(_menialEarnings * 1.5); } if (V.menials > 1) { - r.push(`${num(V.menials)} menial slaves${((V.menialBioreactors > 0) && (V.fuckdolls === 0)) ? ` and`:`,`}`); + r.push(`${num(V.menials)} menial slaves${((V.menialBioreactors > 0) && (V.fuckdolls === 0)) ? ` and` : `,`}`); } else { - r.push(`one menial slave${((V.menialBioreactors > 0) && (V.fuckdolls === 0)) ? ` and`:`,`}`); + r.push(`one menial slave${((V.menialBioreactors > 0) && (V.fuckdolls === 0)) ? ` and` : `,`}`); } cashX(_menialEarnings, "menialTrades"); } @@ -726,7 +727,7 @@ globalThis.arcmgmt = function() { cashX(_cashX, "menialBioreactorsTransferA"); } } else { - r.push(`Prices are average, so${heM} does not make any significant moves.`); + r.push(`Prices are average, so ${heM} does not make any significant moves.`); } App.Events.addParagraph(el, r); } @@ -743,7 +744,7 @@ globalThis.arcmgmt = function() { function fsImpact() { const el = new DocumentFragment(); - const r =[]; + const r = []; if (V.arcologies[0].FSSupremacist !== "unset") { _FSScore += Math.min(V.arcologies[0].FSSupremacist, 100); @@ -1089,7 +1090,7 @@ globalThis.arcmgmt = function() { function policiesImpact() { const el = new DocumentFragment(); - const r =[]; + const r = []; if (V.policies.retirement.menial2Citizen === 1) { _slaveDemandU *= 0.8; _slaveDemandT *= 0.75; @@ -1388,331 +1389,53 @@ globalThis.arcmgmt = function() { function schools() { const el = document.createElement("p"); - let r; - if (V.TSS.schoolPresent === 1) { - r = []; - r.push(`The Slave School has a`); - if (V.TSS.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.TSS.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.TSS.subsidize = 0; - V.TSS.schoolProsperity = 10; - } - if (V.TSS.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.TSS.schoolProsperity++; - } else if (V.TSS.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.TSS.schoolProsperity--; + for (const [SCH, schObj] of App.Data.misc.schools) { + if (V[SCH].schoolPresent !== 1) { + continue; } - App.Events.addNode(el, r, "div"); - } - - if (V.TUO.schoolPresent === 1) { - r = []; - r.push(`The Utopian Orphanage has a`); - if (V.TUO.schoolProsperity > 4) { + const r = []; + r.push(`${capFirstChar(schObj.title)} has a`); + if (V[SCH].schoolProsperity > 4) { r.push(`very prosperous`); - } else if (V.TUO.schoolProsperity < -4) { + } else if (V[SCH].schoolProsperity < -4) { r.push(`struggling`); } else { r.push(`thriving`); } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); + r.push(`${schObj.branchName} in ${V.arcologies[0].name}.`); + if (V[SCH].schoolProsperity >= 10) { + switch (SCH) { + case "GRI": + r.push(`It is one of the finest research facilities in the world`); + break; + case "TFS": + r.push(`They are one of the most renowned futa societies in the world`); + break; + case "HA": + r.push(`It is one of the most famous schools in the world`); + break; + default: + r.push(`It is one of the finest slave schools in the world`); } - V.TUO.subsidize = 0; - V.TUO.schoolProsperity = 10; - } - if (V.TUO.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.TUO.schoolProsperity++; - } else if (V.TUO.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.TUO.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.GRI.schoolPresent === 1) { - r = []; - r.push(`The Growth Research Institute has a`); - if (V.GRI.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.GRI.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); + r.push(r.pop() + `.`); } else { - r.push(`, <span class="green">improving your reputation.</span>`); + r.push(r.pop() + `, <span class="green">improving your reputation.</span>`); repX(200, "policies"); } - V.GRI.subsidize = 0; - V.GRI.schoolProsperity = 10; + V[SCH].subsidize = 0; + V[SCH].schoolProsperity = 10; } - if (V.GRI.subsidize === 1) { + if (V[SCH].subsidize === 1) { r.push(`You have a policy of subsidizing them.`); - V.GRI.schoolProsperity++; - } else if (V.GRI.subsidize === -1) { + V[SCH].schoolProsperity++; + } else if (V[SCH].subsidize === -1) { r.push(`You have a policy of covertly undermining them.`); - V.GRI.schoolProsperity--; + V[SCH].schoolProsperity--; } App.Events.addNode(el, r, "div"); } - if (V.TCR.schoolPresent === 1) { - r = []; - r.push(`The Cattle Ranch has a`); - if (V.TCR.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.TCR.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.TCR.subsidize = 0; - V.TCR.schoolProsperity = 10; - } - if (V.TCR.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.TCR.schoolProsperity++; - } else if (V.TCR.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.TCR.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.SCP.schoolPresent === 1) { - r = []; - r.push(`St. Claver Preparatory has a`); - if (V.SCP.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.SCP.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.SCP.subsidize = 0; - V.SCP.schoolProsperity = 10; - } - if (V.SCP.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.SCP.schoolProsperity++; - } else if (V.SCP.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.SCP.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.LDE.schoolPresent === 1) { - r = []; - r.push(`L'École des Enculées has a`); - if (V.LDE.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.LDE.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.LDE.subsidize = 0; - V.LDE.schoolProsperity = 10; - } - if (V.LDE.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.LDE.schoolProsperity++; - } else if (V.LDE.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.LDE.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.TGA.schoolPresent === 1) { - r = []; - r.push(`The Gymnasium-Academy has a`); - if (V.TGA.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.TGA.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.TGA.subsidize = 0; - V.TGA.schoolProsperity = 10; - } - if (V.TGA.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.TGA.schoolProsperity++; - } else if (V.TGA.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.TGA.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.TFS.schoolPresent === 1) { - r = []; - r.push(`The Futanari Sisters have a`); - if (V.TFS.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.TFS.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.TFS.subsidize = 0; - V.TFS.schoolProsperity = 10; - } - if (V.TFS.subsidize === 1) { - r.push(`You have a policy of subsidizing them`); - if ((V.PC.dick !== 0) && (V.PC.vagina !== -1) && (V.PC.boobs >= 300)) { - r.push(`, which is more effective due to your close relationship with them and your physical resemblance to them`); - V.TFS.schoolProsperity++; - } - r.push(`.`); - V.TFS.schoolProsperity++; - } else if (V.TFS.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.TFS.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.HA.schoolPresent === 1) { - r = []; - r.push(`The Hippolyta Academy has a`); - if (V.HA.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.HA.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.HA.subsidize = 0; - V.HA.schoolProsperity = 10; - } - if (V.HA.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.HA.schoolProsperity++; - } else if (V.HA.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.HA.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } - - if (V.NUL.schoolPresent === 1) { - r = []; - r.push(`Nueva Universidad de Libertad has a`); - if (V.NUL.schoolProsperity > 4) { - r.push(`very prosperous`); - } else if (V.NUL.schoolProsperity < -4) { - r.push(`struggling`); - } else { - r.push(`thriving`); - } - 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) { - r.push(`.`); - } else { - r.push(`, <span class="green">improving your reputation.</span>`); - repX(200, "policies"); - } - V.NUL.subsidize = 0; - V.NUL.schoolProsperity = 10; - } - if (V.NUL.subsidize === 1) { - r.push(`You have a policy of subsidizing them.`); - V.NUL.schoolProsperity++; - } else if (V.NUL.subsidize === -1) { - r.push(`You have a policy of covertly undermining them.`); - V.NUL.schoolProsperity--; - } - App.Events.addNode(el, r, "div"); - } return el; } @@ -2129,7 +1852,7 @@ globalThis.arcmgmt = function() { } function slaveRetirement() { - const r =[]; + const r = []; /* Slave retirement trigger pulled (one time only)*/ if (V.citizenRetirementTrigger === 1) { let _citizenRetirementImpact; diff --git a/src/endWeek/endWeek.js b/src/endWeek/endWeek.js index 0c9b1e88b201aacb086546e1465be6395523adf2..d266db86c95b08f89345541b6887b72da0bedaea 100644 --- a/src/endWeek/endWeek.js +++ b/src/endWeek/endWeek.js @@ -32,7 +32,7 @@ globalThis.endWeek = (function() { function resetSlaveMarkets() { V.gingering = 0; V.market = null; - for (const school of App.Data.misc.schools) { + for (const school of App.Data.misc.schools.keys()) { V[school].schoolSale = 0; } } diff --git a/src/js/utilsFC.js b/src/js/utilsFC.js index fd5fdbb912729a62a55787f82b30d9aff6bc6b9e..29ba225e22d26007a924d45e076fa3b3e0711b24 100644 --- a/src/js/utilsFC.js +++ b/src/js/utilsFC.js @@ -3045,9 +3045,9 @@ App.Utils.masterSuiteAverages = (function() { })(); App.Utils.schoolCounter = function() { - return App.Data.misc.schools.filter(s => V[s].schoolPresent).length; + return Array.from(App.Data.misc.schools.keys()).filter(s => V[s].schoolPresent).length; }; App.Utils.schoolFailure = function() { - return App.Data.misc.schools.find(s => V[s].schoolPresent && V[s].schoolProsperity <= -10); + return Array.from(App.Data.misc.schools.keys()).find(s => V[s].schoolPresent && V[s].schoolProsperity <= -10); }; diff --git a/src/markets/bulkSlave/bulkSlaveIntro.js b/src/markets/bulkSlave/bulkSlaveIntro.js index f69148c86bba7c6c7ba25d8b4815a21cf3a3b368..a1184fd8a8e0f8e53fcb44d9c5b3de06c7317df8 100644 --- a/src/markets/bulkSlave/bulkSlaveIntro.js +++ b/src/markets/bulkSlave/bulkSlaveIntro.js @@ -177,7 +177,7 @@ App.Markets.bulkSlaveIntro = function() { } /* increment Slave school purchase counts if needed */ - if (App.Data.misc.schools.includes(V.market.slaveMarket)) { + if (App.Data.misc.schools.has(V.market.slaveMarket)) { V[V.market.slaveMarket].studentsBought += V.market.newSlaves.length; } } @@ -204,7 +204,7 @@ App.Markets.bulkSlaveIntro = function() { opinion = App.Neighbor.opinion(0, V.market.numArcology); opinion = Math.clamp(Math.trunc(opinion/20), -10, 10); discount -= (opinion * 25); - } else if (App.Data.misc.schools.includes(V.market.slaveMarket)) { + } else if (App.Data.misc.schools.has(V.market.slaveMarket)) { if (V[V.market.slaveMarket].schoolUpgrade !== 0) { discount = 375; } diff --git a/src/markets/marketUI.js b/src/markets/marketUI.js index 90ca923d691b40f674b54c0808bf2d81e5f1d067..af2110b9a0396fd42795de6a77f0ac25b4c6c4d3 100644 --- a/src/markets/marketUI.js +++ b/src/markets/marketUI.js @@ -141,7 +141,7 @@ App.Markets.purchaseFramework = function(slaveMarket, {sTitleSingular = "slave", return el; function student() { - if (App.Data.misc.schools.includes(slaveMarket)) { + if (App.Data.misc.schools.has(slaveMarket)) { V[slaveMarket].schoolSale = 0; V[slaveMarket].studentsBought += 1; } diff --git a/src/markets/theMarket/buySlaves.js b/src/markets/theMarket/buySlaves.js index 707e6052026657593001a07ba7043242131834fc..a6c743a3bac3da4dc66c78209641f226161fd2e0 100644 --- a/src/markets/theMarket/buySlaves.js +++ b/src/markets/theMarket/buySlaves.js @@ -192,7 +192,7 @@ App.UI.buySlaves = function() { if (store.note) { App.UI.DOM.appendNewElement("span", el, ` ${store.note}`, "note"); } - if (App.Data.misc.schools.includes(store.marketType)) { + if (App.Data.misc.schools.has(store.marketType)) { if (V[store.marketType].schoolSale === 1) { App.UI.DOM.appendNewElement("span", el, `Offering your first purchase at half price this week. `, "yellow"); }