:: authorityReport [nobr]

<<if $useTabs == 0>>__Authority__<</if>>
<br>
Your authority is
<<if $authority > 19500>>
	nearly absolute. The arcology is yours to command as it pleases you.
<<elseif $authority > 15000>>
	extremely high. There's little you cannot do within the walls of your arcology.
<<elseif $authority > 10000>>
	high. You command respect and fear in equal measure.
<<elseif $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 wealth, you were used to have 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 command respect and obedience, increasing your authority.
	<<set _authGrowth += 10 * random(10,20)>>
<<elseif $rep >= 15000>>
	Your reputation is so high that your mere presence command respect, increasing your authority.
	<<set _authGrowth += 10 * random(5,15)>>
<<elseif $rep >= 10000>>
	Your reputation is high enough that your presence command some respect, increasing your authority.
	<<set _authGrowth += 10 * random(2,8)>>
<</if>>

<<if $security >= 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 $security >= 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 $security >= 50>>
	Your arcology is quite secure and your citizens know who to thank, increasing your authority.
	<<set _authGrowth += 10 * random(2,8)>>
<</if>>

<<if $crime >= 90>>
	The all powerful criminal organizations controlling the arcology have a very easy time undermining your authority.
	<<set _authGrowth -= 10 * random(10,20)>>
<<elseif $crime >= 70>>
	Crime is king in the arcology, powerful criminals have a very easy time undermining your authority.
	<<set _authGrowth -= 10 * random(5,15)>>
<<elseif $crime >= 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 speak eloquently of your leadership capabilities, helping your authority grow.
	<<set _authGrowth += 5 * ($averageDevotion / 10)>>
<<elseif $averageTrust >= 50>>
	The high trust of your slaves speak 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 $activeUnits >= 9>>
	Your military is massive, commanding so many troops greatly increases your authority.
	<<set _authGrowth += 12 * $activeUnits>>
<<elseif $activeUnits >= 7>>
	Your military is huge, commanding such a number of soldiers increases your authority.
	<<set _authGrowth += 12 * $activeUnits>>
<<elseif $activeUnits >= 4>>
	Your military is at a decent size, commanding a small army increases your authority.
	<<set _authGrowth += 12 * $activeUnits>>
<</if>>

<<if $SF.Toggle && $SF.Active >= 1 && $SF.Units > 10>>
	Having a powerful special force, increases your authority.
	<<set _authGrowth += $SF.Units/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 $miniTruth >= 1>>
	Your authenticity department works tirelessly to impose your authority in all the arcology.
	<<set _authGrowth += 15 * $miniTruth>>
<</if>>

<<if $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 * $secretService>>
<</if>>

<<if $edictsAuthUpkeep > 0>>
	Some of your authority is spent maintaining your edicts
	<<set _authGrowth -= $edictsAuthUpkeep>>
<</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 $authority += _authGrowth>>
<<set $authority = Math.trunc(Math.clamp($authority, 0, 20000))>>

<<if $rebellionsEnabled == 1>>
/* rebellions */
	<br>
	<br>
	<<include "rebellionGenerator">>
<</if>>
