diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index cbcfb44ca88c2e5614ebe2c55f865dc7c880e7ed..cafb853643fe2fee121317a6581009da75c0f746 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -1117,7 +1117,6 @@ App.Data.resetOnNGPlus = { Wardeness: 0, /** @type {FC.SlaveStateOrZero} */ Concubine: 0, - economicUncertainty: 10, justiceEvents: ["slave deal", "slave training", "majority deal", "indenture deal", "virginity deal", "breeding deal"], /* not in setupVars because we remove events from this array as they occur */ prisonCircuit: ["low tier criminals", "gangs and smugglers", "white collar", "military prison"], diff --git a/src/cheats/mod_EditNeighborArcologyCheat.tw b/src/cheats/mod_EditNeighborArcologyCheat.tw index ea9afda1f12433455f8a05d4e3367c6218a72f6d..00a2d0cdeaf34adc8c235ab8967c01524e5e2f15 100644 --- a/src/cheats/mod_EditNeighborArcologyCheat.tw +++ b/src/cheats/mod_EditNeighborArcologyCheat.tw @@ -34,7 +34,7 @@ <</link>> <</if>> -<br> +<br><br> <<set $averageProsperity = _.mean($arcologies.map((a) => a.prosperity))>> <<for $i = 1; $i < $arcologies.length; $i++>> diff --git a/src/js/utilsFC.js b/src/js/utilsFC.js index 017e3f57dcf64afd86f9f6efd4f60c07b624e6f6..b9d78538af1a29e290e297228842f5f813d9d36e 100644 --- a/src/js/utilsFC.js +++ b/src/js/utilsFC.js @@ -2947,3 +2947,17 @@ App.Utils.countAssignmentWorkers = function(assignments) { assignments = assignments || Object.values(Job); return assignments.reduce((acc, cur) => { acc[cur] = V.JobIDMap[cur].size; return acc; }, {}); }; + +/** Calculate and return economic uncertainty multiplier for a given arcology + * @param {number} arcologyID + * @returns {number} + */ +App.Utils.economicUncertainty = function(arcologyID) { + let uncertainty = arcologyID === 0 ? 5 : 10; + if (assistant.power === 1) { + uncertainty -= Math.max(Math.trunc(uncertainty/2), 0); + } else if (assistant.power > 1) { + uncertainty = 0; + } + return jsRandom(100 - uncertainty, 100 + uncertainty) / 100; +}; diff --git a/src/neighbor/neighborDisplay.js b/src/neighbor/neighborDisplay.js index 6fd7d52f1a1ca2bc8ecd4240d916dfa42d13d302..7f035f2e115259b5160c28b1555675ac7fe98c5b 100644 --- a/src/neighbor/neighborDisplay.js +++ b/src/neighbor/neighborDisplay.js @@ -3,6 +3,7 @@ App.Neighbor.Display = class { * @param {function(number):void} onSelection function to be called when selection changes */ constructor(onSelection) { + this.containerID = "neighbor-display"; this._onSelection = onSelection; } @@ -10,24 +11,22 @@ App.Neighbor.Display = class { * @returns {Element} */ render() { - const containerID = "neighbor-display"; const container = document.createElement("div"); - container.id = containerID; + container.id = this.containerID; function makeSortLink(/** @type {string} */ title, /** @type {string} */ mode) { if (V.neighborDisplay === mode) { return document.createTextNode(title); } else { - return App.UI.DOM.link(title, () => { V.neighborDisplay = mode; rerender(); } ); + return App.UI.DOM.link(title, () => { V.neighborDisplay = mode; this.rerender(); } ); } } container.append("Neighbor display mode:"); - const rerender = () => $(`#${containerID}`).empty().append(this.render()); container.appendChild(App.UI.DOM.generateLinksStrip([ - makeSortLink("List by ID", "list"), - makeSortLink("List by Name", "list-name"), - makeSortLink("City Grid", "grid") + makeSortLink.call(this, "List by ID", "list"), + makeSortLink.call(this, "List by Name", "list-name"), + makeSortLink.call(this, "City Grid", "grid") ])); // pick a mode @@ -41,6 +40,11 @@ App.Neighbor.Display = class { return container; } + /** Refresh an existing neighbor display list */ + rerender() { + $(`#${this.containerID}`).replaceWith(this.render()); + } + /** Render the display as a list, sorted by ID * @returns {Element} */ @@ -102,8 +106,9 @@ App.Neighbor.Display = class { return res; } - function nameFrag() { - return App.UI.DOM.makeElement("div", App.UI.DOM.link(arcology.name, () => this.select(arcID)), "name"); + /** @param {function(): void} selectLambda */ + function nameFrag(selectLambda) { + return App.UI.DOM.makeElement("div", App.UI.DOM.link(arcology.name, selectLambda), "name"); } function govGSPFrag() { @@ -114,7 +119,7 @@ App.Neighbor.Display = class { } else { gov = App.UI.DOM.appendNewElement("div", frag, capFirstChar(arcology.government) + '; '); } - const estimatedGSP = Math.trunc((0.1 * arcology.prosperity * random(100 - V.economicUncertainty, 100 + V.economicUncertainty))/100); + const estimatedGSP = Math.trunc(0.1 * arcology.prosperity * App.Utils.economicUncertainty(arcID)); App.UI.DOM.appendNewElement("span", gov, cashFormat(estimatedGSP) + "m GSP", "cash"); return frag; } @@ -170,7 +175,7 @@ App.Neighbor.Display = class { // empty block classNames.push("neighbor-item-empty"); } else { - frag.appendChild(nameFrag()); + frag.appendChild(nameFrag(() => this.select(arcID))); frag.appendChild(govGSPFrag()); frag.appendChild(fsFrag()); frag.appendChild(ownershipFrag()); diff --git a/src/neighbor/neighborInteract.js b/src/neighbor/neighborInteract.js new file mode 100644 index 0000000000000000000000000000000000000000..e13f02b9c98a87fb34a3ef4b9bb434b23712255a --- /dev/null +++ b/src/neighbor/neighborInteract.js @@ -0,0 +1,322 @@ +App.Neighbor.Interact = (function() { + let nd = new App.Neighbor.Display((id) => replaceDetails(id)); + + /** Output the arcology list + * @returns {DocumentFragment} + */ + function list() { + V.arcologies.forEach((a) => a.prosperity = Math.clamp(a.prosperity, 1, 300)); + if (!V.activeArcologyIdx) { + V.activeArcologyIdx = 0; + } + + let frag = document.createDocumentFragment(); + + // set up the neighbor display list itself + frag.append(nd.render()); + $(document).one(':passagedisplay', () => nd.select(V.activeArcologyIdx)); + + // empty container for details + const detailSpan = App.UI.DOM.appendNewElement("span", frag); + detailSpan.id = "neighbor-details"; + + return frag; + } + + /** Replace the details block with an updated one for the given arcology + * Used both as a refresh and as a selection handler + * @param {number} arcID + */ + function replaceDetails(arcID) { + V.activeArcologyIdx = arcID; + const container = $("#neighbor-details").empty(); + container.append(description(arcID)); + container.append(details(arcID)); + } + + /** Re-render most of the page because some important arcology property (FS, government, ownership) may have changed + * @param {number} arcID for reselection + */ + function arcChanged(arcID) { + nd.rerender(); + nd.select(arcID); + } + + /** Create a div containing the neighbor's description + * @param {number} arcID + * @returns {Element} + */ + function description(arcID) { + // still in Twine for now + let container = document.createElement("div"); + V.i = arcID; + App.UI.DOM.includePassage(container, "Neighbor Description"); + return container; + } + + /** Create a fragment containing all the details for a given arcology + * @param {number} arcID + * @returns {DocumentFragment} + */ + function details(arcID) { + let frag = document.createDocumentFragment(); + if (arcID === 0) { + const desc = FutureSocieties.activeFSes(0).map((f) => FutureSocieties.displayName(f)); + if (desc.length === 0) { + App.UI.DOM.appendNewElement("p", frag, `Your arcology's culture has not developed to the point where it can meaningfully influence other arcologies.`); + } else if (desc.length > 2) { + App.UI.DOM.appendNewElement("p", frag, `Your arcology's mature culture is capable of exerting great cultural sway over other arcologies. It can readily project ${desc.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch)}.`); + } else if (desc.length === 2) { + App.UI.DOM.appendNewElement("p", frag, `Your arcology's culture is capable of exerting some cultural sway over other arcologies. It can effectively project ${desc[0]} and ${desc[1]}.`); + } else { + App.UI.DOM.appendNewElement("p", frag, `Your arcology's culture is capable of starting to exert cultural sway over other arcologies. It can project ${desc[0]}.`); + } + } else { + const ownershipCost = 500*Math.trunc(V.arcologies[arcID].prosperity*(1+(V.arcologies[arcID].demandFactor/100))); + frag.append(`A 1% interest in this arcology is worth ${cashFormat(ownershipCost)}. `); + if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 100) { + frag.append(`The transaction fee is ${cashFormat(10000)}.`); + } + + if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 100) { + let links = []; + links.push(App.UI.DOM.link("Buy", (f) => { + cashX(forceNeg(ownershipCost), "war"); + cashX(-10000, "war"); + V.arcologies[arcID].PCminority += 1; + V.arcologies[arcID].demandFactor += 2; + }, [], "Neighbor Interact")); + if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority <= 90) { + if (V.cash > ownershipCost*10) { + const link = App.UI.DOM.link("10%", (f) => { + cashX(forceNeg(ownershipCost*10), "war"); + cashX(-10000, "war"); + V.arcologies[arcID].PCminority += 10; + V.arcologies[arcID].demandFactor += 20; + }, [], "Neighbor Interact"); + links.push(link); + } + } + const div = App.UI.DOM.appendNewElement("div", frag, App.UI.DOM.generateLinksStrip(links)); + if (links.length > 1) { + App.UI.DOM.appendNewElement("span", div, "Transaction costs will only be paid once.", "detail"); + } + } + + if (V.arcologies[arcID].PCminority > 0) { + let links = []; + links.push(App.UI.DOM.link("Sell", (f) => { + cashX(ownershipCost, "war"); + V.arcologies[arcID].PCminority -= 1; + V.arcologies[arcID].demandFactor -= 2; + if (V.arcologies[arcID].government !== "your agent" && V.arcologies[arcID].government !== "your trustees" && V.arcologies[arcID].rival !== 1) { + if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 10) { + V.arcologies[arcID].ownership += 10; + } + } + arcChanged(arcID); + }, [], "Neighbor Interact")); + if (V.arcologies[arcID].PCminority >= 10) { + links.push(App.UI.DOM.link("10%", (f) => { + cashX((ownershipCost*10), "war"); + V.arcologies[arcID].PCminority -= 10; + V.arcologies[arcID].demandFactor -= 20; + if (V.arcologies[arcID].government !== "your agent" && V.arcologies[arcID].government !== "your trustees" && V.arcologies[arcID].rival !== 1) { + if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 10) { + V.arcologies[arcID].ownership += 10; + } + } + }, [], "Neighbor Interact")); + } + App.UI.DOM.appendNewElement("div", frag, App.UI.DOM.generateLinksStrip(links)); + } + + if (V.arcologies[arcID].direction !== V.arcologies[0].embargoTarget) { + frag.append(document.createElement("br")); + frag.append(App.UI.DOM.passageLink("Target them for economic warfare", "Neighbor Interact", () => V.arcologies[0].embargoTarget = V.arcologies[arcID].direction)); + } + + if (V.PC.skill.hacking > 0) { + if (V.arcologies[arcID].direction !== V.arcologies[0].CyberEconomicTarget) { + frag.append(document.createElement("br")); + frag.append(App.UI.DOM.passageLink("Target them for cyber economic warfare", "Neighbor Interact", () => V.arcologies[0].CyberEconomicTarget = V.arcologies[arcID].direction)); + } + if (V.arcologies[arcID].direction !== V.arcologies[0].CyberReputationTarget) { + frag.append(document.createElement("br")); + frag.append(App.UI.DOM.passageLink("Target their leadership for character assassination", "Neighbor Interact", () => V.arcologies[0].CyberReputationTarget = V.arcologies[arcID].direction)); + } + } + if (FutureSocieties.influenceSources(0).length > 0) { + if (V.arcologies[arcID].direction !== V.arcologies[0].influenceTarget) { + frag.append(document.createElement("br")); + frag.append(App.UI.DOM.passageLink("Set as influence target", "Neighbor Interact", () => V.arcologies[0].influenceTarget = V.arcologies[arcID].direction)); + } + } + + if (V.arcologies[arcID].government === "your trustees" || V.arcologies[arcID].government === "your agent") { + frag.append(controlActions(arcID)); + } + + frag.append(fsGoods(arcID)); + } + return frag; + } + + /** Create a div containing actions specific to arcologies that are under the player's control + * @param {number} arcID + * @returns {Element} + */ + function controlActions(arcID) { + const container = document.createElement("div"); + const agent = App.currentAgent(arcID); + const him = agent ? getPronouns(agent).him : "them"; + container.append(document.createElement("br")); + if (V.arcologies[arcID].government === "your trustees") { + container.append(App.UI.DOM.passageLink("Appoint an agent", "Agent Select")); + } else { + let linkText = `Recall and reenslave ${him}`; + const residentList = [agent.ID]; + const agentPartner = V.slaves.find((s) => s.assignment === Job.AGENTPARTNER && s.relationshipTarget === agent.ID); + if (agentPartner) { + linkText = `Recall them and reenslave your agent`; + residentList.push(agentPartner.ID); + } + container.append(App.UI.SlaveList.render.listDOM(residentList, [], App.UI.SlaveList.SlaveInteract.stdInteract)); + container.append(App.UI.DOM.link(linkText, (f) => { removeJob(agent, "be your agent"); arcChanged(arcID); })); + } + container.append(" | "); + const rename = App.UI.DOM.appendNewElement("span", container, ''); + rename.id = "rename"; + rename.append(App.UI.DOM.link(`Instruct ${him} to rename the arcology`, () => $("#rename").replaceWith([ + App.UI.DOM.makeTextBox(V.arcologies[arcID].name, (s) => { V.arcologies[arcID].name = s; }, false), + App.UI.DOM.link("Confirm name", arcChanged, [arcID]) + ]))); + + if (V.arcologies[arcID].government === "your agent") { + const {His, his, he, himself /* him is already set */} = getPronouns(agent); + let r = []; + r.push(`${His} ${agent.intelligence > 95 ? `brilliance` : `intelligence`} and education are the most important qualities for ${him}.`); + if (agent.actualAge > 35) { + r.push(`As with the Head Girl position, ${his} age and experience lend ${him} leadership weight.`); + } + if (agent.career === "an arcology owner") { + r.push(`${His} career as an arcology owner ${himself} is, obviously, useful to ${him}.`); + } else if (setup.HGCareers.includes(agent.career)) { + r.push(`${His} career in leadership helps ${him}.`); + } + if (agent.fetishStrength > 95) { + if ((agent.fetish === "dom") || (agent.fetish === "sadist")) { + r.push(`${His} sexually dominant fetish helps ${him} fill a leadership role.`); + } else if ((agent.fetish === "submissive") || (agent.fetish === "masochist")) { + r.push(`Unfortunately, ${he} has an inappropriate fetish for a leader.`); + } else { + r.push(`${His} sexual fetishes will influence how ${he} leads the arcology.`); + } + } + if (agent.energy > 95) { + r.push(`Finally, ${his} sexual depravity lets ${him} fit into arcology society naturally.`); + } + App.UI.DOM.appendNewElement("div", container, r.join(' ' )); + } + + container.append(document.createElement("br")); + const forceAbandonment = (fs) => { V.arcologies[arcID][fs] = "unset"; arcChanged(arcID); }; + for (const fs of FutureSocieties.activeFSes(arcID)) { + App.UI.DOM.appendNewElement("div", container, App.UI.DOM.link(`Force abandonment of ${FutureSocieties.displayName(fs)}`, forceAbandonment, [fs])); + } + + return container; + } + + /** Create an element containing all the society-dependent stuff you can buy from this arcology. + * @param {number} arcID + * @returns {Element} + */ + function fsGoods(arcID) { + const container = document.createElement("div"); + let r = []; + r.push(`If ${V.arcologies[arcID].name} has developed enough to begin exporting worthwhile goods, it may be of interest to acquire some.`); + const opinionDiscount = App.Neighbor.opinion(arcID, 0)*10; + const basePrice = Math.trunc((7500-opinionDiscount)*V.upgradeMultiplierTrade); + const controlled = (V.arcologies[arcID].government === "your trustees") || (V.arcologies[arcID].government === "your agent"); + if (controlled) { + r.push(`Since it is under your control, it is no problem at all to request the transfer of goods to ${V.arcologies[0].name}.`); + } else if (V.PC.skill.hacking >= 50) { + r.push(`It is within your skills to redirect an outgoing shipment to ${V.arcologies[0].name} for your retrieval.`); + } else if (V.arcologies[arcID].direction === V.arcologies[0].embargoTarget) { + r.push(`However, due to your active embargo, trade with ${V.arcologies[arcID].name} is not possible.`); + } + App.UI.DOM.appendNewElement("p", container, r.join(' ')); + + let exports = 0; + + /** Build a link or text block describing how to acquire a specific good from this arcology + * @param {string} fsRequired - the FS that the arcology has to have for this block to appear + * @param {string} itemName - the item name to check to see if the player already has this item + * @param {string} category - the category to check to see if the player already has this item + * @param {string} itemDisplay - a display name for a group of the item; as in, "a shipment of XXX" or "enough XXX" + * @param {string} property - the global property controlling whether this item has been acquired + * @param {number} [itemPrice] - the price the player should pay for the item; by default, basePrice (computed above) + */ + function addAcquisitionBlock(fsRequired, itemName, category, itemDisplay, property, itemPrice = basePrice) { + if (V.arcologies[arcID][fsRequired] > 95) { + if (!isItemAccessible.entry(itemName, category)) { + if (controlled) { + const link = App.UI.DOM.link(`Request a shipment of ${itemDisplay}`, (f) => { + V[property] = 1; + replaceDetails(arcID); + }); + App.UI.DOM.appendNewElement("div", container, link); + } else if (V.PC.skill.hacking >= 50) { + const link = App.UI.DOM.link(`Divert an outgoing shipment of ${itemDisplay}`, (f) => { + V[property] = 1; + replaceDetails(arcID); + }); + App.UI.DOM.appendNewElement("div", container, link); + } else if (V.arcologies[arcID].direction !== V.arcologies[0].embargoTarget) { + const link = App.UI.DOM.link(`Divert an outgoing shipment of ${itemDisplay}`, (f) => { + V[property] = 1; + cashX(forceNeg(itemPrice), "capEx"); + // replaceDetails(arcID); - cash changed, force passage transition for sidebar update + }, [], "Neighbor Interact"); + const div = App.UI.DOM.appendNewElement("div", container, link); + App.UI.DOM.appendNewElement("span", div, `Will cost ${cashFormat(itemPrice)}`, "detail"); + } + } else { + App.UI.DOM.appendNewElement("div", container, `You already have enough ${itemDisplay}.`); + } + exports = 1; + } + } + + addAcquisitionBlock("FSRomanRevivalist", "a toga", "clothing", "togas", "clothesBoughtToga"); + addAcquisitionBlock("FSEdoRevivalist", "a kimono", "clothing", "kimonos", "clothesBoughtKimono"); + addAcquisitionBlock("FSArabianRevivalist", "harem gauze", "clothing", "silken harem garb", "clothesBoughtHarem"); + addAcquisitionBlock("FSAztecRevivalist", "a huipil", "clothing", "huipils", "clothesBoughtHuipil"); + addAcquisitionBlock("FSChineseRevivalist", "a slutty qipao", "clothing", "skimpy qipaos", "clothesBoughtQipao"); + addAcquisitionBlock("FSEgyptianRevivalist", "ancient Egyptian", "collar", "Egyptian necklace replicas", "clothesBoughtEgypt"); + addAcquisitionBlock("FSPaternalist", "conservative clothing", "clothing", "conservative clothing", "clothesBoughtConservative"); + addAcquisitionBlock("FSDegradationist", "chains", "clothing", "binding chains", "clothesBoughtChains"); + addAcquisitionBlock("FSGenderFundamentalist", "a bunny outfit", "clothing", "bunny suits", "clothesBoughtBunny"); + addAcquisitionBlock("FSIntellectualDependency", "a bimbo outfit", "cloting", "bimbo attire", "clothesBoughtBimbo"); + addAcquisitionBlock("FSSlaveProfessionalism", "a courtesan dress", "clothing", "cortesan dresses", "clothesBoughtCourtesan"); + // addAcquisitionBlock("FSPetiteAdmiration", "petite dress", "clothing", "petite-sized dresses", "clothesBoughtPetite"); + addAcquisitionBlock("FSPhysicalIdealist", "body oil", "clothing", "body oil", "clothesBoughtOil"); + addAcquisitionBlock("FSHedonisticDecadence", "stretch pants and a crop-top", "clothing", "stretch pants and crop-tops", "clothesBoughtLazyClothes"); + addAcquisitionBlock("FSChattelReligionist", "a chattel habit", "clothing", "chattel religionist habits", "clothesBoughtHabit"); + addAcquisitionBlock("FSPastoralist", "Western clothing", "clothing", "Western clothing", "clothesBoughtWestern"); + addAcquisitionBlock("FSRepopulationFocus", "a maternity dress", "clothing", "maternity dresses", "clothesBoughtMaternityDress"); + addAcquisitionBlock("FSRepopulationFocus", "attractive lingerie for a pregnant woman", "clothing", "maternity lingerie", "clothesBoughtMaternityLingerie"); + addAcquisitionBlock("FSRepopulationFocus", "a small empathy belly", "bellyAccessory", "empathy bellies", "clothesBoughtBelly"); + addAcquisitionBlock("FSStatuesqueGlorification", "platform heels", "shoes", "platform shoes", "shoesBoughtHeels"); + + if (exports !== 1) { + const luck = (V.arcologies[arcID].direction === V.arcologies[0].embargoTarget) ? `Fortunately` : `Unfortunately`; + App.UI.DOM.appendNewElement("p", container, `${luck}, they have nothing of value.`); + } + + return container; + } + + return list; +})(); diff --git a/src/uncategorized/neighborDescription.tw b/src/uncategorized/neighborDescription.tw index 91b4e531e3b9a7fec1aa63f171eafbb8d2d99654..2d4dc8f17960c7c97376fc68d021e49ed0dd3073 100644 --- a/src/uncategorized/neighborDescription.tw +++ b/src/uncategorized/neighborDescription.tw @@ -1,43 +1,37 @@ :: Neighbor Description [nobr] -<br><br> -'' $arcologies[$i].name'' is located to the $arcologies[$i].direction of your arcology. It is governed by -<<switch $arcologies[$i].government>> -<<case "elected officials">> - elected officials, periodically paralyzing its development. -<<case "a committee">> - a committee, hindering its development. -<<case "an oligarchy">> - a small group of leading citizens, making its development very unpredictable. -<<case "your trustees">> - a small group of leading citizens who are serving as @@.mediumseagreen;your trustees.@@ -<<case "an individual">> - @@.cyan;an individual,@@ making its development vibrant but unpredictable. -<<case "your agent">> - @@.deeppink;your agent,@@ who is directing the arcology in your stead. -<<case "a corporation">> - a corporation, making its development steady and unspectacular. -<<default>> - direct democracy, making its development dangerously unstable. -<</switch>> -<<if $arcologies[$i].direction == 0>> - <<set $economicUncertainty = 5>> +<div class="indent"> +<<if $arcologies[$i].direction != 0>> + ''$arcologies[$i].name'' is located to the $arcologies[$i].direction of your arcology. It is governed by + <<switch $arcologies[$i].government>> + <<case "elected officials">> + elected officials, periodically paralyzing its development. + <<case "a committee">> + a committee, hindering its development. + <<case "an oligarchy">> + a small group of leading citizens, making its development very unpredictable. + <<case "your trustees">> + a small group of leading citizens who are serving as @@.mediumseagreen;your trustees.@@ + <<case "an individual">> + @@.cyan;an individual,@@ making its development vibrant but unpredictable. + <<case "your agent">> + @@.deeppink;your agent,@@ who is directing the arcology in your stead. + <<case "a corporation">> + a corporation, making its development steady and unspectacular. + <<default>> + direct democracy, making its development dangerously unstable. + <</switch>> <<else>> - <<set $economicUncertainty = 10>> -<</if>> -<<if $assistant.power > 1>> - <<set $economicUncertainty = 0>> -<<elseif $assistant.power == 1>> - <<set $economicUncertainty = Math.max(Math.trunc($economicUncertainty/2),0)>> + ''$arcologies[$i].name'' is your arcology. <</if>> -<<if $arcologies[$i].government != "your trustees">> - <<if $arcologies[$i].government != "your agent">> - Its leadership has control of approximately @@.orange;<<print Math.trunc(($arcologies[$i].ownership*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ of the arcology<<if $arcologies[$i].minority > $arcologies[$i].ownership-10>>, a dangerously narrow margin over competition with a @@.tan;<<print Math.trunc(($arcologies[$i].minority*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ share<</if>>. - <</if>> +<<set _economicUncertainty = App.Utils.economicUncertainty($i)>> +<<if $arcologies[$i].direction == 0>> + You control @@.lime;$arcologies[$i].ownership%@@ of the arcology, and the largest minority holder controls @@.orange;$arcologies[$i].minority%.@@ +<<elseif ($arcologies[$i].government != "your trustees") && ($arcologies[$i].government != "your agent")>> + Its leadership has control of approximately @@.orange;<<print Math.trunc($arcologies[$i].ownership*_economicUncertainty)>>%@@ of the arcology<<if $arcologies[$i].minority > $arcologies[$i].ownership-10>>, a dangerously narrow margin over competition with a @@.tan;<<print Math.trunc($arcologies[$i].minority*_economicUncertainty)>>%@@ share<</if>>. <</if>> -<<if $arcologies[$i].PCminority > 0>>You own @@.lime;$arcologies[$i].PCminority%@@ of this arcology<<if (($arcologies[$i].government == "your trustees") || ($arcologies[$i].government == "your agent")) && $arcologies[$i].minority > $arcologies[$i].PCminority-10>>, a dangerously narrow margin over competition with a @@.red;<<print Math.trunc(($arcologies[$i].minority*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ share<</if>>.<</if>> -<<set $economicUncertainty -= Math.min(2*$assistant.power, $economicUncertainty)>> -The arcology has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc((0.1*$arcologies[$i].prosperity*random(100-$economicUncertainty,100+$economicUncertainty))/100))>>m,@@ +<<if $arcologies[$i].PCminority > 0>>You own @@.lime;$arcologies[$i].PCminority%@@ of this arcology<<if (($arcologies[$i].government == "your trustees") || ($arcologies[$i].government == "your agent")) && $arcologies[$i].minority > $arcologies[$i].PCminority-10>>, a dangerously narrow margin over competition with a @@.red;<<print Math.trunc($arcologies[$i].minority*_economicUncertainty)>>%@@ share<</if>>.<</if>> +The arcology has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc(0.1*$arcologies[$i].prosperity*_economicUncertainty))>>m,@@ <<if Math.abs($arcologies[$i].prosperity - $averageProsperity) < 5>> average among <<elseif $arcologies[$i].prosperity > $averageProsperity>> @@ -614,3 +608,4 @@ its neighbors. Its culture is diverging from the old world: it is _neighborDescription[0] <</if>> <</if>> +</div> diff --git a/src/uncategorized/neighborInteract.tw b/src/uncategorized/neighborInteract.tw index bb7620634a9b9da24df2792d3b006453bfc4356e..746acbf34e6eeadc5f29040ee6ce0bc458ff2aef 100644 --- a/src/uncategorized/neighborInteract.tw +++ b/src/uncategorized/neighborInteract.tw @@ -71,677 +71,4 @@ You have <<print $arcologies.length-1>> neighbors. <br><br> <</if>> <</if>> -<<set _selFunc = (f) => {}>> -<<set _nd = new App.Neighbor.Display(_selFunc)>> -<<includeDOM _nd.render()>> -<<run _nd.select(0)>> - -<span id="Security"> -<<set $desc = FutureSocieties.activeFSes(0).map((f) => FutureSocieties.displayName(f))>> -<<if $desc.length == 0>> - Your arcology's culture has not developed to the point where it can meaningfully influence other arcologies. -<<elseif $desc.length > 2>> - Your arcology's mature culture is capable of exerting great cultural sway over other arcologies. It can readily project <<= $desc.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch)>>. -<<elseif $desc.length == 2>> - Your arcology's culture is capable of exerting some cultural sway over other arcologies. It can effectively project $desc[0] and $desc[1]. -<<else>> - Your arcology's culture is capable of starting to exert cultural sway over other arcologies. It can project $desc[0]. -<</if>> -<br> - -<<for _currentNeighbor = 1; _currentNeighbor < $arcologies.length; _currentNeighbor++>> -<<set _Agent = App.currentAgent(_currentNeighbor)>> -<<capture _currentNeighbor, _Agent>> - <<set $arcologies[_currentNeighbor].prosperity = Math.clamp($arcologies[_currentNeighbor].prosperity, 1, 300)>> - <br>You own $arcologies[_currentNeighbor].PCminority% of - <<link "$arcologies[_currentNeighbor].name">> - <<replace "#Security">> <<set $activeArcologyIdx = _currentNeighbor>> - [[Back to the main diplomacy page|Neighbor Interact]] - <<set $i = _currentNeighbor>> <<include "Neighbor Description">> <br> - - <<set _ownershipCost = 500*Math.trunc($arcologies[_currentNeighbor].prosperity*(1+($arcologies[_currentNeighbor].demandFactor/100)))>> - <br>A 1% interest in this arcology is worth <<print cashFormat(_ownershipCost)>>. - <<if ($arcologies[_currentNeighbor].ownership + $arcologies[_currentNeighbor].PCminority + $arcologies[_currentNeighbor].minority < 100)>> - The transaction fee is <<print cashFormat(10000)>>. - <</if>> - <<if ($arcologies[_currentNeighbor].ownership + $arcologies[_currentNeighbor].PCminority + $arcologies[_currentNeighbor].minority < 100)>> - <br> - <<link "Buy" "Neighbor Interact">> - <<run cashX(forceNeg(_ownershipCost), "war")>> - <<run cashX(-10000, "war")>> - <<set $arcologies[_currentNeighbor].PCminority += 1>> - <<set $arcologies[_currentNeighbor].demandFactor += 2>> - <</link>> - <<if ($arcologies[_currentNeighbor].ownership + $arcologies[_currentNeighbor].PCminority + $arcologies[_currentNeighbor].minority <= 90)>> - <<if $cash > _ownershipCost*10>> - | <<link "10%" "Neighbor Interact">> - <<run cashX(forceNeg(_ownershipCost*10), "war")>> - <<run cashX(-10000, "war")>> - <<set $arcologies[_currentNeighbor].PCminority += 10>> - <<set $arcologies[_currentNeighbor].demandFactor += 20>> - <</link>> - //Transaction costs will only be paid once.// - <</if>> - <</if>> - <</if>> - - <<if $arcologies[_currentNeighbor].PCminority > 0>> - <br> - <<link "Sell" "Neighbor Interact">> - <<run cashX(_ownershipCost, "war")>> - <<set $arcologies[_currentNeighbor].PCminority -= 1>> - <<set $arcologies[_currentNeighbor].demandFactor -= 2>> - <<if $arcologies[_currentNeighbor].government != "your agent" && $arcologies[_currentNeighbor].government != "your trustees" && $arcologies[_currentNeighbor].rival != 1>> - <<if $arcologies[_currentNeighbor].ownership + $arcologies[_currentNeighbor].PCminority + $arcologies[_currentNeighbor].minority < 10>> - <<set $arcologies[_currentNeighbor].ownership += 10>> - <</if>> - <</if>> - <</link>> - <<if $arcologies[_currentNeighbor].PCminority >= 10>> - | <<link "10%" "Neighbor Interact">> - <<run cashX((_ownershipCost*10), "war")>> - <<set $arcologies[_currentNeighbor].PCminority -= 10>> - <<set $arcologies[_currentNeighbor].demandFactor -= 20>> - <<if $arcologies[_currentNeighbor].government != "your agent" && $arcologies[_currentNeighbor].government != "your trustees" && $arcologies[_currentNeighbor].rival != 1>> - <<if $arcologies[_currentNeighbor].ownership + $arcologies[_currentNeighbor].PCminority + $arcologies[_currentNeighbor].minority < 10>> - <<set $arcologies[_currentNeighbor].ownership += 10>> - <</if>> - <</if>> - <</link>> - <</if>> - <</if>> - <br> - - <<if $arcologies[_currentNeighbor].direction !== $arcologies[0].embargoTarget>> - <br>[[Target them for economic warfare|Neighbor Interact][$arcologies[0].embargoTarget = $arcologies[_currentNeighbor].direction]] - <</if>> - - <<if $PC.skill.hacking > 0>> - <<if $arcologies[_currentNeighbor].direction !== $arcologies[0].CyberEconomicTarget>> - <br>[[Target them for cyber economic warfare|Neighbor Interact][$arcologies[0].CyberEconomicTarget = $arcologies[_currentNeighbor].direction]] - <</if>> - <<if $arcologies[_currentNeighbor].direction !== $arcologies[0].CyberReputationTarget>> - <br>[[Target their leadership for character assassination|Neighbor Interact][$arcologies[0].CyberReputationTarget = $arcologies[_currentNeighbor].direction]] - <</if>> - <</if>> - <<if $desc.length > 0>> - <<if $arcologies[_currentNeighbor].direction !== $arcologies[0].influenceTarget>> - <br>[[Set as influence target|Neighbor Interact][$arcologies[0].influenceTarget = $arcologies[_currentNeighbor].direction]] - <</if>> - <</if>> - - <<if $arcologies[_currentNeighbor].government == "your trustees" || $arcologies[_currentNeighbor].government == "your agent">> - <br><br> - <<if $arcologies[_currentNeighbor].government == "your trustees">> - [[Appoint an agent|Agent Select]] <<set $him = "them">> - <<else>> - <<setLocalPronouns _Agent>> - Your agent @@.deeppink;<<= SlaveFullName(_Agent)>>@@ is running this arcology. <<link "Recall and reenslave $him" "Neighbor Interact">><<run removeJob(_Agent, "be your agent")>><</link>> - <</if>> - <span id="rename"> | <<link "Instruct $him to rename the arcology">><<replace #rename>> | <<textbox "$arcologies[$activeArcologyIdx].name" $arcologies[$activeArcologyIdx].name>> [[Confirm name|Neighbor Interact]]<</replace>><</link>></span> - <<if $arcologies[_currentNeighbor].government === "your agent">> - <br>$His <<if _Agent.intelligence > 95>>brilliance<<else>>intelligence<</if>> and education are the most important qualities for $him. - <<if _Agent.actualAge > 35>> - As with the Head Girl position, $his age and experience lend $him leadership weight. - <</if>> - <<if _Agent.career == "an arcology owner">> - $His career as an arcology owner $himself is, obviously, useful to $him. - <<elseif setup.HGCareers.includes(_Agent.career)>> - $His career in leadership helps $him. - <</if>> - <<if _Agent.fetishStrength > 95>> - <<if (_Agent.fetish == "dom") || (_Agent.fetish == "sadist")>> - $His sexually dominant fetish helps $him fill a leadership role. - <<elseif (_Agent.fetish == "submissive") || (_Agent.fetish == "masochist")>> - Unfortunately, $he has an inappropriate fetish for a leader. - <<else>> - $His sexual fetishes will influence how $he leads the arcology. - <</if>> - <</if>> - <<if _Agent.energy > 95>> - Finally, $his sexual depravity lets $him fit into arcology society naturally. - <</if>> - <</if>> - <<if $arcologies[_currentNeighbor].FSSubjugationist != "unset">> - <br><<link "Force Abandonment of Racial Subjugation" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSSubjugationist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSSupremacist != "unset">> - <br><<link "Force Abandonment of Racial Supremacy" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSSupremacist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSRepopulationFocus != "unset">> - <br><<link "Force Abandonment of Repopulationism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSRepopulationFocus = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSRestart != "unset">> - <br><<link "Force Abandonment of Eugenics" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSRestart = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSGenderRadicalist != "unset">> - <br><<link "Force Abandonment of Gender Radicalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSGenderRadicalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSIntellectualDependency != "unset">> - <br><<link "Force Abandonment of Intellectual Dependency" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSIntellectualDependency = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSSlaveProfessionalism != "unset">> - <br><<link "Force Abandonment of Slave Professionalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSSlaveProfessionalism = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSGenderFundamentalist != "unset">> - <br><<link "Force Abandonment of Gender Fundamentalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSGenderFundamentalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSPaternalist != "unset">> - <br><<link "Force Abandonment of Paternalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSPaternalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSDegradationist != "unset">> - <br><<link "Force Abandonment of Degradationism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSDegradationist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSBodyPurist != "unset">> - <br><<link "Force Abandonment of Body Purism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSBodyPurist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSTransformationFetishist != "unset">> - <br><<link "Force Abandonment of Transformation Fetishism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSTransformationFetishist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSYouthPreferentialist != "unset">> - <br><<link "Force Abandonment of Youth Preferentialism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSYouthPreferentialist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSMaturityPreferentialist != "unset">> - <br><<link "Force Abandonment of Maturity Preferentialism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSMaturityPreferentialist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSPetiteAdmiration != "unset">> - <br><<link "Force Abandonment of Petite Admiration" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSPetiteAdmiration = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSStatuesqueGlorification != "unset">> - <br><<link "Force Abandonment of Statuesque Glorification" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSStatuesqueGlorification = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSSlimnessEnthusiast != "unset">> - <br><<link "Force Abandonment of Slimness Enthusiasm" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSSlimnessEnthusiast = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSAssetExpansionist != "unset">> - <br><<link "Force Abandonment of Asset Expansionism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSAssetExpansionist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSPastoralist != "unset">> - <br><<link "Force Abandonment of Pastoralism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSPastoralist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSCummunism != "unset">> - <br><<link "Force Abandonment of Cummunism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSCummunism = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSPhysicalIdealist != "unset">> - <br><<link "Force Abandonment of Physical Idealism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSPhysicalIdealist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSHedonisticDecadence != "unset">> - <br><<link "Force Abandonment of Hedonistic Decadence" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSHedonisticDecadence = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSIncestFetishist != "unset">> - <br><<link "Force Abandonment of Incest Fetishism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSIncestFetishist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSChattelReligionist != "unset">> - <br><<link "Force Abandonment of Chattel Religionism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSChattelReligionist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSRomanRevivalist != "unset">> - <br><<link "Force Abandonment of Roman Revivalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSRomanRevivalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSAztecRevivalist !== "unset">> - <br><<link "Force Abandonment of Aztec Revivalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSAztecRevivalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSEgyptianRevivalist != "unset">> - <br><<link "Force Abandonment of Egyptian Revivalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSEgyptianRevivalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSEdoRevivalist != "unset">> - <br><<link "Force Abandonment of Edo Revivalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSEdoRevivalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSArabianRevivalist != "unset">> - <br><<link "Force Abandonment of Arabian Revivalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSArabianRevivalist = "unset">><</link>> - <</if>> - <<if $arcologies[_currentNeighbor].FSChineseRevivalist != "unset">> - <br><<link "Force Abandonment of Chinese Revivalism" "Neighbor Interact">><<set $arcologies[_currentNeighbor].FSChineseRevivalist = "unset">><</link>> - <</if>> - <</if>> - - <br><br> - If $arcologies[_currentNeighbor].name has developed enough to begin exporting worthwhile goods, it may be of interest to acquire some. - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - Since it is under your control, it is no problem at all to request the transfer of goods to $arcologies[0].name. - <<elseif $PC.skill.hacking >= 50>> - It is within your skills to redirect an outgoing shipment to $arcologies[0].name for your retrieval. - <<elseif $arcologies[_currentNeighbor].direction === $arcologies[0].embargoTarget>> - Due to your active embargo, trade with $arcologies[_currentNeighbor].name is not possible. - <<else>> - <<set _opinion = App.Neighbor.opinion(_currentNeighbor, 0)>> - <<set _prices = _opinion*10>> - <</if>> - <<if $arcologies[_currentNeighbor].FSRomanRevivalist > 95>> - <<if !isItemAccessible.entry("a toga", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of togas" "Neighbor Interact">> - <<set $clothesBoughtToga = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of togas" "Neighbor Interact">> - <<set $clothesBoughtToga = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of togas" "Neighbor Interact">> - <<set $clothesBoughtToga = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough togas. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSEdoRevivalist > 95>> - <<if !isItemAccessible.entry("a kimono", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of kimonos" "Neighbor Interact">> - <<set $clothesBoughtKimono = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of kimonos" "Neighbor Interact">> - <<set $clothesBoughtKimono = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of kimonos" "Neighbor Interact">> - <<set $clothesBoughtKimono = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough kimonos. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSArabianRevivalist > 95>> - <<if !isItemAccessible.entry("harem gauze", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of silken harem garb" "Neighbor Interact">> - <<set $clothesBoughtHarem = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of silken harem garb" "Neighbor Interact">> - <<set $clothesBoughtHarem = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of silken harem garb" "Neighbor Interact">> - <<set $clothesBoughtHarem = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough silk. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSAztecRevivalist > 95>> - <<if !isItemAccessible.entry("a huipil", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of huipils" "Neighbor Interact">> - <<set $clothesBoughtHuipil = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of huipils" "Neighbor Interact">> - <<set $clothesBoughtHuipil = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of huipils" "Neighbor Interact">> - <<set $clothesBoughtHuipil = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough huipils. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSChineseRevivalist > 95>> - <<if !isItemAccessible.entry("a slutty qipao", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of qipaos" "Neighbor Interact">> - <<set $clothesBoughtQipao = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of qipaos" "Neighbor Interact">> - <<set $clothesBoughtQipao = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of qipaos" "Neighbor Interact">> - <<set $clothesBoughtQipao = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough skimpy qipaos. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSEgyptianRevivalist > 95>> - <<if !isItemAccessible.entry("ancient Egyptian", "collar")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of Egyptian necklace replicas" "Neighbor Interact">> - <<set $clothesBoughtEgypt = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of Egyptian necklace replicas" "Neighbor Interact">> - <<set $clothesBoughtEgypt = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of Egyptian necklace replicas" "Neighbor Interact">> - <<set $clothesBoughtEgypt = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough replicas of Egyptian necklaces. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSPaternalist > 95>> - <<if !isItemAccessible.entry("conservative clothing", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of conservative clothing" "Neighbor Interact">> - <<set $clothesBoughtConservative = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of conservative clothing" "Neighbor Interact">> - <<set $clothesBoughtConservative = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of conservative clothing" "Neighbor Interact">> - <<set $clothesBoughtConservative = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough modest clothing. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSDegradationist > 95>> - <<if !isItemAccessible.entry("chains", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of binding chains" "Neighbor Interact">> - <<set $clothesBoughtChains = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of binding chains" "Neighbor Interact">> - <<set $clothesBoughtChains = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of binding chains" "Neighbor Interact">> - <<set $clothesBoughtChains = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough chains. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSGenderFundamentalist > 95>> - <<if !isItemAccessible.entry("a bunny outfit", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of bunny suits" "Neighbor Interact">> - <<set $clothesBoughtBunny = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of bunny suits" "Neighbor Interact">> - <<set $clothesBoughtBunny = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of bunny suits" "Neighbor Interact">> - <<set $clothesBoughtBunny = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough bunny suits and bowties. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSIntellectualDependency > 95>> - <<if !isItemAccessible.entry("a bimbo outfit", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of outfits suitable for bimbos" "Neighbor Interact">> - <<set $clothesBoughtBimbo = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of outfits suitable for bimbos" "Neighbor Interact">> - <<set $clothesBoughtBimbo = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of outfits suitable for bimbos" "Neighbor Interact">> - <<set $clothesBoughtBimbo = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough bimbo attire. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSSlaveProfessionalism > 95>> - <<if !isItemAccessible.entry("a courtesan dress", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of courtesan dresses" "Neighbor Interact">> - <<set $clothesBoughtCourtesan = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of courtesan dresses" "Neighbor Interact">> - <<set $clothesBoughtCourtesan = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of courtesan dresses" "Neighbor Interact">> - <<set $clothesBoughtCourtesan = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough courtesan dresses. - <</if>> - <<set _exports = 1>> - <</if>> - /* - <<if $arcologies[_currentNeighbor].FSPetiteAdmiration > 95>> - <<if !isItemAccessible.entry("temp", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of petite-sized dresses" "Neighbor Interact">> - <<set $clothesBoughtPetite = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of petite-sized dresses" "Neighbor Interact">> - <<set $clothesBoughtPetite = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of petite-sized dresses" "Neighbor Interact">> - <<set $clothesBoughtPetite = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough temp. - <</if>> - <<set _exports = 1>> - <</if>> - */ - <<if $arcologies[_currentNeighbor].FSPhysicalIdealist > 95>> - <<if !isItemAccessible.entry("body oil", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of body oil" "Neighbor Interact">> - <<set $clothesBoughtOil = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of body oil" "Neighbor Interact">> - <<set $clothesBoughtOil = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of body oil" "Neighbor Interact">> - <<set $clothesBoughtOil = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough body oil. - <</if>> - <<set _exports = 1>> - <<elseif $arcologies[_currentNeighbor].FSHedonisticDecadence > 95>> - <<if !isItemAccessible.entry("stretch pants and a crop-top", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of stretch pants and crop-tops" "Neighbor Interact">> - <<set $clothesBoughtLazyClothes = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of stretch pants and crop-tops" "Neighbor Interact">> - <<set $clothesBoughtLazyClothes = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of stretch pants and crop-tops" "Neighbor Interact">> - <<set $clothesBoughtLazyClothes = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough elastic waistbands and tight tops. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSChattelReligionist > 95>> - <<if !isItemAccessible.entry("a chattel habit", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of chattel religionist habits" "Neighbor Interact">> - <<set $clothesBoughtHabit = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of chattel religionist habits" "Neighbor Interact">> - <<set $clothesBoughtHabit = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of chattel religionist habits" "Neighbor Interact">> - <<set $clothesBoughtHabit = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough chattel religionist habits. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSPastoralist > 95>> - <<if !isItemAccessible.entry("Western clothing", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of Western clothing" "Neighbor Interact">> - <<set $clothesBoughtWestern = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of Western clothing" "Neighbor Interact">> - <<set $clothesBoughtWestern = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of Western clothing" "Neighbor Interact">> - <<set $clothesBoughtWestern = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough rancher outfits. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSRepopulationFocus > 95>> - <<if !isItemAccessible.entry("a maternity dress", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of maternity clothing" "Neighbor Interact">> - <<set $clothesBoughtMaternityDress = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of maternity clothing" "Neighbor Interact">> - <<set $clothesBoughtMaternityDress = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of maternity clothing" "Neighbor Interact">> - <<set $clothesBoughtMaternityDress = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough maternity dresses. - <</if>> - <<if !isItemAccessible.entry("attractive lingerie for a pregnant woman", "clothing")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of maternity lingerie" "Neighbor Interact">> - <<set $clothesBoughtMaternityLingerie = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of maternity lingerie" "Neighbor Interact">> - <<set $clothesBoughtMaternityLingerie = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of maternity lingerie" "Neighbor Interact">> - <<set $clothesBoughtMaternityLingerie = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough lingerie suited for pregnant women. - <</if>> - <<if !isItemAccessible.entry("a small empathy belly", "bellyAccessory")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of empathy bellies" "Neighbor Interact">> - <<set $clothesBoughtBelly = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of empathy bellies" "Neighbor Interact">> - <<set $clothesBoughtBelly = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of empathy bellies" "Neighbor Interact">> - <<set $clothesBoughtBelly = 1>> - <<run cashX(forceNeg(Math.trunc((15000-(_prices*2))*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc(15000-(_prices*2)))>>// - <</if>> - <<else>> - <br>You already have enough fake baby bumps. - <</if>> - <<set _exports = 1>> - <</if>> - <<if $arcologies[_currentNeighbor].FSStatuesqueGlorification > 95>> - <<if !isItemAccessible.entry("platform heels", "shoes")>> - <<if ($arcologies[_currentNeighbor].government == "your trustees") || ($arcologies[_currentNeighbor].government == "your agent")>> - <br><<link "Request a shipment of height boosting footwear" "Neighbor Interact">> - <<set $shoesBoughtHeels = 1>> - <</link>> - <<elseif $PC.skill.hacking >= 50>> - <br><<link "Divert an outgoing shipment of height boosting footwear" "Neighbor Interact">> - <<set $shoesBoughtHeels = 1>> - <</link>> - <<elseif $arcologies[_currentNeighbor].direction != $arcologies[0].embargoTarget>> - <br><<link "Purchase a shipment of height boosting footwear" "Neighbor Interact">> - <<set $shoesBoughtHeels = 1>> - <<run cashX(forceNeg(Math.trunc((7500-_prices)*$upgradeMultiplierTrade)), "capEx")>> - <</link>> //Will cost <<print cashFormat(Math.trunc((7500-_prices)*$upgradeMultiplierTrade))>>// - <</if>> - <<else>> - <br>You already have enough varieties of platform shoe. - <</if>> - <<set _exports = 1>> - <</if>> - <<if _exports != 1>> - <<if $arcologies[_currentNeighbor].direction == $arcologies[0].embargoTarget>> - Fortunately, - <<else>> - Unfortunately, - <</if>> - they have nothing of value. - <</if>> - - <</replace>> - <</link>> - which has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc((0.1*$arcologies[_currentNeighbor].prosperity*random(100-$economicUncertainty,100+$economicUncertainty))/100))>>m@@ and is run by - <<if $arcologies[_currentNeighbor].government !== "your agent">> - $arcologies[_currentNeighbor].government who own $arcologies[_currentNeighbor].ownership%. - <<else>> - your agent: - <<set _residentList = [_Agent.ID]>> - <<set _agentPartner = $slaves.find((s) => s.assignment === Job.AGENTPARTNER && s.relationshipTarget === _Agent.ID)>> - <<if _agentPartner>> - <<run _residentList.push(_agentPartner.ID)>> - <</if>> - <<= App.UI.SlaveList.render.listMarkup( - _residentList, - [], - App.UI.SlaveList.SlaveInteract.stdInteract - )>> - <</if>> -<</capture>> -<</for>> -</span> +<<includeDOM App.Neighbor.Interact()>> diff --git a/src/uncategorized/neighborsDevelopment.tw b/src/uncategorized/neighborsDevelopment.tw index 2d7dd91affb1419de1dbddb58b861885418fe3a0..2bd868154ebf5a215c6cdb158e79b5afa6c94c40 100644 --- a/src/uncategorized/neighborsDevelopment.tw +++ b/src/uncategorized/neighborsDevelopment.tw @@ -239,16 +239,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh <<if $arcologies[$i].direction != 0>> /* AI ARCOLOGY SHARE BUYING AND SELLING */ -<<if $arcologies[$i].direction == 0>> - <<set $economicUncertainty = 5>> -<<else>> - <<set $economicUncertainty = 10>> -<</if>> -<<if $assistant.power > 1>> - <<set $economicUncertainty = 0>> -<<elseif $assistant.power == 1>> - <<set $economicUncertainty = Math.max(Math.trunc($economicUncertainty/2),0)>> -<</if>> +<<set _economicUncertainty = App.Utils.economicUncertainty($i)>> <<if $arcologies[$i].government != "your agent">> <<if $arcologies[$i].government != "your trustees">> <<if $arcologies[$i].minority + $arcologies[$i].ownership + $arcologies[$i].PCminority < 100>> @@ -257,14 +248,14 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $sh Its leadership acquires an increased share of its ownership. <<set $arcologies[$i].ownership += 1>> <<set $arcologies[$i].prosperity -= 5>> - This places its government in control of approximately @@.orange;<<print Math.trunc(($arcologies[$i].ownership*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ of the arcology<<if $arcologies[$i].minority > 0>>, against its most prominent competition with a @@.tan;<<print Math.trunc(($arcologies[$i].minority*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ share<</if>>. + This places its government in control of approximately @@.orange;<<print Math.trunc($arcologies[$i].ownership*_economicUncertainty)>>%@@ of the arcology<<if $arcologies[$i].minority > 0>>, against its most prominent competition with a @@.tan;<<print Math.trunc($arcologies[$i].minority*_economicUncertainty)>>%@@ share<</if>>. <<elseif _prosperityDiff < random(-50,10)>> <<if $arcologies[$i].ownership > 0>> <<if $arcologies[$i].rival != 1 || ($arcologies[$i].rival == 1 && $arcologies[$i].ownership > 51 && random(1,2) == 1)>> Its leadership sells off some of its ownership to stay afloat. <<set $arcologies[$i].ownership -= 1>> <<set $arcologies[$i].prosperity += 5>> - This leaves its government in control of approximately @@.orange;<<print Math.trunc(($arcologies[$i].ownership*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ of the arcology<<if $arcologies[$i].minority > 0>>, against its most prominent competition, with a @@.tan;<<print Math.trunc(($arcologies[$i].minority*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ share<</if>>. + This leaves its government in control of approximately @@.orange;<<print Math.trunc($arcologies[$i].ownership*_economicUncertainty)>>%@@ of the arcology<<if $arcologies[$i].minority > 0>>, against its most prominent competition, with a @@.tan;<<print Math.trunc($arcologies[$i].minority*_economicUncertainty>>%@@ share<</if>>. <</if>> <</if>> <</if>>