diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js index f31f5ea9adff46fcb15115b8a03fcb24aa1389b6..55af01d10c3cb37bf1e51849f29bd40e59a46930 100644 --- a/js/003-data/miscData.js +++ b/js/003-data/miscData.js @@ -2314,7 +2314,11 @@ App.Data.misc = { {name: "Ball gag", value: "ball gag"}, {name: "Bit gag", value: "bit gag"}, {name: "Ring gag", value: "ring gag"}, - {name: "Massive dildo gag", value: "massive dildo gag"}, + { + name: "Massive dildo gag", + value: "massive dildo gag", + rs: "toysBoughtGags" + }, {name: "Dildo gag", value: "dildo gag"}, ], diff --git a/js/utils.js b/js/utils.js index 686924dddbc990327c758782b4328180e6df96da..74905a5369ba71929098f7271b2c0e59beee9b10 100644 --- a/js/utils.js +++ b/js/utils.js @@ -385,3 +385,19 @@ function deepAssign(target, source) { } } } + +/** + * Returns the median value for an array + * For more information about mean vs. median see + * https://www.clinfo.eu/mean-median/ + * @param {[number]} arr Does not need to be sorted + */ +function median(arr = []) { + const + mid = Math.floor(arr.length / 2), + nums = [...arr].sort((a, b) => a - b); + + return arr.length % 2 === 0 ? + (nums[mid] + nums[mid - 1]) / 2 : + nums[mid]; +} diff --git a/src/Mods/SpecialForce/Firebase.tw b/src/Mods/SpecialForce/Firebase.tw index e7f1bab1f28d5cfae3f170ac13b42f67d306ea73..65715dedda260b36cca9b39fd58329d65a044ad7 100644 --- a/src/Mods/SpecialForce/Firebase.tw +++ b/src/Mods/SpecialForce/Firebase.tw @@ -42,8 +42,8 @@ Total upgrade progress: <<print App.SF.progress(_size,_max)>> _size/_max(<<print (_size/_max).toFixed(2)*100>>%) <<if _size < 30>> <br>//<<print (30-_size)>> more upgrades is needed until the next tier unlocks.// <</if>> <<if $SF.Upgrade > 0>> - <<set _cost = Math.ceil(Math.abs($cash*.05 * (1.25 + (_size/1000))))>> - <br>[[Re-unlock upgrading.|Firebase][$SF.Upgrade = 0,cashX(-(_cost), "specialForces")]] @@.red;<<print cashFormat(_cost)>>@@ + <<set _cost = Math.ceil(10000 + ((0.03 - (_size/_max)/100) * $SF.CreditsInvested))>> + <br>[[Re-unlock upgrading.|Firebase][$SF.Upgrade = 0,cashX(-(_cost), "specialForcesCap")]] @@.red;<<print cashFormat(_cost)>>@@ <<elseif _size < 30 || _size !== _max>> <<include "Upgrades">> <</if>> @@ -97,7 +97,7 @@ <</if>> <<if $SF.Squad.Firebase > 5 && $secExpEnabled > 0 && $SFSupportLevel >= 4 && App.SecExp.battle.maxUnits() === 18 && App.SecExp.battle.deploySpeed() <= 10>> - <br><br>[[Provide the security force with their own section.|Firebase][$sectionInFirebase = 1, cashX(forceNeg(Math.ceil((750000*(1.15+(_size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env)), "capEx")]] + <br><br>[[Provide the security force with their own section.|Firebase][$sectionInFirebase = 1, cashX(forceNeg(Math.ceil((750000*(1.15+(_size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env)), "specialForcesCap")]] @@.red;<<print cashFormat(Math.ceil((750000*(1.15+(_size/1000))*(1.15+($SF.Squad.Firebase/10)))*_Env))>>@@ <</if>> diff --git a/src/Mods/SpecialForce/Proposal.tw b/src/Mods/SpecialForce/Proposal.tw index b3646d3defd73184a43103477e559824fcf705c9..3f43270876437825f21df8dce4dca75144026827 100644 --- a/src/Mods/SpecialForce/Proposal.tw +++ b/src/Mods/SpecialForce/Proposal.tw @@ -16,6 +16,6 @@ Such a force would solve many problems. More soldiers would mean more control, w <<elseif $PC.skill.warfare >= 50 || $PC.career == "arcology owner">> <<set _price *= 0.75>> <</if>> -<br>[[Prepare for an announcement.|Security Force Naming-Colonel][$SF.Active = 1, $SF.IntroProgress = -1, App.SF.Init(), cashX(forceNeg(_price), "specialForces")]] +<br>[[Prepare for an announcement.|Security Force Naming-Colonel][$SF.Active = 1, $SF.IntroProgress = -1, App.SF.Init(), cashX(forceNeg(_price), "specialForcesCap")]] <br> //Initial costs are @@.yellowgreen;<<print cashFormat(_price)>>@@ and upon establishment the force will have significant support costs until it is self-sufficient.// <br>[[The current measures are enough|RIE Eligibility Check][$SF.Active = 0, delete $SF.IntroProgress]] \ No newline at end of file diff --git a/src/Mods/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js index 88ca2598303e22be61244f454caadede97a07118..8d6ac223485053b3c72a7424b7966dc44e45a58c 100644 --- a/src/Mods/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -173,6 +173,7 @@ App.SF.Init = function() { Depravity: 0, Size: 0, Upgrade: 0, + CreditsInvested: 0, Gift: 0, ROE: "hold", Target: "recruit", @@ -458,7 +459,7 @@ App.SF.fsIntegration = function(input = 'Menu', textDisplay = 100) { } if (V.SF.FS[selectedFS].gift < 1 || (V.SF.FS[selectedFS].lv < 100 && V.SF.FS[selectedFS].vaildOption > 0)) { - InputText0 += ` [[${InputText1}|Firebase][cashX(-${cost}, "specialForces"), $SF.FS.Tension += ${tension}, $SF.FS.${[selectedFS]}.gift = ${gift}, $SF.FS.${[selectedFS]}.lv += ${fsIncrease}]]`; + InputText0 += ` [[${InputText1}|Firebase][cashX(-${cost}, "specialForcesCap"), $SF.FS.Tension += ${tension}, $SF.FS.${[selectedFS]}.gift = ${gift}, $SF.FS.${[selectedFS]}.lv += ${fsIncrease}]]`; if (fsIncrease > 0) { InputText0 += ` (FS acceptance:<span class='green'>+${fsIncrease}%,</span>`; } @@ -2113,13 +2114,11 @@ App.SF.fsIntegration = function(input = 'Menu', textDisplay = 100) { App.SF.AAR = function(endWeekCall = 1) { const S = V.SF.Squad, - target = 50000, - baseLine = 5000, size = App.SF.upgrades.total(); let profit = 0, upkeep = 0, income = 0, - SFSubsidy = 0, + incomeAdd = 0, r = ``; if (V.SF.FS.Tension > 100 && endWeekCall > 0) { if (V.SF.FS.BadOutcome === undefined) { @@ -2141,18 +2140,11 @@ App.SF.AAR = function(endWeekCall = 1) { let FNG = 10, unitCap = 2500, Trade = 0.025; - let cost = {a: 0.01, b: 2.5}, - NO = 1 + (size / 5), - N1 = 1 + (size / 5); + let cost = {a: 10, b: 10}, + N0 = 1 + (0.01 * (size / 6)), + N1 = 1 + (0.01 * (size / 3)); let SFD = V.SF.Depravity; - if (profit < 1) { - cost.a = 10; - } - cost.b = 0.1; - NO = 1; - N1 = 0.1; - if (V.SF.ArmySize > unitCap) { V.SF.ArmySize = unitCap; } @@ -2169,10 +2161,11 @@ App.SF.AAR = function(endWeekCall = 1) { } } } + if (V.SF.ArmySize > 200) { Trade += 0.05 * (V.SF.ArmySize / 200); Multiplier.troop += V.SF.ArmySize / 200; - upkeep += (V.SF.ArmySize * 25) / cost.a; + upkeep += V.SF.ArmySize * 33 * 1/N0; if (V.secExpEnabled > 0 && endWeekCall > 0) { V.SecExp.core.authority += 25 * (Math.ceil(V.SF.ArmySize / 200)); V.SecExp.core.authority += size * 10; @@ -2184,18 +2177,21 @@ App.SF.AAR = function(endWeekCall = 1) { FNG += S.Firebase; Trade += 0.5 * S.Firebase; Multiplier.unit += 7.5 * S.Firebase + 2 * Math.pow(S.Firebase, 2) * cost.a; + incomeAdd += (5000 * S.Firebase)/ S.Firebase - 1; upkeep += (95 * 10 + S.Firebase) * cost.b; } if (S.Armoury > 0) { FNG += 2 * S.Armoury; Trade += 0.25 * S.Armoury; Multiplier.unit += 7.5 * S.Armoury + 2 * Math.pow(S.Armoury, 2) * cost.a; + incomeAdd += (3000 * S.Armoury)/S.Armoury - 1; upkeep += (55 * S.Armoury) * cost.b; } if (S.Drugs > 0) { FNG += S.Drugs; Trade += 0.25 * S.Drugs; Multiplier.unit += 7.5 * S.Drugs + 2 * Math.pow(S.Drugs, 2) * cost.a; + incomeAdd += (3000 * S.Drugs)/S.Drugs - 1; upkeep += (35 * S.Drugs) * cost.b; } if (S.Firebase >= 1) { @@ -2249,7 +2245,7 @@ App.SF.AAR = function(endWeekCall = 1) { FNG += S.GunS; Trade += 0.25 * S.GunS; Multiplier.unit += 12 * S.GunS + 3 * Math.pow(S.GunS, 2) * cost.a; - upkeep += 70 * S.GunS; + upkeep += (70 * S.GunS) * cost.b; } if (S.Satellite.lv > 0 && S.Satellite.InOrbit > 0) { FNG += S.Satellite.lv; @@ -2365,34 +2361,36 @@ App.SF.AAR = function(endWeekCall = 1) { } } - income += ((baseLine * (1 + Multiplier.troop / NO).toFixed(2) * (1 + Multiplier.unit / NO).toFixed(2) * (1 + Multiplier.action / NO).toFixed(2) * (1 + Multiplier.depravity / NO).toFixed(2)) - (upkeep * N1).toFixed(2)) / ((size / 2 + V.SF.ArmySize / 2) * 5); + income += incomeAdd + (1 + Multiplier.troop / N0) * (1 + Multiplier.unit / N0) * (1 + Multiplier.action / N0) * (1 + Multiplier.depravity / N0); + upkeep += 30000 + (25000 * 1 / N1); if (V.SF.Target === "raiding") { income *= 1.25; - } else { - income *= 1.15; + } else if (V.SF.Target === "secure") { + income *= 1.05; + } else { // When recruiting, upkeep is lowered, effect dependent on amount of soldiers. At max capacity, multiplier back to 1. + upkeep *= 0.75 + (V.SF.ArmySize/100); } - if (V.economy < 100) { - if (V.SF.Target === "raiding") { - income *= 14.25; - } else { - income *= 14.15; - } - } // Remove line if hard mode ever gets fixed. + + if (between(V.economy, 33, 100)) { + let multiplier = (1.75 * Math.sqrt(Math.trunc(100000/V.economy-1000)/10)) + (0.2 * (Math.trunc(100000/V.economy-1000)/10)); + income *= (1 + multiplier/100); + } else if (V.economy <= 33) { // There comes a point where a worse global economy no longer benefits your Special Forces. + let multiplier = (1.75 * Math.sqrt(Math.trunc(100000/33-1000)/10)) + (0.2 * (Math.trunc(100000/33-1000)/10)); + income *= (1 + multiplier/100); + } + if (endWeekCall > 0) { V.SF.ArmySize += FNG; } income = Math.ceil(income); + upkeep = Math.ceil(upkeep); + profit = income - upkeep; if (V.debugMode > 0 && endWeekCall > 0) { - r += `<br>income:${num(income)}, troop:${num((0.09+Multiplier.troop/NO).toFixed(2))}, unit:${num((0.09+Multiplier.unit/NO).toFixed(2))}, action:${num((0.09+Multiplier.action/NO).toFixed(2))}, depravity:${num((0.09+Multiplier.depravity/NO).toFixed(2))}, upkeep:${num((upkeep*N1).toFixed(2))}`; - } - - if (income >= target) { - profit = 1; - } else { - profit = 0; - SFSubsidy = 1; + r += `<br>income:${num(income)}, upkeep:${num(upkeep)}, profit:${num(profit)}, troop:${num((0.09+Multiplier.troop/N0).toFixed(2))}, unit:${num((0.09+Multiplier.unit/N0).toFixed(2))}, action:${num((0.09+Multiplier.action/N0).toFixed(2))}, depravity:${num((0.09+Multiplier.depravity/N0).toFixed(2))}`; } if (endWeekCall > 0) { cashX(income, "specialForces"); + //We run this in economyJS.js now. + //cashX(forceNeg(upkeep), "specialForces"); if (V.SF.ArmySize > unitCap) { V.SF.ArmySize = unitCap; } @@ -2428,13 +2426,13 @@ App.SF.AAR = function(endWeekCall = 1) { r += ` The goods procured by ${V.SF.Lower} after accounting for the spoils retained by individual soldiers were `; if (profit > 0) { - r += `<span class='green'>more than sufficient to cover expenses.</span> Excess material and human assets totaling <span class='yellowgreen'>${cashFormat(income)}</span> (after liquidation) were transferred to your accounts.`; + r += `<span class='green'>more than sufficient to cover expenses.</span> Excess material and human assets totaling <span class='yellowgreen'>${cashFormat(profit)}</span> (after liquidation) and paying expenses were transferred to your accounts.`; if (V.economy < 100) { r += ` The rapidly degrading global economy has one upside,<span class='green'> ${App.SF.Caps()} was able to more easily use more 'persuasive' techniques thus leading to an increase in profit.</span>`; } } else { r += `<span class='red'>barely enough to cover expenses.</span> More growth will be needed to ensure profitability, <span class='yellow'>hopefully purchasing more upgrades will help.</span>`; - r += ` Per the estimates that ${App.SF.SFC()} provides, an additional <span class='yellowgreen'>${cashFormat(target-income)}</span> is required for sufficient cover.`; + r += ` Per the estimates that ${App.SF.SFC()} provides, an additional <span class='yellowgreen'>${cashFormat(profit)}</span> is required for sufficient cover.`; } r += ` ${App.SF.Caps()} managed to recruit ${FNG} new soldiers this week, and your reputation has <span class='green'>increased through the improvement of trade security.</span>`; @@ -2492,7 +2490,7 @@ App.SF.AAR = function(endWeekCall = 1) { if (endWeekCall > 0) { return r; } else { - return SFSubsidy; + return upkeep; } }; @@ -2509,7 +2507,7 @@ App.SF.env = function() { App.SF.UpgradeCost = function(cost, unit) { "use strict"; const S = V.SF.Squad; - let value = cost * App.SF.env() * (1.15 + (App.SF.upgrades.total() / 10)) * (1.15 + (unit / 100)); + let value = cost * App.SF.env() * Math.pow(1.15 , unit + 1); if ([S.AircraftCarrier, S.Drones, S.GiantRobot, S.GunS, S.MissileSilo, S.Satellite.lv, S.SpacePlane, S.Sub].includes(unit)) { value *= V.HackingSkillMultiplier; } diff --git a/src/Mods/SpecialForce/SpecialForceBC.js b/src/Mods/SpecialForce/SpecialForceBC.js index 7b848c1b539e874ff337b2cf52eee7749d799c8d..2be42bd16b57189fe6a99e77d6c75731d7922724 100644 --- a/src/Mods/SpecialForce/SpecialForceBC.js +++ b/src/Mods/SpecialForce/SpecialForceBC.js @@ -199,6 +199,7 @@ App.SF.BC = function() { V.SF.UC = V.SF.UC || {}; V.SF.Depravity = V.SF.Depravity || 0; V.SF.Upgrade = V.SF.Upgrade || 0; + V.SF.CreditsInvested = V.SF.CreditsInvested || 0; 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; diff --git a/src/Mods/SpecialForce/Upgrades.tw b/src/Mods/SpecialForce/Upgrades.tw index bcb3527cc9bdc22e51b333191a9b8a4a7d9efceb..257af09ef3db4d91bb1707aebf70db472a288db6 100644 --- a/src/Mods/SpecialForce/Upgrades.tw +++ b/src/Mods/SpecialForce/Upgrades.tw @@ -1,11 +1,12 @@ :: Upgrades [nobr] +<<set _upgradeDiv = 1.65>> <<set _fullyUpgraded = []>> <br>Which facility or equipment do you wish to upgrade this week? <br> <<if $SF.Squad.Firebase < App.SF.upgrades.currentUnitMax('Firebase')>> - <<set _cF = App.SF.UpgradeCost(100000,$SF.Squad.Firebase)>> + <<set _cF = App.SF.UpgradeCost(125000/_upgradeDiv,$SF.Squad.Firebase)>> <<if $cash >= _cF>> <br> - [[Upgrade Firebase|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Firebase++, cashX(-(_cF), "specialForces")]] + [[Upgrade Firebase|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Firebase++, $SF.CreditsInvested += (_cF), cashX(forceNeg(_cF), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Firebase.// <</if>> @@ -15,9 +16,9 @@ <</if>> <<if $SF.Squad.Armoury < App.SF.upgrades.currentUnitMax('Armoury')>> - <<set _cA = App.SF.UpgradeCost(40000,$SF.Squad.Armoury)>> + <<set _cA = App.SF.UpgradeCost(40000/_upgradeDiv,$SF.Squad.Armoury)>> <<if $cash >= _cA>> - [[Upgrade Armory|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Armoury++, cashX(-(_cA), "specialForces")]] + [[Upgrade Armory|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Armoury++, $SF.CreditsInvested += (_cA), cashX(forceNeg(_cA), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Armory.// <</if>> @@ -27,9 +28,9 @@ <</if>> <<if $SF.Squad.Drugs < App.SF.upgrades.currentUnitMax('Drugs')>> - <<set _cDrugs = App.SF.UpgradeCost(40000,$SF.Squad.Drugs)>> + <<set _cDrugs = App.SF.UpgradeCost(40000/_upgradeDiv,$SF.Squad.Drugs)>> <<if $cash >= _cDrugs>> - [[Upgrade Drug Lab|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Drugs++, cashX(-(_cDrugs), "specialForces")]] + [[Upgrade Drug Lab|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Drugs++, $SF.CreditsInvested += (_cDrugs), cashX(forceNeg(_cDrugs), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Drug Lab.// <</if>> @@ -39,9 +40,9 @@ <</if>> <<if $SF.Squad.Firebase >= 2 && $SF.Squad.Drones < App.SF.upgrades.currentUnitMax('Drones')>> - <<set _cDrones = App.SF.UpgradeCost(45000,$SF.Squad.Drones)>> + <<set _cDrones = App.SF.UpgradeCost(45000/_upgradeDiv,$SF.Squad.Drones)>> <<if $cash >= _cDrones>> - [[Upgrade Drone Bay|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Drones++, cashX(-(_cDrones), "specialForces")]] + [[Upgrade Drone Bay|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Drones++, $SF.CreditsInvested += (_cDrones), cashX(forceNeg(_cDrones), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Drone Bay.// <</if>> @@ -53,9 +54,9 @@ <<if App.SF.unlocked.garage()>> <br>''Garage''<br> <div style="margin-left:2em"> <<if $SF.Squad.AV < App.SF.upgrades.currentUnitMax('AV')>> - <<set _cAV = App.SF.UpgradeCost(60000,$SF.Squad.AV)>> + <<set _cAV = App.SF.UpgradeCost(60000/_upgradeDiv,$SF.Squad.AV)>> <<if $cash >= _cAV>> - [[Upgrade Attack Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.AV++, cashX(-(_cAV), "specialForces")]] + [[Upgrade Attack Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.AV++, $SF.CreditsInvested += (_cAV), cashX(forceNeg(_cAV), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Attack Vehicle Fleet.// <</if>> @@ -67,9 +68,9 @@ <div style="margin-left:2em"> <<if $SF.Squad.TV < App.SF.upgrades.currentUnitMax('TV')>> - <<set _cTV = App.SF.UpgradeCost(60000,$SF.Squad.TV)>> + <<set _cTV = App.SF.UpgradeCost(60000/_upgradeDiv,$SF.Squad.TV)>> <<if $cash >= _cTV>> - [[Upgrade Transport Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.TV++, cashX(-(_cTV), "specialForces")]] + [[Upgrade Transport Vehicle Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.TV++, $SF.CreditsInvested += (_cTV), cashX(forceNeg(_cTV), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Transport Vehicle Fleet.// <</if>> @@ -82,9 +83,9 @@ <div style="margin-left:2em"> <<set _PGTU = App.SF.upgrades.currentUnitMax('PGT')>> <<if $SF.Squad.PGT < _PGTU>> - <<set _cPGT = App.SF.UpgradeCost(735000,$SF.Squad.PGT)>> + <<set _cPGT = App.SF.UpgradeCost(735000/_upgradeDiv,$SF.Squad.PGT)>> <<if $cash >= _cPGT>> - [[Upgrade Prototype Goliath tank|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.PGT++, cashX(-(_cPGT), "specialForces")]] + [[Upgrade Prototype Goliath tank|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.PGT++, $SF.CreditsInvested += (_cPGT), cashX(forceNeg(_cPGT), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Prototype Goliath Tank.// <</if>> @@ -100,9 +101,9 @@ <<if App.SF.unlocked.hangar()>>''Hangar''<br> <div style="margin-left:2em"> <<if $SF.Squad.AA < App.SF.upgrades.currentUnitMax('AA')>> - <<set _cAA = App.SF.UpgradeCost(70000,$SF.Squad.AA)>> + <<set _cAA = App.SF.UpgradeCost(70000/_upgradeDiv,$SF.Squad.AA)>> <<if $cash >= _cAA>> - [[Upgrade Attack Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.AA++, cashX(-(_cAA), "specialForces")]] + [[Upgrade Attack Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.AA++, $SF.CreditsInvested += (_cAA), cashX(forceNeg(_cAA), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Attack Aircraft Fleet.// <</if>> @@ -114,9 +115,9 @@ <div style="margin-left:2em"> <<if $SF.Squad.TA < App.SF.upgrades.currentUnitMax('TA')>> - <<set _cTA = App.SF.UpgradeCost(70000,$SF.Squad.TA)>> + <<set _cTA = App.SF.UpgradeCost(70000/_upgradeDiv,$SF.Squad.TA)>> <<if $cash >= _cTA>> - [[Upgrade Transport Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.TA++, cashX(-(_cTA), "specialForces")]] + [[Upgrade Transport Aircraft Fleet|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.TA++, $SF.CreditsInvested += (_cTA), cashX(forceNeg(_cTA), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Transport Aircraft Fleet.// <</if>> @@ -129,9 +130,9 @@ <div style="margin-left:2em"> <<set _SPU = App.SF.upgrades.currentUnitMax('SpacePlane')>> <<if $SF.Squad.SpacePlane < _SPU>> - <<set _cSP = App.SF.UpgradeCost(250000,$SF.Squad.SpacePlane)>> + <<set _cSP = App.SF.UpgradeCost(250000/_upgradeDiv,$SF.Squad.SpacePlane)>> <<if $cash >= _cSP>> - [[Upgrade Spaceplane|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.SpacePlane++, cashX(-(_cSP), "specialForces")]] + [[Upgrade Spaceplane|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.SpacePlane++, $SF.CreditsInvested += (_cSP), cashX(forceNeg(_cSP), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Spaceplane.// <</if>> @@ -146,9 +147,9 @@ <div style="margin-left:2em"> <<set _GunSU = App.SF.upgrades.currentUnitMax('GunS')>> <<if $SF.Squad.GunS < _GunSU>> - <<set _cGunS = App.SF.UpgradeCost(350000,$SF.Squad.GunS)>> + <<set _cGunS = App.SF.UpgradeCost(350000/_upgradeDiv,$SF.Squad.GunS)>> <<if $cash >= _cGunS>> - [[Upgrade Gunship|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.GunS++, cashX(-(_cGunS), "specialForces")]] + [[Upgrade Gunship|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.GunS++, $SF.CreditsInvested += (_cGunS), cashX(forceNeg(_cGunS), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Gunship.// <</if>> @@ -165,9 +166,9 @@ <div style="margin-left:2em"> <<set _SatU = App.SF.upgrades.currentUnitMax('Satellite')>> <<if $SF.Squad.Satellite < _SatU && $SF.SatLaunched < 1>> - <<set _cSat = App.SF.UpgradeCost(525000,$SF.Squad.Satellite)>> + <<set _cSat = App.SF.UpgradeCost(525000/_upgradeDiv,$SF.Squad.Satellite)>> <<if $cash >= _cSat>> - [[Upgrade Satellite|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Satellite++, cashX(-(_cSat), "specialForces")]] + [[Upgrade Satellite|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Satellite++, $SF.CreditsInvested += (_cSat), cashX(forceNeg(_cSat), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Satellite.// <</if>> @@ -183,9 +184,9 @@ <div style="margin-left:2em"> <<set _GRU = App.SF.upgrades.currentUnitMax('GiantRobot')>> <<if $SF.Squad.GiantRobot < _GRU>> - <<set _cGR = App.SF.UpgradeCost(550000,$SF.Squad.GiantRobot)>> + <<set _cGR = App.SF.UpgradeCost(550000/_upgradeDiv,$SF.Squad.GiantRobot)>> <<if $cash >= _cGR>> - [[Upgrade Giant Robot|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.GiantRobot++, cashX(-(_cGR), "specialForces")]] + [[Upgrade Giant Robot|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.GiantRobot++, $SF.CreditsInvested += (_cGR), cashX(forceNeg(_cGR), "specialForcesCap")]] <<else>> //Cannot afford to upgrade the Giant Robot.// <</if>> @@ -200,9 +201,9 @@ <div style="margin-left:2em"> <<set _MSU = App.SF.upgrades.currentUnitMax('MissileSilo')>> <<if $SF.Squad.MissileSilo < _MSU>> - <<set _cMS = App.SF.UpgradeCost(565000,$SF.Squad.MissileSilo)>> + <<set _cMS = App.SF.UpgradeCost(565000/_upgradeDiv,$SF.Squad.MissileSilo)>> <<if $cash >= _cMS>> - [[Upgrade Cruise Missile|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.MissileSilo++, cashX(-(_cMS), "specialForces")]] + [[Upgrade Cruise Missile|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.MissileSilo++, $SF.CreditsInvested += (_cMS), cashX(forceNeg(_cMS), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Cruise Missile.// <</if>> @@ -220,9 +221,9 @@ <div style="margin-left:2em"> <<set _ACU = App.SF.upgrades.currentUnitMax('AircraftCarrier')>> <<if $SF.Squad.AircraftCarrier < _ACU>> - <<set _cAC = App.SF.UpgradeCost(650000,$SF.Squad.AircraftCarrier)>> + <<set _cAC = App.SF.UpgradeCost(650000/_upgradeDiv,$SF.Squad.AircraftCarrier)>> <<if $cash >= _cAC>> - [[Upgrade Aircraft Carrier|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.AircraftCarrier++, cashX(-(_cAC), "specialForces")]] + [[Upgrade Aircraft Carrier|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.AircraftCarrier++, $SF.CreditsInvested += (_cAC), cashX(forceNeg(_cAC), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Aircraft Carrier.// <</if>> @@ -237,9 +238,9 @@ <div style="margin-left:2em"> <<set _SubU = App.SF.upgrades.currentUnitMax('Sub')>> <<if $SF.Squad.Sub < _SubU>> - <<set _cSub = App.SF.UpgradeCost(700000,$SF.Squad.Sub)>> + <<set _cSub = App.SF.UpgradeCost(700000/_upgradeDiv,$SF.Squad.Sub)>> <<if $cash >= _cSub>> - [[Upgrade Submarine|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Sub++, cashX(-(_cSub), "specialForces")]] + [[Upgrade Submarine|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.Sub++, $SF.CreditsInvested += (_cSub), cashX(forceNeg(_cSub), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Submarine// <</if>> @@ -254,9 +255,9 @@ <div style="margin-left:2em"> <<set _HATU = App.SF.upgrades.currentUnitMax('HAT')>> <<if $SF.Squad.HAT < _HATU>> - <<set _cHAT = App.SF.UpgradeCost(665000,$SF.Squad.HAT)>> + <<set _cHAT = App.SF.UpgradeCost(665000/_upgradeDiv,$SF.Squad.HAT)>> <<if $cash >= _cHAT>> - [[Upgrade Amphibious Transport|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.HAT++, cashX(-(_cHAT), "specialForces")]] + [[Upgrade Amphibious Transport|Firebase][$SF.Upgrade = 1, $SF.Colonel.Talk += 1, $SF.Squad.HAT++, $SF.CreditsInvested += (_cSub), cashX(forceNeg(_cHAT), "specialForcesCap")]] <<else>> //Cannot afford to upgrade Amphibious Transport.// <</if>> diff --git a/src/Mods/SpecialForce/WeeklyChoices.tw b/src/Mods/SpecialForce/WeeklyChoices.tw index c4d22063754f2c5e5f5d8eddf6e8ddfe24c7a929..91436ee7527f0e510a2253b5797bf66b295dfff8 100644 --- a/src/Mods/SpecialForce/WeeklyChoices.tw +++ b/src/Mods/SpecialForce/WeeklyChoices.tw @@ -20,7 +20,7 @@ <br> <<= App.SF.Caps()>> can spare some profits from our recent operations. <</if>> | <<link "Request cash" "Firebase">> - <<run cashX(App.SF.weeklyGift(1), "specialForces")>> + <<run cashX(App.SF.weeklyGift(1), "specialForcesCap")>> <</link>> <<if $rep < 20000>> diff --git a/src/arcologyBuilding/shops.js b/src/arcologyBuilding/shops.js index d5ab18b5d190ce9d7328eb117fc1709b686668a4..49c4717d609d20e8d3ed2919fc11179f32bdcf42 100644 --- a/src/arcologyBuilding/shops.js +++ b/src/arcologyBuilding/shops.js @@ -41,8 +41,10 @@ App.Arcology.Cell.Shop = class extends App.Arcology.Cell.BaseCell { return App.Arcology.facilityCellContent(App.Entity.facilities.brothel); } else if (this.type === "Club") { return App.Arcology.facilityCellContent(App.Entity.facilities.club); - } else { + } else if (this.type === "Shops") { return App.Arcology.getCellLink(path, this.type); + } else { + return App.Arcology.getCellLink(path, `${this.type} Shops`); } } @@ -280,9 +282,9 @@ App.Arcology.Cell.Shop = class extends App.Arcology.Cell.BaseCell { } break; case "Statuesque Glorification": - fragment.append("dedicated to Statuesque Glorification. The shops here are overwhelmingly dedicated to the tall; not a single shop caters the slightest to anyone below the height threshold. Most of the shops sell clothing specially tailored to their towering patrons, though a handful also sell furniture and appliances made to comfortably accommodate a more lengthy population. The crown attraction, however, is a modest indoor amusement park designed both to make the most of a riders height and invoke a sense of envy in those unable to ride. "); + fragment.append("dedicated to Statuesque Glorification. The shops here are overwhelmingly dedicated to the tall; not a single shop caters the slightest to anyone below the height threshold. Most of the shops sell clothing specially tailored to their towering patrons, though a handful also sell furniture and appliances made to comfortably accommodate a more lengthy population. The crown attraction, however, is a modest indoor amusement park designed both to make the most of a rider's height and invoke a sense of envy in those unable to ride. "); if (V.PC.height >= 170) { - fragment.append(App.UI.DOM.linkReplace("Give the roller coaster a spin", "While it isn't the most thrilling ride, given the constraints it has to work with, but it does wind through the various footpaths of the promenade to maximize visibility and to remind those to short to ride of their place.")); + fragment.append(App.UI.DOM.linkReplace("Give the roller coaster a spin", "While it isn't the most thrilling ride, given the constraints it has to work with, but it does wind through the various footpaths of the promenade to maximize visibility and to remind those too short to ride of their place.")); } else { fragment.append("You can only watch as your citizens have fun and savor the bitter feeling of them looking down on their hilariously short leader."); } diff --git a/src/interaction/budgets/recordTemplates.js b/src/interaction/budgets/recordTemplates.js index 3cef5ce692339ce9ec2419278c776048af508a2e..a7fb7425aca8087ef64ae8f5101fb68b81c26c48 100644 --- a/src/interaction/budgets/recordTemplates.js +++ b/src/interaction/budgets/recordTemplates.js @@ -109,6 +109,7 @@ App.Data.Records.LastWeeksCash = function() { this.mercenaries = 0, this.peacekeepers = 0, this.specialForces = 0, + this.specialForcesCap = 0, this.securityExpansion = 0, this.citizenOrphanage = 0, diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 3712b2bb7f3d9fc7d4b3c83e5146773ded0ae15e..b1f14e54dc22c5ac7738386cd876a9b788a2b573 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -219,6 +219,7 @@ globalThis.CategoryAssociatedGroup = Object.freeze({ 'mercenaries', 'securityExpansion', 'specialForces', + 'specialForcesCap', 'peacekeepers' ] }); @@ -866,8 +867,8 @@ globalThis.calculateCosts = (function() { } function getSFCosts() { - if (V.SF.Toggle && V.SF.Active >= 1 && App.SF.AAR(0)) { - return Math.ceil(5000 * (1 + ((V.SF.ArmySize / 100) + (App.SF.upgrades.total() / 100)))); + if (V.SF.Toggle && V.SF.Active >= 1) { + return App.SF.AAR(0); } return 0; } diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index a11485dba822af7fd49a55e279d97ba8a90f7fdf..6d9513588ce4ca92b7f1111adc99359af47bd9ba 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -2714,6 +2714,7 @@ globalThis.rulesAssistantOptions = (function() { constructor() { const pairs = [ ["vanilla"], + ["random"], ["oral"], ["anal"], ["boobs"], @@ -2726,7 +2727,13 @@ globalThis.rulesAssistantOptions = (function() { ]; super("Smart piercing fetish target", pairs); this.setValue(current_rule.set.clitSetting); - this.onchange = (value) => current_rule.set.clitSetting = value; + this.onchange = (value) => { + if (value === "random") { + current_rule.set.clitSetting = jsEither(pairs); + } else { + current_rule.set.clitSetting = value; + } + }; } } diff --git a/src/uncategorized/costsBudget.js b/src/uncategorized/costsBudget.js index 3f68e52de47fae26131a844e55ee7078d8fc3019..61f0d60c16ae2506fa59fe39c96934c847337a04 100644 --- a/src/uncategorized/costsBudget.js +++ b/src/uncategorized/costsBudget.js @@ -254,6 +254,7 @@ App.UI.Budget.Cost = function() { generateRowCategory("Mercenaries", "mercenaries"), generateRowCategory("Security Expansion", "securityExpansion"), generateRowCategory("Special Forces", "specialForces"), + generateRowCategory("Special Forces Capital Expenses", "specialForcesCap"), generateRowCategory("Peacekeepers", "peacekeepers") ]); diff --git a/src/uncategorized/wardrobe.tw b/src/uncategorized/wardrobe.tw index c9c3006ae50cc4ac4e0cc0ae9d22e0fa47dc44df..ff5dbe546c0dc1bd54ae24c54fccb64cb3dc6796 100644 --- a/src/uncategorized/wardrobe.tw +++ b/src/uncategorized/wardrobe.tw @@ -617,10 +617,10 @@ The room containing all the clothes and accessories you have available to dress <div> <<if $toysBoughtGags == 0>> - [[Order a shipment of extra long dildo gags|Wardrobe][cashX(forceNeg(Math.trunc(5000 * $upgradeMultiplierTrade)), "capEx"), $toysBoughtGags = 1]] + [[Order a shipment of massive dildo gags|Wardrobe][cashX(forceNeg(Math.trunc(5000 * $upgradeMultiplierTrade)), "capEx"), $toysBoughtGags = 1]] <span class="detail">Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierTrade))>></span> <<else>> - You are well stocked with extra long dildo gags. + You are well stocked with massive dildo gags. <</if>> </div> </p>