:: authorityReport [nobr]

<<if $useTabs == 0>>__Authority__<</if>>
<br>
Your authority is
<<if $SecExp.core.authority > 19500>>
	nearly absolute. The arcology is yours to command as it pleases you.
<<elseif $SecExp.core.authority > 15000>>
	extremely high. There's little you cannot do within the walls of your arcology.
<<elseif $SecExp.core.authority > 10000>>
	high. You command respect and fear in equal measure.
<<elseif $SecExp.core.authority > 5000>>
	moderate. You command some respect from your citizens.
<<else>>
	low. You command no respect or fear from your citizens.
<</if>>

<<set _authGrowth = 0>>

<<if $PC.career == "wealth">>
	As part of the idle rich, you were used to having obedience coming naturally to you. Now you find it harder to maintain authority over the arcology.
	<<set _authGrowth -= (10 * random(5,15))>>
<<elseif $PC.career == "slaver">>
	Your past as a slaver helps you assert your authority over the arcology.
	<<set _authGrowth += (10 * random(5,15))>>
<<elseif $PC.career == "escort">>
	Given your past career as an escort, you find it hard to assert your authority over the arcology and its inhabitants.
	<<set _authGrowth -= (10 * random(5,15))>>
<<elseif $PC.career == "servant">>
	Given your past career as a servant, you find it hard to assert your authority over the arcology and its inhabitants.
	<<set _authGrowth -= (10 * random(5,15))>>
<<elseif $PC.career == "BlackHat">>
	Given your past career as a (rather questionable) incursion specialist, you find it hard to assert your authority over the arcology and its inhabitants, despite what you may know about them.
	<<set _authGrowth -= (10 * random(5,15))>>
<<elseif $PC.career == "gang">>
	Given your past life as a gang leader, you find it easier to assert your authority over the arcology and its inhabitants.
	<<set _authGrowth += (10 * random(5,15))>>
<</if>>

<<if $rep >= 19500>>
	Your legend is so well known that your mere presence commands respect and obedience, increasing your authority.
	<<set _authGrowth += (10 * random(10,20))>>
<<elseif $rep >= 15000>>
	Your reputation is so high that your mere presence commands respect, increasing your authority.
	<<set _authGrowth += (10 * random(5,15))>>
<<elseif $rep >= 10000>>
	Your reputation is high enough that your presence commands some respect, increasing your authority.
	<<set _authGrowth += (10 * random(2,8))>>
<</if>>

<<if $SecExp.security.cap >= 90>>
	Your arcology is incredibly secure and your citizens know quite well who to thank, greatly increasing your authority.
	<<set _authGrowth += (10 * random(10,20))>>
<<elseif $SecExp.security.cap >= 70>>
	Your arcology is really secure and your citizens know quite well who to thank, increasing your authority.
	<<set _authGrowth += (10 * random(5,15))>>
<<elseif $SecExp.security.cap >= 50>>
	Your arcology is quite secure and your citizens know who to thank, increasing your authority.
	<<set _authGrowth += (10 * random(2,8))>>
<</if>>

<<if $SecExp.core.crimeLow >= 90>>
	The all powerful criminal organizations controlling the arcology have a very easy time undermining your authority.
	<<set _authGrowth -= (10 * random(10,20))>>
<<elseif $SecExp.core.crimeLow >= 70>>
	Crime is king in the arcology, powerful criminals have a very easy time undermining your authority.
	<<set _authGrowth -= (10 * random(5,15))>>
<<elseif $SecExp.core.crimeLow >= 50>>
	Criminal organizations have a strong foothold in the arcology, their activities undermine your authority.
	<<set _authGrowth -= (10 * random(2,8))>>
<</if>>

<<if $averageDevotion >= 50 && $averageTrust >= 50>>
	The high devotion and trust of your slaves speak eloquently of your leadership capabilities, helping your authority grow.
	<<set _authGrowth += (5 * (($averageDevotion + $averageTrust) / 10))>>
<<elseif $averageDevotion >= 50>>
	The high devotion of your slaves speaks eloquently of your leadership capabilities, helping your authority grow.
	<<set _authGrowth += (5 * ($averageDevotion / 10))>>
<<elseif $averageTrust >= 50>>
	The high trust of your slaves speaks eloquently of your leadership capabilities, helping your authority grow.
	<<set _authGrowth += (5 * ($averageTrust / 10))>>
<</if>>

<<if $arcologies[0].ownership >= 90>>
	You own so much of the arcology that your authority quickly increases.
	<<set _authGrowth += (5 * Math.trunc($arcologies[0].ownership / 10))>>
<<elseif $arcologies[0].ownership >= 70>>
	You own a big part of the arcology, causing your authority to increase.
	<<set _authGrowth += (5 * Math.trunc($arcologies[0].ownership / 10))>>
<<elseif $arcologies[0].ownership >= 50>>
	You own the majority of the arcology, causing your authority to slowly increase.
	<<set _authGrowth += (5 * Math.trunc($arcologies[0].ownership / 10))>>
<<else>>
	Your low ownership of the arcology causes your authority to decrease.
	<<set _authGrowth -= (5 * Math.trunc($arcologies[0].ownership / 10))>>
<</if>>

<<if App.SecExp.battle.activeUnits() >= 9>>
	Your military is massive; commanding so many troops greatly increases your authority.
<<elseif App.SecExp.battle.activeUnits() >= 7>>
	Your military is huge; commanding such a number of soldiers increases your authority.
<<elseif App.SecExp.battle.activeUnits() >= 4>>
	Your military is at a decent size; commanding a small army increases your authority.
<</if>>
<<if App.SecExp.battle.activeUnits() >= 4>>
	<<set _authGrowth += (12 * App.SecExp.battle.activeUnits())>>
<</if>>

<<if $SF.Toggle && $SF.Active >= 1 && $SF.Size > 10>>
	Having a powerful special force increases your authority.
	<<set _authGrowth += ($SF.Size/10)>>
<</if>>

<<if $arcologies[0].FSChattelReligionist >= 90>>
	Religious organizations have a tight grip on the minds of your residents and their dogma greatly helps your authority grow.
	<<set _authGrowth += $arcologies[0].FSChattelReligionist>>
<<elseif $arcologies[0].FSChattelReligionist >= 50>>
	Religious organizations have a tight grip on the minds of your residents and their dogma helps your authority grow.
	<<set _authGrowth += $arcologies[0].FSChattelReligionist>>
<</if>>

<<if $arcologies[0].FSRestart >= 90>>
	The arcology's society is extremely stratified. The reliance on the Societal Elite by the lower classes greatly increases your reputation.
	<<set _authGrowth += $arcologies[0].FSRestart>>
<<elseif $arcologies[0].FSRestart >= 50>>
	The arcology's society is very stratified. The reliance on the Societal Elite by the lower classes increases your reputation.
	<<set _authGrowth += $arcologies[0].FSRestart>>
<</if>>

<<if $arcologies[0].FSPaternalist >= 90>>
	Your extremely paternalistic society has the unfortunate side effects of spreading dangerous ideals in the arcology, greatly damaging your authority.
	<<set _authGrowth -= Math.clamp($arcologies[0].FSPaternalist, 0, 100)>>
<<elseif $arcologies[0].FSPaternalist >= 50>>
	Your paternalistic society has the unfortunate side effects of spreading dangerous ideals in the arcology, damaging your authority.
	<<set _authGrowth -= Math.clamp($arcologies[0].FSPaternalist, 0, 100)>>
<</if>>

<<if $arcologies[0].FSNull >= 90>>
	Extreme cultural openness allows dangerous ideas to spread in your arcology, greatly damaging your reputation.
	<<set _authGrowth -= $arcologies[0].FSNull>>
<<elseif $arcologies[0].FSNull >= 50>>
	Mild cultural openness allows dangerous ideas to spread in your arcology, damaging your reputation.
	<<set _authGrowth -= $arcologies[0].FSNull>>
<</if>>

<<if $SecExp.buildings.propHub.miniTruth >= 1>>
	Your authenticity department works tirelessly to impose your authority in all of the arcology.
	<<set _authGrowth += (15 * $SecExp.buildings.propHub.miniTruth)>>
<</if>>

<<if $SecExp.buildings.propHub.secretService >= 1>>
	Your secret services constantly keep under surveillance any potential threat, intervening when necessary. Rumors of the secretive security service and mysterious disappearances make your authority increase.
	<<set _authGrowth += (15 * $SecExp.buildings.propHub.secretService)>>
<</if>>

<<if App.SecExp.upkeep('edictsAuth') > 0>>
	Some of your authority is spent maintaining your edicts.
	<<set _authGrowth -= App.SecExp.upkeep('edictsAuth')>>
<</if>>

This week
<<if _authGrowth > 0>>
	@@.green;authority has increased.@@
<<elseif _authGrowth == 0>>
	@@.yellow;authority did not change.@@
<<else>>
	@@.red;authority has decreased.@@
<</if>>

<<set $SecExp.core.authority += _authGrowth>>
<<set $SecExp.core.authority = Math.trunc(Math.clamp($SecExp.core.authority, 0, 20000))>>

<<if $SecExp.settings.rebellion.enabled == 1>>
	<br><br>
	<<include "rebellionGenerator">> /* rebellions */
<</if>>
src/Mods/SecExp/authorityReport.tw