:: family panic [nobr]

<<set $nextButton = "Back", $nextLink = "Main">>

<<set $slaves.forEach(function(s) { s.sisters = 0; s.daughters = 0; })>>
<<set $PC.daughters = 0, $PC.sisters = 0>>

<<for _fp = 0; _fp < $slaves.length; _fp++>>
	<<if ($slaves[_fp].mother == -1 || $slaves[_fp].father == -1)>>
		<<set $PC.daughters++>>
	<</if>>
	<<if areSisters($slaves[_fp], $PC) > 0>>
		<<set $PC.sisters++>>
	<</if>>
	<<for _fpt = 0; _fpt < $slaves.length; _fpt++>>
		<<if ($slaves[_fpt].mother == $slaves[_fp].ID) || ($slaves[_fpt].father == $slaves[_fp].ID)>>
			<<set $slaves[_fp].daughters++>>
		<</if>>
		<<if areSisters($slaves[_fpt], $slaves[_fp]) > 0>>
			<<set $slaves[_fp].sisters++>>
		<</if>>
	<</for>>
<</for>>

//Family relations flushed and rebuilt.//