diff --git a/src/SpecialForce/CheatEdit.tw b/src/Mods/SpecialForce/CheatEdit.tw similarity index 100% rename from src/SpecialForce/CheatEdit.tw rename to src/Mods/SpecialForce/CheatEdit.tw diff --git a/src/SpecialForce/ColonelSexDec.tw b/src/Mods/SpecialForce/ColonelSexDec.tw similarity index 100% rename from src/SpecialForce/ColonelSexDec.tw rename to src/Mods/SpecialForce/ColonelSexDec.tw diff --git a/src/SpecialForce/Firebase.tw b/src/Mods/SpecialForce/Firebase.tw similarity index 97% rename from src/SpecialForce/Firebase.tw rename to src/Mods/SpecialForce/Firebase.tw index 148000fef6ad19a1d0a9d7189aa498da91db6031..a8785139c504ece650963638b0e1b29d91ce7c6b 100644 --- a/src/SpecialForce/Firebase.tw +++ b/src/Mods/SpecialForce/Firebase.tw @@ -52,22 +52,22 @@ <<if $SF.UC.Lock < 1>> <br> <<switch $SF.UC.Assign>> <<case 0>> - <br>No soldiers are working undercover, which would primarily advance your cultural goals. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] + <br>No soldiers are working undercover, which would primarily advance your cultural goals while also slightly boosting your reputation. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] <<case 1>> - <br>A small section of soldiers are working undercover, which will primarily advance your cultural goals. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] + <br>A small section of soldiers are working undercover, which will primarily advance your cultural goals while also slightly boosting your reputation. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] <<case 2>> - <br>A large section of soldiers are working undercover, which will primarily advance your cultural goals. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] + <br>A large section of soldiers are working undercover, which will primarily advance your cultural goals while also slightly boosting your reputation. [[Full time assignment|Firebase][$SF.UC.Lock = 1]] <br>[[Reassign soldiers|Firebase][$SF.UC.Assign = -1]] <<default>> - <br>Would you like to assign soldiers to undercover duty, which will primarily advance your cultural goals? + <br>Would you like to assign soldiers to undercover duty, which will primarily advance your cultural goals while also slightly boosting your reputation? <br>[[Do not assign soldiers to work undercover|Firebase][$SF.UC.Assign = 0]] <br>[[Assign a small section of soldiers to work undercover|Firebase][$SF.UC.Assign = 1]] <br>[[Assign a large section of soldiers to work undercover|Firebase][$SF.UC.Assign = 2]] <</switch>> <<else>> - <br> <<if $SF.UC.Assign < 1>>''Zero''<<elseif $SF.UC.Assign < 2>>A ''small'' section<<else>>A ''large'' section<</if>> of the special force is assigned to undercover work, which will primarily advance your cultural goals. [[Re-allocate the units|Firebase][$SF.UC.Lock = 0]] + <br> <<if $SF.UC.Assign < 1>>''Zero''<<elseif $SF.UC.Assign < 2>>A ''small'' section<<else>>A ''large'' section<</if>> of the special force is assigned to undercover work, which will primarily advance your cultural goals while also slightly boosting your reputation. [[Re-allocate the units|Firebase][$SF.UC.Lock = 0]] <</if>> <<if $SF.Squad.Firebase > 5 && $secExpEnabled > 0 && $SFSupportLevel >= 4 && App.SecExp.battle.maxUnits() === 18 && App.SecExp.battle.deploySpeed() <= 10>> diff --git a/src/SpecialForce/NamingColonel.tw b/src/Mods/SpecialForce/NamingColonel.tw similarity index 100% rename from src/SpecialForce/NamingColonel.tw rename to src/Mods/SpecialForce/NamingColonel.tw diff --git a/src/SpecialForce/Proposal.tw b/src/Mods/SpecialForce/Proposal.tw similarity index 100% rename from src/SpecialForce/Proposal.tw rename to src/Mods/SpecialForce/Proposal.tw diff --git a/src/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js similarity index 99% rename from src/SpecialForce/SpecialForce.js rename to src/Mods/SpecialForce/SpecialForce.js index 81e649e1615b9b7048b3fcbfae38dbf77c89e764..dc8df2b5115b04ea6c3c486d0de9562aa3194410 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -15,7 +15,6 @@ App.SF.Init = function() { V.SF.Gift = V.SF.Gift || 0; V.SF.UC.Assign = V.SF.UC.Assign || 0; V.SF.UC.Lock = V.SF.UC.Lock || 0; - V.SF.UC.num = V.SF.UC.num || 0; V.SF.ROE = V.SF.ROE || "hold"; V.SF.Target = V.SF.Target || "recruit"; V.SF.Regs = V.SF.Regs || "strict"; @@ -60,8 +59,6 @@ App.SF.Init = function() { V.SF.MercCon.Menials = V.SF.MercCon.Menials || 0; V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalMenials || 0; V.SF.MercCon.TotalMercs = V.SF.MercCon.TotalMercs || 0; - - App.SF.AAR(0); } // V.arcologies[0].SFRaid = 1; V.arcologies[0].SFRaidTarget = -1; /* if (typeof V.SF.Facility === "undefined") { @@ -167,7 +164,6 @@ App.SF.BC = function() { Regs: V.securityForceAccountability, Lower: V.securityForceName, Caps: capFirstChar(V.securityForceName), - Subsidy: V.SubsidyActive }); MainClean(); App.SF.NameCapsCheck(); @@ -346,6 +342,10 @@ App.SF.BC = function() { ColonelClean(); TradeShowClean(); UnitsClean(); + delete V.SF.Subsidy; + if (jsDef(V.SF.UC)) { + delete V.SF.UC.num; + } if (V.week < 72 && V.SF.Active !== -1) { V.SF.Active = -1; } }; /* usedOnce */ @@ -2220,7 +2220,7 @@ App.SF.fsIntegration = function(input = 'Menu', textDisplay = 100, text = `\n`) r += `\nThe ${V.SF.Lower} still deploys into the old world to plunder as it pleases, but no longer for you. You receive no money from their exploits, and their total defiance and independence of you is a permanent stain on your reputation. Of course, you'll never have the needed military power to dislodge them, especially with all the redundant fortifications, crossfire envelopes, and myriad traps that paranoid bitch had built around each entrance ever since she went rouge. Trying to sabotage certain support beams from above to make the Firebase facility collapse in on itself could easily cause enough damage to topple other parts of the arcology too, and such a thing would be very difficult to cover up. In other words, you're stuck with them. The Firebase has become a permanent tumor on your Arcology and good name.`; break; } - let Obj = {Active: -2, Toggle: V.SF.Toggle, FS: {Tension: V.SF.FS.Tension, BadOutcome: BadOutcome}}; + const Obj = {Active: -2, Toggle: V.SF.Toggle, Squad:{Troops:V.SF.Squad.Troops}, Size:V.SF.Size FS: {Tension: V.SF.FS.Tension, BadOutcome: BadOutcome}}; V.SF = Obj; return r; } else if (input === 'BadOutcome_Firebase') { @@ -2249,6 +2249,7 @@ App.SF.AAR = function(endWeekCall = 1) { let profit = 0, upkeep = 0, income = 0, + SFSubsidy = 0, r = ``; if (V.SF.FS.Tension > 100 && endWeekCall > 0) { if (V.SF.FS.BadOutcome === undefined) { @@ -2274,10 +2275,8 @@ App.SF.AAR = function(endWeekCall = 1) { NO = 1 + (V.SF.Size / 5), N1 = 1 + (V.SF.Size / 5); - V.SF.UC.num = 0; App.SF.Count(); - let deaths = 0, - SFD = V.SF.Depravity; + let SFD = V.SF.Depravity; if (profit < 1) { cost.a = 10; } @@ -2300,14 +2299,6 @@ App.SF.AAR = function(endWeekCall = 1) { S.Troops -= Math.ceil(jsRandom(1.10 * S.Troops / 1000, -1.15 * S.Troops / 1000)); } } - if (V.SF.UC.Assign > 0) { - if (V.SF.UC.Assign < 2) { - V.SF.UC.num = Math.ceil(S.Troops * 0.01); - } else { - V.SF.UC.num = Math.ceil(S.Troops * 0.05); - } - } - S.Troops -= V.SF.UC.num; } if (S.Troops > 200) { Trade += 0.05 * (S.Troops / 200); @@ -2526,10 +2517,9 @@ App.SF.AAR = function(endWeekCall = 1) { if (income >= target) { profit = 1; - V.SF.Subsidy = 0; } else { profit = 0; - V.SF.Subsidy = 1; + SFSubsidy = 1; } if (endWeekCall > 0) { @@ -2541,21 +2531,6 @@ App.SF.AAR = function(endWeekCall = 1) { V.arcologies[0].prosperity = V.AProsperityCap; } - if (S.Drugs >= 8 || S.Drugs >= 10) { - let survivalChance = 50; - if (S.Drugs >= 8) { - survivalChance -= 5; - } else if (S.Drugs >= 10) { - survivalChance += 5; - } - - if (jsRandom(0, 100) > survivalChance) { - deaths = jsRandom(0, ((S.Drugs * 2) + 4)); - } - if (deaths > 0) { - S.Troops -= deaths; - } - } if (V.SF.UC.Assign === 1 && V.SF.UC.Lock < 1) { V.SF.UC.Assign = 0; } @@ -2579,12 +2554,6 @@ App.SF.AAR = function(endWeekCall = 1) { if (V.SF.UC.Assign > 0) { r += `<br>A ${V.SF.UC.Assign < 2 ? 'small':'large'} portion of the force was assigned as ${V.SF.UC.Assign < 2 ? 'part':'full'} time undercover officers.`; } - if (deaths > 0) { - r += ` <span class='red'>${deaths} soldiers fatally overdosed on the drug cocktail</span>`; - if (V.SF.MercCon.CanAttend === -1) { - r += `, The Colonel's much heavier than average drug use saves her from this side effect.`; - } - } r += `<br>These activities have, overall, <span class='green'>improved your arcology's prosperity</span>.`; r += ` The goods procured by ${V.SF.Lower} after accounting for the spoils retained by individual soldiers were `; @@ -2651,7 +2620,11 @@ App.SF.AAR = function(endWeekCall = 1) { } } } - return r; + if (endWeekCall > 0) { + return r; + } else { + return SFSubsidy; + } }; App.SF.Count = function() { @@ -2745,7 +2718,6 @@ App.SF.Count = function() { V.SF.Size = C(V.SF.Size, 0, T.max); T.T1 = 0; - T.SFSubsidy = 5000 * (1 + ((S.Troops / 100) + (V.SF.Size / 100))); App.SF.NameCapsCheck(); if (V.SF.FS.Tension === -1) { diff --git a/src/SpecialForce/TrickShotNight.tw b/src/Mods/SpecialForce/TrickShotNight.tw similarity index 100% rename from src/SpecialForce/TrickShotNight.tw rename to src/Mods/SpecialForce/TrickShotNight.tw diff --git a/src/SpecialForce/Upgrades.tw b/src/Mods/SpecialForce/Upgrades.tw similarity index 100% rename from src/SpecialForce/Upgrades.tw rename to src/Mods/SpecialForce/Upgrades.tw diff --git a/src/SpecialForce/WeeklyChoices.tw b/src/Mods/SpecialForce/WeeklyChoices.tw similarity index 100% rename from src/SpecialForce/WeeklyChoices.tw rename to src/Mods/SpecialForce/WeeklyChoices.tw diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 2dce41bbaa0e4c1ba91cd6a9e992d287e57f6684..2673e62c90f1bc1f9fe3607973d490ade3de3b52 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -472,9 +472,11 @@ window.calculateCosts = (function() { function getSFCosts() { let costs = 0; - if (State.variables.SF.Toggle && State.variables.SF.Active >= 1 && State.variables.SF.Subsidy > 0) { - App.SF.Count(); - costs += Math.ceil(State.temporary.SFSubsidy); + if (State.variables.SF.Toggle && State.variables.SF.Active >= 1) { + const SFSubsidy = App.SF.AAR(0); + if (SFSubsidy > 0) { + costs += Math.ceil(5000 * (1 + ((State.variables.SF.Squad.Troops / 100) + (State.variables.SF.Size / 100)))); + } } return costs; } diff --git a/src/uncategorized/fsDevelopments.tw b/src/uncategorized/fsDevelopments.tw index 2d92e02099a19ddc18dc17f47c2d5003d0728c2c..fab374e7ddd0526ea98c391e8fe39397d38dc644 100644 --- a/src/uncategorized/fsDevelopments.tw +++ b/src/uncategorized/fsDevelopments.tw @@ -104,9 +104,14 @@ /* Spending, terrain, rep effects */ <<set _broadProgress = 0>> -<<if $SF.Toggle && $SF.Active >= 1 && $SF.UC.Assign > 0 && $SF.UC.num > 0>> +<<if $SF.Toggle && $SF.Active >= 1 && $SF.UC.Assign > 0>> Assigning a <<if $SF.UC.Assign === 1>>small<<else>>large<</if>> portion of $SF.Lower to undercover work helps to advance your cultural goals. - <<set _broadProgress += $SF.UC.num/100>> <br> + <<if $SF.UC.Assign === 1>> + <<set _value = $SF.Squad.Troops * 0.05>> + <<else>> + <<set _value = $SF.Squad.Troops * 0.25>> + <</if>> + <<set _broadProgress += _value/100>> <br> <</if>> <<if $FSSpending > 1>> Your @@.yellowgreen;societal spending@@ helps forward your goals for the arcology's future. diff --git a/src/uncategorized/reputation.tw b/src/uncategorized/reputation.tw index 0d349d0e0a19ecf6db88f7d26b4b5c85101c8a13..95ea974133346388d320047646a07551398c1591 100644 --- a/src/uncategorized/reputation.tw +++ b/src/uncategorized/reputation.tw @@ -293,6 +293,19 @@ On formal occasions, you are announced as $PCTitle. <</if>> <</if>> +<<if $SF.Toggle && $SF.Active >= 1 && $SF.UC.Assign > 0>> + <br>Assigning a <<if $SF.UC.Assign === 1>>small<<else>>large<</if>> portion of $SF.Lower to @@.green;undercover work, slightly boosts your reputation@@. + <<if $SF.UC.Assign === 1>> + <<set _value = $SF.Squad.Troops * 0.05>> + <<else>> + <<set _value = $SF.Squad.Troops * 0.25>> + <</if>> + <<run repX(_value, "specialForces")>> <br> +<<elseif $SF.FS.BadOutcome === "ISOLATION">> + <br>Your citizens are @@.red;very displeased@@ that you are hosting a legion of heavily armed squatters in your basement. + <<run repX(forceNeg($SF.Squad.Troops+$SF.Size), "specialForces")>> +<</if>> + <<if $arcologies[0].FSSupremacist != "unset">> <<if ($PC.race == $arcologies[0].FSSupremacistRace)>> Since you are a member of the $PC.race race, society @@.green;strongly approves@@ of your ownership of the arcology. @@ -746,11 +759,6 @@ On formal occasions, you are announced as $PCTitle. <</if>> <</if>> -<<if $SF.BadOutcome === "lockdown">> - Your citizens are @@.red;very displeased@@ that you are hosting a legion of heavily armed squatters in your basement. - <<run repX(forceNeg($SF.Troops+$SF.Size), "specialForces")>> -<</if>> - <<if $FCNNstation == 1>> Playing host to the Free Cities News Network brings @@.green;approval@@ from those who still consider freedom of the press a virtue. <<run repX(500, "policies")>>