:: tradeReport [nobr]

<<if $week < 30>>
	The world economy is in good enough shape to sustain economic growth. Trade flows liberally in all the globe.
	<<set _tradeChange += 1>>
<<elseif $week < 60>>
	The world economy is deteriorating, but still in good enough shape to sustain economic growth.
	<<set _tradeChange += 0.5>>
<<elseif $week < 90>>
	The world economy is deteriorating, but still in decent enough shape to sustain economic growth.
<<elseif $week < 120>>
	The world economy is deteriorating and the slowing down of global growth is starting to have some effect on trade flow.
	<<set _tradeChange -= 1>>
<<else>>
	The world economy is heavily deteriorated. The slowing down of global growth has a great negative effect on trade flow.
	<<set _tradeChange -= 2>>
<</if>>

<<set _tradeChange = 0>>
<<if $lastAttackWeeks < 2 && $hasFoughtOnce == 1>>
	The recent attack has a negative effect on the trade of the arcology.
	<<set _tradeChange -= 1>>
<<elseif $lastAttackWeeks < 4 && $hasFoughtOnce == 1>>
	While some time has passed, the last attack still has a negative effect on the commercial activity of the arcology.
	<<set _tradeChange -= 0.5>>
<</if>>
<<if $lastRebellionWeeks < 2 && $hasRebelledOnce == 1>>
	The recent rebellion has a negative effect on the trade of the arcology.
	<<set _tradeChange -= 1>>
<<elseif $lastRebellionWeeks < 4 && $hasRebelledOnce == 1>>
	While some time has passed, the last rebellion still has a negative effect on the commercial activity of the arcology.
	<<set _tradeChange -= 0.5>>
<</if>>

<<if $terrain == "urban">>
	Since your arcology is located in the heart of an urban area, its commerce is naturally vibrant.
	<<set _tradeChange++>>
<</if>>
<<if $terrain == "ravine">>
	Since your arcology is located in the heart of a ravine, its commerce is hindered by a lack of accessibility.
	<<set _tradeChange -= 0.5>>
<</if>>

<<if $PC.career == "wealth" || $PC.career == "capitalist" || $PC.career == "celebrity" || $PC.career == "BlackHat">>
	<<set _tradeChange += 1>>
<<elseif $PC.career == "escort" || $PC.career == "servant" || $PC.career == "gang">>
	<<set _tradeChange -= 0.5>>
<</if>>

<<if $rep > 18000>>
	Your extremely high reputation attracts trade from all over the world.
<<elseif $rep > 12000>>
	Your high reputation attracts trade from all over the world.
<</if>>

<<setAssistantPronouns>>
<<if $assistant.power == 1>>
	Thanks to the computing power available to _himA, $assistant.name is able to guide the commercial development of the arcology to greater levels.
	<<set _tradeChange++>>
<<elseif $assistant.power >= 2>>
	Thanks to the incredible computing power available to _himA, $assistant.name is able to guide the commercial development of the arcology to greater levels.
	<<set _tradeChange += 2>>
<</if>>

<<if $tradeLegalAid == 1>>
	Your support in legal matters for new businesses helps improve the economic dynamicity of your arcology, boosting commercial activities.
	<<set _tradeChange += 1>>
<</if>>

<<if $taxTrade == 1>>
	The fees imposed on transitioning goods do little to earn you the favor of the companies making use of your arcology.
	<<set _tradeChange -= 1>>
<</if>>

<<if $weapManu == 1>>
	The weapons manufacturing facility of the arcology attracts a significant amount of trade.
	<<set _tradeChange += 0.5 * ($weapProductivity + $weapLab)>>
<</if>>
<<if $transportHub == 1>>
	<<if $airport == 1>>
		The airport, while small, helps facilitate the commercial development of the arcology.
		<<set _tradeChange += 1>>
	<<elseif $airport == 2>>
		The airport, while fairly small, helps facilitate the commercial development of the arcology.
		<<set _tradeChange += 1.5>>
	<<elseif $airport == 3>>
		The airport helps facilitate the commercial development of the arcology.
		<<set _tradeChange += 2>>
	<<elseif $airport == 4>>
		The airport is a great boon to the commercial development of the arcology.
		<<set _tradeChange += 2.5>>
	<<else>>
		The airport is an incredible boon to the commercial development of the arcology.
		<<set _tradeChange += 3>>
	<</if>>

	<<if $terrain != "oceanic" && $terrain != "marine">>
		<<if $railway == 1>>
			The railway network's age and limited extension limit commercial activity.
		<<elseif $railway == 2>>
			The railway network is a great help to the commercial development of the arcology, but its limited extension hampers its potential.
			<<set _tradeChange += 1>>
		<<elseif $railway == 3>>
			The railway network is a great help to the commercial development of the arcology.
			<<set _tradeChange += 1.5>>
		<<else>>
			The railway network is a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.
			<<set _tradeChange += 2>>
		<</if>>
	<<else>>
		<<if $docks == 1>>
			The docks' age and limited size limit commercial activity.
		<<elseif $docks == 2>>
			The docks are a great help to the commercial development of the arcology, but their limited size hampers its potential.
			<<set _tradeChange += 1>>
		<<elseif $docks == 3>>
			The docks are a great help to the commercial development of the arcology.
			<<set _tradeChange += 1.5>>
		<<else>>
			The docks are a huge help to the commercial development of the arcology. Few in the world can boast such a modern and efficient transport system.
			<<set _tradeChange += 2>>
		<</if>>
	<</if>>
<</if>>

<<if $SF.Toggle && $SF.Active >= 1 && $SF.Size > 10>>
	Having a powerful special force increases trade security.
	<<set _tradeChange += $SF.Size/10>>
<</if>>

<<if _tradeChange > 0>>
	This week @@.green;trade improved.@@
<<elseif _tradeChange == 0>>
	This week @@.yellow;trade did not change.@@
<<else>>
	This week @@.red;trade diminished.@@
<</if>>

<<if $SecExp.core.trade <= 20>>
	The almost non-existent trade crossing the arcology @@.yellow;does little to promote growth.@@
<<elseif $SecExp.core.trade <= 40>>
	The low level of trade crossing the arcology promotes a @@.green;slow yet steady growth@@ of its economy.
	<<set _AWeekGrowth += 1.5>>
<<elseif $SecExp.core.trade <= 60>>
	With trade at positive levels, the @@.green;prosperity of the arcology grows more powerful.@@
	<<set _AWeekGrowth += 2.5>>
<<elseif $SecExp.core.trade <= 80>>
	With trade at high levels, the @@.green;prosperity of the arcology grows quickly and violently.@@
	<<set _AWeekGrowth += 3.5>>
<<else>>
	With trade at extremely high levels, the @@.green;prosperity of the arcology grows with unprecedented speed.@@
	<<set _AWeekGrowth += 4.5>>
<</if>>

<<set $SecExp.core.trade = Math.clamp($SecExp.core.trade + _tradeChange,0,100)>>
src/Mods/SecExp/tradeReport.tw