From 3caac23128c228e8c3a9981bcf452b7900a15bb1 Mon Sep 17 00:00:00 2001 From: Blank <blank@national.shitposting.agency> Date: Wed, 15 May 2019 18:40:13 -0700 Subject: [PATCH] SF fixing and tweaking II --- src/SpecialForce/Proposal.tw | 49 +++---- src/SpecialForce/SpecialForce.js | 213 +++++++++++++++---------------- src/SpecialForce/Upgrades.tw | 54 ++++---- src/init/storyInit.tw | 3 +- 4 files changed, 146 insertions(+), 173 deletions(-) diff --git a/src/SpecialForce/Proposal.tw b/src/SpecialForce/Proposal.tw index 72ca2c8bb32..fd04ace1eb0 100644 --- a/src/SpecialForce/Proposal.tw +++ b/src/SpecialForce/Proposal.tw @@ -1,34 +1,21 @@ :: Security Force Proposal [nobr] -<<set $nextButton = " ">> -<span id="result"> +<<set $nextButton = " ", _price = 20000>> +The Free Cities were founded on the principles of unrestrained anarcho-capitalism. To those with such beliefs, the very idea of possessing an armed force, a key tool of government control, or weapons at all, was anathema. +<br><br> +In the period since, however, your citizens have seen the value in weaponry. They watched on their news-feed as some Free Cities were sacked by the armies and mobs of the old world, driven by their hatred of the citizens' luxurious lifestyles. They've seen other Cities toppled from within, by slave conspiracies or infighting among citizen groupings with differing beliefs. They've witnessed the distressingly rapid rise of fanatical anti-slavery organizations, who would like nothing more than to see them slowly bled by their own chattel. They are learned people, and they know what happens to slaveowners who lose their power. +<br><br> +They've also seen the results of your policies. Your actions towards the arming of both yourself and the arcology proved critical, and ensured their safety when the old world came for them. And your victory over the Daughters of Liberty, who the citizens know would have executed every single one of them, has created an opportunity. If you insisted upon the creation of a standing 'special' force for the arcology, many would support you and, more importantly, nobody of note would object. +<br><br> +Such a force would solve many problems. More soldiers would mean more control, which is very good for you. More soldiers would mean more security for the arcology and the approaches to it, which is very good for business. More soldiers would mean more obedience from rebellious slaves who can see how powerless they truly are, which is very good for everybody. The force would be tiny compared to the old world militaries that still exist, but money and technology can, of course, overcome massive numerical inferiority. This being the Free Cities, they would have other uses besides security. Perhaps, in time, you could exert some manner of influence on the old world itself. +<br><br> +''This is a unique and very important opportunity'', and is possible only because of your recent victory over the Daughters. If you do not seize it, the memories and fears of your citizens will fade,and you will not be able to raise the matter again. - The Free Cities were founded on the principles of unrestrained anarcho-capitalism. To those with such beliefs, the very idea of possessing an armed force, a key tool of government control, or weapons at all, was anathema. - <br><br> - In the period since, however, your citizens have seen the value in weaponry. They watched on their news-feed as some Free Cities were sacked by the armies and mobs of the old world, driven by their hatred of the citizens' luxurious lifestyles. They've seen other Cities toppled from within, by slave conspiracies or infighting among citizen groupings with differing beliefs. They've witnessed the distressingly rapid rise of fanatical anti-slavery organizations, who would like nothing more than to see them slowly bled by their own chattel. They are learned people, and they know what happens to slaveowners who lose their power. - <br><br> - They've also seen the results of your policies. Your actions towards the arming of both yourself and the arcology proved critical, and ensured their safety when the old world came for them. And your victory over the Daughters of Liberty, who the citizens know would have executed every single one of them, has created an opportunity. If you insisted upon the creation of a standing 'special' force for the arcology, many would support you and, more importantly, nobody of note would object. - <br><br> - Such a force would solve many problems. More soldiers would mean more control, which is very good for you. More soldiers would mean more security for the arcology and the approaches to it, which is very good for business. More soldiers would mean more obedience from rebellious slaves who can see how powerless they truly are, which is very good for everybody. The force would be tiny compared to the old world militaries that still exist, but money and technology can, of course, overcome massive numerical inferiority. This being the Free Cities, they would have other uses besides security. Perhaps, in time, you could exert some manner of influence on the old world itself. - <br><br> - ''This is a unique and very important opportunity'', and is possible only because of your recent victory over the Daughters. If you do not seize it, the memories and fears of your citizens will fade,and you will not be able to raise the matter again. - - <<set _price = 20000>> - <<if $PC.warfare >= 100>> - <<set _price *= .5>> - <<elseif $PC.warfare >= 50||$PC.career === "arcology owner">> - <<set _price *= .75>> - <</if>> - <br><<link "Prepare for an announcement." "Security Force Naming-Colonel">> - <<replace "#result">> - <<= App.SF.Init()>> - <<set $SF.IntroProgress = -1>> - <<run cashX(forceNeg(_price), "specialForces")>> - <</replace>> - <</link>><br>//Initial costs are @@.yellowgreen;<<print cashFormat(_price)>>@@ and upon establishment the force will have significant support costs until it is self-sufficient.// - <br><<link "The current measures are enough." "RIE Eligibility Check">> - <<replace "#result">> - <<set $SF.Active = 0>> - <</replace>> - <</link>> -</span> \ No newline at end of file +<<if $PC.warfare >= 100>> + <<set _price *= 0.5>> +<<elseif $PC.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(-_price, "specialForces")]] +<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]] \ No newline at end of file diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js index 7c94a665095..57f05c859dc 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/SpecialForce/SpecialForce.js @@ -1,62 +1,66 @@ // V=SugarCube.State.variables, T=SugarCube.State.temporary; App.SF.Init = function() { const V = State.variables; - if (V.SF === undefined) V.SF = {}; - if (V.SF.UC === undefined) V.SF.UC = {}; - V.SF.Depravity = V.SF.Depravity || 0; - V.SF.Size = V.SF.Size || 0; - V.SF.Upgrade = V.SF.Upgrade || 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; - 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"; - V.SF.Caps = V.SF.Caps || "The Special Force"; - V.SF.Lower = V.SF.Lower || "the special force"; - - if (V.SF.Squad === undefined) V.SF.Squad = {}; - V.SF.Squad.Troops = V.SF.Squad.Troops || 40; - V.SF.Squad.Armoury = V.SF.Squad.Armoury || 0; - V.SF.Squad.Firebase = V.SF.Squad.Firebase || 0; - V.SF.Squad.AV = V.SF.Squad.AV || 0; - V.SF.Squad.TV = V.SF.Squad.TV || 0; - V.SF.Squad.Drones = V.SF.Squad.Drones || 0; - V.SF.Squad.Drugs = V.SF.Squad.Drugs || 0; - V.SF.Squad.PGT = V.SF.Squad.PGT || 0; - V.SF.Squad.AA = V.SF.Squad.AA || 0; - V.SF.Squad.TA = V.SF.Squad.TA || 0; - V.SF.Squad.SpacePlane = V.SF.Squad.SpacePlane || 0; - V.SF.Squad.GunS = V.SF.Squad.GunS || 0; - - if (V.SF.Squad.Satellite === undefined) V.SF.Squad.Satellite = {}; - V.SF.Squad.Satellite.lv = V.SF.Squad.Satellite.lv || 0; - V.SF.Squad.Satellite.InOrbit = V.SF.Squad.Satellite.InOrbit || 0; - V.SF.Squad.GiantRobot = V.SF.Squad.GiantRobot || 0; - V.SF.Squad.MissileSilo = V.SF.Squad.MissileSilo || 0; - V.SF.Squad.AircraftCarrier = V.SF.Squad.AircraftCarrier || 0; - V.SF.Squad.Sub = V.SF.Squad.sub || 0; - V.SF.Squad.HAT = V.SF.Squad.HAT || 0; - - if (V.SF.Colonel === undefined) V.SF.Colonel = {}; - V.SF.Colonel.Core = V.SF.Colonel.Core || ""; - V.SF.Colonel.Talk = V.SF.Colonel.Talk || 0; - V.SF.Colonel.Fun = V.SF.Colonel.Fun || 0; - V.SF.Colonel.Status = V.SF.Colonel.Status || 0; - - if (V.SF.MercCon === undefined) V.SF.MercCon = {}; - V.SF.MercCon.History = V.SF.MercCon.History || 0; - V.SF.MercCon.CanAttend = V.SF.MercCon.CanAttend || -2; - V.SF.MercCon.Income = V.SF.MercCon.Income || 0; - V.SF.MercCon.Revenue = V.SF.MercCon.Revenue || 0; - V.SF.MercCon.Mercs = V.SF.MercCon.Mercs || 0; - 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; - + if (passage() === "init" || passage() === "New Game Plus") V.SF = {Active: -1}; + V.SF.Toggle = V.SF.Toggle || 0; + V.SF.FS = V.SF.FS || {}; V.SF.FS.Tension = V.SF.FS.Tension || -1; - App.SF.AAR(0); + if (V.SF.Toggle && V.SF.Active >= 1) { + V.SF.UC = V.SF.UC || {}; + V.SF.Depravity = V.SF.Depravity || 0; + V.SF.Size = V.SF.Size || 0; + V.SF.Upgrade = V.SF.Upgrade || 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; + 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"; + V.SF.Caps = V.SF.Caps || "The Special Force"; + V.SF.Lower = V.SF.Lower || "the special force"; + + V.SF.Squad = V.SF.Squad || {}; + V.SF.Squad.Troops = V.SF.Squad.Troops || 40; + V.SF.Squad.Armoury = V.SF.Squad.Armoury || 0; + V.SF.Squad.Firebase = V.SF.Squad.Firebase || 0; + V.SF.Squad.AV = V.SF.Squad.AV || 0; + V.SF.Squad.TV = V.SF.Squad.TV || 0; + V.SF.Squad.Drones = V.SF.Squad.Drones || 0; + V.SF.Squad.Drugs = V.SF.Squad.Drugs || 0; + V.SF.Squad.PGT = V.SF.Squad.PGT || 0; + V.SF.Squad.AA = V.SF.Squad.AA || 0; + V.SF.Squad.TA = V.SF.Squad.TA || 0; + V.SF.Squad.SpacePlane = V.SF.Squad.SpacePlane || 0; + V.SF.Squad.GunS = V.SF.Squad.GunS || 0; + + V.SF.Squad.Satellite = V.SF.Squad.Satellite || {}; + V.SF.Squad.Satellite.lv = V.SF.Squad.Satellite.lv || 0; + V.SF.Squad.Satellite.InOrbit = V.SF.Squad.Satellite.InOrbit || 0; + V.SF.Squad.GiantRobot = V.SF.Squad.GiantRobot || 0; + V.SF.Squad.MissileSilo = V.SF.Squad.MissileSilo || 0; + V.SF.Squad.AircraftCarrier = V.SF.Squad.AircraftCarrier || 0; + V.SF.Squad.Sub = V.SF.Squad.sub || 0; + V.SF.Squad.HAT = V.SF.Squad.HAT || 0; + + V.SF.Colonel = V.SF.Colonel || {}; + V.SF.Colonel.Core = V.SF.Colonel.Core || ""; + V.SF.Colonel.Talk = V.SF.Colonel.Talk || 0; + V.SF.Colonel.Fun = V.SF.Colonel.Fun || 0; + V.SF.Colonel.Status = V.SF.Colonel.Status || 0; + + V.SF.MercCon = V.SF.MercCon || {}; + V.SF.MercCon.History = V.SF.MercCon.History || 0; + V.SF.MercCon.CanAttend = V.SF.MercCon.CanAttend || -2; + V.SF.MercCon.Income = V.SF.MercCon.Income || 0; + V.SF.MercCon.Revenue = V.SF.MercCon.Revenue || 0; + V.SF.MercCon.Mercs = V.SF.MercCon.Mercs || 0; + 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") { V.SF.Facility = { @@ -261,62 +265,55 @@ App.SF.BC = function() { App.SF.Init(); } } else if (typeof V.SF === "object") { - if (V.SF.MercCon && V.SF.MercCon.View) { delete V.SF.MercCon.View; } - if (V.SF.UC === undefined) { - if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { - V.SF.UC = {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}; - } else { - V.SF.UC = {Assign: 0, Lock: 0}; + App.SF.Init(); + + if (V.SF.MercCon !== undefined) { + if( V.SF.MercCon.View !== undefined) { + delete V.SF.MercCon.View; } - delete V.SF.SpecOps; - delete V.SF.SpecOpsLock; + if (V.SF.MercCon.Helots !== undefined) { + V.SF.MercCon.Menials = V.SF.MercCon.Helots; + delete V.SF.MercCon.Helots; + } + if (V.SF.MercCon.TotalHelots !== undefined) { + V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots; + delete V.SF.MercCon.TotalHelots; + } + } + + if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { + V.SF.UC = {Assign: V.SF.SpecOps, Lock: V.SF.SpecOpsLock}; } - if (V.SF.UC.num === undefined) { + delete V.SF.SpecOps; + delete V.SF.SpecOpsLock; + if (V.SFUC !== undefined) { V.SF.UC.num = V.SFUC || 0; } delete V.SFUC; - if (V.SF.Active === -1) { - App.SF.Init(); - } - if (V.SF.MWU) { + + if (V.SF.MWU !== undefined) { delete V.SF.MWU; } if (V.SpecOpsLock !== undefined) { V.SF.SpecOpsLock = V.SpecOpsLock; } delete V.SpecOpsLock; - if (V.SF.Upgrade === undefined) { + if (V.SF.U !== undefined) { V.SF.Upgrade = V.SF.U || 0; } delete V.SF.U; - if (V.SF.Gift === undefined) { + if (V.SF.WG !== undefined) { V.SF.Gift = V.SF.WG || 0; } delete V.SF.WG; - if (V.SF.MercCon === undefined) { - App.SF.Init(); - } - if (V.SF.MercCon.Helots !== undefined) { - V.SF.MercCon.Menials = V.SF.MercCon.Helots; - delete V.SF.MercCon.Helots; - } else { - V.SF.MercCon.Menials = 0; - } - if (V.SF.MercCon.TotalHelots !== undefined) { - V.SF.MercCon.TotalMenials = V.SF.MercCon.TotalHelots; - delete V.SF.MercCon.TotalHelots; - } else { - V.SF.MercCon.TotalMenials = 0; - } - if (V.SF.Bonus !== undefined) { delete V.SF.Bonus; } if (V.SF.Depravity < 0) { V.SF.Depravity = 0; } - if (V.SF.Size === undefined) { + if (V.SF.Units !== undefined) { V.SF.Size = V.SF.Units; } delete V.SF.Units; @@ -332,27 +329,14 @@ App.SF.BC = function() { V.SF.Colonel = V.SFColonel; } delete V.SFColonel; - if (V.SF.Squad.Satellite !== undefined && V.SatLaunched === undefined) { - V.SF.Squad.Sat = {lv: 0, InOrbit: 0}; + if (V.SF.Squad !== undefined && V.SF.Squad.Satellite !== undefined && V.SatLaunched !== undefined) { + V.SF.Squad.Sat = {lv: V.SF.Squad.Satellite, InOrbit: V.SatLaunched}; V.SF.Squad.Satellite = V.SF.Squad.Sat; delete V.SF.Squad.Sat; delete V.SatLaunched; delete V.SFUnit; } } - if (V.SF.Squad !== undefined && V.SF.Squad.Satellite.lv === undefined) { - V.SF.Squad.Sat = {lv: V.SF.Squad.Satellite, InOrbit: 0}; - V.SF.Squad.Satellite = V.SF.Squad.Sat; - delete V.SF.Squad.Sat; - } - // if (V.SF.Facility === undefined) App.SF.Init(); - if (V.SF.Squad.Satellite === undefined) { - V.SF.Squad.Satellite = {lv: 0, InOrbit: 0}; - } - if (V.SF.FS === undefined) { - V.SF.FS = {Tension: -1}; - } - if (V.SF.Toggle && V.SF.Active >= 1) App.SF.Init(); } InitClean(); MainClean(); @@ -2754,6 +2738,9 @@ 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 (E > 100) { T.Env = 4; } else if (E > 67) { @@ -2765,33 +2752,33 @@ App.SF.Count = function() { if (V.SF.Size >= 30) { T.T1 = 1; } - T.SFSubsidy = 5000 * (1 + ((V.SF.Squad.Troops / 100) + (V.SF.Size / 100))); - App.SF.NameCapsCheck(); + if (V.SF.IntroProgress > -1) { delete V.SF.IntroProgress; } - if (V.SF.MercCon === undefined) { - App.SF.Init(); - } + if (V.SF.Size === T.max) { delete V.SF.Upgrade; } + if (V.SF.BadOutcome !== undefined) { delete V.SF.BadOutcome; } - if (V.SF.FS === undefined) { - V.SF.FS = {Tension: -1}; - } - if (V.SF.tour === undefined) { + + if (V.Tour !== undefined) { V.SF.tour = V.Tour || 0; + delete V.Tour; } - delete V.Tour; + V.SF.tour = V.SF.tour || 0; + if (V.arcologies[0].SFRaid !== undefined) { delete V.arcologies[0].SFRaid; } + if (V.arcologies[0].SFRaidTarget !== undefined) { delete V.arcologies[0].SFRaidTarget; } + if (V.SF.Facility !== undefined) { delete V.SF.Facility; } @@ -2817,7 +2804,7 @@ App.SF.UpgradeCost = function(cost, unit) { return Math.ceil(value); }; -window.progress = function(x, max) { +App.SF.progress = function(x, max) { "use strict"; let out = `â`, z, i; diff --git a/src/SpecialForce/Upgrades.tw b/src/SpecialForce/Upgrades.tw index b05bacee2b4..bf1659e5281 100644 --- a/src/SpecialForce/Upgrades.tw +++ b/src/SpecialForce/Upgrades.tw @@ -2,7 +2,7 @@ <br><br> <<if $SF.Size !== _max>> - Total upgrade progress: <<print progress($SF.Size,_max)>> $SF.Size/_max(<<print ($SF.Size/_max).toFixed(2)*100>>%) <<if $SF.Size < 30>> <br>//<<print (30-$SF.Size )>> more upgrades is needed until the next tier unlocks.// <</if>> + Total upgrade progress: <<print App.SF.progress($SF.Size,_max)>> $SF.Size/_max(<<print ($SF.Size/_max).toFixed(2)*100>>%) <<if $SF.Size < 30>> <br>//<<print (30-$SF.Size )>> more upgrades is needed until the next tier unlocks.// <</if>> <<else>> There are no more upgrades available. <</if>> @@ -22,7 +22,7 @@ <<else>> //Cannot afford to upgrade the Firebase.// <</if>> - //Costs @@.red;<<print cashFormat(_cF)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Firebase)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cF)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Firebase)>> </span> <br> <<elseif $SF.Squad.Firebase === _FU>> //The Firebase has been fully upgraded.// <br> <</if>> @@ -34,7 +34,7 @@ <<else>> //Cannot afford to upgrade the Armory.// <</if>> - //Costs @@.red;<<print cashFormat(_cA)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Armoury)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cA)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Armoury)>> </span> <br> <<elseif $SF.Squad.Armoury === _AU>> //The Armory has been fully upgraded.// <br> <</if>> @@ -46,7 +46,7 @@ <<else>> //Cannot afford to upgrade the Drug Lab.// <</if>> - //Costs @@.red;<<print cashFormat(_cDrugs)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Drugs)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cDrugs)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Drugs)>> </span> <br> <<elseif $SF.Squad.Drugs === _DrugsU>> //The Drug Lab has been fully upgraded.// <br> <</if>> @@ -58,7 +58,7 @@ <<else>> //Cannot afford to upgrade the Drone Bay.// <</if>> - //Costs @@.red;<<print cashFormat(_cDrones)>>@@// <span style="float:right;"> <<print progress($SF.Squad.Drones)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cDrones)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.Drones)>> </span> <br> <<elseif $SF.Squad.Drones === _DU>> //The Drone Bay has been fully upgraded.// <br> <</if>> @@ -72,7 +72,7 @@ <<else>> //Cannot afford to upgrade the Attack Vehicle Fleet.// <</if>> - //Costs @@.red;<<print cashFormat(_cAV)>>@@// <span style="float:right;"> <<print progress($SF.Squad.AV)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cAV)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.AV)>> </span> <br> <<elseif $SF.Squad.AV === _AVU>> //The Attack Vehicle Fleet has been fully upgraded.// <br> <</if>> @@ -86,7 +86,7 @@ <<else>> //Cannot afford to upgrade Transport Vehicle Fleet.// <</if>> - //Costs @@.red;<<print cashFormat(_cTV)>>@@// <span style="float:right;"> <<print progress($SF.Squad.TV)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cTV)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.TV)>> </span> <br> <<elseif $SF.Squad.TV === _TVU>> //The Transport Vehicle Fleet has been fully upgraded.// <br> <</if>> @@ -100,9 +100,9 @@ <<else>> //Cannot afford to upgrade Prototype Goliath Tank.// <</if>> - //Costs @@.red;<<print cashFormat(_cPGT)>>@@// <span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cPGT)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.PGT)>> </span> <br> <<elseif $SF.Squad.PGT === _PGTU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.PGT)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.PGT)>> </span> <br> <<elseif $SF.Squad.PGT === _PGTU>> //The Prototype Goliath Tank has been fully upgraded.// <br> <</if>> @@ -118,7 +118,7 @@ <<else>> //Cannot afford to upgrade Attack Aircraft Fleet.// <</if>> - //Costs @@.red;<<print cashFormat(_cAA)>>@@// <span style="float:right;"> <<print progress($SF.Squad.AA)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cAA)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.AA)>> </span> <br> <<elseif $SF.Squad.AA === _AAU>> //The Attack Aircraft Fleet has been fully upgraded.// <br> <</if>> @@ -132,7 +132,7 @@ <<else>> //Cannot afford to upgrade the Transport Aircraft Fleet.// <</if>> - //Costs @@.red;<<print cashFormat(_cTA)>>@@// <span style="float:right;"> <<print progress($SF.Squad.TA)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cTA)>>@@// <span style="float:right;"> <<print App.SF.progress($SF.Squad.TA)>> </span> <br> <<elseif $SF.Squad.TA === _TAU>> //The Transport Aircraft Fleet has been fully upgraded.// <br> <</if>> @@ -146,9 +146,9 @@ <<else>> //Cannot afford to upgrade the Spaceplane.// <</if>> - //Costs @@.red;<<print cashFormat(_cSP)>>@@//<span style="float:right;"> <<print progress($SF.Squad.SpacePlane)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cSP)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.SpacePlane)>> </span> <br> <<elseif $SF.Squad.SpacePlane === _SPU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.SpacePlane)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.SpacePlane)>> </span> <br> <<elseif $SF.Squad.SpacePlane === _SPU>> //The Spaceplane has been fully upgraded.// <br> <</if>> @@ -162,9 +162,9 @@ <<else>> //Cannot afford to upgrade Gunship.// <</if>> - //Costs @@.red;<<print cashFormat(_cGunS)>>@@//<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cGunS)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GunS)>> </span> <br> <<elseif $SF.Squad.GunS === _GunSU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.GunS)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GunS)>> </span> <br> <<elseif $SF.Squad.GunS === _GunSU>> //The Gunship has been fully upgraded.// <br> <</if>> @@ -180,9 +180,9 @@ <<else>> //Cannot afford to upgrade Satellite.// <</if>> - //Costs @@.red;<<print cashFormat(_cSat)>>@@//<span style="float:right;"> <<print progress($SF.Squad.Satellite.lv)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cSat)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Satellite.lv)>> </span> <br> <<elseif $SF.Squad.Satellite.lv === _SatU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.Satellite.lv)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Satellite.lv)>> </span> <br> <<else>> //The Satellite has been fully upgraded.// <br> <</if>> @@ -197,9 +197,9 @@ <<else>> //Cannot afford to upgrade the Giant Robot.// <</if>> - //Costs @@.red;<<print cashFormat(_cGR)>>@@//<span style="float:right;"> <<print progress($SF.Squad.GiantRobot)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cGR)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GiantRobot)>> </span> <br> <<elseif $SF.Squad.GiantRobot === _GRU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.GiantRobot)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.GiantRobot)>> </span> <br> <<else>> //The Giant Robot has been fully upgraded.// <br> <</if>> @@ -213,9 +213,9 @@ <<else>> //Cannot afford to upgrade Cruise Missile.// <</if>> - //Costs @@.red;<<print cashFormat(_cMS)>>@@//<span style="float:right;"> <<print progress($SF.Squad.MissileSilo)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cMS)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.MissileSilo)>> </span> <br> <<elseif $SF.Squad.MissileSilo === _MSU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.MissileSilo)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.MissileSilo)>> </span> <br> <<else>> //The Cruise Missile has been fully upgraded.// <br> <</if>> @@ -231,9 +231,9 @@ <<else>> //Cannot afford to upgrade Aircraft Carrier.// <</if>> - //Costs @@.red;<<print cashFormat(_cAC)>>@@//<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span> <br> + //Costs @@.red;<<print cashFormat(_cAC)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.AircraftCarrier)>> </span> <br> <<elseif $SF.Squad.AircraftCarrier === _ACU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.AircraftCarrier)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.AircraftCarrier)>> </span> <br> <<else>> //The Aircraft Carrier has been fully upgraded.// <br> <</if>> @@ -247,9 +247,9 @@ <<else>> //Cannot afford to upgrade Submarine// <</if>> - //Costs @@.red;<<print cashFormat(_cSub)>>@@//<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span> + //Costs @@.red;<<print cashFormat(_cSub)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Sub)>> </span> <<elseif $SF.Squad.Sub === _SubU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.Sub)>> </span> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.Sub)>> </span> <<else>> //The Submarine has been fully upgraded.// <br> <</if>> @@ -263,9 +263,9 @@ <<else>> //Cannot afford to upgrade Amphibious Transport.// <</if>> - //Costs @@.red;<<print cashFormat(_cHAT)>>@@//<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span> + //Costs @@.red;<<print cashFormat(_cHAT)>>@@//<span style="float:right;"> <<print App.SF.progress($SF.Squad.HAT)>> </span> <<elseif $SF.Squad.HAT === _HATU && $PC.warfare < 75>> - //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print progress($SF.Squad.HAT)>> </span> <br> + //Your warfare skill is not high enough unlock the next upgrade.//<span style="float:right;"> <<print App.SF.progress($SF.Squad.HAT)>> </span> <br> <<else>> //The Amphibious Transport has been fully upgraded.// <br> <</if>> diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 68f9a95aca4..fabe80df7a9 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -1512,7 +1512,6 @@ You should have received a copy of the GNU General Public License along with thi <<set $DefaultBirthDestination = "individually decided fates">> <<set $abbreviateHormoneBalance = 2>> -<<if def $SF.Toggle>> <<set $SF = {Toggle:$SF.Toggle}>> <<else>> <<set $SF = {Toggle:0}>> <</if>> -<<set $SF.Active=-1, $SF.FS = {Tension:-1}>> +<<= App.SF.Init()>> <<goto "Alpha disclaimer">> -- GitLab