diff --git a/TODO.txt b/TODO.txt index e34d7df8398a77221fb2a959100dcc99f5e92029..7cefdbf0cf30dc93ec59754998e51a01560bedc7 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,7 +4,6 @@ Rebellions: further development: -specialized slave schools -fortifications --transport hub -security based careers should have discount on secHQ upgrades -celebrity on propHub -more levels for militia edict (further militarize society) diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw index f23364493dee756b59e2a463174fe87778bd6240..9868282609d32c09d49279388731ccbeae9b3b70 100644 --- a/src/SecExp/attackHandler.tw +++ b/src/SecExp/attackHandler.tw @@ -35,9 +35,9 @@ <</if>> <<if $showBattleStatistics == 1>> <<if $battleResult == 0>> - <br>Failure! + <br>Bribery failed! <<else>> - <br>Success! + <br>Bribery Successful! <</if>> <br><br> <<link "proceed">> @@ -46,7 +46,8 @@ <<else>> <<goto "attackReport">> <</if>> -<</if>> + +<<else>> /*Init*/ <<if $majorBattle == 0>> @@ -1144,4 +1145,6 @@ <</link>> <<else>> <<goto "attackReport">> -<</if>> \ No newline at end of file +<</if>> + +<</if>> /* closes check for bribery */ \ No newline at end of file diff --git a/src/SecExp/attackOptions.tw b/src/SecExp/attackOptions.tw index 590fc41d3a7ed5fb703fa0b5e068f4f9c46fe322..802d63ae0c903df2191e979a670e0e818ca56e35 100644 --- a/src/SecExp/attackOptions.tw +++ b/src/SecExp/attackOptions.tw @@ -463,7 +463,7 @@ Offensive Tactics <<set $hasFoughtOnce = 1>> <</if>> <<set $foughtThisWeek = 1>> - <<goto "attackHandler">> + <<goto "attackReport">> <</link>> <br> /* calculates bribe cost */ diff --git a/src/SecExp/attackReport.tw b/src/SecExp/attackReport.tw index 451307b6cc2472f5b567b464302ae8a6e94e81b1..1e3798cd9bb89f881fcabd9bf652e8bb09429fbf 100644 --- a/src/SecExp/attackReport.tw +++ b/src/SecExp/attackReport.tw @@ -130,26 +130,29 @@ <hr> <<if $attackType == "raiders">> - Today, the _day of _month _year, our arcology was attacked by a band of wild raiders, $attackTroops men strong. Our defense forces clashed with them - <<if $battleTerrain == "urban">> - in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, - <<elseif $battleTerrain == "rural">> - in the rural land surrounding the free city, - <<elseif $battleTerrain == "hills">> - on the hills around the free city, - <<elseif $battleTerrain == "coast">> - along the coast just outside the free city, - <<elseif $battleterrain == "outskirts">> - just against the walls of the arcology, - <<elseif $battleTerrain == "mountains">> - in the mountains overlooking the arcology, - <<elseif $battleTerrain == "wasteland">> - in the wastelands outside the free city territory, - <</if>> - <<if $enemyLosses != $attackTroops>> - inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. - <<else>> - completely annihilating their troops, while sustaining <<print $losses>> casualties. + Today, the _day of _month _year, our arcology was attacked by a band of wild raiders, $attackTroops men strong. + <<if $battleResult != 1 || $battleResult != 0 || $battleResult != -1>> + Our defense forces clashed with them + <<if $battleTerrain == "urban">> + in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, + <<elseif $battleTerrain == "rural">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + <<if $enemyLosses != $attackTroops>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<else>> + completely annihilating their troops, while sustaining <<print $losses>> casualties. + <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> @@ -193,26 +196,29 @@ You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <<elseif $attackType == "free city">> - Today, the _day of _month _year, our arcology was attacked by a contingent of mercenaries hired by a competing free city, $attackTroops men strong. Our defense forces clashed with them - <<if $battleTerrain == "urban">> - in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, - <<elseif $battleTerrain == "rural">> - in the rural land surrounding the free city, - <<elseif $battleTerrain == "hills">> - on the hills around the free city, - <<elseif $battleTerrain == "coast">> - along the coast just outside the free city, - <<elseif $battleterrain == "outskirts">> - just against the walls of the arcology, - <<elseif $battleTerrain == "mountains">> - in the mountains overlooking the arcology, - <<elseif $battleTerrain == "wasteland">> - in the wastelands outside the free city territory, - <</if>> - <<if $enemyLosses != $attackTroops>> - inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. - <<else>> - completely annihilating their troops, while sustaining <<print $losses>> casualties. + Today, the _day of _month _year, our arcology was attacked by a contingent of mercenaries hired by a competing free city, $attackTroops men strong. + <<if $battleResult != 1 || $battleResult != 0 || $battleResult != -1>> + Our defense forces clashed with them + <<if $battleTerrain == "urban">> + in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, + <<elseif $battleTerrain == "rural">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + <<if $enemyLosses != $attackTroops>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<else>> + completely annihilating their troops, while sustaining <<print $losses>> casualties. + <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> @@ -256,26 +262,29 @@ You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <<elseif $attackType == "freedom fighters">> - Today, the _day of _month _year, our arcology was attacked by a group of freedom fighters bent on the destruction of the institution of slavery, $attackTroops men strong. Our defense forces clashed with them - <<if $battleTerrain == "urban">> - in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, - <<elseif $battleTerrain == "rural">> - in the rural land surrounding the free city, - <<elseif $battleTerrain == "hills">> - on the hills around the free city, - <<elseif $battleTerrain == "coast">> - along the coast just outside the free city, - <<elseif $battleterrain == "outskirts">> - just against the walls of the arcology, - <<elseif $battleTerrain == "mountains">> - in the mountains overlooking the arcology, - <<elseif $battleTerrain == "wasteland">> - in the wastelands outside the free city territory, - <</if>> - <<if $enemyLosses != $attackTroops>> - inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. - <<else>> - completely annihilating their troops, while sustaining <<print $losses>> casualties. + Today, the _day of _month _year, our arcology was attacked by a group of freedom fighters bent on the destruction of the institution of slavery, $attackTroops men strong. + <<if $battleResult != 1 || $battleResult != 0 || $battleResult != -1>> + Our defense forces clashed with them + <<if $battleTerrain == "urban">> + in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, + <<elseif $battleTerrain == "rural">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + <<if $enemyLosses != $attackTroops>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<else>> + completely annihilating their troops, while sustaining <<print $losses>> casualties. + <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> @@ -319,26 +328,29 @@ You decided in favor of a financial approach rather than open hostilities. Your troops remain inside the arcology's walls. <</if>> <<elseif $attackType == "old world">> - Today, the _day of _month _year, our arcology was attacked by an old world nation boasting a misplaced sense of superiority, $attackTroops men strong. Our defense forces clashed with them - <<if $battleTerrain == "urban">> - in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, - <<elseif $battleTerrain == "rural">> - in the rural land surrounding the free city, - <<elseif $battleTerrain == "hills">> - on the hills around the free city, - <<elseif $battleTerrain == "coast">> - along the coast just outside the free city, - <<elseif $battleterrain == "outskirts">> - just against the walls of the arcology, - <<elseif $battleTerrain == "mountains">> - in the mountains overlooking the arcology, - <<elseif $battleTerrain == "wasteland">> - in the wastelands outside the free city territory, - <</if>> - <<if $enemyLosses != $attackTroops>> - inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. - <<else>> - completely annihilating their troops, while sustaining <<print $losses>> casualties. + Today, the _day of _month _year, our arcology was attacked by an old world nation boasting a misplaced sense of superiority, $attackTroops men strong. + <<if $battleResult != 1 || $battleResult != 0 || $battleResult != -1>> + Our defense forces clashed with them + <<if $battleTerrain == "urban">> + in the streets of <<if $terrain == "urban">>the old world city surrounding the arcology<<else>>of the free city<</if>>, + <<elseif $battleTerrain == "rural">> + in the rural land surrounding the free city, + <<elseif $battleTerrain == "hills">> + on the hills around the free city, + <<elseif $battleTerrain == "coast">> + along the coast just outside the free city, + <<elseif $battleterrain == "outskirts">> + just against the walls of the arcology, + <<elseif $battleTerrain == "mountains">> + in the mountains overlooking the arcology, + <<elseif $battleTerrain == "wasteland">> + in the wastelands outside the free city territory, + <</if>> + <<if $enemyLosses != $attackTroops>> + inflicting <<print $enemyLosses>> casualties, while sustaining <<print $losses>> casualties themselves. + <<else>> + completely annihilating their troops, while sustaining <<print $losses>> casualties. + <</if>> <</if>> <<if $battleResult == 3>> <<if $battleTurns <= 5>> diff --git a/src/SecExp/secExpSmilingMan.tw b/src/SecExp/secExpSmilingMan.tw index e683280d448587bb7cee7a246fc20f64b9106f24..2389d48ca2f15830b8d39c6750afc96d08e27276 100644 --- a/src/SecExp/secExpSmilingMan.tw +++ b/src/SecExp/secExpSmilingMan.tw @@ -14,7 +14,7 @@ they almost seemed the product of natural laws rather than masterful manipulation of the digital market. While you sift through the pages of the report, $assistantName remains strangely quiet. "I'm worried <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, this individual seems to be able to penetrate whatever system gathers his attention. I... feel vulnerable" she said "It's not something I'm used to." <br>Fortunately you have not been hit directly by this criminal, not yet at least. Still the repercussions of numerous bankruptcies take their toll on your arcology, whose @@.red;prosperty suffers@@. - <br><<set $arcologies[0].prosperity -= random(5,15)>> + <br><<set $arcologies[0].prosperity *= random(80,90) * 0.01>> <br> <span id="result"> <br> @@ -166,7 +166,7 @@ <<set $cash *= 0.2>> <</if>> You are not the only one affected by this however. @@.red;The economy of the entire world is severely affected@@ by the loss of vast quantities of currency. Who knows how long will it take for the global economy to recover. - <<set $globalCrisisWeeks = random(12,24)>> + <<set $globalCrisisWeeks = random(8,16)>> With the loss of so much information, most of your accomplishments are simply forgotten, @@.red;your reputation suffers.@@ <<set $rep *= 0.6>> <<if $arcologies[0].ownership >= 60>> diff --git a/src/js/utilJS.tw b/src/js/utilJS.tw index 3c1904e40f7c2276b4cd0ee6487348b7ec55c12c..a7846d3be8a2f4a64b7aeee96aac832cd40bf2c1 100644 --- a/src/js/utilJS.tw +++ b/src/js/utilJS.tw @@ -371,9 +371,6 @@ window.isInt = function(n) { return n === +n && n === (n|0); } - - - window.numberWithCommas = function(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } diff --git a/src/uncategorized/arcmgmt.tw b/src/uncategorized/arcmgmt.tw index e0a57fefa348fec0f4a24afb421bdef2404b80a6..94f2e39d9cbe7c88e1b7872c2725242143ee400d 100644 --- a/src/uncategorized/arcmgmt.tw +++ b/src/uncategorized/arcmgmt.tw @@ -603,7 +603,11 @@ earning you @@.yellowgreen;¤_earnings.@@ <<else>> Though $arcologies[0].name can support more citizens and more activity, @@.red;it lost prosperity this week.@@ <</if>> - <<set $arcologies[0].prosperity += _AWeekGrowth>> + <<if isNaN(_AWeekGrowth)>> + <br>@@.red;Error: AWeekGrowth is NaN + <<else>> + <<set $arcologies[0].prosperity += _AWeekGrowth>> + <</if>> <</if>> <<if $secExp == 1>> diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index a627b2164989382fab5a963072a0251cfebdd4ce..3af0398604a8d40dfe1799ac9277c05002ddbe96 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -131,6 +131,7 @@ __Construction__ <</if>> <</if>> + <br><br> __Language__ diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw index 359f569b70915e8446ae4410fafcba487f157b28..110923650332121abd362f46ea01be7ef8c54c72 100644 --- a/src/uncategorized/nonRandomEvent.tw +++ b/src/uncategorized/nonRandomEvent.tw @@ -148,14 +148,16 @@ <<goto "P slave medic">> <<elseif ($PPit == 1) && ($Bodyguard != 0)>> <<goto "PE pit fight">> -<<elseif $smilingManProgress == 0 && _effectiveWeek >= 74>> - <<goto "secExpSmilingMan">> -<<elseif $smilingManProgress == 1 && _effectiveWeek >= 77>> - <<goto "secExpSmilingMan">> -<<elseif $smilingManProgress == 2 && _effectiveWeek >= 82>> - <<goto "secExpSmilingMan">> -<<elseif $smilingManProgress == 3>> - <<goto "secExpSmilingMan">> +<<elseif !($rivalOwner > 0)>> + <<if $smilingManProgress == 0 && _effectiveWeek >= 74>> + <<goto "secExpSmilingMan">> + <<elseif $smilingManProgress == 1 && _effectiveWeek >= 77>> + <<goto "secExpSmilingMan">> + <<elseif $smilingManProgress == 2 && _effectiveWeek >= 82>> + <<goto "secExpSmilingMan">> + <<elseif $smilingManProgress == 3>> + <<goto "secExpSmilingMan">> + <</if>> <<else>> <<if random(1,100) > _effectiveWeek+25>> <<goto "RIE Eligibility Check">> diff --git a/src/uncategorized/storyCaption.tw b/src/uncategorized/storyCaption.tw index 3b704c8bf8d15ffac16b9f7cce97e1d86278d196..7b14c77e05c52b315131643eb3c366dce14ce6d5 100644 --- a/src/uncategorized/storyCaption.tw +++ b/src/uncategorized/storyCaption.tw @@ -88,7 +88,7 @@ <<else>> __@@.red;Cash@@__ <</if>> -| ''¤''_cash +| ''¤''$cash </span> <br> <<if _Pass == "Main">> @@ -129,7 +129,7 @@ <<else>> <<set _costs = numberWithCommas($costs)>> <br>Upkeep | -<</if>>¤_costs +<</if>>¤$costs <br>@@.pink;Total Sex Slaves@@ | _SL <br>@@.pink;Penthouse Beds@@ | <<if $dormitoryPopulation+$roomsPopulation > ($dormitory+$rooms)>>@@.red;<<print $dormitoryPopulation+$roomsPopulation>>@@<<else>><<print $dormitoryPopulation+$roomsPopulation>><</if>>/<<print ($dormitory+$rooms)>>