:: SlaveSupport Report [nobr]

<<SlaveSort $SSiIDs>>
<<set _DL = $SSiIDs.length, $SlaveSupportSlaves = _DL, _SL = $slaves.length, _brokenSlaves = 0, _idleBonus = 0, _softenedQuirks = 0, _trustMalus = 0, _FLsFetish = 0>>

<<if $SlaveSupportDecoration != "standard">>
	<<set _devBonus = 1>>
<<else>>
	<<set _devBonus = 0>>
<</if>>

/* Progression at facilities */

	<<set _FLs = $slaves.findIndex(function(s))>>

<<if $SSLevelBarracks && $slaves[$i].XP >= 15>>
	<<set $SSLBSCA += 1, $slaves[_FLs].devotion += 5, $slaves[_FLs].trust += 5,$slaves[_FLs].intelligence = 3,$slaves[_FLs].intelligenceImplant = 1, $slaves[_FLs].combatSkill = 1>>
<<elseif $SSLevelBarracks && $slaves[$i].XP >= 10>>
	<<set $SSLBCA += 1, $slaves[_FLs].devotion += 4, $slaves[_FLs].trust += 4,$slaves[_FLs].intelligence = 2,$slaves[_FLs].intelligenceImplant = 1, $slaves[_FLs].combatSkill = 1>>
<<elseif $SSLevelBarracks && $slaves[$i].XP >= 5>>
	<<set $SSLBHC += 1, $slaves[_FLs].devotion += 3, $slaves[_FLs].trust += 3,$slaves[_FLs].intelligence = 1,$slaves[_FLs].intelligenceImplant = 0, $slaves[_FLs].combatSkill = 0>>
<<elseif $SSLevelBarracks && $slaves[$i].XP >= 1>>
	<<set $SSLBC += 1, $slaves[_FLs].devotion += 2, $slaves[_FLs].trust += 2,$slaves[_FLs].intelligence = 0,$slaves[_FLs].intelligenceImplant = 0, $slaves[_FLs].combatSkill = 0>>
<</if>>
	
<<if $SSLevelArmoury && $slaves[$i].XP >= 15>>
	<<set $SSLASAST += 1, $slaves[_FLs].devotion += 5, $slaves[_FLs].trust += 5,$slaves[_FLs].intelligence = 3,$slaves[_FLs].intelligenceImplant = 1, $slaves[_FLs].combatSkill = 1>>
<<elseif $SSLevelArmoury && $slaves[$i].XP >= 10>>
	<<set $SSLAAST += 1, $slaves[_FLs].devotion += 4, $slaves[_FLs].trust += 4,$slaves[_FLs].intelligence = 2,$slaves[_FLs].intelligenceImplant = 1, $slaves[_FLs].combatSkill = 1>>
<<elseif $SSLevelArmoury && $slaves[$i].XP >= 5>>
	<<set $SSLASM += 1, $slaves[_FLs].devotion += 3, $slaves[_FLs].trust += 3,$slaves[_FLs].intelligence = 1,$slaves[_FLs].intelligenceImplant = 0, $slaves[_FLs].combatSkill = 0>>
<<elseif $SSLevelArmoury && $slaves[$i].XP >= 1>>
	<<set $SSLAM += 1, $slaves[_FLs].devotion += 2, $slaves[_FLs].trust += 2,$slaves[_FLs].intelligence = 0,$slaves[_FLs].intelligenceImplant = 0, $slaves[_FLs].combatSkill = 0>>
<</if>>
	
<<if $SSLevelStimulantLab && $slaves[$i].XP >= 15>>
	<<set $SSLSLPH += 1, $slaves[_FLs].devotion += 5, $slaves[_FLs].trust += 5,$slaves[_FLs].intelligence = 3,$slaves[_FLs].intelligenceImplant = 1, $slaves[_FLs].combatSkill = 1>>
<<elseif $SSLevelStimulantLab && $slaves[$i].XP >= 10>>
	<<set $SSLSLSC += 1, $slaves[_FLs].devotion += 4, $slaves[_FLs].trust += 4,$slaves[_FLs].intelligence = 2,$slaves[_FLs].intelligenceImplant = 1, $slaves[_FLs].combatSkill = 1>>
<<elseif $SSLevelStimulantLab && $slaves[$i].XP >= 5>>
	<<set $SSLSLAC += 1, $slaves[_FLs].devotion += 3, $slaves[_FLs].trust += 3,$slaves[_FLs].intelligence = 1,$slaves[_FLs].intelligenceImplant = 0, $slaves[_FLs].combatSkill = 0>>
<<elseif $SSLevelStimulantLab && $slaves[$i].XP >= 1>>
	<<set $SSLC += 1, $slaves[_FLs].devotion += 2, $slaves[_FLs].trust += 2,$slaves[_FLs].intelligence = 0,$slaves[_FLs].intelligenceImplant = 0, $slaves[_FLs].combatSkill = 0>>
<</if>>
	
<<if (_DL > 0)>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<if (_DL == 1)>>''One slave has been assigned to $SlaveSupportName.''<<else>>''_DL slaves have been assigned to $SlaveSupportName.''<</if>>
<</if>>
