From a493a2d71609b3dc539349f924f5c2cf9bf71f30 Mon Sep 17 00:00:00 2001 From: Blank_Alt <12406-Blank_Alt@users.noreply.gitgud.io> Date: Fri, 2 Apr 2021 12:51:40 +1300 Subject: [PATCH] SF-tweak --- src/Mods/SpecialForce/SpecialForce.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Mods/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js index 2a873a316e5..c00e581cb9b 100644 --- a/src/Mods/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -1040,7 +1040,7 @@ App.SF.fsIntegration = (function() { cashX(-V.cash * 0.25, "specialForces"); let r = ``, BadOutcome = ''; - Math.clamp(V.rep, 0, 17500); + V.rep = Math.clamp(V.rep, 0, 17500); switch (V.SF.Colonel.Core) { case "kind": BadOutcome += 'MIGRATION'; @@ -1152,7 +1152,7 @@ App.SF.AAR = function(endWeekCall = 1) { } else { r += `This week your arcology lost a bit of prosperity and large amount of reputation, due to the looming threat that The Colonel and her forces may resurface.`; V.arcologies[0].prosperity -= 25; - Math.clamp(V.rep, 0, 17500); + V.rep = Math.clamp(V.rep, 0, 17500); } } else if (V.SF.FS.Tension < 100) { let Multiplier = { @@ -1161,7 +1161,7 @@ App.SF.AAR = function(endWeekCall = 1) { unit: 1, depravity: 1 }; - let FNG = 10, + let FNG = 10 + (V.SF.ArmySize / 10), unitCap = 2500, Trade = 0.025; let cost = {a: 10, b: 10}, @@ -1169,7 +1169,7 @@ App.SF.AAR = function(endWeekCall = 1) { N1 = 1 + (0.01 * (size / 3)); let SFD = V.SF.Depravity; - Math.clamp(V.SF.ArmySize, 0, unitCap); + V.SF.ArmySize = Math.clamp(V.SF.ArmySize, 0, unitCap); if (endWeekCall > 0) { if (V.SF.ArmySize < 100) { V.SF.ArmySize += Math.ceil(jsRandom(2, 5)); @@ -1413,8 +1413,8 @@ App.SF.AAR = function(endWeekCall = 1) { cashX(income, "specialForces"); // We run this in economyJS.js now. // cashX(forceNeg(upkeep), "specialForces"); - Math.clamp(V.SF.ArmySize, 0, unitCap); - Math.clamp(V.arcologies[0].prosperity, 0, V.AProsperityCap); + V.SF.ArmySize = Math.clamp(V.SF.ArmySize, 0, unitCap); + V.arcologies[0].prosperity = Math.clamp(V.arcologies[0].prosperity, 0, V.AProsperityCap); if (V.SF.UC.Assign === 1 && V.SF.UC.Lock < 1) { V.SF.UC.Assign = 0; @@ -1483,11 +1483,11 @@ App.SF.AAR = function(endWeekCall = 1) { if (V.SF.MercCon.CanAttend === 1) { V.SF.MercCon.Income = 0; V.SF.MercCon.Menials = 0; - let tradeShowAttendes = 200, - menialGiftsPerAttendee = 5, - NewMercs = 0; - let menialGifts = Math.ceil(jsRandom(1, ((tradeShowAttendes * menialGiftsPerAttendee) / 10))); - let TSProfit = Math.ceil(500000 * (1 + (size / 1000)) * (1 + (V.arcologies[0].prosperity / 1000)) * App.SF.env()); + const tradeShowAttendes = 200; + const menialGiftsPerAttendee = 5; + const menialGifts = Math.ceil(jsRandom(1, ((tradeShowAttendes * menialGiftsPerAttendee) / 10))); + const TSProfit = Math.ceil(500000 * (1 + (size / 1000)) * (1 + (V.arcologies[0].prosperity / 1000)) * App.SF.env()); + const NewMercs = jsRandom(1, (tradeShowAttendes / 10)); V.SF.MercCon.Menials += menialGifts; V.SF.MercCon.TotalMenials += menialGifts; @@ -1499,7 +1499,6 @@ App.SF.AAR = function(endWeekCall = 1) { if (V.secExpEnabled > 0 && V.mercenaries > 0) { V.SF.MercCon.Mercs = 0; - NewMercs = jsRandom(1, (tradeShowAttendes / 10)); V.SecExp.units.mercs.free += NewMercs; V.SF.MercCon.TotalMercs += NewMercs; V.SF.MercCon.Mercs += NewMercs; -- GitLab