diff --git a/devTools/types/FC/SecExp.d.ts b/devTools/types/FC/SecExp.d.ts index 444ae2beefd7014d842b8d3197bb43cc90894279..f49f3d622968e7e2df6d93c9d05adfd2da93962b 100644 --- a/devTools/types/FC/SecExp.d.ts +++ b/devTools/types/FC/SecExp.d.ts @@ -23,7 +23,7 @@ declare namespace FC { commissars: number } - type PlayerHumanUnitType = "bots" | "citizens" | "mercenary" | "slave"; + type PlayerHumanUnitType = "bots" | "citizens" | "mercenary" | "slave" | "SF"; type EnemyUnitType = "raiders" | "free city" | "old world" | "freedom fighters"; } } diff --git a/src/Mods/SecExp/js/Unit.js b/src/Mods/SecExp/js/Unit.js index 2c9b03766eb89ebb839dcac763baf3a7ba917fc5..65b528b2a1264f235816be7c63591069f84b0024 100644 --- a/src/Mods/SecExp/js/Unit.js +++ b/src/Mods/SecExp/js/Unit.js @@ -324,7 +324,7 @@ App.SecExp.generateUnitID = function() { }; /** Player unit factory - get a unit based on its type and index - * @param {string} type - "Bots", "Militia", "Slaves", "Mercs", or "SF" + * @param {PlayerHumanUnitType} type - "Bots", "Militia", "Slaves", "Mercs", or "SF" * @param {number} [index] - must be supplied if type is not "Bots" * @returns {App.SecExp.Unit} */ @@ -456,7 +456,7 @@ App.SecExp.getAppliedUpgrades = function(type) { attack++; def++; hp++; morale += 10; } if (V.arcologies[0].FSNeoImperialistLaw1) { - attack++; + attack++; } } } @@ -596,11 +596,11 @@ App.SecExp.BaseDroneUnit = class BaseDroneUnit { /** @implements {BaseUnit} */ App.SecExp.BaseRaiderUnit = class BaseRaiderUnit { static get attack() { - return 7; + return 7 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.raiders : 0); } static get defense() { - return 2; + return 2 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.raiders : 0); } static get morale() { @@ -615,11 +615,11 @@ App.SecExp.BaseRaiderUnit = class BaseRaiderUnit { /** @implements {BaseUnit} */ App.SecExp.BaseFreeCityUnit = class BaseFreeCityUnit { static get attack() { - return 6; + return 6 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.FC : 0); } static get defense() { - return 4; + return 4 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.FC : 0); } static get morale() { @@ -634,11 +634,11 @@ App.SecExp.BaseFreeCityUnit = class BaseFreeCityUnit { /** @implements {BaseUnit} */ App.SecExp.BaseOldWorldUnit = class BaseOldWorldUnit { static get attack() { - return 8; + return 8 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0); } static get defense() { - return 4; + return 4 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0); } static get morale() { @@ -653,11 +653,11 @@ App.SecExp.BaseOldWorldUnit = class BaseOldWorldUnit { /** @implements {BaseUnit} */ App.SecExp.BaseFreedomFighterUnit = class BaseFreedomFighterUnit { static get attack() { - return 9; + return 9 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0); } static get defense() { - return 2; + return 2 + (V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0); } static get morale() { @@ -883,12 +883,12 @@ App.SecExp.EnemyUnit = class SecExpEnemyUnit extends App.SecExp.Unit { get attack() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; - return this._baseUnit.attack * (1 + equipmentFactor) + V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0; + return this._baseUnit.attack * (1 + equipmentFactor); } get defense() { const equipmentFactor = this._data.equip * App.SecExp.equipMod; - return this._baseUnit.defense * (1 + equipmentFactor) + V.SecExp.buildings.weapManu ? V.SecExp.buildings.weapManu.sellTo.oldWorld : 0; + return this._baseUnit.defense * (1 + equipmentFactor); } get hp() { diff --git a/src/Mods/SecExp/js/secExp.js b/src/Mods/SecExp/js/secExp.js index 8bd6a0d9ae605029d5a3dad95f0942a18ff1b231..6e1edc00fab7bf3cd6eeafd043d33a8a89df3e1f 100644 --- a/src/Mods/SecExp/js/secExp.js +++ b/src/Mods/SecExp/js/secExp.js @@ -4,7 +4,7 @@ * @param {string} [section=''] which sub section (if any) is this function being called from. * @returns {{text:string, bonus:number}} */ -App.SecExp.SF_effect = function(report, section = '') { +App.SecExp.assistanceSF = function(report, section = '') { const size = V.SF.Toggle && V.SF.Active >= 1 ? App.SF.upgrades.total() : 0; let r = ``, bonus = 0; if (size > 10) { diff --git a/src/Mods/SecExp/js/tradeReport.js b/src/Mods/SecExp/js/tradeReport.js index 582c987ab68eb560f4c2edc4dde6714d93d88f8f..eb8e0dc19a127d5060a419e02b2381fa075f0bee 100644 --- a/src/Mods/SecExp/js/tradeReport.js +++ b/src/Mods/SecExp/js/tradeReport.js @@ -117,7 +117,7 @@ App.SecExp.tradeReport = function() { } } - const SF = App.SecExp.SF_effect('trade'); + const SF = App.SecExp.assistanceSF('trade'); r.push(SF.text); tradeChange += SF.bonus; if (tradeChange > 0) { diff --git a/src/endWeek/economics/arcmgmt.js b/src/endWeek/economics/arcmgmt.js index a9b96bbd2e89f5a7983fd9aa14ae1589191b6900..5c87e250a6bb206ffbe253acee085f4a8e673de3 100644 --- a/src/endWeek/economics/arcmgmt.js +++ b/src/endWeek/economics/arcmgmt.js @@ -1,5 +1,6 @@ App.EndWeek.arcManagement = function() { const el = new DocumentFragment(); + const secExpImigrationBonus = App.SecExp.propagandaEffects("immigration"); let r; let _enslaved; let _crime; @@ -625,17 +626,11 @@ App.EndWeek.arcManagement = function() { delete V.SecExp.smilingMan.globalCrisisWeeks; } } - if (V.garrison.reactorTime > 0) { - r.push(`The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators.`); - r.push(`It will still take`); - if (V.garrison.reactorTime > 1) { - r.push(`${V.garrison.reactorTime} weeks`); - } else { - r.push(`a week`); - } - r.push(`to finish repair works.`); + let reactorDamaged = V.garrison.reactorTime + if (reactorDamaged > 0) { + r.push(`The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators. It will still take ${numberWithPluralOne(reactorDamaged, 'week')} to finish repair works.`); _AWeekGrowth -= random(1, 2); - V.garrison.reactorTime--; + reactorDamaged--; IncreasePCSkills('engineering', 0.1); } @@ -1640,7 +1635,7 @@ App.EndWeek.arcManagement = function() { } r = []; if (V.lowerClass < _LCD) { - let _LCImmigration = Math.trunc((_LCD - V.lowerClass) * (0.3 * _terrain)) + 1 + App.SecExp.propagandaEffects("immigration").effect; + let _LCImmigration = Math.trunc((_LCD - V.lowerClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus .effect; if (V.arcologies[0].FSIntellectualDependencyLaw === 1) { /* Enslaving the dumb lower class immigrants*/ const _intellectualDependencyEnslaved = Math.trunc(_LCImmigration * 0.25); _LCImmigration -= _intellectualDependencyEnslaved; @@ -1705,7 +1700,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`Your middle class is <span class="green">sexually satiated</span> and their happiness attracts others.`); } if (V.middleClass < _MCD) { - let _MCImmigration = Math.trunc((_MCD - V.middleClass) * (0.3 * _terrain)) + 1 + App.SecExp.propagandaEffects("immigration").effect; + let _MCImmigration = Math.trunc((_MCD - V.middleClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus .effect; V.middleClass += _MCImmigration; if (_MCImmigration > 1) { @@ -1744,7 +1739,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`Your upper class is <span class="green">sexually satiated</span> and their happiness attracts others.`); } if (V.upperClass < _UCD) { - let _UCImmigration = Math.trunc((_UCD - V.upperClass) * (0.3 * _terrain)) + 1 + App.SecExp.propagandaEffects("immigration").effect; + let _UCImmigration = Math.trunc((_UCD - V.upperClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus .effect; V.upperClass += _UCImmigration; if (_UCImmigration > 1) { @@ -1789,7 +1784,7 @@ App.EndWeek.arcManagement = function() { appendDiv(`Your millionaires are <span class="green">sexually satiated</span> and their happiness attracts others.`); } if (V.topClass < _TCD) { - let _TCImmigration = Math.trunc((_TCD - V.topClass) * (0.3 * _terrain)) + 1 + App.SecExp.propagandaEffects("immigration").effect; + let _TCImmigration = Math.trunc((_TCD - V.topClass) * (0.3 * _terrain)) + 1 + secExpImigrationBonus .effect; V.topClass += _TCImmigration; if (_TCImmigration > 1) { @@ -1808,7 +1803,7 @@ App.EndWeek.arcManagement = function() { } } } - appendDiv(App.SecExp.propagandaEffects("immigration").text); + appendDiv(secExpImigrationBonus .text); } function slaveRetirement() { diff --git a/src/endWeek/economics/persBusiness.js b/src/endWeek/economics/persBusiness.js index e5c9d3876afd7cbd9d67cc461c41ae6aaa809056..cd4ae3d5bcd202039ef21ba6bb5d033e0e7b3409 100644 --- a/src/endWeek/economics/persBusiness.js +++ b/src/endWeek/economics/persBusiness.js @@ -878,16 +878,11 @@ App.EndWeek.personalBusiness = function() { cashX(blackMarket, "personalBusiness"); } - if (V.arcRepairTime > 0) { - r.push(`The recent rebellion left the arcology wounded and it falls to its owner to fix it. It will still take`); - if (V.arcRepairTime > 1) { - r.push(`${V.arcRepairTime} weeks`); - } else { - r.push(`a week`); - } - r.push(`to finish repair works.`); + let arcDamaged = V.arcRepairTime; + if (arcDamaged > 0) { + r.push(`The recent rebellion left the arcology wounded and it falls to its owner to fix it. It will still take ${numberWithPluralOne(arcDamaged, 'week')} to finish repair works.`); cashX(-5000, "personalBusiness"); - V.arcRepairTime--; + arcDamaged--; IncreasePCSkills('engineering', 0.1); } App.Events.addParagraph(el, r); diff --git a/src/endWeek/saLiveWithHG.js b/src/endWeek/saLiveWithHG.js index 2e6b5d27777e4581746bed545b083eac9a068071..ba1c8b01a2d586aaf2c22fddf030e57b1d7c4019 100644 --- a/src/endWeek/saLiveWithHG.js +++ b/src/endWeek/saLiveWithHG.js @@ -411,7 +411,7 @@ App.SlaveAssignment.liveWithHG = (function() { if (HG.fetishKnown === 1) { r.push(`Since their relationship is very abusive, only ${HG.slaveName} <span class="devotion inc">enjoys</span> living together with ${slave.slaveName}.`); } else { - r.push(`It turns out their relationship is <span class="fetish gain">rather abusive</span>, so only ${HG.slaveName} gets any <span class="devotion inc">enjoyment</span> out of living together with ${slave.slaveName}.`); + r.push(`It turns out their relationship is <span class="fetish gain">rather abusive,</span> so only ${HG.slaveName} gets any <span class="devotion inc">enjoyment</span> out of living together with ${slave.slaveName}.`); } HG.devotion += 3; slave.devotion -= 5; diff --git a/src/events/RETS/reFucktoyPrefersRelative.js b/src/events/RETS/reFucktoyPrefersRelative.js index b6eec0a389e9583d61fc886c7622731eff587ca6..f88e8ac2f7d25c476a73224565dc4f5ab2b7176d 100644 --- a/src/events/RETS/reFucktoyPrefersRelative.js +++ b/src/events/RETS/reFucktoyPrefersRelative.js @@ -267,7 +267,7 @@ App.Events.RETSFucktoyPrefersRelative = class RETSFucktoyPrefersRelative extends recipient.vagina++; } } - t.push(`It takes a few moments to find a rythm, but ${fucktoy.slaveName} is excited that ${he} gets to do this with ${his} ${getWrittenTitle(fucktoy)} and ${his} ${relativeTerm(fucktoy, relative)}. It's easy to enjoy the change of pace, especially with ${recipient.slaveName} writhing on your ${V.PC.dick > 0 ? `dick` : `strapon`}.`); + t.push(`It takes a few moments to find a rhythm, but ${fucktoy.slaveName} is excited that ${he} gets to do this with ${his} ${getWrittenTitle(fucktoy)} and ${his} ${relativeTerm(fucktoy, relative)}. It's easy to enjoy the change of pace, especially with ${recipient.slaveName} writhing on your ${V.PC.dick > 0 ? `dick` : `strapon`}.`); App.Events.addParagraph(frag, t); } else if (doubleCowgirl) { const onDick = canDoVaginal(fucktoy) ? fucktoy : canDoVaginal(relative) ? relative : canDoAnal(fucktoy) ? fucktoy : relative; // whee @@ -291,7 +291,7 @@ App.Events.RETSFucktoyPrefersRelative = class RETSFucktoyPrefersRelative extends } else { t.push(`give ${fucktoy.slaveName} a rimjob`); // I guess? } - t.push(`while you get a taste of ${him2}. It takes a few moments to find a rythm, but ${fucktoy.slaveName} is excited that ${he} gets to do this with ${his} ${getWrittenTitle(fucktoy)} and ${his} ${relativeTerm(fucktoy, relative)}, and it's not long before all of you have reached orgasm.`); + t.push(`while you get a taste of ${him2}. It takes a few moments to find a rhythm, but ${fucktoy.slaveName} is excited that ${he} gets to do this with ${his} ${getWrittenTitle(fucktoy)} and ${his} ${relativeTerm(fucktoy, relative)}, and it's not long before all of you have reached orgasm.`); seX(fucktoy, "oral", relative, "oral", 1); App.Events.addParagraph(frag, t); } diff --git a/src/events/intro/initNationalities.js b/src/events/intro/initNationalities.js index e870dbb31e606661d19f6f53d2302d66c7db3841..e484c6a4aa1b9bc18d5afc3c780f0caaf003f219 100644 --- a/src/events/intro/initNationalities.js +++ b/src/events/intro/initNationalities.js @@ -16,13 +16,6 @@ App.Intro.initNationalities = function() { assistantTime: 0, waterwayTime: 0 }; - if (V.wasToggledBefore === 0) { - if (V.mercenaries === 1) { - V.mercFreeManpower = jsRandom(5, 20); - } else if (V.mercenaries > 1) { - V.mercFreeManpower = jsRandom(10, 30); - } - } } function applyPCQualities() { diff --git a/submodules/sugarcube-2 b/submodules/sugarcube-2 deleted file mode 160000 index c9351665e98ed6f74c6afa0bb5e181f5bd58ef0f..0000000000000000000000000000000000000000 --- a/submodules/sugarcube-2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c9351665e98ed6f74c6afa0bb5e181f5bd58ef0f