code:
:: Brothel Assignment Scene [nobr]

<<set $nextButton = "Continue", $nextLink = $returnTo>>
<<run Enunciate($activeSlave)>>
<<setLocalPronouns $activeSlave>>

	/* 000-250-006 */
	<<if $seeImages == 1>>
		<<if $imageChoice == 1>>

<<SlaveArt $activeSlave 2 0>>

		<<else>>

<<SlaveArt $activeSlave 2 0>>

		<</if>>
	<</if>>
	/* 000-250-006 */

You could direct $assistantName to relay your orders to $activeSlave.slaveName, but you've decided to avoid relying too much on machine assistance. So, $he is merely directed to report to your office. The
<<if $activeSlave.devotion > 95>>
	worshipful $girl <<if $activeSlave.amp != 1>>hurries in as soon as $he possibly can<<else>>comes in as soon as $he can get another slave to carry $him in<</if>>, happy $his beloved <<= WrittenMaster($activeSlave)>> is taking an interest in $him.
<<elseif $activeSlave.devotion > 50>>
	devoted $girl <<if $activeSlave.amp != 1>>hurries in promptly<<else>>comes in as soon as $he can get another slave to carry $him in<</if>>, eager to do whatever you demand of $him.
<<elseif $activeSlave.devotion > 20>>
	$girl, broken to your will, <<if $activeSlave.amp != 1>>comes in promptly<<else>>comes in as soon as $he can get another slave to carry $him in<</if>>, clearly ready to follow orders.
<<elseif ($activeSlave.trust < -20) && ($activeSlave.devotion > -10)>>
	fearful slave <<if $activeSlave.amp != 1>>comes in promptly<<else>>comes in as soon as $he can get another slave to carry $him in<</if>>, afraid of what will happen to $him if $he doesn't.
<<elseif ($activeSlave.trust < -50)>>
	terrified slave <<if $activeSlave.amp != 1>>comes in hurriedly<<else>>comes in as soon as $he can get another slave to carry $him in<</if>>, almost paralyzed by terror of what will happen to $him if $he doesn't.
<<else>>
	rebellious slave <<if $activeSlave.amp != 1>>comes in slowly, having decided that $he can always decide to resist once $he hears what you want<<else>>comes in as soon as you order another slave to carry $him in, since $he can't exactly resist this without limbs<</if>>.
<</if>>
You tell $him $he's to report to <<if $Madam != 0>>$Madam.slaveName immediately, to serve in $brothelName<<else>>$brothelName immediately, to serve there<</if>> until further notice.

<<if $activeSlave.devotion > 50>>

	<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60) && ($activeSlave.fetish != "none")>>
		$He looks excited.
		<<if canTalk($activeSlave)>>
			"<<Master>>, I hoped you would <<s>>end me down there <<s>>ometime!
			<<switch $activeSlave.fetish>>
			<<case "submissive">>
				I mean, I'll have to do whatever the cu<<s>>tomer<<s>> pay for, right?" $His eyes go a little unfocused. "And, they'll hold me down..." $He trails off.
			<<case "masochist">>
				I mean, it'<<s>> hard being a brothel whore, right? And when I get tired or <<s>>ore, I'll <<s>>till be <<s>>old. Even when it hurt<<s>> me to fuck any more." $His eyes glow with an unhealthy light.
			<<case "cumslut">>
				I mean," $he licks $his lips unconsciously,
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"I hear there are <<s>>ome ni<<c>>e ladie<<s>> that go there for lunchtime cunnilingu<<s>>."
				<<else>>
					"the blowjob<<s>>. Ju<<s>>t, the blowjob<<s>>. That'<<s>> all."
				<</if>>
			<<case "humiliation">>
				There'<<s>> a window that fa<<c>>e<<s>> the hallway there, right? <<if $Madam != 0>>Do you think $Madam.slaveName would let me<<else>>Could I<</if>> get fucked there? Where everyone could <<s>>ee me being fucked for money?"
			<<case "buttslut">>
				I mean," and $he shifts $his weight, $his mind obviously on $his backdoor,
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"there have to be ladie<<s>> who want to buttfuck a whore, right? At lea<<s>>t, I really hope there are."
				<<else>>
					"the other girl<<s>> tell me that whore<<s>> there get fucked up the a<<ss>> all day and all night. <<S>>ound<<s>> like fun to me."
				<</if>>
			<<case "boobs">>
				I mean," and $he sticks out $his chest a little,
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"I hear from the other girl<<s>> there'<<s>> thi<<s>> ni<<c>>e lady who goe<<s>> there every morning and pay<<s>> to have a whore <<s>>uck her nipple<<s>> for, like, an hour. I," $he licks $his lips, "could do that."
				<<else>>
					"the other girl<<s>> tell me that whore<<s>> there get tittyfucked all the time. <<S>>ound<<s>> like fun to me."
				<</if>>
			<<case "pregnancy">>
				I mean," $he says meditatively,
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"I hear from the other girl<<s>> there'<<s>> thi<<s>> pregnant lady who goe<<s>> there every night and pay<<s>> to have a whore cuddle her. Ju<<s>>t cuddle, all night. That would be kind of hard, ju<<s>>t cuddling, but I could do it."
				<<elseif $activeSlave.vagina == -1>>
					"<<s>>in<<c>>e it'<<s>> all bareback, I'm going to have a fuckton of cum in me. I wonder how much cum it take<<s>> to get a butthole pregnant? I'm gonna try, anyway."
				<<elseif isFertile($activeSlave)>>
					"<<s>>in<<c>>e it'<<s>> all bareback, I'm going to have a fuckton of cum in me. I wonder how much cum it would take to get my poor womb pregnant?"
				<<elseif $activeSlave.pregKnown == 1>>
					"I'm going to be a pregnant whore. That'<<s>> pretty fucking <<s>>e<<x>>y."
				<<elseif $activeSlave.preg > 0>>
					"<<s>>in<<c>>e it'<<s>> all bareback, I'm going to have a fuckton of cum in me. I wonder how much cum it would take to get my poor womb pregnant?"
				<<elseif $activeSlave.ovaries == 1 && $activeSlave.pubertyXX == 0>>
					"I can't wait till I can get pregnant. That'd be pretty fucking <<s>>e<<x>>y."
				<<else>>
					"I hear from the other girl<<s>> there'<<s>> thi<<s>> pregnant lady who goe<<s>> there every night and pay<<s>> to have a whore cuddle her. Ju<<s>>t cuddle, all night. That would be kind of hard, ju<<s>>t cuddling, but I could do it."
				<</if>>
			<<case "dom">>
				I heard from the other girl<<s>> that <<s>>ome <<c>>iti<<z>>en<<s>> bring their girl<<s>> there. Ju<<s>>t to make them take it from a whore."
			<<case "sadist">>
				I heard from the other girl<<s>> that <<s>>ome <<c>>iti<<z>>en<<s>> bring their girl<<s>> there. Becau<<s>>e nobody know<<s>> how to hurt a bitch like a whore doe<<s>>." $He shivers.
			<</switch>>
		<<else>>
			<<switch $activeSlave.fetish>>
			<<case "submissive">>
				$He gestures that $he'll be at the mercy of $his customers. $His eyes go a little unfocused as $he clearly begins to fantasize.
			<<case "masochist">>
				$He gestures that $he'll probably get roughed up by some of $his customers and that there will be no breaks for $his sore holes. $His eyes glow with an unhealthy light as $he clearly begins to fantasize.
			<<case "cumslut">>
				$He licks $his lips unconsciously and motions
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					tounging a clit.
				<<else>>
					sucking cock.
				<</if>>
			<<case "humiliation">>
				$He gestures if $he could be fucked in public there.
			<<case "buttslut">>
				$He shifts $his weight, $his mind obviously on $his backdoor, and gestures
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					if any girls would want to buttfuck $him.
				<<else>>
					that $he knows whores take it up the ass there and can't wait to join them.
				<</if>>
			<<case "boobs">>
				$He sticks out $his chest a little and gestures
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					that $he's heard a women comes by each day just to have her nipples sucked. $He licks $his lips, clearly savoring the thought.
				<<else>>
					that $he knows tittyfucking is popular there and can't wait to give $his pair up for sale.
				<</if>>
			<<case "pregnancy">>
				$He gestures
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					that $he's heard that a pregnant women has been coming every night to pay for a whore to cuddle her. $He asks if $he could be that $girl.
				<<elseif $activeSlave.vagina == -1>>
					how much $he wishes $he could get pregnant from all the cum loads $he's going to get shot up $his rear.
				<<elseif isFertile($activeSlave)>>
					that $he knows all the sex is bareback. By the look in $his eyes, you can tell $he is wondering how long it will take for some guys seed to take root in $him.
				<<elseif $activeSlave.pregKnown == 1>>
					how sexy $he thinks pregnant whores are.
				<<elseif $activeSlave.preg > 0>>
					that $he knows all the sex is bareback. By the look in $his eyes, you can tell $he is wondering how long it will take for some guys seed to take root in $him.
				<<elseif $activeSlave.ovaries == 1 && $activeSlave.pubertyXX == 0>>
					how excited $he is for the day $he starts $his menstrual cycle. Will $he even see $his first period, or will every egg $he makes get fertilized?
				<<else>>
					that $he's heard a pregnant women has been coming every night to pay for a whore to cuddle her. $He hopes that one day $he'll be chosen.
				<</if>>
			<<case "dom">>
				$He gestures that $he knows citizens sometimes bring their toys there just to let them get pushed around by a whore. $He'd like that to be true. A lot.
			<<case "sadist">>
				$He gestures that $he knows citizens sometimes bring their toys there for punishment. $He shivers with anticipation.
			<</switch>>
		<</if>>
	<<else>>
		$He looks
		<<if canTalk($activeSlave)>>
			determined. "<<Master>>, I will do my be<<s>>t to be a good whore, and get lot<<s>> of <<c>>iti<<z>>en<<s>> to pay good money for my body."
		<<else>>
			determined and gestures that $he'll do $his best to get lots of citizens to pay to use $him.
		<</if>>
	<</if>>

<<elseif ($activeSlave.devotion > 20) || (($activeSlave.devotion >= -20) && ($activeSlave.trust < -20) && ($activeSlave.trust >= -50))>>
	<<if canTalk($activeSlave)>>
		<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60) && ($activeSlave.fetish != "none")>>
			$He looks cautiously excited. "<<Master>>,
			<<switch $activeSlave.fetish>>
			<<case "submissive">>
				I'll have to do whatever the cu<<s>>tomer<<s>> pay for, right?" $His eyes go a little unfocused. "And, they'll hold me down..." $He trails off.
			<<case "masochist">>
				it'<<s>> hard being a brothel whore, right? And when I get tired or <<s>>ore, I'll <<s>>till be <<s>>old. Even when it hurt<<s>> me to fuck any more." $His eyes glow with an unhealthy light.
			<<case "cumslut">>
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"I hear there are <<s>>ome ni<<c>>e ladie<<s>> that go there for lunchtime cunnilingu<<s>>."
				<<else>>
					"the blowjob<<s>>. Ju<<s>>t, the blowjob<<s>>. That'<<s>> all."
				<</if>>
			<<case "humiliation">>
				there'<<s>> a window that fa<<c>>e<<s>> the hallway there, right? <<if $Madam != 0>>Do you think $Madam.slaveName would let me<<else>>Could I<</if>> get fucked there? Where everyone could <<s>>ee me being fucked for money?"
			<<case "buttslut">>

				uh," and $he shifts $his weight, $his mind obviously on $his backdoor,
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"there have to be ladie<<s>> who want to buttfuck a whore, right? At lea<<s>>t, I really hope there are."
				<<else>>
					"the other girl<<s>> tell me that whore<<s>> there get fucked up the a<<ss>> all day and all night. <<S>>ound<<s>> like fun to me."
				<</if>>
			<<case "boobs">>
				$He sticks out $his chest a little and gestures
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					that $he's heard a women comes by each day just to have her nipples sucked. $He licks $his lips, clearly savoring the thought.
				<<else>>
					that $he knows tittyfucking is popular there and can't wait to give $his pair up for sale.
				<</if>>
			<<case "pregnancy">>
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					I hear from the other girl<<s>> there'<<s>> thi<<s>> pregnant lady who goe<<s>> there every night and pay<<s>> to have a whore cuddle her. Ju<<s>>t cuddle, all night. That would be kind of hard, ju<<s>>t cuddling, but I could do it."
				<<elseif $activeSlave.vagina == -1>>
					<<s>>in<<c>>e it'<<s>> all bareback, I'm going to have a fuckton of cum in me. I wonder how much cum it take<<s>> to get a butthole pregnant? I'm gonna try, anyway."
				<<elseif isFertile($activeSlave)>>
					<<s>>in<<c>>e it'<<s>> all bareback, I'm going to have a fuckton of cum in me. I wonder how much cum it would take to get my poor womb pregnant?"
				<<elseif $activeSlave.pregKnown == 1>>
					"I'm going to be a pregnant whore. That'<<s>> pretty fucking <<s>>e<<x>>y."
				<<elseif $activeSlave.preg > 0>>
					"<<s>>in<<c>>e it'<<s>> all bareback, I'm going to have a fuckton of cum in me. I wonder how much cum it would take to get my poor womb pregnant?"
				<<elseif $activeSlave.ovaries == 1 && $activeSlave.pubertyXX == 0>>
					"I can't wait till I can get pregnant. That'd be pretty fucking <<s>>e<<x>>y."
				<<else>>
					"I hear from the other girl<<s>> there'<<s>> thi<<s>> pregnant lady who goe<<s>> there every night and pay<<s>> to have a whore cuddle her. Ju<<s>>t cuddle, all night. That would be kind of hard, ju<<s>>t cuddling, but I could do it."
				<</if>>
			<<case "dom">>
				I heard from the other girl<<s>> that <<s>>ome <<c>>iti<<z>>en<<s>> bring their girl<<s>> there. Ju<<s>>t to make them take it from a whore."
			<<case "sadist">>
				I heard from the other girl<<s>> that <<s>>ome <<c>>iti<<z>>en<<s>> bring their girl<<s>> there. Becau<<s>>e nobody know<<s>> how to hurt a bitch like a whore doe<<s>>." $He shivers.
			<</switch>>
		<<elseif $activeSlave.sexualFlaw != "none">>
			"Ye<<s>>, <<Master>>," $he says obediently. $He hesitates, looking concerned.
			<<switch $activeSlave.sexualFlaw>>
			<<case "hates oral">>
				"I — I'm going to h-have to <<s>>uck a lot of dick there, aren't I." $He swallows nervously. $His lower lip quivers, and $he does $his best not to cry in front of you.
			<<case "hates anal">>
				"C-cu<<s>>tomer<<s>> are really going to ream me up the butt hole, aren't they." $He <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers, and $he does $his best not to cry in front of you.
			<<case "hates penetration">>
				"C-cu<<s>>tomer<<s>> are really going to fuck me <<s>>ore, aren't they." $He <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<elseif $activeSlave.vagina > 0>>unconsciously lets $his hands fall to $his crotch, but catches $himself and doesn't quite shield $his pussy.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers, and $he does $his best not to cry in front of you.
			<<case "repressed">>
				"Being a whore i<<s>> a <<s>>in," $he <<say>>s quietly, half to $himself. "I'm going t-to b-be <<s>>o dirty. I'm going to h-hell." $He starts to cry quietly. "<<S>>-<<s>>orry, <<Master>>. I'll do my be<<s>>t."
			<<case "idealistic">>
				"I'm going to be <<s>>old for <<s>>e<<x>>," $he <<say>>s quietly, half to $himself. "Men are going to pay, and then they're g-going to <<s>>tick their dick<<s>> in me, and then they're going to leave." $He starts to cry quietly. "<<S>>-<<s>>orry, <<Master>>. I'll do my be<<s>>t."
			<<case "shamefast">>
				"I'm going to be meat in a brothel," $he <<say>>s quietly, half to $himself. "I'm going to <<s>>tand there naked with the other girl<<s>>, and men will pick me and then u<<s>>e my body. Over and over." $He starts to cry quietly. "<<S>>-<<s>>orry, <<Master>>. I'll do my be<<s>>t."
			<<case "apathetic">>
				"I gue<<ss>> I'll lie there," $he sighs quietly, half to $himself. "A man will pay and then he'll come into my room where I'm lying on the bed, and he'll <<s>>tick hi<<s>> cock in me and cum and leave. And then the ne<<x>>t man will come in." $He starts to cry quietly. "<<S>>-<<s>>orry, <<Master>>. I'll do my be<<s>>t."
			<<case "crude">>
				"Okay," $he <<say>>s, thinking. "My poor cornhole i<<s>> going to be <<s>>uch a <<s>>eminal <<s>>ewer." $He looks doubtful. "<<Sh>>ould I not have <<s>>aid that, <<Master>>?"
			<<case "judgemental">>
				"Gro<<ss>>," $he <<say>>s curtly. "Well, no more hand<<s>>ome boy<<s>> for me, then. Fat pathetic guy<<s>> who patroni<<z>>e whore<<s>>, all the way down. Fuck."
			<</switch>>
		<<else>>
			$He tries to be brave. "<<Master>>, I will do my be<<s>>t to be a good whore." Then, half to $himself, $he adds in a small voice, "I can do thi<<s>>."
		<</if>>
	<<else>>
		<<if ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60) && ($activeSlave.fetish != "none")>>
			$He looks cautiously excited.
			<<switch $activeSlave.fetish>>
			<<case "submissive">>
				$His eyes go a little unfocused before $he snaps back to attention and gestures that $he'll have to do whatever they want. $His attention wavers once more.
			<<case "masochist">>
				$He gestures if brothel whores get breaks when they get sore. Before you can tell $him no, $his eyes glow with an unhealthy light and $he expresses that $he'd like it more if it hurt.
			<<case "cumslut">>
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					$He gestures that $he heard a rumor that some ladies swing by during lunchtime for a quick eating out.
				<<else>>
					As drool starts to leak from $his mouth, it's pretty obvious $he can't wait to start sucking.
				<</if>>
			<<case "humiliation">>
				$He asks if there is a window that $he could be stationed in for all to see.
			<<case "buttslut">>
				$He shifts $his weight, $his mind obviously on $his backdoor, and gestures
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					if any girls would want to buttfuck $him.
				<<else>>
					that $he knows whores take it up the ass there and can't wait to join them.
				<</if>>
			<<case "boobs">>
				er," and $he sticks out $his chest a little,
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					"I hear from the other girl<<s>> there'<<s>> thi<<s>> ni<<c>>e lady who goe<<s>> there every morning and pay<<s>> to have a whore <<s>>uck her nipple<<s>> for, like, an hour. I," $he licks $his lips, "could do that."
				<<else>>
					"the other girl<<s>> tell me that whore<<s>> there get tittyfucked all the time. <<S>>ound<<s>> like fun to me."
				<</if>>
			<<case "pregnancy">>
				$He gestures
				<<if $activeSlave.attrXX > $activeSlave.attrXY>>
					that $he's heard that a pregnant women has been coming every night to pay for a whore to cuddle her. $He asks if $he could be that $girl.
				<<elseif $activeSlave.vagina == -1>>
					how much $he wishes $he could get pregnant from all the cum loads $he's going to get shot up $his rear.
				<<elseif isFertile($activeSlave)>>
					that $he knows all the sex is bareback. By the look in $his eyes, you can tell $he is wondering how long it will take for some guys seed to take root in $him.
				<<elseif $activeSlave.pregKnown == 1>>
					how sexy $he thinks pregnant whores are.
				<<elseif $activeSlave.preg > 0>>
					that $he knows all the sex is bareback. By the look in $his eyes, you can tell $he is wondering how long it will take for some guys seed to take root in $him.
				<<elseif $activeSlave.ovaries == 1 && $activeSlave.pubertyXX == 0>>
					how excited $he is for the day $he starts $his menstrual cycle. Will $he even see $his first period, or will every egg $he makes get fertilized?
				<<else>>
					that $he's heard a pregnant women has been coming every night to pay for a whore to cuddle her. $He hopes that one day $he'll be chosen.
				<</if>>
			<<case "dom">>
				$He gestures that $he knows citizens sometimes bring their toys there just to let them get pushed around by a whore. $He'd like that to be true. A lot.
			<<case "sadist">>
				$He gestures that $he knows citizens sometimes bring their toys there for punishment. $He shivers with anticipation.
			<</switch>>
		<<elseif $activeSlave.sexualFlaw != "none">>
			$He nods obediently before hesitating with a concerned look on $his face.
			<<switch $activeSlave.sexualFlaw>>
			<<case "hates oral">>
				$He slowly gestures if blowjobs are popular there while swallowing nervously. $His lower lip starts to quiver, and $he does $his best not to cry in front of you.
			<<case "hates anal">>
				$He slowly gestures if anal is popular there and <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers, and $he does $his best not to cry in front of you.
			<<case "hates penetration">>
				$He slowly gestures that $he understands that customers will expect to fuck $him and <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<elseif $activeSlave.vagina > 0>>unconsciously lets $his hands fall to $his crotch, but catches $himself and doesn't quite shield $his pussy.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers, and $he does $his best not to cry in front of you.
			<<case "repressed">>
				$He shakily gestures that $he'll be a sinner, but if that's what you want, $he'll do it. $He starts to cry quietly.
			<<case "idealistic">>
				$He shakily gestures that $he'll do $his best to please any men that use $him. $He starts to cry quietly.
			<<case "shamefast">>
				$He shakily gestures that $he'll do $his best to use $his naked body to attract men and entice passersby. $He starts to cry quietly.
			<<case "apathetic">>
				$He shakily gestures that $he'll do $his best to take cock. $He starts to cry quietly.
			<<case "crude">>
				$He gestures that $his body is going to become so foul after a day's worth of fucks. $He pauses for a moment, doubtful over whether $he should have said that or not.
			<<case "judgemental">>
				$He gestures $his disappointment that only the most pathetic of losers will be fucking $him now. $He pauses for a moment, doubtful over whether $he should have said that or not.
			<</switch>>
		<<else>>
			$He puts on a brave face and gestures that $he'll do $his best. As you send $him off, you catch sight of $him trying to reassure $himself.
		<</if>>
	<</if>>

<<elseif ($activeSlave.trust < -20)>>

	<<if canTalk($activeSlave)>>
		<<if $activeSlave.sexualFlaw != "none">>
			"Yes, <<Master>>," $he says automatically. $He's badly frightened, and says in a small voice, half to $himself,
			<<switch $activeSlave.sexualFlaw>>
			<<case "hates oral">>
				"I — I'm going to h-have to <<s>>uck a lot of dick, aren't I." $He swallows and tries to control $himself out of fear, but finally gasps out, "Oh God, I'm <<s>>cared," and bursts into tears.
			<<case "hates anal">>
				"C-cu<<s>>tomer<<s>> are really going to ream me up the butt hole, aren't they." $He <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers and $he tries to control $himself out of fear, but finally gasps out, "Oh God, I'm <<s>>cared," and bursts into tears.
			<<case "hates penetration">>
				"C-cu<<s>>tomer<<s>> are really going to fuck me <<s>>ore, aren't they." $He <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<elseif $activeSlave.vagina > 0>>unconsciously lets $his hands fall to $his crotch, but catches $himself and doesn't quite shield $his pussy.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers, and $he tries to control $himself out of fear, but finally gasps out, "Oh God, I'm <<s>>cared," and bursts into tears.
			<<case "repressed">>
				"Being a whore i<<s>> a <<s>>in," $he <<say>>s quietly, half to $himself. "I'm going t-to b-be <<s>>o dirty. I'm going to h-hell." $He starts to cry quietly. $He tries to get $himself back under control, out of fear, but finally wails, "Oh God, I'm <<s>>orry, p-plea<<s>>e forgive me God," and dissolves into sobbing.
			<<case "idealistic">>
				"I'm going to be <<s>>old for <<s>>e<<x>>," $he <<say>>s quietly, half to $himself. "Men are going to pay, and then they're g-going to <<s>>tick their dick<<s>> in me, and then they're going to leave." $He starts to cry openly. "<<S>>-<<s>>orry, <<Master>>. P-plea<<s>>e don't beat me. I'll do it."
			<<case "shamefast">>
				"I'm going to be meat in a brothel," $he <<say>>s quietly, half to $himself. "I'm going to <<s>>tand there naked with the other girl<<s>>, and men will pick me and then u<<s>>e my body. Over and over." $He starts to cry openly. "<<S>>-<<s>>orry, <<Master>>. P-plea<<s>>e don't beat me. I'll do it."
			<<case "apathetic">>
				"I gue<<ss>> I'll lie there," $he sighs quietly, half to $himself. "A man will pay and then he'll come into my room where I'm lying on the bed, and he'll <<s>>tick his cock in me and cum and leave. And then the ne<<x>>t man will come in." $He starts to cry quietly. "<<S>>-<<s>>orry, <<Master>>. P-plea<<s>>e don't beat me. I'll let it happen."
			<<case "crude">>
				"Okay," $he <<say>>s, thinking. "My poor cornhole i<<s>> going to be <<s>>uch a <<s>>eminal <<s>>ewer." $He looks doubtful. "<<Sh>>ould I not have <<s>>aid that, <<Master>>?"
			<<case "judgemental">>
				"Gro<<ss>>," $he <<say>>s curtly. "Well, no more hand<<s>>ome boy<<s>> for me, then. Fat pathetic guy<<s>> who patroni<<z>>e whore<<s>>, all the way down. Fuck."
			<</switch>>
		<<else>>
			$He does $his best to control $himself and avoid punishment. "<<Master>>, I will." $He holds $himself together until you dismiss $him; as $he turns away to go, the tears come fast, and $he almost runs into the door frame on $his way out, blind with weeping.
		<</if>>
	<<else>>
		<<if $activeSlave.sexualFlaw != "none">>
			$He automatically gestures consent. $He's badly frightened, and gingerly continues
			<<switch $activeSlave.sexualFlaw>>
			<<case "hates oral">>
				by asking if $he'll have to suck a lot of dick. $He swallows and tries to control $himself out of fear, but finally loses composure and bursts into tears.
			<<case "hates anal">>
				by asking if $he'll be assfucked a lot. $He <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers and $he tries to control $himself out of fear, but finally loses composure and bursts into tears.
			<<case "hates penetration">>
				by asking if $he's going to be constantly fucked. $He <<if $activeSlave.amp == 1>>shifts uncomfortably, unconsciously trying to shield $his rear as best $he can manage without limbs.<<elseif $activeSlave.vagina > 0>>unconsciously lets $his hands fall to $his crotch, but catches $himself and doesn't quite shield $his pussy.<<else>>unconsciously reaches around behind $himself, not quite shielding $his anus with $his hands.<</if>> $His lower lip quivers, and $he tries to control $himself out of fear, but finally loses composure and bursts into tears.
			<<case "repressed">>
				that being a whore is a sin. $He starts to cry quietly. $He tries to get $himself back under control, out of fear, but finally wails and dissolves into prayers intermixed with sobbing.
			<<case "idealistic">>
				that sex should be with the one you love, not random men. $He starts to cry openly while begging you not to beat $him.
			<<case "shamefast">>
				that $he doesn't want to be naked in a line up for men to choose from. $He starts to cry openly while begging you not to beat $him.
			<<case "apathetic">>
				that all $he has to do is lie there and take it. $He starts to cry quietly.
			<<case "crude">>
				by asking if men enjoy fucking a thoroughly seeded hole. $He pauses for a moment, doubtful over whether $he should have said that or not.
			<<case "judgemental">>
				by expressing $his disappointment with the type of men that frequent brothels.
			<</switch>>
		<<else>>
			$He does $his best to control $himself and avoid punishment. "<<Master>>, I will." $He holds $himself together until you dismiss $him; as $he turns away to go, the tears come fast, and $he almost runs into the door frame on $his way out, blind with weeping.
		<</if>>
	<</if>>

<<else>>

	$He manages to
	<<if canTalk($activeSlave)>>
		get "Oh fuck n-" out
	<<elseif $activeSlave.amp != 1>>
		flip you an incredibly rude gesture
	<<else>>
		get an incredibly rude gesture out
	<</if>>
	before the compliance systems activate and $he's poleaxed to the ground. Anticipating this, you had <<if $Madam != 0>>$Madam.slaveName <<else>>another, more obedient slave<</if>> standing by to haul $him away. It'll take a couple of hundred customers, but being sold in a brothel for rape should knock the resistance out of $him.

<</if>> /* CLOSES DEVOTION */


code:
App.Data.Facilities.brothel = {
	baseName: "brothel",
	genericName: null,
	jobs: {
		assignee: {
			position: "whore",
			assignment: "work in the brothel",
			publicSexUse: true,
			fuckdollAccepted: false
		},
	},
	defaultJob: "assignee",
	manager: {
		position: "madam",
		assignment: "be the Madam",
		careers: ["a banker", "a business owner", "a businessman", "a camp counselor", "a club manager", "a hotel manager", "a landlady", "a madam", "a manager", "a park ranger", "a pimp", "a procuress", "a stockbroker", "an innkeeper"],
		skill: null,
		publicSexUse: true,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 50
	}
}

App.Entity.Facilities.BrothelJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);

		// condition is the same as for the club
		if (!App.Entity.Facilities.Job._isBrokenEnough(slave, 51, -50, -20, -50, 50)) {
			r.push(App.Entity.Facilities.Job._stdBreakageMessage(slave));
		}
		return r;
	}
}

App.Entity.Facilities.MadamJob = class extends App.Entity.Facilities.ManagingJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);
		if (slave.intelligence + slave.intelligenceImplant < -50) {
			r.push(`${slave.slaveName} is not intelligent enough to be the Madam.`);
		}
		return r;
	}
}

App.Entity.facilities.brothel = new App.Entity.Facilities.Facility(
	App.Data.Facilities.brothel,
	{
		assignee: new App.Entity.Facilities.BrothelJob()
	},
	new App.Entity.Facilities.MadamJob()
);

repo_name: Fekenol/fc


code:
App.Data.Facilities.cellblock = {
	baseName: "cellblock",
	genericName: null,
	jobs: {
		assignee: {
			position: "confinee",
			assignment: "be confined in the cellblock",
			publicSexUse: false,
			fuckdollAccepted: false
		},
	},
	defaultJob: "assignee",
	manager: {
		position: "wardness",
		assignment: "be the Wardeness",
		careers: ["a bouncer", "a bounty hunter", "a bully", "a chief of police", "a gang member", "a hall monitor", "a mercenary", "a police detective", "a police officer", "a prison guard", "a prison warden", "a private detective", "a security guard", "a street thug", "an enforcer", "an orderly"],
		skill: "wardeness",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: false,
		shouldThink: false,
		requiredDevotion: 51

	}
}

App.Entity.Facilities.CellblockJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);

		if ((slave.devotion > -20 || slave.trust < -20) && (slave.devotion >= -50 || slave.trust < -50)) {
			r.push(`${slave.slaveName} is not defiant enough for ${this.facility.name} to have an effect.`);
		}

		return r;
	}
}

App.Entity.facilities.cellblock = new App.Entity.Facilities.Facility(
	App.Data.Facilities.cellblock,
	{
		assignee: new App.Entity.Facilities.CellblockJob()
	}
);


code:
App.Data.Facilities.clinic = {
	baseName: "clinic",
	genericName: null,
	jobs: {
		patient: {
			position: "patient",
			assignment: "get treatment in the clinic",
			publicSexUse: false,
			fuckdollAccepted: false
		}
	},
	defaultJob: "patient",
	manager: {
		position: "nurse",
		assignment: "be the Nurse",
		careers: ["a chemist", "a chiropractor", "a coroner", "a dentist", "a doctor", "a hospital volunteer", "a medic", "a medical student", "a midwife", "a mortician", "a nurse", "a paramedic", "a pharmacist", "a physician", "a school nurse's assistant", "a school nurse", "a surgeon"],
		skill: "nurse",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: false,
		shouldThink: true,
		requiredDevotion: 51
	}
}

App.Entity.Facilities.ClinicPatientJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);
		const V = State.variables;

		if ((slave.health >= 20) &&
			(V.Nurse === 0 || ((slave.chem <= 15 || this.facility.upgrade("Filters") !== 1) &&
				(V.bellyImplants !== 1 || slave.bellyImplant <= -1) &&
				(slave.pregKnown !== 1 || (this.facility.option("SpeedGestation") <= 0 && slave.pregControl !== "speed up")) && (slave.pregAdaptation * 1000 >= slave.bellyPreg && slave.preg <= slave.pregData.normalBirth / 1.33)))) {
			r.push(`${slave.slaveName} cannot benefit from ${this.facility.name}.`);
		}

		return r;
	}
}

App.Entity.facilities.clinic = new App.Entity.Facilities.Facility(
	App.Data.Facilities.clinic,
	{
		patient: new App.Entity.Facilities.ClinicPatientJob()
	}
);


code:
App.Data.Facilities.club = {
	baseName: "club",
	genericName: null,
	jobs: {
		slut: {
			position: "Slut",
			assignment: "serve in the club",
			publicSexUse: true,
			fuckdollAccepted: false
		},
	},
	defaultJob: "slut",
	manager: {
		position: "DJ",
		assignment: "be the DJ",
		careers: ["a classical dancer", "a classical musician", "a dancer", "a house DJ", "a marching band leader", "a musician", "a radio show host", "an aspiring pop star", "an idol", "an orchestra conductor"],
		skill: "DJ",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: false,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 51
	}
}

App.Entity.Facilities.ClubSlutJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);

		// condition is the same as for the brothel
		// TODO: consider moving this to App.Entity.Facilities.SexJob
		if (!App.Entity.Facilities.Job._isBrokenEnough(slave, 51, -50, -20, -50, 50)) {
			r.push(App.Entity.Facilities.Job._stdBreakageMessage(slave));
		}

		return r;
	}
}

App.Entity.Facilities.ClubDJJob = class extends App.Entity.Facilities.ManagingJob {
	canEmploy(slave) {
		let r = super.canEmploy(slave);
		if (slave.intelligence + slave.intelligenceImplant < -50) {
			r.push(`${slave.slaveName} is not intelligent enough to DJ.`);
		}
		return r;
	}
}

App.Entity.facilities.club = new App.Entity.Facilities.Facility(
	App.Data.Facilities.club,
	{
		slut: new App.Entity.Facilities.ClubSlutJob()
	},
	new App.Entity.Facilities.ClubDJJob()
);


code:
App.Data.Facilities.dairy = {
	baseName: "dairy",
	genericName: null,
	jobs: {
		cow: {
			position: "cow",
			assignment: "work in the dairy",
			publicSexUse: false,
			fuckdollAccepted: false
		}
	},
	defaultJob: "cow",
	manager: {
		position: "milkmaid",
		assignment: "be the Milkmaid",
		careers: ["a cowgirl", "a dairy worker", "a farmer's daughter", "a milkmaid", "a shepherd", "a veterinarian"],
		skill: "milkmaid",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: false,
		shouldThink: true,
		requiredDevotion: 21
	}
}

App.Entity.Facilities.DairyCowJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);

		const V = State.variables;

		if ((slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) {
			r.push(`${slave.slaveName}'s indenture forbids extractive Dairy service.`);
		}
		if ((slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) {
			r.push(`${slave.slaveName}'s indenture allows only free range milking.`);
		}
		if (slave.breedingMark === 1 && V.propOutcome === 1 && V.dairyRestraintsSetting > 0) {
			r.push(`${slave.slaveName} may only be a free range cow.`);
		}
		if ((V.dairyPregSetting > 0) && ((slave.bellyImplant !== -1) || (slave.broodmother !== 0))) {
			r.push(`${slave.slaveName}'s womb cannot accommodate current machine settings.`);
		}

		if ((slave.amp !== 1) && (this.facility.option("RestraintsUpgrade") !== 1) &&
			!App.Entity.Facilities.Job._isBrokenEnough(slave, 20, -50, -20, -50)) {
			r.push(`${slave.slaveName} must be obedient in order to be milked at ${this.facility.name}.`);
		}

		if ((slave.lactation === 0) && (slave.balls === 0) && ((V.dairySlimMaintainUpgrade !== 1 && V.dairySlimMaintain <= 0) || (slave.boobs <= 300 && slave.balls !== 0 && V.dairyImplantsSetting !== 1) || V.dairyImplantsSetting === 2)) {
			if ((V.dairySlimMaintainUpgrade === 1 && V.dairySlimMaintain === 1) || (V.dairyImplantsSetting === 2) || (slave.boobs <= 300 && slave.balls > 0 && (V.dairyImplantsSetting === 0 || V.dairyImplantsSetting === 3))) {
				r.push(`${slave.slaveName} is not lactating ` + ((V.seeDicks > 0) ? 'or producing semen ' : '') + `and ${this.facility.name}'s current settings forbid the automatic implantation of lactation inducing drugs or manual stimulation to induce it, and thus cannot be a cow.`);
			} else {
				r.push(`${slave.slaveName} is not lactating ` + ((V.seeDicks > 0) ? 'or producing semen ' : '') + 'and cannot be a cow.');
			}
		} else if ((V.dairyStimulatorsSetting >= 2) && (slave.anus <= 2) && (V.dairyPrepUpgrade !== 1)) {
			r.push(`${slave.slaveName}'s anus cannot accommodate current machine settings.`);
		} else if ((V.dairyPregSetting >= 2) && (slave.vagina <= 2) && (slave.ovaries !== 0) && (V.dairyPrepUpgrade !== 1)) {
			r.push(`${slave.slaveName}'s vagina cannot accommodate current machine settings.`);
		}

		return r;
	}
}

App.Entity.Facilities.Dairy = class extends App.Entity.Facilities.Facility {
	constructor() {
		super(App.Data.Facilities.dairy,
			{
			cow: new App.Entity.Facilities.DairyCowJob()
		});
	}

	get hasFreeSpace() {
		const V = State.variables;
		const dairySeed = V.bioreactorsXY + V.bioreactorsXX + V.bioreactorsHerm + V.bioreactorsBarren;
		return this.capacity > this.hostedSlaves + dairySeed;
	}
}

App.Entity.facilities.dairy = new App.Entity.Facilities.Dairy();


code:
:: Farmer Select [nobr]

<<set $nextButton = "Back", $nextLink = "Farmyard", $showEncyclopedia = 1, $encyclopedia = "Farmer">>
<<showallAssignmentFilter>>
<<if ($Farmer != 0)>>
	<<set $Farmer = getSlave($Farmer.ID)>>
	<<setLocalPronouns $Farmer>>
	''__@@.pink;<<= SlaveFullName($Farmer)>>@@__'' is serving as your Farmer.

$He will tend to your crops and animals.
<<else>>
	You have not selected a Farmer.
<</if>>

''Appoint a Farmer from your obedient slaves:''

[[None|Farmer Workaround][$i = -1]]

<<assignmentFilter>>

	<<showallAssignmentFilter>>
	<<include "Slave Summary">>
	<<resetAssignmentFilter>>


code:
:: Farmer Workaround [silently]

<<if $Farmer != 0>>
	<<= removeJob($Farmer, "be the Farmer")>>
<</if>>
<<if $i > -1>>
	<<= assignJob($slaves[$i], "be the Farmer")>>
	<<set $slaves[$i].livingRules = "luxurious">>
	<<set $Farmer = $slaves[$i]>>
<</if>>

<<goto "Farmyard">>


code:
:: FarmyardAnimals [nobr]

<<set $nextButton = "Back", $nextLink = "Farmyard", $returnTo = "FarmyardAnimals", $showEncyclopedia = 1, $encyclopedia = "Farmyard">>

/* TODO: write some descriptions for the different animals in their cages */

<<if $farmyardKennels > 0 || $farmyardStable > 0 || $farmyardCages > 0>>

''Domestic Animals''

<<if $farmyardKennels > 0>>

	__Dogs__

//Cost <<print cashFormat(20000)>> each// /* TODO: this number is mostly a placeholder, will need adjusting */

	<<if $animalsBought.labradorRetrievers <= 0>>
		<<link "Purchase dogs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.labradorRetrievers = 1, $animalsBought.canines += 1, $canines.push("Labrador Retrievers")>><</link>>

	<<else>>
		Dogs
		<<if $activeCanine.breed != "Labrador Retriever">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Labrador Retriever", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
<</if>>

<<if $farmyardStable > 0>>

	__Hooved Animals__

//Cost <<print cashFormat(20000)>> each// /* TODO: this number is mostly a placeholder, will need adjusting */

	<<if $animalsBought.horses <= 0>>
		<<link "Purchase horses" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.horses = 1, $animalsBought.hooved += 1, $hooved.push("horses")>><</link>>

	<<else>>
		Horses
		<<if $activeHooved.species != "horse">>
			[[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "horse", speciesCap: "Horse", speciesPlural: "horses", type: "hooved", dickSize: "huge", ballType: "horse"}]]
		<<else>>
			//Set as active hooved//
		<</if>>

	<</if>>
	<<if $animalsBought.bulls <= 0>>
		<<link "Purchase bulls" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bulls = 1, $animalsBought.hooved += 1, $hooved.push("bulls")>><</link>>

	<<else>>
		Bulls
		<<if $activeHooved.species != "bull">>
			[[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "bull", speciesCap: "Bull", speciesPlural: "bulls", type: "hooved", dickSize: "huge", ballType: "horse"}]]
		<<else>>
			//Set as active hooved//
		<</if>>

	<</if>>
	<<if $animalsBought.pigs <= 0>>
		<<link "Purchase pigs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.pigs = 1, $animalsBought.hooved += 1, $hooved.push("pigs")>><</link>>

	<<else>>
		Pigs
		<<if $activeHooved.species != "pig">>
			[[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "pig", speciesCap: "Pig", speciesPlural: "pigs", type: "hooved", dickSize: "large", ballType: "horse"}]]
		<<else>>
			//Set as active hooved//
		<</if>>

	<</if>>
<</if>>
<</if>>

<<if $farmyardKennels > 1 || $farmyardStable > 1 || $farmyardCages > 1>>

''Exotic Animals''

<<if $farmyardKennels > 1>>

	__Canines__

//Cost <<print cashFormat(20000)>> each//

	<<if $animalsBought.wolves <= 0>>
		<<link "Purchase wolves" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.wolves = 1, $animalsBought.canines += 1, $canines.push("wolves")>><</link>>

	<<else>>
		/*A couple of adult wolves are lounging about in their kennels.(OLD)*/
		Wolves
		<<if $activeCanine.species != "wolf">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "wolf", speciesCap: "Wolf", speciesPlural: "wolves", type: "canine", dickSize: "large", ballType: "wolf"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
<</if>>

<<if $farmyardCages > 1>>

	__Felines__

//Cost <<print cashFormat(30000)>> each// /* TODO: this number is mostly a placeholder, will need adjusting */

	<<if $animalsBought.lions <= 0>>
		<<link "Purchase lions" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.lions = 1, $animalsBought.felines += 1, $felines.push("lions")>><</link>>

	<<else>>
		/*Most of the lions are sunning themselves. (OLD)*/
		Lions
		<<if $activeFeline.species != "lion">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "lion", speciesCap: "Lion", speciesPlural: "lions", type: "feline", dickSize: "large", ballType: "lion"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
<</if>>
<</if>>


code:
App.Data.Facilities.farmyard = {
	baseName: "farmyard",
	genericName: null,
	jobs: {
		farmhand: {
			position: "farmhand",
			assignment: "work as a farmhand",
			publicSexUse: false,
			fuckdollAccepted: false
		}
	},
	defaultJob: "farmhand",
	manager: {
		position: "farmer",
		assignment: "be the Farmer",
		careers: ["a beekeeper", "a bullfighter", "a farmer", "a farmhand", "a rancher", "a rodeo star", "a zookeeper"],
		skill: "farmer",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: false,
		shouldThink: true,
		requiredDevotion: 51
	}
}

App.Entity.facilities.farmyard = new App.Entity.Facilities.Facility(
	App.Data.Facilities.farmyard
);


code:
:: FarmyardLab [nobr]

<<set $nextButton = "Back", $nextLink = "Farmyard", $returnTo = "FarmyardLab", $showEncyclopedia = 1, $encyclopedia = "Farmyard">>

/* TODO: add plant types and research for them */

$farmyardNameCaps Research Lab

<<if $farmyardLabUpgrades.animalOvaries == 0>>
	[[Retrofit the pharmaceutical fabricator to work with animal ovaries|FarmyardLab][cashX(-25000, "capEx"), $farmyardLabUpgrades.animalOvaries = 1]]

//Costs <<print cashFormat(25000)>> and allows you to implant animal ovaries into slaves.//

<<elseif $farmyardLabUpgrades.animalOvaries == 1>>
	The pharmaceutical fabricator has been retrofitted to work with animal ovaries, allowing you to implant them into slaves.

<</if>>
<<if $farmyardLabUpgrades.animalTesticles == 0>>
	[[Retrofit the pharmaceutical fabricator to work with animal testicles|FarmyardLab][cashX(-25000, "capEx"), $farmyardLabUpgrades.animalTesticles = 1]]

//Costs <<print cashFormat(25000)>> and allows you to implant animal testicles into slaves.//

<<elseif $farmyardLabUpgrades.animalTesticles == 1>>
	The pharmaceutical fabricator has been retrofitted to work with animal testicles, allowing you to implant them into slaves.

<</if>>
<<if $farmyardLabUpgrades.animalMpreg == 0>>
	[[Retrofit the pharmaceutical fabricator to work with animal anal wombs and ovaries|FarmyardLab][cashX(-25000, "capEx"), $farmyardLabUpgrades.animalMpreg = 1]]

//Costs <<print cashFormat(25000)>> and allows you to implant animal anal wombs and ovaries into slaves.//

<<elseif $farmyardLabUpgrades.animalMpreg == 1>>
	The pharmaceutical fabricator has been retrofitted to work with animal anal wombs and ovaries, allowing you to implant them into slaves.

<</if>>


code:
:: Farmyard Report [nobr]

<<SlaveSort $FarmyardiIDs>>
<<set _DL = $FarmyardiIDs.length, $farmyardSlaves = _DL, _SL = $slaves.length, $FarmerCashBonus = 0, _FLsFetish = 0, _profits = 0, _foodWeek = 0>>
<<set $FarmerDevotionBonus = 1, $FarmerDevotionThreshold = 45, $FarmerTrustBonus = 1, $FarmerTrustThreshold = 35, $FarmerHealthBonus = 0>>
/*<<set $legendaryWombID = 0>> TODO: will the Farmyard have a legendary womb system? */

<<set $facility = $facility || {}, $facility.farmyard = initFacilityStatistics($facility.farmyard)>>

<<if ($Farmer != 0)>>
	<<set _FLs = $slaveIndices[$Farmer.ID]>>

	<<if ($slaves[_FLs].health < -80)>>
		<<set $slaves[_FLs].health += 20>>
	<<elseif $slaves[_FLs].health < -40>>
		<<set $slaves[_FLs].health += 15>>
	<<elseif $slaves[_FLs].health < 0>>
		<<set $slaves[_FLs].health += 10>>
	<<elseif $slaves[_FLs].health < 90>>
		<<set $slaves[_FLs].health += 7>>
	<</if>>
	<<if $slaves[_FLs].devotion <= 45>>
		<<set $slaves[_FLs].devotion += 5>>
	<</if>>
	<<if $slaves[_FLs].trust < 45>>
		<<set $slaves[_FLs].trust += 5>>
	<</if>>
	<<if $slaves[_FLs].livingRules != "luxurious">>
		<<set $slaves[_FLs].livingRules = "luxurious">>
	<</if>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
		<<if $slaves[_FLs].fetish != "dom">>
			<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "dom">>
			<</if>>
		<<elseif $slaves[_FLs].fetishKnown == 0>>
			<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
		<<else>>
			<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
		<</if>>
	<</if>>
	/% Make sure we have registered living expenses as for any other slave %/
	<<run getSlaveStatisticData($Farmer, $facility.farmyard)>>
	<<set $Farmer = $slaves[_FLs]>>
	<<setLocalPronouns $Farmer>>
	    <<= SlaveFullName($Farmer)>> is serving as the Farmer.
	<<if $Farmer.relationship == -3 && $Farmer.devotion > 50>>
		As your loving wife, $he does $his best to ensure $farmyardName runs smoothly.
		<<set $FarmerCashBonus += 0.25>>
	<</if>>
	<<if (_FLsFetish == 1)>>
		$He isn't above sampling the merchandise $himself; before long it's obvious to $his workers that $he @@.lightcoral;really likes fucking them.@@
	<<elseif (_FLsFetish == 2)>>
		$He's careful that all of the farmhands under $his supervision are all ready to work every morning, and $he @@.lightsalmon;becomes more dominant.@@
	<</if>>
	<<if ($Farmer.skill.farmer <= 10)>>
		Though $Farmer.slaveName does $his best to manage the farmyard, with $his lack of skill $he can do little.
	<<elseif ($Farmer.skill.farmer <= 30)>>
		$Farmer.slaveName's basic skills marginally @@.yellowgreen;improve@@ business at $farmyardName.
		<<set $FarmerCashBonus += 0.05>>
	<<elseif ($Farmer.skill.farmer <= 60)>>
		$Farmer.slaveName's skills @@.yellowgreen;improve@@ business at $farmyardName.
		<<set $FarmerCashBonus += 0.1>>
	<<elseif ($Farmer.skill.farmer < 100)>>
		$Farmer.slaveName's skills greatly @@.yellowgreen;improve@@ business at $farmyardName.
		<<set $FarmerCashBonus += 0.15>>
	<<else>>
		$Farmer.slaveName's mastery immensely @@.yellowgreen;improves@@ business at $farmyardName.
		<<set $FarmerCashBonus += 0.20>>
	<</if>>
	<<if ($Farmer.actualAge > 35)>>
		$His age and experience also contribute.
		<<set $FarmerCashBonus += 0.05>>
	<<elseif $AgePenalty == 0>>
		<<set $FarmerCashBonus += 0.05>>
	<</if>>
	<<if setup.farmerCareers.includes($Farmer.career)>>
		$He has experience from $his life before $he was a slave that helps $him in the difficult life of managing animals and property.
		<<set $FarmerCashBonus += 0.05>>
	<<elseif $Farmer.skill.farmer >= $masteredXP>>
		$He has experience from working for you that helps $him in the difficult life of managing animals and property.
		<<set $FarmerCashBonus += 0.05>>
	<<else>>
		<<set $slaves[_FLs].skill.farmer += random(1,Math.ceil(($Farmer.intelligence+$Farmer.intelligenceImplant)/15) + 8)>>
	<</if>>
	<<if ($Farmer.intelligence+$Farmer.intelligenceImplant > 15)>>
		$He is a clever manager.
		<<set $FarmerCashBonus += 0.05*Math.floor(($Farmer.intelligence+$Farmer.intelligenceImplant)/32)>>
	<</if>>
	<<if ($Farmer.dick > 2) && (canPenetrate($Farmer))>>
		$His turgid dick helps $him manage $his workers.
		<<set $FarmerCashBonus += 0.05>>
	<</if>>
	<<if !canSmell($Farmer)>>
		$His lack of a sense of smell protects $him from that omnipresent barnyard scent.
		<<set $FarmerCashBonus += 0.05>>
	<</if>>

	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$FarmyardiIDs[_dI]]>>
		<<setLocalPronouns $slaves[$i]>>
		<<setLocalPronouns $Farmer 2>>
		<<if $Farmer.rivalryTarget == $slaves[$i].ID>>
			_He2 forces _his2 <<print rivalryTerm($Farmer)>> to service all the slaves in $farmyardName.	/* TODO: not sure about this */
			<<set $slaves[$i].devotion -= 2, $slaves[$i].trust -= 2>>
			<<if canDoVaginal($slaves[$i])>>
				<<set $slaves[$i].counter.vaginal += 10, $vaginalTotal += 10>>
				<<if $slaves[$i].counter.publicUse>><<set $slaves[$i].counter.publicUse += 10>><<else>><<set $slaves[$i].counter.publicUse = 10>><</if>>
			<</if>>
			<<if canDoAnal($slaves[$i])>>
				<<set $slaves[$i].counter.anal += 10, $analTotal += 10>>
				<<if $slaves[$i].counter.publicUse>><<set $slaves[$i].counter.publicUse += 10>><<else>><<set $slaves[$i].counter.publicUse = 10>><</if>>
			<</if>>
			<<set $slaves[$i].counter.oral += 10, $oralTotal += 10>>
			<<if $slaves[$i].counter.publicUse>><<set $slaves[$i].counter.publicUse += 10>><<else>><<set $slaves[$i].counter.publicUse = 10>><</if>>
			<<if random(1,100) > 65>>
				<<set $slaves[_FLs].rivalry++, $Farmer.rivalry++, $slaves[$i].rivalry++>>
			<</if>>
		<<elseif $Farmer.relationshipTarget == $slaves[$i].ID>>
			_He2 dotes over _his2 <<print relationshipTerm($Farmer)>>, $slaves[$i].slaveName, making sure $he isn't worked too hard, but unfortunately manages to get in the way of $his work.
			<<set $slaves[$i].devotion++, $FarmerCashBonus -= 0.05>>
		<<elseif $familyTesting == 1 && areRelated($Farmer, $slaves[$i]) > 0>>
			_He2 pays special attention to _his2 <<print relativeTerm($Farmer.ID,$slaves[$i].ID)>>, $slaves[$i].slaveName, making sure $he is treated well and showing off $his skills. /* TODO: does this need rewriting? */
			<<set $slaves[$i].trust++, $FarmerCashBonus += 0.05>>
		<<elseif $Farmer.relationTarget == $slaves[$i].ID && $familyTesting == 0>>
			_He2 pays special attention to _his2 $slaves[$i].relation, $slaves[$i].slaveName, making sure $he is treated well and showing off $his skills. /* TODO: does this need rewriting? */
			<<set $slaves[$i].trust++, $FarmerCashBonus += 0.05>>
		<</if>>
	<</for>>

	<<set _oldCash = $cash>>
	<<if (_DL < 5)>>
		/* TODO: will we need this block?
		<<set $slavesGettingHelp = 0>>
		<<if $universalRulesFacilityWork == 1>>
			<<for $i = 0; $i < _SL; $i++>>
				<<if ($slaves[$i].assignment == "farmhand")>>
					<<set $slavesGettingHelp++>>
				<</if>>
			<</for>>
		<</if>>
		*/
		<<if (_DL+$slavesGettingHelp < 5)>>
			<<set $i = _FLs>> /* apply following SA passages to facility leader */
			<<if $showEWD != 0>>

    $He <<include "SA work the farm">>
			<<else>>
				<<silently>><<include "SA work the farm">><</silently>>
			<</if>>
			<<set _seed = $cash-_oldCash, cashX(Math.trunc(0.5*_seed), "farmyard"), _seed = Math.trunc(1.5*_seed), _profits += _seed>>
			/* TODO: what will the Farmer do when she isn't busy? */

    Since $he doesn't have enough farmhands to manage to keep $him busy, $he sees $beauty customers $himself (<<print Math.trunc($beauty/7)>> a day), earning you @@.yellowgreen;<<print cashFormat(_seed)>>.@@ $He can charge more for $his time, since many citizens find it erotic to fuck the Farmer.
		<</if>>
	<</if>>
	<<if (_DL > 0)>>

<</if>>
<</if>>

<<if (_DL > 0)>>
	    <<if _DL != 1>>''There are _DL farmhands working out of $farmyardName.''<<else>>''There is one farmhand working out of $farmyardName.''<</if>>
<</if>>

<<if $Farmer != 0>>
	<<set $i = _FLs>> /* apply following SA passages to facility leader */
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>

				<<SlaveArt $slaves[_FLs] 0 0>>

		<</if>>
		/* 000-250-006 */
		''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as the Farmer.

		<<= saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA drugs">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
<</if>>

<<if (_DL > 0)>>
	<<set _oldCash = $cash, _oldFood = $food>>
	<<for _dI = 0; _dI < _DL; _dI++>>
		<<set $i = $slaveIndices[$FarmyardiIDs[_dI]]>>
		<<setLocalPronouns $slaves[$i]>>
		/* Perform facility based rule changes */
		<<switch $farmyardDecoration>>
		<<case "Degradationist" "standard">>	/* TODO: add the rest of the FS */
			<<set $slaves[$i].livingRules = "spare">>
		<<case "Roman Revivalist">>
			<<set $slaves[$i].livingRules = "luxurious">>
		<<default>>
			<<set $slaves[$i].livingRules = "normal">>
		<</switch>>
		/* TODO: should FS with "spare" living rules cause some minor health damage and devotion / trust loss? */
		<<if ($slaves[$i].health < -80)>>
			<<set $slaves[$i].health += 20>>
		<<elseif $slaves[$i].health < -40>>
			<<set $slaves[$i].health += 15>>
		<<elseif $slaves[$i].health < 0>>
			<<set $slaves[$i].health += 10>>
		<<elseif $slaves[$i].health < 90>>
			<<set $slaves[$i].health += 7>>
		<</if>>
		<<if ($slaves[$i].devotion <= 20) && ($slaves[$i].trust >= -20)>>
			<<set $slaves[$i].devotion -= 5, $slaves[$i].trust -= 5>>
		<<elseif ($slaves[$i].devotion < 45)>>
			<<set $slaves[$i].devotion += 4>>
		<<elseif ($slaves[$i].devotion > 50)>>
			<<set $slaves[$i].devotion -= 4>>
		<</if>>
		<<if ($slaves[$i].trust < 30)>>
			<<set $slaves[$i].trust += 5>>
		<</if>>
		<<if $slaves[$i].energy > 40 && $slaves[$i].energy < 95>>
			<<set $slaves[$i].energy++>>
		<</if>>

		<<if $showEWD != 0>>

			/* 000-250-006 */
			<<if $seeImages && $seeReportImages>>

					<<SlaveArt $slaves[$i] 0 0>>

			<</if>>
			/* 000-250-006 */
			''__@@.pink;<<= SlaveFullName($slaves[$i])>>@@__''
			<<if $slaves[$i].choosesOwnAssignment == 2>>
				<<include "SA chooses own job">>
			<<else>>
				is working out of $farmyardName.
			<</if>>

    $He <<= saWorkTheFarm($slaves[$i])>>

			<<= saChoosesOwnClothes($slaves[$i])>>
			<<include "SA rules">>
			<<include "SA diet">>
			<<include "SA long term effects">>
			<<include "SA drugs">>
			<<include "SA relationships">>
			<<include "SA rivalries">>

<<include "SA devotion">>
		<<else>>
			<<silently>>
			<<include "SA chooses own job">>
			<<_dump = saWorkTheFarm($slaves[$i])>>
			$He <<= saWorkTheFarm($slaves[$i])>>
			<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>
			<<include "SA rules">>
			<<include "SA diet">>
			<<include "SA long term effects">>
			<<include "SA drugs">>
			<<include "SA relationships">>
			<<include "SA rivalries">>
			<<include "SA devotion">>
			<</silently>>
		<</if>>

		<<set _incomeStats = getSlaveStatisticData($slaves[$i], $slaves[$i].assignment === Job.FARMYARD ? $facility.farmyard : undefined)>>
		<<set _profits += _incomeStats.income>>

		/* TODO: is this right? */
		<<if $farmyardSlaves > 0>>
			<<set _foodWeek = _incomeStats.food>>
		<</if>>
		<<if $farmMenials > 0>>
			<<set _foodWeek += ($farmMenials*350)>>
		<</if>>

	<</for>>
	<<set _profits += $cash-_oldCash, _oldCash = $cash, _foodWeek += $food-_oldFood, _possibleBonuses = 0, _farmyardBonuses = 0>>

	<<set _profits += $cash-_oldCash>>		/* TODO: is this supposed to be set a second time? */

	<>

	$farmyardNameCaps <<if _profits > 0>>makes you @@.yellowgreen;<<print cashFormat(Math.trunc(_profits))>>@@ and <</if>>produced @@.chocolate;<<print massFormat(_foodWeek)>>@@ of food this week.

	<<set $food += _foodWeek>>

	<<if $farmyardDecoration != "standard">>

$farmyardNameCaps's customers enjoyed
		<<if $seeBestiality == 1 && $farmyardBreeding > 0 && ($canines.length > 0 || $hooved.length > 0 || $felines.length > 0)>>
			@@.green;watching farmhands fuck animals in $farmyardDecoration surroundings.@@
		<<elseif $farmyardShows == 1>>
			@@.green;watching farmhands put on shows in $farmyardDecoration surroundings.@@
		<<else>>
			/* TODO: not sure about this one */
			@@.green;partaking of $farmyardName's fine produce in its $farmyardDecoration décor.@@
		<</if>>
	<</if>>

	<<FarmyardStatistics 0>>
	<<timed 50ms>>
		<<replace #farmyardstats>>
			<<FarmyardStatistics 1>>
		<</replace>>
	<</timed>>
<</if>>

<<if _DL > 0 || $Farmer != 0>>

<</if>>


code:
:: Food Market [nobr]

<<if $useTabs == 0>>__The Food Market__<</if>>

<<set _foodValue = $foodStored*$foodCost>>  /* FIXME: currently costs 25 / kg, will need tweaking */
The food market has @@.chocolate;<<print massFormat($foodStored)>>@@ in storage, valued at a total of @@.yellowgreen;<<print cashFormat(_foodValue)>>.@@

/* TODO: allow for the buying and selling of food */

<<link "Buy <<= massFormat(1)>>" "Manage Arcology">><<set cashX(forceNeg($foodCost*1), "farmyard"), $foodStored += 1>><</link>>
| <<link "<<= massFormat(10)>>" "Manage Arcology">><<set cashX(forceNeg($foodCost*10), "farmyard"), $foodStored += 10>><</link>>
| <<link "<<= massFormat(100)>>" "Manage Arcology">><<set cashX(forceNeg($foodCost*100), "farmyard"), $foodStored += 100>><</link>>
| <<link "<<= massFormat(1000)>>" "Manage Arcology">><<set cashX(forceNeg($foodCost*1000), "farmyard"), $foodStored += 1000>><</link>>
| <<link "<<= massFormat(10000)>>" "Manage Arcology">><<set cashX(forceNeg($foodCost*10000), "farmyard"), $foodStored += 10000>><</link>>
<<if $foodStored > 0>>

	<<link "Sell <<= massFormat(1)>>" "Manage Arcology">><<set cashX(($foodCost*1), "farmyard"), $foodStored -= 1>><</link>>
<</if>>
<<if $foodStored >= 10>>
	| <<link "<<= massFormat(10)>>" "Manage Arcology">><<set cashX(($foodCost*10), "farmyard"), $foodStored -= 10>><</link>>
<</if>>
<<if $foodStored >= 100>>
	| <<link "<<= massFormat(100)>>" "Manage Arcology">><<set cashX(($foodCost*100), "farmyard"), $foodStored -= 100>><</link>>
<</if>>
<<if $foodStored >= 1000>>
	| <<link "<<= massFormat(1000)>>" "Manage Arcology">><<set cashX(($foodCost*1000), "farmyard"), $foodStored -= 1000>><</link>>
<</if>>
<<if $foodStored >= 10000>>
	| <<link "<<= massFormat(10000)>>" "Manage Arcology">><<set cashX(($foodCost*10000), "farmyard"), $foodStored -= 10000>><</link>>
<</if>>
<<if $food > 0>>

	<<link "Store <<= massFormat(1)>>" "Manage Arcology">><<set $foodStored += 1, $food -= 1>><</link>>
<</if>>
<<if $food >= 10>>
	| <<link "<<= massFormat(10)>>" "Manage Arcology">><<set $foodStored += 10, $food -= 10>><</link>>
<</if>>
<<if $food >= 100>>
	| <<link "<<= massFormat(100)>>" "Manage Arcology">><<set $foodStored += 100, $food -= 100>><</link>>
<</if>>
<<if $food >= 1000>>
	| <<link "<<= massFormat(1000)>>" "Manage Arcology">><<set $foodStored += 1000, $food -= 1000>><</link>>
<</if>>
<<if $food >= 10000>>
	| <<link "<<= massFormat(10000)>>" "Manage Arcology">><<set $foodStored += 10000, $food -= 10000>><</link>>
<</if>>
<<if $foodStored > 0>>

	<<link "Retrieve <<= massFormat(1)>>" "Manage Arcology">><<set $food += 1, $foodStored -= 1>><</link>>
<</if>>
<<if $foodStored >= 10>>
	| <<link "<<= massFormat(10)>>" "Manage Arcology">><<set $food += 10, $foodStored -= 10>><</link>>
<</if>>
<<if $foodStored >= 100>>
	| <<link "<<= massFormat(100)>>" "Manage Arcology">><<set $food += 100, $foodStored -= 100>><</link>>
<</if>>
<<if $foodStored >= 1000>>
	| <<link "<<= massFormat(1000)>>" "Manage Arcology">><<set $food += 1000, $foodStored -= 1000>><</link>>
<</if>>
<<if $foodStored >= 10000>>
	| <<link "<<= massFormat(10000)>>" "Manage Arcology">><<set $food += 10000, $foodStored -= 10000>><</link>>
<</if>>


code:
:: Food Report [nobr]

$arcologies[0].name produced <<= massFormat($foodLastWeek)>> of food this week. Blah blah write some more stuff here.


code:
:: P food crisis [nobr]

/* feel free to move this into a different folder */

<<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event">>

<<switch $foodCrisis>>
<<case 1>>

	<<if ($PC.trading >= 100) || ($PC.career == "capitalist")>>
		<<set _price = 2500>>
	<<elseif ($PC.trading >= 50) || ($PC.career == "capitalist")>>
		<<set _price = 5000>>
	<<else>>
		<<set _price = 10000>>
	<</if>>

	The region supplying much of the Free City's food had been battling a famine for quite some time now — between the deteriorating weather and the war raging on — but it had always seemed the situation was improving, and your arcology's citizens never really had to worry about going to bed hungry. Unfortunately, that all changed this week. A firefight had broken out near one of the region's largest farms, and one of the main reserves of food was caught in the crossfire.

	Supplies steadily began to dwindle, and it wasn't long before the prices of food began to rise as a result. <<if $arcologyUpgrade.hydro == 1>>Even the hydroponics system you had installed earlier could barely put a dent in the needs of your citizens.<</if>> Now, the poorest in your arcology are facing starvation. Seeing no other choice, they turned to you to provide them with sustenance. ''This is a unique opportunity.'' It's unlikely your citizens would ask for your help again, should you choose not to help them.

	<<link "Provide them with ample rations">>
		<<replace "#result">>
		You have enough to go around, so you decide to help the desperate citizens. You have a number of rationing stations set up throughout $arcologies[0].name and announce that each citizen is entitled to four full meals a day, more than enough to sate the hunger of even the most famished of men. Your citizens are @@.green;thrilled@@ to hear that their leader is looking out for them.
		<<run repX(5000, "event")>>
		<<set cashX(forceNeg(_price*2), "farmyard")>>
		<<set $rations = 2>>
		<</replace>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost <<print cashFormat(_price*2)>> and some upkeep, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost <<print cashFormat(_price*2)>> and incur significant upkeep costs//<</if>>
	<</link>>

<<link "Give them enough to survive on">>
		<<replace "#result">>
		You have your own problems to deal with, but that doesn't mean you don't look out for your own. You have a number of rationing stations set up throughout $arcologies[0].name and announce that each citizen is entitled to two full meals a day, just enough for your citizens not to starve. Your citizens are @@.green;happy@@ to hear that their leader is looking out for them.
		<<run repX(2500, "event")>>
		<<set cashX(forceNeg(_price), "farmyard")>>
		<<set $rations = 1>>
		<</replace>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost <<print cashFormat(_price)>> and some upkeep, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost <<print cashFormat(_price)>> and incur significant upkeep costs//<</if>>
	<</link>>

<<link "They can figure their problem out on their own">>
		<<replace "#result">>
		You have your own problems to deal with, and you simply can't afford to drop everything and solve theirs at the moment. That you can't take care of your arcology's citizen @@.red;reflects poorly on you.@@
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<case 2>>

	It's been a few weeks since your citizens had approached you asking for aid, and since then, the situation hasn't improved. In fact, it had gotten worse, and food prices have reached a record high. The tension in $arcologies[0].name is palpable, and small riots have broken out more than once over disputes about food. You are not surprised, then, when you receive a visit from some of the "middle class" /* TODO: still not really happy with this */ citizens. They state that they noticed that you have been giving out rations to the poorer citizens, and, now that the situation has become dire, were wondering if you would be willing to do the same for them.

	<<link "Give them generous rations as well">>
		<<replace "#result">>
		You still have more than enough to go around, so you inform the leaders that you have decided you will give them large rations, enough to feed even the hungriest citizen. The leaders are @@.green;very pleased@@ to hear that you are taking care of them as well.
		<<run repX(5000, "event")>>
		<<set cashX(forceNeg(_price*2), "farmyard")>>
		<<set $rations = 4>>
		<</replace>>
	<</link>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost <<print cashFormat(_price*2)>> and some upkeep, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost <<print cashFormat(_price*2)>> and incur significant upkeep costs//<</if>>

<<link "Provide them with enough sustenance to survive on too">>
		<<replace "#result">>
		As much as you'd like to provide them with all of the food in the world, it simply is not feasible in your current situation. Therefore, you announce to the leaders that you will provide them only enough rations to live off of. The leaders understand, and are @@.green;pleased@@ to hear that you would provide for them at all.
		<<run repX(2500, "event")>>
		<<set cashX(forceNeg(_price), "farmyard")>>
		<<set $rations = 3>>
		<</replace>>
	<</link>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost <<print cashFormat(_price)>> and some upkeep, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost <<print cashFormat(_price)>> and incur significant upkeep costs//<</if>>

<<link "Change your mind about giving out any rations at all">>
		<<replace "#result">>
		Having given the people rations at all was a mistake, you think to yourself. You have a great number of your own problems to deal with, and providing rations to everyone that can't afford food is putting an unnecessary strain on your own situation. With this is mind, you tell the leaders that you simply can't help them at this time, and have decided that you can't help anyone with food at all. The citizens are understandably @@.red;angry@@ that you would go back on your word.
		<<run repX(-1000, "event")>>
		<<set $rations = 0>>
		<</replace>>
	<</link>>

<<case 3>>

	Another few weeks has passed since your last meeting with your citizens regarding rationing, and things have only deteriorated further since then. It was only a matter, then, before the wealthier citizens of $arcologies[0].name paid you a visit one afternoon. While being able to afford food wasn't exactly difficult for them as of yet, they could read the writing on the wall, and knew it would only be a matter of time before the prices of food were so high that even they would be forced to beg for handouts.

	Seeing the progress you had made since taking control of the arcology, they decided their best course of action was to come to you with a proposition. They would allow you to take full control of the food supply in $arcologies[0].name, and in return you would keep them well-fed. ''This is a unique opportunity.'' If you turn their offer down, the citizens of your arcology will find another way of surviving.

	<<link "Set up a food market">>
		<<replace "#result">>
		You know that a proposition like this wouldn't have been easy for your citizens to make, and you also know that there is no one better suited to a task like this than you. You announce that you will be setting up a market to buy, sell, and store food in, and that you'll make sure that the citizens will continue to be well-fed. Your citizens are @@.green;glad@@ to hear that you are looking out for their best interests.
		<<run repX(5000, "event")>>
		<<set cashX(forceNeg(_price*5), "farmyard")>>
		<<set $foodMarket = 1>>
		<<unset $rations>>
		<</replace>>
	<</link>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost an initial investment of <<print cashFormat(_price*5)>>, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost an initial investment of <<print cashFormat(_price*5)>>//<</if>>

<<link "Politely decline their offer, but continue giving them rations">>
		<<replace "#result">>
		Things have been going fairly well for you, but not //that// well — setting up an entirely new place to buy, sell, and store food would no doubt be an expensive undertaking. You tell the citizens that while you can't spare the resources to create a new market at the moment, you will honor your past agreement and continue giving them free rations. The people initially seem a bit disappointed that you don't seem to want to expand $arcologies[0].name, but are ultimately @@.green;glad@@ to hear that you'll continue taking care of them.
		<<run repX(2500, "event")>>
		<<set cashX(forceNeg(_price), "farmyard")>>
		<<set $rations = 5>>
		<</replace>>
	<</link>> <<if ($PC.trading >= 50) || ($PC.career == "capitalist")>>//This will cost <<print cashFormat(_price)>> and some upkeep, @@.springgreen;reduced by your knowledge of trading@@//<<else>>//This will cost <<print cashFormat(_price)>> and incur significant upkeep costs//<</if>>

<<link "Turn down their offer and end rationing completely">>
		<<replace "#result">>
		While a new place to buy, sell, and store food in $arcologies[0].name would most likely come in quite handy in the future, you ultimately decide that you simply cannot spare the resources required. In fact, giving rations at all was a costly venture, and after not having seen any sort of return-on-investment, you decide that you are unable to continue giving out rations anymore. Your citizens are @@.red;angry@@ at the fact that you seem not to care about them at all, but that's their problem.
		<<run repX(-1000, "event")>>
		<<unset $rations>>
		<</replace>>
	<</link>>

<</switch>>


code:
/* Putting them here because commenting them out was breaking for some reason */

		<<if $animalsBought.germanShepherds == 0>>
		<<link "Purchase German Shepherds" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.germanShepherds = 1, $animalsBought.canines += 1, $canines.push("German Shepherds")>><</link>>

	<<elseif $animalsBought.germanShepherds == 1>>
		German Shepherds
		<<if $activeCanine.breed != "German Shepherd">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "German Shepherd", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.goldenRetrievers == 0>>
		<<link "Purchase Golden Retrievers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.goldenRetrievers = 1, $animalsBought.canines += 1, $canines.push("Golden Retrievers")>><</link>>

	<<elseif $animalsBought.goldenRetrievers == 1>>
		Golden Retrievers
		<<if $activeCanine.breed != "Golden Retriever">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Golden Retriever", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.frenchBulldogs == 0>>
		<<link "Purchase French Bulldogs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.frenchBulldogs = 1, $animalsBought.canines += 1, $canines.push("French Bulldogs")>><</link>>

	<<elseif $animalsBought.frenchBulldogs == 1>>
		French Bulldogs
		<<if $activeCanine.breed != "French Bulldog">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "French Bulldog", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.bulldogs == 0>>
		<<link "Purchase Bulldogs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bulldogs = 1, $animalsBought.canines += 1, $canines.push("Bulldogs")>><</link>>

	<<elseif $animalsBought.bulldogs == 1>>
		Bulldogs
		<<if $activeCanine.breed != "Bulldog">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Bulldog", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.beagles == 0>>
		<<link "Purchase Beagles" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.beagles = 1, $animalsBought.canines += 1, $canines.push("Beagles")>><</link>>

	<<elseif $animalsBought.beagles == 1>>
		Beagles
		<<if $activeCanine.breed != "Beagle">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Beagle", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.poodles == 0>>
		<<link "Purchase Poodles" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.poodles = 1, $animalsBought.canines += 1, $canines.push("Poodles")>><</link>>

	<<elseif $animalsBought.poodles == 1>>
		Poodles
		<<if $activeCanine.breed != "Poodle">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Poodle", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.rottweilers == 0>>
		<<link "Purchase Rottweilers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.rottweilers = 1, $animalsBought.canines += 1, $canines.push("Rottweilers")>><</link>>

	<<elseif $animalsBought.rottweilers == 1>>
		Rottweilers
		<<if $activeCanine.breed != "Rottweiler">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Rottweiler", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.yorkshireTerriers == 0>>
		<<link "Purchase Yorkshire Terriers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.yorkshireTerriers = 1, $animalsBought.canines += 1, $canines.push("Yorkshire Terriers")>><</link>>

	<<elseif $animalsBought.yorkshireTerriers == 1>>
		Yorkshire Terriers
		<<if $activeCanine.breed != "Yorkshire Terrier">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Yorkshire Terrier", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.siberianHuskies == 0>>
		<<link "Purchase Siberian Huskies" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.siberianHuskies = 1, $animalsBought.canines += 1, $canines.push("Siberian Huskies")>><</link>>

	<<elseif $animalsBought.siberianHuskies == 1>>
		Siberian Huskies
		<<if $activeCanine.breed != "Siberian Husky">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Siberian Husky", type: "canine", dickSize: "big", ballType: "dog"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>

<<if $farmyardCages > 0>>

	Cats:

	<<if $animalsBought.siameses == 0>>
		<<link "Purchase Siamese cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.siameses = 1, $animalsBought.felines += 1, $felines.push("Siamese cats")>><</link>>

	<<elseif $animalsBought.siameses == 1>>
		Siamese cats
		<<if $activeFeline.breed != "Siamese">>
			[[Set as active canine|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Siamese", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.persians == 0>>
		<<link "Purchase Persian cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.persians = 1, $animalsBought.felines += 1, $felines.push("Persian cats")>><</link>>

	<<elseif $animalsBought.persians == 1>>
		Persian cats
		<<if $activeFeline.breed != "Persian">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Persian", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.maineCoons == 0>>
		<<link "Purchase Maine Coon cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.maineCoons = 1, $animalsBought.felines += 1, $felines.push("Maine Coon cats")>><</link>>

	<<elseif $animalsBought.maineCoons == 1>>
		Maine Coon cats
		<<if $activeFeline.breed != "Maine Coon">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Maine Coon", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.ragdolls == 0>>
		<<link "Purchase Ragdoll cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.ragdolls = 1, $animalsBought.felines += 1, $felines.push("Ragdoll cats")>><</link>>

	<<elseif $animalsBought.ragdolls == 1>>
		Ragdoll cats
		<<if $activeFeline.breed != "Ragdoll">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Ragdoll", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.bengals == 0>>
		<<link "Purchase Bengal cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bengals = 1, $animalsBought.felines += 1, $felines.push("Bengal cats")>><</link>>

	<<elseif $animalsBought.bengals == 1>>
		Bengal cats
		<<if $activeFeline.breed != "Bengal">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Bengal", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.abbysinians == 0>>
		<<link "Purchase Abbysinian cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.abbysinians = 1, $animalsBought.felines += 1, $felines.push("Abbysinian cats")>><</link>>

	<<elseif $animalsBought.abbysinians == 1>>
		Abbysinian cats
		<<if $activeFeline.breed != "Abbysinian">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Abbysinian", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.birmans == 0>>
		<<link "Purchase Birman cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.birmans = 1, $animalsBought.felines += 1, $felines.push("Birman cats")>><</link>>

	<<elseif $animalsBought.birmans == 1>>
		Birman cats
		<<if $activeFeline.breed != "Birman">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Birman", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.orientalShorthairs == 0>>
		<<link "Purchase Oriental Shorthair cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.orientalShorthairs = 1, $animalsBought.felines += 1, $felines.push("Oriental Shorthair cats")>><</link>>

	<<elseif $animalsBought.orientalShorthairs == 1>>
		Oriental Shorthair cats
		<<if $activeFeline.breed != "Oriental Shorthair">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Oriental Shorthair", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.sphynxes == 0>>
		<<link "Purchase Sphynx cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.sphynxes = 1, $animalsBought.felines += 1, $felines.push("Sphynx cats")>><</link>>

	<<elseif $animalsBought.sphynxes == 1>>
		Sphynx cats
		<<if $activeFeline.breed != "Sphynx">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Sphynx", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.russianBlues == 0>>
		<<link "Purchase Russian Blue cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.russianBlues = 1, $animalsBought.felines += 1, $felines.push("Russian Blue cats")>><</link>>

	<<elseif $animalsBought.russianBlues == 1>>
		Russian Blue cats
		<<if $activeFeline.breed != "Russian Blue">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Russian Blue", type: "feline", dickSize: "small", ballType: "cat"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
<</if>>

	<<if $animalsBought.foxes == 0>>
		<<link "Purchase foxes" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.foxes = 1, $animalsBought.canines += 1, $canines.push("foxes")>><</link>>

	<<elseif $animalsBought.foxes == 1>>
		/*Red foxes play in one corner of their kennels, chasing one another.(OLD)*/
		Foxes
		<<if $activeCanine.species != "fox">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "fox", speciesCap: "Fox", speciesPlural: "foxes", type: "canine", dickSize: "large", ballType: "fox"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.jackals == 0>>
		<<link "Purchase jackals" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.jackals = 1, $animalsBought.canines += 1, $canines.push("jackals")>><</link>>

	<<elseif $animalsBought.jackals == 1>>
		/*A group of male jackals are fighting over a potential mate, causing quite a ruckus.(OLD)*/
		Jackals
		<<if $activeCanine.species != "jackal">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "jackal", speciesCap: "Jackal", speciesPlural: "jackals", type: "canine", dickSize: "large", ballType: "jackal"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>
	<<if $animalsBought.dingos == 0>>
		<<link "Purchase dingos" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.dingos = 1, $animalsBought.canines += 1, $canines.push("dingos")>><</link>>

	<<elseif $animalsBought.dingos == 1>>
		/*The dingos are eating their meal, growling at each other when one gets to close to another's food.(OLD)*/
		Dingos
		<<if $activeCanine.species != "dingo">>
			[[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dingo", speciesCap: "Dingo", speciesPlural: "dingos", type: "canine", dickSize: "large", ballType: "dingo"}]]
		<<else>>
			//Set as active canine//
		<</if>>

	<</if>>

<<if $farmyardStable > 1>>

	Hooved Animals:

	<<if $animalsBought.zebras == 0>>
		<<link "Purchase zebras" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.zebras = 1, $animalsBought.hooved += 1, $hooved.push("zebras")>><</link>>
	<<elseif $animalsBought.zebras == 1>>
		Zebras
		<<if $activeHooved.species != "zebra">>
			[[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "zebra", speciesCap: "Zebra", speciesPlural: "zebras", type: "hooved", dickSize: "huge", ballType: "zebra"}]]
		<<else>>
			//Set as active hooved//
		<</if>>
	<</if>>

<</if>>

<<if $animalsBought.cougars == 0>>
		<<link "Purchase cougars" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.cougars = 1, $animalsBought.felines += 1, $felines.push("cougars")>><</link>>

	<<elseif $animalsBought.cougars == 1>>
		/*The cougars are sleeping, their lean bodies scattered around under trees. (OLD)*/
		Cougars
		<<if $activeFeline.species != "cougar">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cougar", speciesCap: "Cougar", speciesPlural: "cougars", type: "feline", dickSize: "large", ballType: "cougar"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.jaguars == 0>>
		<<link "Purchase jaguars" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.jaguars = 1, $animalsBought.felines += 1, $felines.push("jaguars")>><</link>>

	<<elseif $animalsBought.jaguars == 1>>
		/*You can see a few jaguars laying around in the trees in their enclosure. (OLD)*/
		Jaguars
		<<if $activeFeline.species != "jaguar">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "jaguar", speciesCap: "Jaguar", speciesPlural: "jaguars", type: "feline", dickSize: "large", ballType: "jaguar"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.lynx == 0>>
		<<link "Purchase lynxs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.lynx = 1, $animalsBought.felines += 1, $felines.push("lynx")>><</link>>

	<<elseif $animalsBought.lynx == 1>>
		/*The lynxes are playfully running around their enclosure. (OLD)*/
		Lynx
		<<if $activeFeline.species != "lynx">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "lynx", speciesCap: "Lynx", speciesPlural: "lynx", type: "feline", dickSize: "large", ballType: "lynx"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.leopards == 0>>
		<<link "Purchase leopards" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.leopards = 1, $animalsBought.felines += 1, $felines.push("leopards")>><</link>>

	<<elseif $animalsBought.leopards == 1>>
		/*The leopards are lazing about in the trees in their enclosure. (OLD)*/
		Leopards
		<<if $activeFeline.species != "leopard">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "leopard", speciesCap: "Leopard", speciesPlural: "leopards", type: "feline", dickSize: "large", ballType: "leopard"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>
	<<if $animalsBought.tigers == 0>>
		<<link "Purchase tigers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.tigers = 1, $animalsBought.felines += 1, $felines.push("tigers")>><</link>>

	<<elseif $animalsBought.tigers == 1>>
		/*Some of the tigers are swimming, and the ones that aren't are lazing about. (OLD)*/
		Tigers
		<<if $activeFeline.species != "tiger">>
			[[Set as active feline|FarmyardAnimals][$activeFeline = {species: "tiger", speciesCap: "Tiger", speciesPlural: "tigers", type: "feline", dickSize: "large", ballType: "tiger"}]]
		<<else>>
			//Set as active feline//
		<</if>>

	<</if>>


code:
App.Data.Facilities.headGirlSuite = {
	baseName: "HGSuite",
	genericName: null,
	jobs: {
		HGToy: {
			position: "Head Girl's toy",
			assignment: "live with your Head Girl",
			publicSexUse: true,
			fuckdollAccepted: false
		}
	},
	defaultJob: "HGToy",
	manager: {
		position: "Head Girl",
		assignment: "be your Head Girl",
		careers: ["a captain", "a corporate executive", "a director", "a dominatrix", "a gang leader", "a judge", "a lawyer", "a leading arcology citizen", "a military officer", "a model-UN star", "a noblewoman", "a politician", "a Queen", "a slaver", "a student council president"],
		skill: "headGirl",
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 51
	}
}

App.Entity.facilities.headGirlSuite = new App.Entity.Facilities.Facility(
	App.Data.Facilities.headGirlSuite
);


code:
App.Data.Facilities.masterSuite = {
	baseName: "masterSuite",
	genericName: "Master Suite",
	jobs: {
		fucktoy: {
			position: "fucktoy",
			assignment: "serve in the master suite",
			publicSexUse: false,
			fuckdollAccepted: false
		}
	},
	defaultJob: "fucktoy",
	manager: {
		position: "concubine",
		assignment: "be your Concubine",
		careers: [],
		skill: null,
		publicSexUse: false,
		fuckdollAccepted: false,
		broodmotherAccepted: true,
		shouldWalk: false,
		shouldSee: false,
		shouldHear: false,
		shouldTalk: false,
		shouldThink: false,
		requiredDevotion: 51
	}
}

App.Entity.Facilities.MasterSuiteFuckToyJob = class extends App.Entity.Facilities.FacilitySingleJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	canEmploy(slave) {
		let r = super.canEmploy(slave);
		if (!App.Entity.Facilities.Job._isBrokenEnough(slave, 20, -51, -21, -50)) {
			r.push(`${slave.slaveName} is not sufficiently broken for ${this.facility.name}.`);
		}

		return r;
	}
}

App.Entity.Facilities.ConcubineJob = class extends App.Entity.Facilities.ManagingJob {
	canEmploy(slave) {
		let r = super.canEmploy(slave);
		if (slave.amp === 1) {
			r.push(`${slave.slaveName} can't serve as your Concubine without limbs.`)
		}
		return r;
	}
}

App.Entity.facilities.masterSuite = new App.Entity.Facilities.Facility(
	App.Data.Facilities.masterSuite,
	{
		fucktoy: new App.Entity.Facilities.MasterSuiteFuckToyJob()
	},
	new App.Entity.Facilities.ConcubineJob()
);


code:
:: AC Dump

<<if (ndef $activeChild) || ($activeChild == 0)>>

	@@.red;ERROR:@@ AC Dump, activeChild invalid, returnTo is '$returnTo', previous passage was '<<print previous()>>'. Please report this.

	<<link "Continue">><<goto $returnTo>><</link>> | [[Go Back|previous()]]

<<else>>

	<<silently>>

	<<set _CL = $cribs.length, _ID = $activeChild.ID>>

	<<if $i >= 0 && $i < _CL && $cribs[$i].ID == _ID>> /* shortcut if $i is already pointing to this slave */
		<<set $cribs[$i] = $activeChild>>
	<<else>>
		<<set $i = $cribs.findIndex(function(s) { s.ID === _ID; })>> /* find $i if exists */
		<<if $i != -1>> /* not found, so new slave */
			@@.red;ERROR:@@ $activeChild.slaveName not found! Please report this.
		<<else>>
			<<set $cribs[$i] = $activeChild>>
		<</if>>
	<</if>>

	<</silently>>

	<<goto $returnTo>>

<</if>>