From 7e5a9077f811d83b8629e012809e62904954ca46 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Thu, 29 Oct 2020 01:35:39 -0400 Subject: [PATCH] make desc local --- src/endWeek/economics/neighborsDevelopment.js | 219 +++++++++--------- 1 file changed, 110 insertions(+), 109 deletions(-) diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index 0684c421f16..366b7d9bc2d 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -13,6 +13,7 @@ App.EndWeek.neighborsDevelopment = function() { let _desc; let _prosperityDiff; let _redHanded; // TODO: may be used too much and not properly reset. + let desc; for (V.i = 0; V.i < V.arcologies.length; V.i++) { if (V.arcologies[V.i].prosperity < 10) { V.arcologies[V.i].prosperity = 10; @@ -1477,7 +1478,7 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].ownership >= 100) { _appliedInfluenceBonus /= 2; } - V.desc = []; + desc = []; let _alignment = 0; if (V.arcologies[j].FSSubjugationist > 60) { @@ -1487,14 +1488,14 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSSubjugationist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its racially aligned Subjugationism"); + desc.push("helping to advance its racially aligned Subjugationism"); } else { V.arcologies[V.i].FSSubjugationist -= Math.trunc((V.arcologies[j].FSSubjugationist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Subjugationism"); + desc.push("attacking its incompatible Subjugationism"); } } else if ((V.arcologies[V.i].FSSupremacist !== "unset") && (V.arcologies[j].FSSubjugationistRace === V.arcologies[V.i].FSSupremacistRace)) { V.arcologies[V.i].FSSupremacist -= Math.trunc((V.arcologies[j].FSSubjugationist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its opposing Supremacism"); + desc.push("attacking its opposing Supremacism"); } } if (V.arcologies[j].FSSupremacist > 60) { @@ -1504,14 +1505,14 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSSupremacist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its racially aligned Supremacism"); + desc.push("helping to advance its racially aligned Supremacism"); } else { V.arcologies[V.i].FSSupremacist -= Math.trunc((V.arcologies[j].FSSupremacist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Supremacism"); + desc.push("attacking its incompatible Supremacism"); } } else if ((V.arcologies[V.i].FSSubjugationist !== "unset") && (V.arcologies[j].FSSupremacistRace === V.arcologies[V.i].FSSubjugationistRace)) { V.arcologies[V.i].FSSubjugationist -= Math.trunc((V.arcologies[j].FSSupremacist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its opposing Subjugationism"); + desc.push("attacking its opposing Subjugationism"); } } if (V.arcologies[j].FSRepopulationFocus > 60) { @@ -1520,10 +1521,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSRepopulationFocus > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Repopulationism"); + desc.push("helping to advance its Repopulationism"); } else if (V.arcologies[V.i].FSRestart !== "unset") { V.arcologies[V.i].FSRestart -= Math.trunc((V.arcologies[j].FSRepopulationFocus-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Eugenics"); + desc.push("attacking its Eugenics"); } } else if (V.arcologies[j].FSRestart > 60) { if (V.arcologies[V.i].FSRestart !== "unset") { @@ -1531,10 +1532,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSRestart > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Eugenics"); + desc.push("helping to advance its Eugenics"); } else if (V.arcologies[V.i].FSRepopulationFocus !== "unset") { V.arcologies[V.i].FSRepopulationFocus -= Math.trunc((V.arcologies[j].FSRestart-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Repopulation Efforts"); + desc.push("attacking its Repopulation Efforts"); } } if (V.arcologies[j].FSGenderRadicalist > 60) { @@ -1543,10 +1544,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSGenderRadicalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Gender Radicalism"); + desc.push("helping to advance its Gender Radicalism"); } else if (V.arcologies[V.i].FSGenderFundamentalist !== "unset") { V.arcologies[V.i].FSGenderFundamentalist -= Math.trunc((V.arcologies[j].FSGenderRadicalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Gender Fundamentalism"); + desc.push("attacking its Gender Fundamentalism"); } } else if (V.arcologies[j].FSGenderFundamentalist > 60) { if (V.arcologies[V.i].FSGenderFundamentalist !== "unset") { @@ -1554,10 +1555,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSGenderFundamentalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Gender Fundamentalism"); + desc.push("helping to advance its Gender Fundamentalism"); } else if (V.arcologies[V.i].FSGenderRadicalist !== "unset") { V.arcologies[V.i].FSGenderRadicalist -= Math.trunc((V.arcologies[j].FSGenderFundamentalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Gender Radicalism"); + desc.push("attacking its Gender Radicalism"); } } if (V.arcologies[j].FSPaternalist > 60) { @@ -1566,10 +1567,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSPaternalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Paternalism"); + desc.push("helping to advance its Paternalism"); } else if (V.arcologies[V.i].FSDegradationist !== "unset") { V.arcologies[V.i].FSDegradationist -= Math.trunc((V.arcologies[j].FSPaternalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Degradationism"); + desc.push("attacking its Degradationism"); } } else if (V.arcologies[j].FSDegradationist > 60) { if (V.arcologies[V.i].FSDegradationist !== "unset") { @@ -1577,10 +1578,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSDegradationist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Degradationism"); + desc.push("helping to advance its Degradationism"); } else if (V.arcologies[V.i].FSPaternalist !== "unset") { V.arcologies[V.i].FSPaternalist -= Math.trunc((V.arcologies[j].FSDegradationist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Paternalism"); + desc.push("attacking its Paternalism"); } } if (V.arcologies[j].FSIntellectualDependency > 60) { @@ -1589,10 +1590,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSIntellectualDependency > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Intellectual Dependency"); + desc.push("helping to advance its Intellectual Dependency"); } else if (V.arcologies[V.i].FSSlaveProfessionalism !== "unset") { V.arcologies[V.i].FSSlaveProfessionalism -= Math.trunc((V.arcologies[j].FSIntellectualDependency-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Slave Professionalism"); + desc.push("attacking its Slave Professionalism"); } } else if (V.arcologies[j].FSSlaveProfessionalism > 60) { if (V.arcologies[V.i].FSSlaveProfessionalism !== "unset") { @@ -1600,10 +1601,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSSlaveProfessionalism > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Slave Professionalism"); + desc.push("helping to advance its Slave Professionalism"); } else if (V.arcologies[V.i].FSIntellectualDependency !== "unset") { V.arcologies[V.i].FSIntellectualDependency -= Math.trunc((V.arcologies[j].FSSlaveProfessionalism-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Intellectual Dependency"); + desc.push("attacking its Intellectual Dependency"); } } if (V.arcologies[j].FSBodyPurist > 60) { @@ -1612,10 +1613,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSBodyPurist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Body Purism"); + desc.push("helping to advance its Body Purism"); } else if (V.arcologies[V.i].FSTransformationFetishist !== "unset") { V.arcologies[V.i].FSTransformationFetishist -= Math.trunc((V.arcologies[j].FSBodyPurist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Transformation Fetishism"); + desc.push("attacking its Transformation Fetishism"); } } else if (V.arcologies[j].FSTransformationFetishist > 60) { if (V.arcologies[V.i].FSTransformationFetishist !== "unset") { @@ -1623,10 +1624,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSTransformationFetishist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Transformation Fetishism"); + desc.push("helping to advance its Transformation Fetishism"); } else if (V.arcologies[V.i].FSBodyPurist !== "unset") { V.arcologies[V.i].FSBodyPurist -= Math.trunc((V.arcologies[j].FSTransformationFetishist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Body Purism"); + desc.push("attacking its Body Purism"); } } if (V.arcologies[j].FSYouthPreferentialist > 60) { @@ -1635,10 +1636,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSYouthPreferentialist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Youth Preferentialism"); + desc.push("helping to advance its Youth Preferentialism"); } else if (V.arcologies[V.i].FSMaturityPreferentialist !== "unset") { V.arcologies[V.i].FSMaturityPreferentialist -= Math.trunc((V.arcologies[j].FSYouthPreferentialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Maturity Preferentialism"); + desc.push("attacking its Maturity Preferentialism"); } } else if (V.arcologies[j].FSMaturityPreferentialist > 60) { if (V.arcologies[V.i].FSMaturityPreferentialist !== "unset") { @@ -1646,10 +1647,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSMaturityPreferentialist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Maturity Preferentialism"); + desc.push("helping to advance its Maturity Preferentialism"); } else if (V.arcologies[V.i].FSYouthPreferentialist !== "unset") { V.arcologies[V.i].FSYouthPreferentialist -= Math.trunc((V.arcologies[j].FSMaturityPreferentialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Youth Preferentialism"); + desc.push("attacking its Youth Preferentialism"); } } if (V.arcologies[j].FSPetiteAdmiration > 60) { @@ -1658,10 +1659,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSPetiteAdmiration > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Petite Admiration"); + desc.push("helping to advance its Petite Admiration"); } else if (V.arcologies[V.i].FSStatuesqueGlorification !== "unset") { V.arcologies[V.i].FSStatuesqueGlorification -= Math.trunc((V.arcologies[j].FSPetiteAdmiration-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Statuesque Glorification"); + desc.push("attacking its Statuesque Glorification"); } } else if (V.arcologies[j].FSStatuesqueGlorification > 60) { if (V.arcologies[V.i].FSStatuesqueGlorification !== "unset") { @@ -1669,10 +1670,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSStatuesqueGlorification > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Statuesque Glorification"); + desc.push("helping to advance its Statuesque Glorification"); } else if (V.arcologies[V.i].FSPetiteAdmiration !== "unset") { V.arcologies[V.i].FSPetiteAdmiration -= Math.trunc((V.arcologies[j].FSStatuesqueGlorification-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Petite Admiration"); + desc.push("attacking its Petite Admiration"); } } if (V.arcologies[j].FSSlimnessEnthusiast > 60) { @@ -1681,10 +1682,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSSlimnessEnthusiast > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Slimness Enthusiasm"); + desc.push("helping to advance its Slimness Enthusiasm"); } else if (V.arcologies[V.i].FSAssetExpansionist !== "unset") { V.arcologies[V.i].FSAssetExpansionist -= Math.trunc((V.arcologies[j].FSSlimnessEnthusiast-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Asset Expansionism"); + desc.push("attacking its Asset Expansionism"); } } else if (V.arcologies[j].FSAssetExpansionist > 60) { if (V.arcologies[V.i].FSAssetExpansionist !== "unset") { @@ -1692,10 +1693,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSAssetExpansionist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Asset Expansionism"); + desc.push("helping to advance its Asset Expansionism"); } else if (V.arcologies[V.i].FSSlimnessEnthusiast !== "unset") { V.arcologies[V.i].FSSlimnessEnthusiast -= Math.trunc((V.arcologies[j].FSAssetExpansionist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Slimness Enthusiasm"); + desc.push("attacking its Slimness Enthusiasm"); } } if (V.arcologies[j].FSPastoralist > 60) { @@ -1704,10 +1705,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSPastoralist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Pastoralism"); + desc.push("helping to advance its Pastoralism"); } else if (V.arcologies[V.i].FSCummunism !== "unset") { V.arcologies[V.i].FSCummunism -= Math.trunc((V.arcologies[j].FSPastoralist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Cummunism"); + desc.push("attacking its Cummunism"); } } else if (V.arcologies[j].FSCummunism > 60) { if (V.arcologies[V.i].FSCummunism !== "unset") { @@ -1715,10 +1716,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSCummunism > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Cummunism"); + desc.push("helping to advance its Cummunism"); } else if (V.arcologies[V.i].FSPastoralist !== "unset") { V.arcologies[V.i].FSPastoralist -= Math.trunc((V.arcologies[j].FSCummunism-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Pastoralism"); + desc.push("attacking its Pastoralism"); } } if (V.arcologies[j].FSPhysicalIdealist > 60) { @@ -1727,10 +1728,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSPhysicalIdealist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Physical Idealism"); + desc.push("helping to advance its Physical Idealism"); } else if (V.arcologies[V.i].FSHedonisticDecadence !== "unset") { V.arcologies[V.i].FSHedonisticDecadence -= Math.trunc((V.arcologies[j].FSPhysicalIdealist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Hedonism"); + desc.push("attacking its Hedonism"); } } else if (V.arcologies[j].FSHedonisticDecadence > 60) { if (V.arcologies[V.i].FSHedonisticDecadence !== "unset") { @@ -1738,10 +1739,10 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSHedonisticDecadence > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Hedonism"); + desc.push("helping to advance its Hedonism"); } else if (V.arcologies[V.i].FSPhysicalIdealist !== "unset") { V.arcologies[V.i].FSPhysicalIdealist -= Math.trunc((V.arcologies[j].FSHedonisticDecadence-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its Physical Idealism"); + desc.push("attacking its Physical Idealism"); } } if (V.arcologies[j].FSIncestFetishist > 60) { @@ -1750,7 +1751,7 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSIncestFetishist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Incest Fetishism"); + desc.push("helping to advance its Incest Fetishism"); } } if (V.arcologies[j].FSChattelReligionist > 60) { @@ -1759,7 +1760,7 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSChattelReligionist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Chattel Religionism"); + desc.push("helping to advance its Chattel Religionism"); } } if (V.arcologies[j].FSRomanRevivalist > 60) { @@ -1768,25 +1769,25 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSRomanRevivalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Roman Revivalism"); + desc.push("helping to advance its Roman Revivalism"); } else if (V.arcologies[V.i].FSNeoImperialist !== "unset") { V.arcologies[V.i].FSNeoImperialist -= Math.trunc((V.arcologies[j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Imperialism"); + desc.push("attacking its incompatible Imperialism"); } else if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { V.arcologies[V.i].FSAztecRevivalist -= Math.trunc((V.arcologies[j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { V.arcologies[V.i].FSEgyptianRevivalist -= Math.trunc((V.arcologies[j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { V.arcologies[V.i].FSEdoRevivalist -= Math.trunc((V.arcologies[j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { V.arcologies[V.i].FSArabianRevivalist -= Math.trunc((V.arcologies[j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { V.arcologies[V.i].FSChineseRevivalist -= Math.trunc((V.arcologies[j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } else if (V.arcologies[j].FSAztecRevivalist > 60) { if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { @@ -1794,25 +1795,25 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSAztecRevivalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Aztec Revivalism"); + desc.push("helping to advance its Aztec Revivalism"); } else if (V.arcologies[V.i].FSNeoImperialist !== "unset") { V.arcologies[V.i].FSNeoImperialist -= Math.trunc((V.arcologies[j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Imperialism"); + desc.push("attacking its incompatible Imperialism"); } else if (V.arcologies[V.i].FSRomanRevivalist !== "unset") { V.arcologies[V.i].FSRomanRevivalist -= Math.trunc((V.arcologies[j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { V.arcologies[V.i].FSEgyptianRevivalist -= Math.trunc((V.arcologies[j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { V.arcologies[V.i].FSEdoRevivalist -= Math.trunc((V.arcologies[j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { V.arcologies[V.i].FSArabianRevivalist -= Math.trunc((V.arcologies[j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { V.arcologies[V.i].FSChineseRevivalist -= Math.trunc((V.arcologies[j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } else if (V.arcologies[j].FSEgyptianRevivalist > 60) { if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { @@ -1820,25 +1821,25 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSEgyptianRevivalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Egyptian Revivalism"); + desc.push("helping to advance its Egyptian Revivalism"); } else if (V.arcologies[V.i].FSRomanRevivalist !== "unset") { V.arcologies[V.i].FSRomanRevivalist -= Math.trunc((V.arcologies[j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSNeoImperialist !== "unset") { V.arcologies[V.i].FSNeoImperialist -= Math.trunc((V.arcologies[j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Imperialism"); + desc.push("attacking its incompatible Imperialism"); } else if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { V.arcologies[V.i].FSAztecRevivalist -= Math.trunc((V.arcologies[j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { V.arcologies[V.i].FSEdoRevivalist -= Math.trunc((V.arcologies[j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { V.arcologies[V.i].FSArabianRevivalist -= Math.trunc((V.arcologies[j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { V.arcologies[V.i].FSChineseRevivalist -= Math.trunc((V.arcologies[j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } else if (V.arcologies[j].FSEdoRevivalist > 60) { if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { @@ -1846,25 +1847,25 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSEdoRevivalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Edo Revivalism"); + desc.push("helping to advance its Edo Revivalism"); } else if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { V.arcologies[V.i].FSEgyptianRevivalist -= Math.trunc((V.arcologies[j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSNeoImperialist !== "unset") { V.arcologies[V.i].FSNeoImperialist -= Math.trunc((V.arcologies[j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Imperialism"); + desc.push("attacking its incompatible Imperialism"); } else if (V.arcologies[V.i].FSRomanRevivalist !== "unset") { V.arcologies[V.i].FSRomanRevivalist -= Math.trunc((V.arcologies[j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { V.arcologies[V.i].FSAztecRevivalist -= Math.trunc((V.arcologies[j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { V.arcologies[V.i].FSArabianRevivalist -= Math.trunc((V.arcologies[j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { V.arcologies[V.i].FSChineseRevivalist -= Math.trunc((V.arcologies[j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } else if (V.arcologies[j].FSArabianRevivalist > 60) { if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { @@ -1872,25 +1873,25 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSArabianRevivalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Arabian Revivalism"); + desc.push("helping to advance its Arabian Revivalism"); } else if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { V.arcologies[V.i].FSEgyptianRevivalist -= Math.trunc((V.arcologies[j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSNeoImperialist !== "unset") { V.arcologies[V.i].FSNeoImperialist -= Math.trunc((V.arcologies[j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Imperialism"); + desc.push("attacking its incompatible Imperialism"); } else if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { V.arcologies[V.i].FSEdoRevivalist -= Math.trunc((V.arcologies[j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSRomanRevivalist !== "unset") { V.arcologies[V.i].FSRomanRevivalist -= Math.trunc((V.arcologies[j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { V.arcologies[V.i].FSAztecRevivalist -= Math.trunc((V.arcologies[j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { V.arcologies[V.i].FSChineseRevivalist -= Math.trunc((V.arcologies[j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } else if (V.arcologies[j].FSChineseRevivalist > 60) { if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { @@ -1898,25 +1899,25 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSChineseRevivalist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Chinese Revivalism"); + desc.push("helping to advance its Chinese Revivalism"); } else if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { V.arcologies[V.i].FSEgyptianRevivalist -= Math.trunc((V.arcologies[j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSNeoImperialist !== "unset") { V.arcologies[V.i].FSNeoImperialist -= Math.trunc((V.arcologies[j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Imperialism"); + desc.push("attacking its incompatible Imperialism"); } else if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { V.arcologies[V.i].FSEdoRevivalist -= Math.trunc((V.arcologies[j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { V.arcologies[V.i].FSArabianRevivalist -= Math.trunc((V.arcologies[j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSRomanRevivalist !== "unset") { V.arcologies[V.i].FSRomanRevivalist -= Math.trunc((V.arcologies[j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { V.arcologies[V.i].FSAztecRevivalist -= Math.trunc((V.arcologies[j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } else if (V.arcologies[j].FSNeoImperialist > 60) { if (V.arcologies[V.i].FSNeoImperialist !== "unset") { @@ -1924,43 +1925,43 @@ App.EndWeek.neighborsDevelopment = function() { if (V.arcologies[V.i].FSNeoImperialist > V.FSLockinLevel) { _alignment += 1; } - V.desc.push("helping to advance its Neo-Imperialism"); + desc.push("helping to advance its Neo-Imperialism"); } else if (V.arcologies[V.i].FSEgyptianRevivalist !== "unset") { V.arcologies[V.i].FSEgyptianRevivalist -= Math.trunc((V.arcologies[j].FSNeoImperialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSChineseRevivalist !== "unset") { V.arcologies[V.i].FSChineseRevivalist -= Math.trunc((V.arcologies[j].FSNeoImperialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSEdoRevivalist !== "unset") { V.arcologies[V.i].FSEdoRevivalist -= Math.trunc((V.arcologies[j].FSNeoImperialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSArabianRevivalist !== "unset") { V.arcologies[V.i].FSArabianRevivalist -= Math.trunc((V.arcologies[j].FSNeoImperialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSRomanRevivalist !== "unset") { V.arcologies[V.i].FSRomanRevivalist -= Math.trunc((V.arcologies[j].FSNeoImperialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } else if (V.arcologies[V.i].FSAztecRevivalist !== "unset") { V.arcologies[V.i].FSAztecRevivalist -= Math.trunc((V.arcologies[j].FSNeoImperialist-60)/4)+_appliedInfluenceBonus; - V.desc.push("attacking its incompatible Revivalism"); + desc.push("attacking its incompatible Revivalism"); } } - if (V.desc.length === 0) { + if (desc.length === 0) { r.push(`'' ${V.arcologies[j].name}'' attempts to influence it, but has no significant impacts.`); - } else if (V.desc.length > 2) { - r.push(`'' ${V.arcologies[j].name}'''s mature culture influences V.arcologies[V.i].name, V.desc[0],`); - for (let _k = 1; _k < V.desc.length; _k++) { - if (_k < V.desc.length-1) { - r.push(`${V.desc[_k]},`); + } else if (desc.length > 2) { + r.push(`'' ${V.arcologies[j].name}'''s mature culture influences V.arcologies[V.i].name, desc[0],`); + for (let _k = 1; _k < desc.length; _k++) { + if (_k < desc.length-1) { + r.push(`${desc[_k]},`); } else { - r.push(`and ${V.desc[_k]}.`); + r.push(`and ${desc[_k]}.`); } } - } else if (V.desc.length === 2) { - r.push(`'' ${V.arcologies[j].name}'''s culture influences V.arcologies[V.i].name's V.desc[0] and V.desc[1].`); + } else if (desc.length === 2) { + r.push(`'' ${V.arcologies[j].name}'''s culture influences V.arcologies[V.i].name's desc[0] and desc[1].`); } else { - r.push(`'' ${V.arcologies[j].name}'''s culture is beginning to influence V.arcologies[V.i].name's V.desc[0].`); + r.push(`'' ${V.arcologies[j].name}'''s culture is beginning to influence V.arcologies[V.i].name's desc[0].`); } if (_appliedInfluenceBonus > 0) { @@ -1978,7 +1979,7 @@ App.EndWeek.neighborsDevelopment = function() { } if (V.arcologies[j].direction !== 0) { - if (V.desc.length === 0) { + if (desc.length === 0) { r.push(`'' ${V.arcologies[j].name}'' is not satisfied with the impact its directed influence is having, and withdraws it with the intention of targeting it elsewhere.`); V.arcologies[j].influenceTarget = -1; } else if (_alignment >= 4) { -- GitLab