diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index 742766d65d243ddbbdab81f6c66d97cec88b338c..629764c007e7c4d0202a961df41c1886e9486dd0 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -32,13 +32,12 @@ App.EndWeek.neighborsDevelopment = function() { for (let i = 0; i < V.arcologies.length; i++) { const arc = V.arcologies[i]; const r = []; - r.push(`<span class="bold"> ${arc.name}</span>, your `); + r.push(`<span class="bold"> ${arc.name}</span>, your`); if (arc.direction === 0) { - r.push(`arcology`); + r.push(`arcology,`); } else { - r.push(`neighbor to the ${arc.direction}`); + r.push(`neighbor to the ${arc.direction},`); } - r.push(`,`); /* PROSPERITY */ @@ -289,26 +288,15 @@ App.EndWeek.neighborsDevelopment = function() { if (arc.minority + arc.ownership + arc.PCminority < 100) { _prosperityDiff = arc.prosperity - averageProsperity; if (_prosperityDiff > random(-10, 50)) { - r.push(`Its leadership acquires an increased share of its ownership.`); arc.ownership += 1; arc.prosperity -= 5; - r.push(`This places its government in control of approximately <span class="orange">${Math.trunc(arc.ownership * _economicUncertainty)}%</span> of the arcology`); - if (arc.minority > 0) { - r.push(`, against its most prominent competition with a <span class="tan">${Math.trunc(arc.minority * _economicUncertainty)}%</span> share`); - } - r.push(`.`); + r.push(`Its leadership acquires an increased share of its ownership. This places its government in control of approximately <span class="orange">${Math.trunc(arc.ownership * _economicUncertainty)}%</span> of the arcology${(arc.minority > 0) ? `, against its most prominent competition with a <span class="tan">${Math.trunc(arc.minority * _economicUncertainty)}%</span> share`:``}.`); } else if (_prosperityDiff < random(-50, 10)) { if (arc.ownership > 0) { if (arc.rival !== 1 || (arc.rival === 1 && arc.ownership > 51 && random(1, 2) === 1)) { - r.push(`Its leadership sells off some of its ownership to stay afloat.`); arc.ownership -= 1; arc.prosperity += 5; - r.push(`This leaves its government in control of approximately <span class="orange">${Math.trunc(arc.ownership * _economicUncertainty)}%</span> of the arcology`); - - if (arc.minority > 0) { - r.push(`, against its most prominent competition, with a <span class="tan">${Math.trunc(arc.minority * _economicUncertainty)}%</span> share`); - } - r.push(`.`); + r.push(`Its leadership sells off some of its ownership to stay afloat. This leaves its government in control of approximately <span class="orange">${Math.trunc(arc.ownership * _economicUncertainty)}%</span> of the arcology${(arc.minority > 0) ? `, against its most prominent competition, with a <span class="tan">${Math.trunc(arc.minority * _economicUncertainty)}%</span> share` : ``}.`); } } } @@ -1454,7 +1442,7 @@ App.EndWeek.neighborsDevelopment = function() { r.push(neighborsFSadoption(arc)); } } - } /* CLOSES FUTURE SOCIETY ADOPTION */ + } // CLOSES FUTURE SOCIETY ADOPTION /* INFLUENCE RECEPTION */ @@ -1972,7 +1960,7 @@ App.EndWeek.neighborsDevelopment = function() { } if (arc.ownership >= 100) { if (_appliedInfluenceBonus > 0) { - r.push(`However, `); + r.push(`However,`); } r.push(`${arc.name} is under completely unified control, making it resistant to change.`); } @@ -2069,13 +2057,12 @@ App.EndWeek.neighborsDevelopment = function() { let r = []; const {heU, girlU} = getNonlocalPronouns(0).appendSuffix('U'); - r.push(`<span class="bold"> ${arc.name}</span>, your `); + r.push(`<span class="bold"> ${arc.name}</span>, your`); if (arc.direction === 0) { - r.push(`arcology`); + r.push(`arcology,`); } else { - r.push(`neighbor to the ${arc.direction}`); + r.push(`neighbor to the ${arc.direction},`); } - r.push(`,`); r.push(`is prosperous enough that`); switch (arc.government) { case "elected officials": @@ -2449,7 +2436,7 @@ App.EndWeek.neighborsDevelopment = function() { default: V.rivalryFSAdopted = 0; } - } else { /* RIVAL ADOPTION */ + } else { // RIVAL ADOPTION desc = "Its owner is"; if (V.arcologies[0].FSSubjugationist > random(5, 60)) { if (_validFSes.includes("FSSupremacist") && (arc.FSSubjugationist === "unset") || (arc.FSSubjugationistRace !== V.arcologies[0].FSSubjugationistRace)) { @@ -2639,13 +2626,16 @@ App.EndWeek.neighborsDevelopment = function() { } /* AGENT ADOPTION*/ - agentAdoption(); + if (_adopted === 0) { + agentAdoption(); + } /* CROSS-FS ADOPTION*/ - crossFSadoption(); + if (_adopted === 0) { + crossFSadoption(); + } /* NEIGHBOR ADOPTION*/ - if (_adopted === 0) { for (let j = 0; j < V.arcologies.length; j++) { if (arc.direction !== V.arcologies[j].direction) { @@ -2702,7 +2692,6 @@ App.EndWeek.neighborsDevelopment = function() { } /* RANDOM ADOPTION*/ - if (_adopted === 0) { if (random(0, 4) === 1) { switch (arc.government) { @@ -2906,7 +2895,7 @@ App.EndWeek.neighborsDevelopment = function() { function agentAdoption() { if (arc.government === "your agent") { - _adopted = 1; /* breaking out of the for loop will preserve this */ + _adopted = 1; const _leader = App.currentAgent(i); const {he, himself, woman, him, hers} = getPronouns(_leader); @@ -2982,7 +2971,7 @@ App.EndWeek.neighborsDevelopment = function() { arc.FSAssetExpansionist = 5; return; } - if (_validFSes.includes("FSCummunism") && _leader.fetish === "cumslut") { /* this will become the cum focused condition, being replaced with breast focus for milk */ + if (_validFSes.includes("FSCummunism") && _leader.fetish === "cumslut") { // this will become the cum focused condition, being replaced with breast focus for milk r.push(`Your agent <span class="pink">_leader.slaveName</span> successfully pushes it to <span class="yellow">adopt Cummunism,</span> since ${he} already loves sucking down huge loads of cum.`); arc.FSCummunism = 5; return; @@ -3075,13 +3064,13 @@ App.EndWeek.neighborsDevelopment = function() { return; } - _adopted = 0; /* did not return out of the for loop, so no FS was adopted */ + _adopted = 0; // We failed, reset to zero. } return; } function crossFSadoption() { - _adopted = 1; /* breaking out of the for loop will preserve this */ + _adopted = 1; if (arc.FSSubjugationist > random(50, 200)) { if (_validFSes.includes("FSDegradationist")) { r.push(`The arcology's racial Subjugationist culture <span class="yellow">pushes it towards Degradationism.</span>`); @@ -3487,7 +3476,7 @@ App.EndWeek.neighborsDevelopment = function() { } } - _adopted = 0; /* did not return out of the for loop, so no FS was adopted */ + _adopted = 0; return; } }