:: SA take classes [nobr]

<<set $learning to 1>>

<<if ($slaves[$i].assignment is "learn in the schoolroom")>>
	<<if ($Schoolteacher != 0)>>
		<<set $seed to $Schoolteacher.intelligence+$Schoolteacher.intelligenceImplant>>
		<<if ($Schoolteacher.visualAge > 35)>>
			<<set $seed += 1>>
		<</if>>
		<<if $schoolteacherCareers.contains($Schoolteacher.career)>>
			<<set $seed += 1>>
		<</if>>
		<<if ($Schoolteacher.face > 1)>>
			<<set $seed += 1>>
		<</if>>
		<<if (random(1,100) < 20+($seed*20))>>
			<<set $learning += 1>>
		<</if>>
	<</if>>
<</if>>

takes courses in slavery<<if $schoolroomUpgradeSkills + $schoolroomUpgradeRemedial + $schoolroomUpgradeLanguage != 0>>, using $schoolroomName's improved educational materials, <</if>> under $assistantName's supervision;
<<if ($slaves[$i].devotion > 20)>>
	she is such an obedient slave that your assistant mostly @@color:hotpink;encourages her.@@
	<<set $slaves[$i].devotion += 2>>
<<elseif ($slaves[$i].trust < -20)>>
	she obeys out of fear, so your assistant mostly @@color:hotpink;encourages her.@@
	<<set $slaves[$i].devotion += 1>>
<<else>>
	she is resistant, so your assistant mostly @@color:gold;punishes her,@@ increasing her @@color:mediumorchid;dislike for slavery.@@
	<<set $slaves[$i].devotion -= 2>>
	<<set $slaves[$i].trust -= 4>>
<</if>>

<<if ($slaves[$i].intelligence >= 3)>>
	She is a genius,
	<<set $learning += 1>>
<<elseif ($slaves[$i].intelligence >= 2)>>
	She is highly intelligent
	<<set $learning += 1>>
<<elseif ($slaves[$i].intelligence >= 1)>>
	She is of above average intelligence
	<<if (random(1,100) < 70)>>
		<<set $learning += 1>>
	<</if>>
<<elseif ($slaves[$i].intelligence >= 0)>>
	She is of average intelligence
	<<if (random(1,100) < 50)>>
		<<set $learning += 1>>
	<</if>>
<<elseif ($schoolroomUpgradeRemedial == 1)>>
	<<if (random(1,100) < 50)>>
		<<set $learning += 1>>
	<</if>>
<<elseif ($slaves[$i].intelligence >= -1)>>
	She is of below average intelligence
	<<if (random(1,100) < 30)>>
		<<set $learning += 1>>
	<</if>>
<<elseif ($slaves[$i].intelligence >= -2)>>
	She is quite stupid
	<<if (random(1,100) < 10)>>
		<<set $learning += 1>>
	<</if>>
<<else>>
	She is an imbecile,
<</if>>

<<if ($slaves[$i].devotion > 95)>>
	and worshipful of you,
	<<set $learning += 1>>
<<elseif ($slaves[$i].devotion > 50)>>
	and devoted to you,
	<<if (random(1,100) < 70)>>
		<<set $learning += 1>>
	<</if>>
<<elseif ($slaves[$i].devotion > 20)>>
	and obedient to you,
	<<if (random(1,100) < 50)>>
		<<set $learning += 1>>
	<</if>>
<<elseif ($slaves[$i].trust < -20)>>
	and frightened of you,
	<<if (random(1,100) < 50)>>
		<<set $learning += 1>>
	<</if>>
<<else>>
	and neither likes you nor is afraid of you,
<</if>>

<<if ($learning <= 1)>>
	and she learns slowly this week.
<<elseif ($learning is 2)>>
	and she does well with her studies this week.
<<else>>
	and she is perfectly studious this week.
<</if>>

<<set $seed to 0>>
<<set $skillIncrease = 10+$slaves[$i].intelligence>>
<<for $j to 0; $j < $learning; $j++>>
	<<if ($slaves[$i].devotion <= 20) && ($seed == 0)>>
		Since she is wanting in basic obedience, she suffers through courses on @@color:hotpink;her place@@ in the Free Cities world.
		<<set $slaves[$i].devotion += 10>>
		<<set $seed to 1>>
	<<elseif ($slaves[$i].oralSkill <= 10)>>
		Since she is orally incompetent, she is taught basic gag reflex suppression exercises and other simple oral things.
		<<OralSkillIncrease $slaves[$i]>>
	<<elseif ($slaves[$i].vaginalSkill <= 10) && ($slaves[$i].vagina > 0) && ($slaves[$i].vaginalAccessory != "chastity belt")>>
		Since she is unskilled at using her pussy, she is taught kegel exercises and other simple vaginal skills.
		<<VaginalSkillIncrease $slaves[$i]>>
	<<elseif ($slaves[$i].analSkill <= 10) && ($slaves[$i].anus > 0)>>
		Since she is a novice at taking it up her butt, she is taught relaxation exercises and other simple anal basics.
		<<AnalSkillIncrease $slaves[$i]>>
	<<elseif ($slaves[$i].whoreSkill <= 10)>>
		Since she has little idea what's involved in selling her body, she is taught basic safety practices and other simple prostitution skills.
		<<WhoreSkillIncrease $slaves[$i]>>
	<<elseif ($slaves[$i].entertainSkill <= 10)>>
		Since her entertainment value is limited to her holes, she is taught simple conversational skills and other courtesan's essentials.
		<<EntertainSkillIncrease $slaves[$i]>>
	<<elseif ($schoolroomUpgradeSkills == 1)>>
		<<if ($slaves[$i].oralSkill <= 30)>>
			Having completed the basic sex slave curriculum, she studies more advanced ways to use her lips and tongue to please cocks, cunts, and asses.
			<<OralSkillIncrease $slaves[$i]>>
		<<elseif ($slaves[$i].whoreSkill <= 30)>>
			Having completed the basic sex slave curriculum, she studies intermediate prostitution, including how to stay as safe as possible and maximize her efficiency.
			<<WhoreSkillIncrease $slaves[$i]>>
		<<elseif ($slaves[$i].entertainSkill <= 30)>>
			Having completed the basic sex slave curriculum, she studies courtesanship, including social dynamics and flirtation more subtle than straightforward begging for sex.
			<<EntertainSkillIncrease $slaves[$i]>>
		<</if>>
	<</if>>
<</for>>

<<if ($slaves[$i].intelligenceImplant < 1)>>
	She makes some progress towards a basic education.
	<<set $slaves[$i].intelligenceImplant += 0.1*$learning>>
	<<if ($slaves[$i].intelligenceImplant >= 1)>>
		<<set $slaves[$i].intelligenceImplant to 1>>
		She has completed a course of slave education, and for most purposes she is now @@color:deepskyblue;more intelligent.@@
		<<if ($slaves[$i].intelligence < 3)>>
			<<set $slaves[$i].intelligence += 1>>
		<</if>>
	<</if>>
<</if>>

<<if ($slaves[$i].intelligenceImplant == 1)>>
<<if $slaves[$i].voice != 0>>
	<<if ($slaves[$i].intelligence > random(-4,4))>>
	<<if ($schoolroomUpgradeLanguage == 0)>>
		<<if ($slaves[$i].accent > 3)>>
			She has @@color:green;learned some $language,@@ and can make her point with some gesturing, though she speaks $language horribly.
			<<set $slaves[$i].accent -= 1>>
			<<if $slaves[$i].speechRules = "language lessons">>
				<<set $slaves[$i].speechRules = "accent elimination">>
			<</if>>
		<<elseif ($slaves[$i].accent == 3)>>
		She has @@color:green;learned functional $language,@@ and can make herself understood, though her $slaves[$i].nationality accent is still quite heavy.
		<<set $slaves[$i].accent -= 1>>
		<</if>>
	<<else>>
		<<if ($slaves[$i].accent > 3)>>
			She has @@color:green;learned some $language,@@ and can make her point with some gesturing, though she speaks $language horribly.
			<<set $slaves[$i].accent -= 1>>
		<<elseif ($slaves[$i].accent >= 2)>>
		She has @@color:green;learned decent $language,@@ though she retains enough of her $slaves[$i].nationality accent to make her voice distinctly sexy.
		<<set $slaves[$i].accent to 1>>
		<</if>>
	<</if>>
	<</if>>
<</if>>
<</if>>

<<if ($slaves[$i].intelligenceImplant == 1)>>
<<if ($slaves[$i].voice == 0) || ($slaves[$i].accent <= 1) || (($schoolroomUpgradeLanguage == 0) && ($slaves[$i].accent <= 2))>>
<<if ($slaves[$i].oralSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].oralSkill > 10))>>
<<if ($slaves[$i].whoreSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].whoreSkill > 10))>>
<<if ($slaves[$i].entertainSkill > 30) || (($schoolroomUpgradeSkills == 0) && ($slaves[$i].entertainSkill > 10))>>
<<if ($slaves[$i].analSkill > 10) || ($slaves[$i].anus < 1)>>
<<if ($slaves[$i].vaginalSkill > 10) || ($slaves[$i].vagina < 1)>>
	She can learn little from further classes, so @@color:yellow;her assignment has defaulted to rest.@@
	<<set $slaves[$i].assignment to "rest", $slaves[$i].assignmentVisible to 1, $schoolroomSlaves-->>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

src/uncategorized/saTakeClasses.tw