diff --git a/devTools/types/FC/gameState.d.ts b/devTools/types/FC/gameState.d.ts index 17edc15283bab7b28ec5eb3cb327fc7cf8b9e36a..4b1d99fd963b8d82415172cf5e3e4487fd3313e8 100644 --- a/devTools/types/FC/gameState.d.ts +++ b/devTools/types/FC/gameState.d.ts @@ -16,7 +16,7 @@ declare namespace FC { /** - 0: Gone - 1: Not established - - 2: Intro + - 2: Established - 3: Independent */ state: number; diff --git a/src/descriptions/arcologyDescription.js b/src/descriptions/arcologyDescription.js index eb5b11e3a4954fa8c08e92b5374318751f35d71f..28a48e06cec93c3ec3becefd2a894ff759f6b39d 100644 --- a/src/descriptions/arcologyDescription.js +++ b/src/descriptions/arcologyDescription.js @@ -998,17 +998,17 @@ App.Desc.playerArcology = function(lastElement) { if (V.invasionVictory) { frag.append(`The area previously occupied by the little old world country whose collapse led to a failed invasion of the Free City is a lawless wilderness.`); } else if (V.week > 29) { - frag.append(` A small old world country near the arcology is in the process of collapse${V.nationHate ? ", and your opportunistic behavior towards it has caused hatred there" : ""}.`); + frag.append(`A small old world country near the arcology is in the process of collapse${V.nationHate ? ", and your opportunistic behavior towards it has caused hatred there" : ""}.`); } else { - frag.append(` There is nothing notable about the decaying old world countries ${V.terrain === "oceanic" ? "on the shoreline nearest" : "near"} the arcology.`); + frag.append(`There is nothing notable about the decaying old world countries ${V.terrain === "oceanic" ? "on the shoreline nearest" : "near"} the arcology.`); } } else { if (V.peacekeepers.strength >= 50) { frag.append(`General ${V.peacekeepers.generalName} now governs an area near the Free City as a warlord, using the men and women of his former peacekeeping forces to rule.`); if (V.peacekeepers.attitude >= 100) { - frag.append(`The area is a de facto client state of your arcology.`); + frag.append(` The area is a de facto client state of your arcology.`); } else { - frag.append(`He considers himself indebted to you, and delivers periodic tributes of menial slaves.`); + frag.append(` He considers himself indebted to you, and delivers periodic tributes of menial slaves.`); } } else { // TODO: create an actual framework for this behavior (only refreshing a specific element) diff --git a/src/endWeek/economics/persBusiness.js b/src/endWeek/economics/persBusiness.js index 0f2ecaf2095b9a9d753ce99b8e1f46e5a6a398a6..392d24e02aef95464dbff1a43ac68c67b4cdfc18 100644 --- a/src/endWeek/economics/persBusiness.js +++ b/src/endWeek/economics/persBusiness.js @@ -950,7 +950,7 @@ App.EndWeek.personalBusiness = function() { r.push(`A share of our weapons production is sold to other Free Cities.`); income += Math.round(V.week / 3 * price * 10 * factoryMod); } - if (V.peacekeepers !== 0 && V.peacekeepers.strength >= 50) { + if (V.peacekeepers.state === 3 && V.peacekeepers.strength >= 50) { r.push(`The peacekeeping force is always in need of new armaments and is happy to be supplied by their ally.`); income += Math.round(V.peacekeepers.strength * price * 10 * factoryMod); } diff --git a/src/events/nonRandom/peacekeepers/pPeacekeepersIndependence.js b/src/events/nonRandom/peacekeepers/pPeacekeepersIndependence.js index e70cca5079b103a7585c51379e0e21b943704227..53ba6e64a48bcc889c7bde7eeaacc8dfcc632d43 100644 --- a/src/events/nonRandom/peacekeepers/pPeacekeepersIndependence.js +++ b/src/events/nonRandom/peacekeepers/pPeacekeepersIndependence.js @@ -45,9 +45,6 @@ App.Events.PPeacekeepersIndependence = class PPeacekeepersIndependence extends A function assistance() { const frag = new DocumentFragment(); - if (!V.peacekeepers) { // for typing - return frag; - } cashX(-smallAid, "peacekeepers"); V.peacekeepers.strength = 50; V.peacekeepers.attitude += 5; diff --git a/src/events/nonRandom/peacekeepers/pPeacekeepersInfluence.js b/src/events/nonRandom/peacekeepers/pPeacekeepersInfluence.js index e7bc4c2a8550e35fe84a9a80972abb3b39d07271..373b6a331e046ae34ee9734e0217a828b690a46f 100644 --- a/src/events/nonRandom/peacekeepers/pPeacekeepersInfluence.js +++ b/src/events/nonRandom/peacekeepers/pPeacekeepersInfluence.js @@ -7,10 +7,6 @@ App.Events.PPeacekeepersInfluence = class PPeacekeepersInfluence extends App.Eve } execute(node) { - if (!V.peacekeepers) { // for typing - return node; - } - V.nextButton = "Continue"; V.peacekeepers.influenceAnnounced = 1; diff --git a/src/events/nonRandom/rival/pRivalryDispatch.js b/src/events/nonRandom/rival/pRivalryDispatch.js index 6cc307062f3e13f77731c8f613e31f10a826e18a..a5711c58776b3b36eebdc73d98453026c7771a57 100644 --- a/src/events/nonRandom/rival/pRivalryDispatch.js +++ b/src/events/nonRandom/rival/pRivalryDispatch.js @@ -14,7 +14,7 @@ App.Events.PRivalryDispatch = class PRivalryDispatch extends App.Events.BaseEven } else if ((V.rivalOwner - V.rivalryPower + 10) / V.arcologies[0].prosperity < 0.5) { V.eventResults.rivalActionWeek = V.week; // that's all for this week node.append(App.Events.pRivalryVictory()); - } else if (V.peacekeepers && V.peacekeepers.attitude > 5 && V.rivalryDuration > 1 && !V.eventResults.peacekeeperHelp) { + } else if (V.peacekeepers.state === 2 && V.peacekeepers.attitude > 5 && V.rivalryDuration > 1 && !V.eventResults.peacekeeperHelp) { // can fire this event again to trigger victory or rival actions in the same week node.append(App.Events.PRivalryPeacekeepers()); } else { diff --git a/src/events/scheduled/seNicaeaCouncil.js b/src/events/scheduled/seNicaeaCouncil.js index e5117d575df90d34f55a88b87c9ad99c446f9165..58c749deee2c94c7f33287689221f79b357cd3a1 100644 --- a/src/events/scheduled/seNicaeaCouncil.js +++ b/src/events/scheduled/seNicaeaCouncil.js @@ -78,12 +78,6 @@ App.Events.SENicaeaCouncil = class SENicaeaCouncil extends App.Events.BaseEvent $(container).empty().append(councilInfluence()); } - function concludeCouncil() { - repX(V.nicaea.influence * 10000, "event"); - V.nicaea.influence = 0; - $(container).empty().append(councilInfluence()); - } - /** * @typedef {object} NicaeaChoice * @property {string} text @@ -174,7 +168,11 @@ App.Events.SENicaeaCouncil = class SENicaeaCouncil extends App.Events.BaseEvent ])); App.Events.addParagraph(frag, [ - App.UI.DOM.link("Conclude the Council", () => concludeCouncil), + App.UI.DOM.link("Conclude the Council", () => { + repX(V.nicaea.influence * 10000, "event"); + V.nicaea.influence = 0; + $(container).empty().append(councilInfluence()); + }), App.UI.DOM.makeElement("span", "This will let the currently prevailing views stand, and convert your remaining influence with the Council into general reputation", "note") ]); } else { diff --git a/src/js/economyJS.js b/src/js/economyJS.js index dab32f26dd03e0d25c92ed17e6e2174aa972779a..ac2907a22aa8314a4b3446e5ea2cbeaa96685297 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -706,7 +706,7 @@ globalThis.calculateCosts = (function() { } function getPeacekeeperCosts() { - return (V.peacekeepers !== 0 && V.peacekeepers.undermining !== 0) ? V.peacekeepers.undermining : 0; + return (V.peacekeepers.state === 2 && V.peacekeepers.undermining !== 0) ? V.peacekeepers.undermining : 0; } function getMercenariesCosts() {