diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 33dd17c38561cd5e5f42ab228e331309dbe4df04..b0b77ec1e62dc31647019801aef449c4f5621971 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -2087,17 +2087,36 @@ window.SectorCounts = function() { } }); - const apartments = V.building.findCells(cell => cell instanceof App.Arcology.Cell.Apartment); - apartments.forEach(a => { - if (a.type === 2) { - V.AProsperityCap += 10; - } else if (a.type === 1) { - V.AProsperityCap += 15; - } - }); - - const sweatshops = V.building.findCells(cell => cell instanceof App.Arcology.Cell.Manufacturing && cell.type === "Sweatshops"); - V.Sweatshops = sweatshops.length; + // The idea is that cells used for your private benefit contribute less to the economy as they cannot be used by + // others to generate revenue and therefore increase total cash flow. Can be offset by more luxury apartments. + V.Sweatshops = 0; + V.building.findCells(cell => !(cell instanceof App.Arcology.Cell.Penthouse)) + .forEach(cell => { + if (cell instanceof App.Arcology.Cell.Apartment) { + if (cell.type === 1) { + V.AProsperityCap += 10; + } else if (cell.type === 0) { + V.AProsperityCap += 5; + } + } else if (cell instanceof App.Arcology.Cell.Shop) { + if (cell.type !== "Diary" && cell.type !== "Brothel") { + V.AProsperityCap += 10; + } + } else if (cell instanceof App.Arcology.Cell.Market) { + if (cell.type === "Transport Hub") { + V.AProsperityCap += 15; + } else if (cell.type !== "Pit" && cell.type !== "Arcade") { + V.AProsperityCap += 10; + } + } else if (cell instanceof App.Arcology.Cell.Manufacturing) { + if (cell.type !== "Diary" && cell.type !== "Farmyard" && cell.type !== "Barracks") { + V.AProsperityCap += 10; + if (cell.type === "Sweatshops") { + V.Sweatshops++; + } + } + } + }); V.AProsperityCap += V.AProsperityCapModified; };