code:
:: Security Force Naming-Colonel [nobr]
<<set $nextButton = " ">> <<if ndef $NamingColonel>> <<set $NamingColonel = 0>> <</if>>
<<if $NamingColonel === 0>>
	It's been a short while since you told your citizens that you were going to talk to them about their security, and by all accounts, they've turned out in force to watch your address over the arcology's internal communications system. You wake up early, relieve your frustrations on a few slaves woken out of deep sleep, and take position behind your desk. You also call over a slave and push her under your desk. The unspoken instruction is clear, and she begins enthusiastically
	<<if $PC.dick == 1>>
			sucking your cock, taking it as deep as she can without gagging.
	<<else>>
			eating you out, pressing her face into your pussy and forcing her tongue deep inside you.
	<</if>>

A blinking light tells you that the channel is open. You take a deep breath, and begin. You greet your citizens and explain that while you believe deeply in the underlying principles of the Free Cities, recent events have forced you to modify some of your views. The Old World attack from the outside and the more recent assault by the Daughters of Liberty from within has proven that some form of permanent, organized standing force is needed to ensure the personal safety of the citizen body.

You tell them that the Old World continues to deteriorate. You tell them that it is only a matter of time before the poor, diseased, starving, and unwashed masses try their hand at invading the arcology again. You tell them that such a force would be good for business, securing trade routes and conducting slaving raids far greater in scale than those performed by private slaving corporations. And finally, to quell their greatest fear, you tell them that you would personally support the force financially.

As you speak, you carefully monitor the citizens' opinions as indicated on their communication devices. It is uniformly positive - they know whom they have to thank for their continued survival and dominance. You also monitor your arousal given the ministrations of your slave. A few small movements on your part communicate to your citizens what is happening without being too obvious. Free Cities business etiquette respects business conducted while being subtly serviced (and your doing so during such a public and important broadcast signals how seriously you are taking it), but a climax would be seen as a serious lack of discipline.

You finally wrap up your speech, declaring yourself Marshal of the newly-formed <<textbox "$SF.Lower" $SF.Lower>>

You close the link to the communication system and read a message from your assistant that appeared during the last moments of your address. In consultation with major figures in the mercenary community, a suitable candidate for day-to-day command of the new unit has been found. Your instructions were to keep you in the dark about them so as to avoid prejudgment. They are waiting outside your office.

[[Invite them inside|Security Force Naming-Colonel][$NamingColonel = 1]]
<</if>>
<<if $NamingColonel === 1>>
	The figure that enters is not what you were expecting, given your previous experiences with the mercenary groups that work with the arcology owners of the Free Cities. Most mercenaries you've worked with have been grizzled stout men, veterans of the Old World militaries that finally had too much and went private. Instead, a woman walks in.
	<<if $SFColonel.Core == "">>
		She strikes you as someone who is likely to be:

[[Kind|Security Force Naming-Colonel][$SFColonel.Core = "kind"]]

[[Cruel and psychopathic|Security Force Naming-Colonel][$SFColonel.Core = "cruel"]]

[[A brazen warmonger|Security Force Naming-Colonel][$SFColonel.Core = "brazen"]]

[[Jaded|Security Force Naming-Colonel][$SFColonel.Core = "jaded"]]

[[Shell-shocked|Security Force Naming-Colonel][$SFColonel.Core = "shell shocked"]]
	<</if>>
	<<if $SFColonel.Core !== "">>
		She is likely to be ''$SFColonel.Core''.

She strides in, stopping in front of your desk,
		<<switch $SFColonel.Core>>
			<<case "kind">>
				pulling off a laid-back salute with an easy grin.
			<<case "cruel">>
				her eyes flashing a hard glare in an instant before quickly softening into those of someone who wants something you have.
			<<case "brazen">>
				snapping off a textbook salute that decades of hard service grills into a veteran.
			<<default>>
				not bothering to put on even the semi-military air (complete with salute) that most mercenaries tend to adopt when meeting new clients.
		<</switch>>
		She is very tall and wearing the pants, boots, gloves, and the tank top undershirt of a standard female combat uniform. Her bare arms and upper body are corded with muscle, and through the tank top's thin fabric you can see both the shape of her muscled abdomen and the curves of her small but perky breasts, complete with what your experience tells you are barbell nipple piercings. Her eyes are alive with intelligence, and you can see her scanning your office, clearly impressed by its opulence. Her hair is shaved close to the scalp, and her ears and nose are heavily pierced. You can make out three long, ugly scars running over top of the mottled tissue of a previous, severe burn along one side of her face, as well as numerous smaller scars and burns on her bare arms. She's been disarmed prior to meeting you; the pistol holster on her hip lies empty, as do at least three knife holsters about her person.

Returning your gaze to her face, she crosses her arms underneath her chest, pressing her breasts up and forward. You have her measure. Given the generally patriarchal nature of both the mercenary community, and the same nature combined with the heavily sexualized lifestyle of the Free Cities, she's decided to embrace her position rather than fight it.

"So," she begins, "you're the boss." You invite her to sit down. "No thanks, boss. Besides,"
		<<switch $SFColonel.Core>>
			<<case "kind">>
				she playfully
			<<case "shell shocked">>
				she uncomfortably
			<<default>>
				she
		<</switch>>
		indicates the slave under your desk, "you look a little occupied." She nods at the camera across from you. "Saw the speech. Very nice. I'd heard you crazy bastards do business while getting
		<<if $PC.dick == 1>>
				sucked off,
		<<else>>
				eaten out,
		<</if>>
		but I've never seen anyone actually do it. Hell, most of you people don't want to have to have too much to do with a merc like me. I usually get my instructions remotely."
		<<switch $SFColonel.Core>>
			<<case "jaded" "brazen">>
				A short, harsh laugh escapes her. "But I guess it keeps you focused. Can't have the entire arcology seeing you cum."
			<<case "kind">>
				She grins. "That kind of thing doesn't really bother me though."
			<<case "cruel">>
				She frowns. "The client always seems to be happier that way."
		<</switch>>

She moves a step closer. "Your computer-helper-thing told me you wanted me to be a surprise, so I guess I'll tell you why you want me to run the $SF.Lower for you. I'm a killer, pure and simple,<<if $SFColonel.Core === "cruel">>" she smiles, "<</if>>and you need that. I looked into those attacks you've suffered. Nasty business. I'll make sure that an attack like that never happens again. I was a soldier out there, in charge of about a thousand men when the Free Cities first started going up, and I knew they were the future. Eventually I deserted, found the first refugee convoy I could, killed the moron protecting it, sold the girls off to slavers, and bought enough gear to start killing for people like you. Ran my own merc crew, did well till we tried to take on a bigger one and everyone died."
		<<switch $SFColonel.Core>>
			<<case "shell shocked">>
				She looks away, caught in her own memories. It takes a solid minute before she starts again.
			<<case "cruel">>
				Her smile grows.
			<<default>>
				She pauses for a moment.
		<</switch>>
		"Joined with another big outfit, became the number two, then shit went bad and I had to run. Been a solo fighter and slaver ever since. I know my work, and I know I can make this work."

You feel your climax approaching and hold up a finger. The merc pauses while you
		<<if $PC.dick == 1>>
			grab the slave's head, forcing your cock roughly down her throat while you cum. She swallows as much as she can before pulling away, coughing.
		<<else>>
			grip the slave's head tightly with your thighs, pressing her face tightly against your pussy as you cum. When you release her, she pulls away, coughing.
		<</if>>

		<<if $SFColonel.Core === "shell shocked">>
			The merc looks away again, letting the girl settle down before continuing.
		<<else>>
			The merc laughs again. "I could get used to a place like this."
		<</if>>
		She waves her hand around the office. "I bet you want to know why I'd be trustworthy for something like this." You don't correct her. "Thought so." Her demeanor softens, and you can detect a hit of nervousness. "I would say that I've never turned on a client and leave it at that, but this is different. It's getting worse out there. I'm sure you know that." You give her a slight nod. "Four times now I've woken up in the middle of the night and had to kill someone.<<if $SFColonel.Core === "shell shocked">>"<<else>> Two of them were the people I'd taken to bed. You can't even trust your drunken fucks anymore.
		<<switch $SFColonel.Core>>
			<<case "kind">>
				It's a shame, but that's the world we live in."
			<<case "cruel">>
				Then again, who doesn't like a good hard fuck and stab?"
			<<default>>
				But what else is new?"
		<</switch>><</if>>

		<<if $SFColonel.Core === "jaded" || $SFColonel.Core === "shell shocked">>
			"All I know how to do at this point is fight, and that's kept me alive this far.
		<<else>>
			"I like fighting, but I want to live somewhere where I can relax from life out there.
		<</if>>
		You give me the job and a place to live, let me hang up the uncertainty of being a merc, and I'll die for you if it comes to that. I promise the people I recruit will feel the same. Besides," she grins, "I could get used to
		<<switch $SFColonel.Core>>
			<<case "brazen">>
				crushing any enemy that looks our way."
			<<case "cruel">>
				having my own stable to abuse as I see fit. A terrified little slavegirl locked between my legs, struggling to breathe?"
			<<default>>
				spending my R&R time with a cold beer in one hand, a few lines of coke or a stack of pills in front of me."
		<</switch>>
		A glint runs through her eyes. "Sounds like a good fucking time."

You quickly decide she'll do. You tap a few commands on your desk's console, assigning her personal quarters on the arcology's higher levels and transferring her first stipend to her new account. You also ask her what title she wants.

"Title?" Another short laugh. "I guess I do need one, given that I'm all official and shit now." She thinks for a moment. "I was a major before I went freelance, and I think I'd like a promotion. Colonel sounds good." You make a note of this in her file. "You people don't seal contracts with a fuck do you?" Reassuring her you don't, she laughs again. "Good. I make it a point never to fuck the boss. It's bad for business." She turns around. "Well, I guess I'd better get to it. Your helper-thing assigned me space on the lower levels for the firebase. I brought a few squads of guys I know from the old days to start, but we'll grow fast once I put the word out, I guarantee it."

[[Let her leave|Security Force Naming-Colonel][$NamingColonel = 2]]
	<</if>>
<</if>>
<<if $NamingColonel === 2>>
	<<set $nextLink = "Next Week",$nextButton = "Continue">> <<unset $NamingColonel>>
	She turns and leaves, and you chase the slave out after her. A few minutes later, a soft chime announces the arrival of a message. It's from the Colonel.

//Hey boss, just wanted to mention something else. In your speech you said that you were going to be paying for $SF.Lower. In my mind that means it's yours, no matter what anyone else here might think. I do what you tell me to do. I make sure the troops behave as you want them to behave. I've worked for some 'nice guys' in the past, and I can do that job if you want. It's boring, but sustainable, and I'll have the $SF.Lower turning a profit and supporting the arcology in good order. But if you let me <<if $SFColonel.Core === "cruel">>off the leash<<else>>do what I do<</if>> and throw any Old World complaints in the trash where they belong, I promise you'll have money pouring into your coffers, even accounting for the good amounts me and my boys will pocket along the way. You'll have an empire in short order.
	<<if $mercenaries > 1>>
		Either way, I'll keep my hands off those mercs you've already installed. I figure that you've reasons for having two different death squads under contract.
	<</if>>

Oh, one last thing. I know you've got some kind of grand social experiment going on up there like all the other arco owners, and that's your own deal, but I'd appreciate it if you could keep that stuff out of the new barracks. I'll have a hard time approaching potential recruits and telling them they should come live in a Roman apartment, an Egyptian temple, a goddamn Japanese teahouse, or some of the other crazy shit I've seen in the past. They're hard, nasty people, and trust me, I can tell you from experience that changing that is just not going to happen. Like I said, though, I can hold them back a bit if you like.

Talk to you later, boss.// <<set $SF.Active = 2>>
<</if>>


code:
:: Security Force Proposal [nobr]
<<if $SF.Active === -1 && passage() !== "New Game Plus">>

	The Free Cities were founded on the principles of unrestrained anarcho-capitalism. To those with such beliefs, the very idea of possessing an armed force, a key tool of government control, or weapons at all, was anathema.

In the period since, however, your citizens have seen the value in weaponry. They watched on their news-feed as some Free Cities were sacked by the armies and mobs of the Old World, driven by their hatred of the citizens' luxurious lifestyles. They've seen other Cities toppled from within, by slave conspiracies or infighting among citizen groupings with differing beliefs. They've witnessed the distressingly rapid rise of fanatical anti-slavery organizations, who would like nothing more than to see them slowly bled by their own chattel. They are learned people, and they know what happens to slaveowners who lose their power.

They've also seen the results of your policies. Your actions towards the arming of both yourself and the arcology proved critical, and ensured their safety when the Old World came for them. And your victory over the Daughters of Liberty, who the citizens know would have executed every single one of them, has created an opportunity. If you insisted upon the creation of a standing 'special' force for the arcology, many would support you and, more importantly, nobody of note would object.

Such a force would solve many problems. More soldiers would mean more control, which is very good for you. More soldiers would mean more security for the arcology and the approaches to it, which is very good for business. More soldiers would mean more obedience from rebellious slaves who can see how powerless they truly are, which is very good for everybody. The force would be tiny compared to the Old World militaries that still exist, but money and technology can, of course, overcome massive numerical inferiority. This being the Free Cities, they would have other uses besides security. Perhaps, in time, you could exert some manner of influence on the Old World itself.

''This is a unique and very important opportunity'', and is possible only because of your recent victory over the Daughters. If you do not seize it, the memories and fears of your citizens will fade,and you will not be able to raise the matter again.

	<<set _price = 20000>> <<if $PC.warfare >= 100>> <<set _price = _price*.5>>
	<<elseif $PC.warfare >= 50||$PC.career === "arcology owner">>
	<<set _price = _price*.75>> <</if>>

<<link "Prepare for an announcement.""Security Force Proposal">> <<replace "#result">>
		You instruct $assistantName to announce to the arcology's citizenry that you will be making an important announcement in the near future regarding the security situation. Given the damage still present from the Daughters' attack, everyone will be tuning in. You also instruct your assistant to begin quietly investigating potential leadership figures for the force itself.
		<<set $cash -= _price>> <<= SFInit()>>
	<</replace>> <</link>>
//Initial costs are @@.yellowgreen;<<print cashFormat(_price)>>@@ and upon establishment the force will have significant support costs until it is self-sufficient.//

<<link "The current measures are enough.""Next Week">> <<replace "#result">> <<run Object.assign(, $SF, {Active:0})>> <</replace>> <</link>>
<<elseif $SF.Active === 1>>
	<<include "Security Force Naming-Colonel">>
<</if>>


code:
:: SF_Report [nobr]

<<silently>> <<= Count()>>
	<<if $SFUnit.Troops > 2000>> <<set $SFUnit.Troops = random(1955,1999)>> <</if>>
	<<if $SFUnit.Troops < 100>> <<set $SFUnit.Troops += Math.ceil(random(2,5))>>
	<<elseif $SFUnit.Troops < 2000>>
		<<if $SF.Target == "recruit">>
			<<set $SFUnit.Troops += Math.ceil(random(-1*$SFUnit.Troops/100,0))>>
		<<elseif $SF.Target == "raiding">>
			<<set $SFUnit.Troops += Math.ceil(random(-3*$SFUnit.Troops/100,-4*$SFUnit.Troops/100))>>
		<<else>>
			<<set $SFUnit.Troops += Math.ceil(random(-2*$SFUnit.Troops/100,-3*$SFUnit.Troops/100))>>
		<</if>>
	<</if>>
	<<set _SFIncome = 75000,_actionMultiplier = 1,_troopMultiplier = 1,_unitMultiplier = 1,_depravityMultiplier = 1,_SFupkeep = 0,_FNGs = 10,_Trade = 0.025>>
	<<if $SF.SpecOps > 0>>
		<<if $SF.SpecOps === 1>> <<set $SFUC = Math.ceil($SFUnit.Troops*.1),$SFUnit.Troops-$SFUC>>
		<<else>> <<set $SFUC = Math.ceil($SFUnit.Troops*.25),$SFUnit.Troops-$SFUC>> <</if>>
	<</if>>
	<<if $SFUnit.Troops > 200>> <<set _Trade += 0.05*(Math.ceil($SFUnit.Troops/100))>>
		<<set _troopMultiplier = $SFUnit.Troops/200, _SFupkeep += $SFUnit.Troops*25>>
		<<if $secExp > 0>>
			<<set $authority += 25*(Math.ceil($SFUnit.Troops/200)),$authority = Math.clamp($authority, 0, 20000)>>
		<</if>>
	<</if>>

	<<if $SFUnit.Firebase > 0>>
		<<set _FNGs += $SFUnit.Firebase,_Trade += 0.5*$SFUnit.Firebase,_unitMultiplier += 7.5*$SFUnit.Firebase+2*Math.pow($SFUnit.Firebase,2),_SFupkeep += 500*(10+$SFUnit.Firebase)>>
	<</if>>
	<<if $SFUnit.Armoury > 0>>
		<<set _FNGs += (2*$SFUnit.Armoury),_Trade += 0.25*$SFUnit.Armoury,_unitMultiplier += 7.5*$SFUnit.Armoury+2*Math.pow($SFUnit.Armoury,2), _SFupkeep += 100*$SFUnit.Armoury>>
	<</if>>
	<<if $SFUnit.Drugs > 0>>
		<<set _FNGs += $SFUnit.Drugs,_Trade += 0.25*$SFUnit.Drugs,_unitMultiplier += 7.5*$SFUnit.Drugs+2*Math.pow($SFUnit.Drugs,2),_SFupkeep += 300*$SFUnit.Drugs>>
	<</if>>
	<<if $SFUnit.Firebase >= 1>>
		<<if $SFUnit.AV > 0>>
			<<set _FNGs += $SFUnit.AV,_Trade += 0.25*$SFUnit.AV,_unitMultiplier += 7.5*$SFUnit.AV+2*Math.pow($SFUnit.AV,2),_SFupkeep += 1000*$SFUnit.AV>>
		<</if>>
		<<if $SFUnit.TV > 0>>
			<<set _FNGs += $SFUnit.TV,_Trade += 0.25*$SFUnit.TV,_unitMultiplier += 7.5*$SFUnit.TV+2*Math.pow($SFUnit.TV,2), _SFupkeep += 800*$SFUnit.TV>>
		<</if>>
		<<if $SFUnit.PGT > 0>>
			<<set _Trade += 0.25*($SFUnit.PGT),_unitMultiplier += 15*$SFUnit.PGT+3*Math.pow($SFUnit.PGT,2),_SFupkeep += 5000+1000*$SFUnit.PGT>>
		<</if>>
	<</if>>
	<<if $SFUnit.Firebase >= 2 && $SFUnit.Drones > 0>>
		<<set _FNGs += $SFUnit.Drones,_Trade += 0.5*$SFUnit.Drones,_unitMultiplier += 7.5*$SFUnit.Drones+2*Math.pow($SFUnit.Drones,2),_SFupkeep += 500*$SFUnit.Drones>>
	<</if>>

	<<if $SFUnit.Firebase >= 4>>
		<<if $SFUnit.AA > 0>>
			<<set _FNGs += $SFUnit.AA,_Trade += 0.25*$SFUnit.AA,_unitMultiplier += 7.5*$SFUnit.AA+2*Math.pow($SFUnit.AA,2),_SFupkeep += 1000*$SFUnit.AA>>
		<</if>>
		<<if $SFUnit.TA > 0>>
			<<set _FNGs += $SFUnit.TA,_Trade += 0.25*$SFUnit.TA,_unitMultiplier += 7.5*$SFUnit.TA+2*Math.pow($SFUnit.TA,2),_SFupkeep += 800*$SFUnit.TA>>
		<</if>>
		<<if $SFUnit.SpacePlane > 0>>
			<<set _FNGs += $SFUnit.SpacePlane,_Trade += 0.25*$SFUnit.SpacePlane,_unitMultiplier += 7.5*$SFUnit.SpacePlane+2*Math.pow($SFUnit.SpacePlane,2),_SFupkeep += 1000*$SFUnit.SpacePlane>>
		<</if>>
		<<if $SFUnit.GunS > 0>>
			<<set _FNGs += $SFUnit.GunS,_Trade += 0.25*$SFUnit.GunS,_unitMultiplier += 12*$SFUnit.GunS+3*Math.pow($SFUnit.GunS,2),_SFupkeep += 3000+700*$SFUnit.GunS>>
		<</if>>
		<<if $SFUnit.Satellite > 0>>
			<<set _FNGs += $SFUnit.Satellite,_Trade += 0.25*$SFUnit.Satellite,_unitMultiplier += 15*$SFUnit.Satellite+5*Math.pow($SFUnit.Satellite,2)>>
		<</if>>
		<<if $SFUnit.GiantRobot > 0>>
			<<set _FNGs += $SFUnit.GiantRobot,_Trade += 0.25*$SFUnit.GiantRobot,_unitMultiplier += 15*$SFUnit.GiantRobot+5*Math.pow($SFUnit.GiantRobot,2),_SFupkeep += 10000+1500*$SFUnit.GiantRobot>>
		<</if>>
		<<if $SFUnit.MissileSilo > 0>>
			<<set _Trade += 0.25*$SFUnit.MissileSilo,_unitMultiplier += 15*$SFUnit.MissileSilo+5*Math.pow($SFUnit.MissileSilo,2),_SFupkeep += 1000*$SFUnit.MissileSilo>>
		<</if>>
	<</if>>

	<<if $SFUnit.AircraftCarrier > 0>>
		<<set _FNGs += $SFUnit.AircraftCarrier,_Trade += 0.25*$SFUnit.AircraftCarrier,_unitMultiplier += 9*$SFUnit.AircraftCarrier+3*Math.pow($SFUnit.AircraftCarrier,2),_SFupkeep += 800*$SFUnit.AircraftCarrier>>
	<</if>>
	<<if $SFUnit.Sub > 0>>
		<<set _FNGs += $SFUnit.Sub,_Trade += 0.25*$SFUnit.Sub,_unitMultiplier += 7.5*$SFUnit.Sub+2*Math.pow($SFUnit.Sub,2),_SFupkeep += 900*$SFUnit.Sub>>
	<</if>>
	<<if $SFUnit.HAT > 0>>
		<<set _Trade += 0.25*$SFUnit.HAT,_unitMultiplier += 7.5*$SFUnit.HAT+2*Math.pow($SFUnit.HAT,2),_SFupkeep += 700*$SFUnit.HAT>>
	<</if>>

	<<set _SFD = $SF.Depravity>>
	<<switch $SFColonel.Core>>
		<<case "kind">>
			<<set _FNGs += 10,_Trade += 0.15,_SFD -= 0.15>>
		<<case "cruel">>
			<<set _Trade -= 0.15,_SFD += 0.15>>
		<<case "brazen">>
			<<set _FNGs += 15,_unitMultiplier += 0.5>>
		<<case "jaded">>
			<<set _Trade -= 0.05,_SFD += 0.05>>
		<<case "shell shocked">>
			<<set _Trade += 0.05,_SFD -= 0.05,_unitMultiplier -= 0.5>>
	<</switch>>
	<<if $SF.Target == "raiding">> <<set _SFD += 0.05,_actionMultiplier += 0.5>>
		<<elseif $SF.Target == "secure">> <<set _SFD -= 0.05,_actionMultiplier += 0.2>>
		<<else>> <<set _SFD -= 0.1,_actionMultiplier -= 0.5>> <</if>>
	<<if $SF.ROE == "free">> <<set _actionMultiplier *= 0.8,_SFD += 0.05,_Trade += _Trade*.95>>
		<<elseif $SF.ROE == "hold">> <<set _actionMultiplier *= 1.1,_SFD -= 0.05,_Trade += _Trade*1.05>> <</if>>
	<<if $SF.Regs == "none">> <<set _actionMultiplier *= 0.8,_SFD += 0.05,_Trade += _Trade*.95>>
		<<elseif $SF.Regs == "strict">> <<set _actionMultiplier *= 1.1,_SFD -= 0.05,_Trade += _Trade*1.05>> <</if>>
	<<set _depravityMultiplier = 1+_SFD>>
	<<if _SFD > -2>> <<set _Trade *= 1+_SFD/2>> <</if>>

	<<if $SF.Target == "recruit">> <<set _FNGs += Math.ceil((_FNGs)*.95)>>
		<<else>> <<set _FNGs += Math.ceil((_FNGs)*.25)>> <</if>>
	<<if $SF.Target == "secure">> <<set $rep += Math.ceil($rep*((_Trade/100)*.95))>>
		<<set $arcologies[0].prosperity = Math.ceil(($arcologies[0].prosperity+(_Trade/10)*.95))>>
	<<else>> <<set $rep += Math.ceil($rep*((_Trade/100)*.25))>>
		<<set $arcologies[0].prosperity = Math.ceil(($arcologies[0].prosperity+(_Trade/10)*.25))>>
	<</if>>
	<<if $secExp > 0>> <<set $authority += $SF.Units*10,$authority = Math.clamp($authority, 0, 20000)>> <</if>>

	<<set _SFIncome = Math.ceil((_SFIncome*_troopMultiplier/10*_unitMultiplier/10*_actionMultiplier/10*_depravityMultiplier)-_SFupkeep),$SFUnit.Troops += Math.round(_FNGs/2)>>
	/*Remove below line if hard mode ever gets fixed*/
	<<if $economy < 100>> <<set _SFIncome = Math.ceil(_SFIncome*(1+($week/100)))>> <</if>>
	<<if $SFUnit.Troops > 2000>> <<set $SFUnit.Troops = random(1955,1999)>> <</if>>
	<<if $rep > 20000>> <<set $rep = 20000>> <</if>>
	<<if $arcologies[0].prosperity > $AProsperityCap>>
		<<set $arcologies[0].prosperity = $AProsperityCap>> <</if>>
	<<if _SFIncome >= 100000>>
		<<set _Profitable = 1,$SF.Subsidy = 0,$cash += _SFIncome>>
	<<else>> <<set _Profitable = 0>> <</if>>

	<<if $SFUnit.Drugs >= 8 || $SFUnit.Drugs >= 10>> <<set _Deaths = 0,_SurvivalChance = 50>>
		<<if $SFUnit.Drugs >= 8>> <<set _SurvivalChance -= 5>> <<elseif $SFUnit.Drugs >= 10>>
			<<set _SurvivalChance += 5>> <</if>>
		<<if random(0,100) > _SurvivalChance>>
			<<set _Deaths = random(0,(($SFUnit.Drugs*2)+4))>> <</if>>
		<<if _Deaths > 0>> <<set $SFUnit.Troops -= _Deaths>> <</if>>
	<</if>>
<</silently>>

__Status and Activities of $SF.Lower __:

This week, $SF.Lower focused their <<print commaNum($SFUnit.Troops)>> troops on
<<if $SF.Target === "recruit">>
	recruiting and training more personnel. Smaller parties ventured out to protect the arcology's trade routes and strike targets of opportunity.
<<elseif $SF.Target === "secure">>
	securing the trade routes between the arcology and the surrounding area. Smaller parties ventured out to strike targets of opportunity and process new recruits.
<<else>>
	locating and striking targets of opportunity, capturing both material loot and new slaves. Smaller parties secured the most important of the arcology's trade routes and processed new recruits.
<</if>>
<<if $SF.SpecOps > 0>>
A <<if $SF.SpecOps <2>>small<<else>>large<</if>> portion of the force was assigned as <<if $SF.SpecOps <2>>part<<else>>full<</if>> time undercover officers.<</if>>

<<if _Deaths > 0>>
<<print (_Deaths)>> soldiers fatally overdosed on the drug cocktail
	<<if $SFTradeShow.CanAttend === -1>>
		, The Colonel's much heavier than average drug use saves her from this side effect
	<</if>>.
<</if>>
These activities have, overall, @@.green;improved@@ your arcology's prosperity.
The goods procured by the $SF.Lower this week, after accounting for the spoils retained by individual soldiers were
<<if _Profitable>>
	@@.green;more than sufficient@@ to cover expenses. Excess material and human assets totaling @@.yellowgreen;<<print cashFormat(_SFIncome)>>@@ (after liquidation) were transferred to your accounts.
<<else>>
	@@.red;barely enough@@ to cover expenses. More growth will be needed to ensure profitability.
<</if>>
$SF.Caps managed to recruit <<print Math.round(_FNGs/2)>> new soldiers this week, and your reputation has @@.green;increased@@ through the improvement of trade security.

    //Your instructions to <<print SFC()>>://

      Deployment focus:
	 <<if $SF.Target == "recruit">> ''Recruiting and Training''<<elseif $SF.Target == "secure">> ''Securing Trade Routes''<<else>> ''Raiding and Slaving''<</if>>.
	<<link "Recruit and Train">> <<set $SF.Target = "recruit">>
		<<replace "#focus">> ''Recruiting and Training'' <</replace>> <</link>>
	| <<link "Secure Trade Routes">> <<set $SF.Target = "secure">>
		<<replace "#focus">> ''Securing Trade Routes'' <</replace>> <</link>>
	| <<link "Raiding and Slaving">> <<set $SF.Target = "raiding">>
		<<replace "#focus">> ''Raiding and Slaving'' <</replace>> <</link>>

      Rules of Engagement:
	 <<if $SF.ROE === "hold">> ''Hold Fire''<<elseif $SF.ROE === "limited">> ''Limited Fire''<<else>> ''Free Fire''<</if>>.
		<<link "Hold Fire">> <<set $SF.ROE = "hold">> <<replace "#roe">> ''Hold Fire''
			<</replace>> <</link>>
		| <<link "Limited Fire">> <<set $SF.ROE = "limited">> <<replace "#roe">>
			''Limited Fire'' <</replace>> <</link>>
		| <<link "Free Fire">> <<set $SF.ROE = "free">> <<replace "#roe">> ''Free Fire''
			<</replace>> <</link>>

      Accountability:
	 <<if $SF.Regs === "strict">> ''Strict Accountability''<<elseif $SF.Regs === "some">> ''Some Accountability''<<else>>''No Accountability''<</if>>.
		<<link "Strict Accountability">> <<set $SF.Regs = "strict">>
		<<replace "#accountability">> ''Strict Accountability'' <</replace>> <</link>>
		| <<link "Some Accountability">> <<set $SF.Regs = "some">>
			<<replace "#accountability">> ''Some Accountability'' <</replace>> <</link>>
		| <<link "No Accountability">> <<set $SF.Regs = "none">>
		<<replace "#accountability">> ''No Accountability'' <</replace>> <</link>>
<<if $SFTradeShow.View > 0 && $SFTradeShow.CanAttend === 1>>
''TradeShow'':
	<<set $SFTradeShow.Income = 0,$SFTradeShow.Helots = 0>>
	<<set _TradeShowAttendes = 200,_MenialSlavesPerAttendee = 5>>
	<<set _MenialSlaves = Math.ceil(random(1,((_TradeShowAttendes*_MenialSlavesPerAttendee)/10)))>>
	<<set _TSProfit = Math.ceil(500000*(1+($SF.Units/1000))*(1+($arcologies[0].prosperity/1000))*_Env)>>
	During a break, The Colonel managed to sell some generic schematics to the _TradeShowAttendes attendes, some decided to also give her some menial slaves as a bonus.

	<<set $helots += _MenialSlaves>>
	<<set $SFTradeShow.Helots += _MenialSlaves,$SFTradeShow.TotalHelots += _MenialSlaves>>
	<<set $cash += _TSProfit,$SFTradeShow.Income += _TSProfit>>
	<<set $SFTradeShow.Revenue += _TSProfit>>
	<<if $secExp > 0 && $mercenaries > 0>> <<set $SFTradeShow.Mercs = 0>>
		<<set _NewMercs = random(1,(_TradeShowAttendes/10))>>
		<<set $mercFreeManpower += _NewMercs,$SFTradeShow.TotalMercs += _NewMercs>>
		<<set $SFTradeShow.Mercs += _NewMercs>>
	<</if>> <<set $SFTradeShow.History += 1>>
<</if>> <<if $SF.SpecOps === 1 && !$SF.SpecOpsLock>> <<set $SF.SpecOps = 0>> <</if>>
<<set $SF.U = 0,$SF.WG = 0,$SFColonel.Talk = 0,$SFColonel.Fun = 0>>


code:
:: Trick Shot Night [nobr]

<<set $nextButton = "Continue", $nextLink = "RIE Eligibility Check", $returnTo = "RIE Eligibility Check">>

Despite your direct elevator, interaction with the majority of your security force is relatively scarce. Aside from mutually exchanged nods in the firebase and the occasional briefing, your $SF.Lower enjoy a degree of autonomy.

On a particularly lackadaisical evening, you find yourself alerted to a message alert by $assistantName.
<<if $assistant > 0>>
	"<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>>, a message from $SF.Lower." She pauses before continuing. "It seems they're asking if you'd like to join their trick shot night."
<<else>>
	It informs you that $SF.Lower have sent a message asking you to join them at their trick shot night.
<</if>>

  <<link "Politely decline">>
	<<replace "#result">>
		You inform $SF.Lower that you aren't planning to attend. A short while later, you receive a message from them stating that their invitation is an open one and that you're welcome to join in another night.
	<</replace>>
<</link>>

<<if $cash < 500000>>

//You lack the necessary funds to attend.//
<<else>> /* cash >= 500000 */

<<link "Attend the trick shot night">>
	<<replace "#result">> <<set $PC.warfare += 1>>
		You instruct to $assistantName to inform $SF.Lower that you will be attending their trick shot night, and after settling your affairs in the penthouse you head down to the firebase. The atmosphere in the firebase is casual, especially in comparison to the usual situations you meet them, though your security force still maintain some measure of decorum towards you as their employer. Eventually, you settle in at the table with a handful of $SF.Lower officers and cash in your @@.yellowgreen;<<print cashFormat(500000)>>@@ into bullets. All that remains is to decide your strategy for the night.

	<<link "Play it safe">>
		<<replace "#bountyresult">>
			<<if random(1,100) > 50>>
				Despite your attempts to mitigate risk and play the safest shots possible, it seems lady luck has conspired against you this evening. However, even when your last bullet is shot, your security force pitch you a few bullets to keep you in the game for the rest of the night. You may have lost most of your ¤, but it seems you've @@.green;made some friends.@@
				<<set $rep += 1000, $cash -= 250000>>
			<<else>>
				While a careful eye for accuracy has buoyed you through the evening, ultimately lady luck is the decider in handing you the win in a number of close shots. Unfortunately your meticulous play limited your chance at a larger payout, and you only come away from the evening with @@.yellowgreen;<<print cashFormat(100000)>>@@ more than you arrived with and @@.green;the respect of your security force.@@
				<<set $rep += 1000, $cash += 100000>>
			<</if>>
		<</replace>>
	<</link>>

 <<link "Up the ante">>
		<<replace "#bountyresult">>
			<<set $activeSlaveOneTimeMinAge = 25>>
			<<set $activeSlaveOneTimeMaxAge = 35>>
			<<set $one_time_age_overrides_pedo_mode = 1>>
			<<if $arcologies[0].FSSupremacistLawME == 1>>
				<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
			<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
				<<set _races = ["amerindian", "asian", "black", "indo-aryan", "latina", "malay", "middle eastern", "mixed race", "pacific islander", "semitic", "southern european", "white"]>>
				<<set _races = _races.delete($arcologies[0].FSSubjugationistRace)>>
				<<set $fixedRace = _races.random()>>
			<</if>>
			<<include "Generate XX Slave">>
			<<set $activeSlave.origin = "She put herself up as collateral at a trick shot game, and lost.">>
			<<set $activeSlave.career = "a soldier">>
			<<set $activeSlave.indentureRestrictions = 2>>
			<<set $activeSlave.indenture = 52>>
			<<if $activeSlave.eyes == -2>>
				<<set $activeSlave.eyes = -1>>
			<</if>>
			<<set $activeSlave.devotion = random(45,60)>>
			<<set $activeSlave.trust = random(55,65)>>
			<<set $activeSlave.health = random(60,80)>>
			<<set $activeSlave.muscles = 60>>
			<<if $activeSlave.weight > 130>>
				<<set $activeSlave.weight -= 100>>
				<<set $activeSlave.waist = random(-10,50)>>
			<</if>>
			<<set $activeSlave.anus = 0>>
			<<set $activeSlave.analSkill = 0>>
			<<set $activeSlave.whoreSkill = 0>>
			<<set $activeSlave.combatSkill = 1>>
			<<set $activeSlave.behavioralFlaw = "arrogant">>
			<<set $activeSlave.hStyle = "buzzcut">>
			<<setLocalPronouns $activeSlave>>
			Some aggressive play and an eye for riling up your fellow players has resulted in an immense payout, and all but one of your adversaries have folded as the situation has escalated. The only player still in contention is a wily old mercenary, the veteran of $his fair share of battles on the battlefield and at the firing range. $He's short on bullets, however, and $he'll have to buy in with something else as collateral.

				<<link "A year of servitude">>
					<<replace "#aliveresult">>
						<<if random(1,100) > 50>>
							For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck was not on your side. As the victor sweeps up $his spoils, the other security force clap you on the back and offer their condolences for your defeat. Though you may have lost your ¤, it seems you've @@.green;made some friends.@@
							<<set $rep += 1000, $cash -= 500000>>
						<<else>>
							For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck has rendered you the victor. A silence falls over the room as the result is declared, but after some time your opponent breaks the hush by joking that life as your slave is probably easier than fighting for $arcologies[0].name. After some awkward laughter the night continues, and at the end your former mercenary joins you on your trip back to the penthouse to submit to processing and to begin $his new life as your sexual servant. $He's not young, but $he's tough and not distrusting of you due to $his service in $SF.Lower.

							<<include "New Slave Intro">>
						<</if>>
					<</replace>>
				<</link>>

 <<link "Dock $his wages">>
					<<replace "#aliveresult">>
						<<if random(1,100) > 50>>
							For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck was not on your side. As the victor sweeps up $his spoils, the other security force members clap you on the back and offer their condolences for your defeat. Though you may have lost your ¤, it seems you've @@.green;made some friends.@@
							<<set $rep += 1000, $cash -= 500000>>
						<<else>>
							For all your skillful maneuvering to reach this position, ultimately the win comes down to chance. This time, however, luck has rendered you the victor. Your opponent accepts $his defeat with grace and jokes to $his comrades that $he'll be fighting in $his underwear for the next few months, and their uproar of laughter fills the room. Though you take the lion's share of the ¤, your security force also @@.green;had a good time fraternizing with you.@@
							<<set $rep += 2000, $cash += 500000>>
						<</if>>
					<</replace>>
				<</link>>

		<</replace>>
	<</link>>

	<</replace>>
<</link>> // It will cost @@.yellowgreen;<<print cashFormat(500000)>>@@ to participate in the trick shot night.//
<</if>>


code:
:: Upgrades [nobr]

Total upgrade progress: <<print progress($SF.Units,_max)>>

	<<if $SF.MWU >= 1>>
Total multi week $SF.Lower upgrades: $SF.MWU <</if>>

	<<if $SF.U > 0 && $SF.MWU >= 0 && ($SF.Units !== _max)>>

[[Re-unlock upgrading.|Firebase][$SF.U = 0,$SF.MWU += 1,$cash -= Math.ceil(Math.abs($cash*.05*(1.25+($SF.Units/1000))))]] @@.yellowgreen;<<print cashFormat(Math.ceil(Math.abs($cash*.05*(1.25+($SF.Units/1000)))))>><</if>>

	<<if ($SF.Units < 30 || $SF.Units !== _max) && $SF.U < 1>> <<set _T1 = $SF.Units >= 30>>

Which facility or equipment do you wish to upgrade this week?

		<<if $SFUnit.Firebase < 5||_T1 && $SFUnit.Firebase < _FU>>

			<<set _cF = Math.ceil(100000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Firebase/100)))>>

			<<if $cash >= _cF>>

				<<link "Upgrade Firebase">> <<set $SF.U = 1, $SFUnit.Firebase++, $cash -= _cF>><<goto "Firebase">><</link>>

			<<else>>//Cannot afford to upgrade the Firebase.//<</if>>

			//Costs @@.yellowgreen;<<print cashFormat(_cF)>>@@ //

		<<elseif $SFUnit.Firebase == _FU>>//The Firebase has been fully upgraded.//

		<<else>>//More upgrades are required to unlock the next tier.//

		<</if>>	 <<print progress($SFUnit.Firebase)>>

		<<if $SFUnit.Armoury < 5||_T1 && $SFUnit.Armoury < _AU>>

			<<set _cA = Math.ceil(40000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Armoury/100)))>>

			<<if $cash >= _cA>>

				<<link "Upgrade Armory">> <<set $SF.U = 1, $SFUnit.Armoury++, $cash -= _cA>> <<goto "Firebase">><</link>>

			<<else>>//Cannot afford to upgrade the Armory.//<</if>>

			//Costs @@.yellowgreen;<<print cashFormat(_cA)>>@@ //

		<<elseif $SFUnit.Armoury == _AU>>//The Armory has been fully upgraded.//

		<<else>>//More upgrades are required to unlock the next tier.//

		<</if>>  <<print progress($SFUnit.Armoury)>>

		<<if $SFUnit.Drugs < 5||_T1 && $SFUnit.Drugs < _DrugsU>>

			<<set _cDrugs = Math.ceil(40000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Drugs/100)))>>

			<<if $cash >= _cDrugs>>

				<<link "Upgrade Drug Lab">><<set $SF.U = 1, $SFUnit.Drugs++, $cash -= _cDrugs>> <<goto "Firebase">><</link>>

			<<else>>//Cannot afford to upgrade the Drug Lab.//<</if>>

			//Costs @@.yellowgreen;<<print cashFormat(_cDrugs)>>@@ //

		<<elseif $SFUnit.Drugs == _DrugsU>>//The Drug Lab has been fully upgraded.//

		<<else>>//More upgrades are required to unlock the next tier.//

		<</if>>  <<print progress($SFUnit.Drugs)>>

		<<if $SFUnit.Firebase >= 2 && ($SFUnit.Drones < 5 ||_T1 && $SFUnit.Drones < _DU)>>

			<<set _cDrones = Math.ceil(45000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Drones/100))*HSM())>>

			<<if $cash >= _cDrones>>

				<<link "Upgrade Drone Bay">><<set $SF.U = 1, $SFUnit.Drones++, $cash -= _cDrones>> <<goto "Firebase">>	<</link>>

			<<else>>//Cannot afford to upgrade the Drone Bay.//<</if>>

			//Costs @@.yellowgreen;<<print cashFormat(Math.ceil(45000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Drones/100))*HSM()))>>@@ //  <<print progress($SFUnit.Drones)>>

		<<elseif $SFUnit.Drones == _DU>>//The Drone Bay has been fully upgraded.// <<print progress($SFUnit.Drones)>>

		<<elseif _T1 && $SFUnit.Drones == 5>>//More upgrades are required to unlock the next tier.// <<print progress($SFUnit.Drones)>> <</if>>

		<<if $SFUnit.Firebase >= 1 && $terrain !== "oceanic">>
''Garage''

<<if ($SFUnit.AV < 5||_T1 && $SFUnit.AV < _AVU)>>

				<<set _cAV = Math.ceil(60000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.AV/100)))>>

				<<if $cash >= _cAV>>

					<<link "Upgrade Attack Vehicle Fleet">><<set $SF.U = 1, $SFUnit.AV++, $cash -= _cAV>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade the Attack Vehicle Fleet.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cAV)>>@@//<<print progress($SFUnit.AV)>>

			<<elseif $SFUnit.AV == _AVU>>//The Attack Vehicle Fleet has been fully upgraded.//<<print progress($SFUnit.AV)>>

			<<else>>//More upgrades are required to unlock the next tier.//<<print progress($SFUnit.AV)>>

			<</if>>

<<if ($SFUnit.TV < 5||_T1 && $SFUnit.TV < _TVU)>>

				<<set _cTV = Math.ceil(60000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.TV/100)))>>

				<<if $cash >= _cTV>>

					<<link "Upgrade Transport Vehicle Fleet">><<set $SF.U = 1, $SFUnit.TV++, $cash -= _cTV>><<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Transport Vehicle Fleet.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cTV)>>@@//<<print progress($SFUnit.TV)>>

			<<elseif $SFUnit.TV == _TVU>>//The Transport Vehicle Fleet has been fully upgraded.//<<print progress($SFUnit.TV)>>

			<<else>>//More upgrades are required to unlock the next tier.// <<print progress($SFUnit.TV)>> <</if>>

<<if _T1 && $SFUnit.PGT < _PGTU>>

				<<set _cPGT = Math.ceil(735000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.PGT/100)))>>

				<<if $cash >= _cPGT>>

					<<link "Upgrade Prototype Goliath tank">><<set $SF.U = 1, $SFUnit.PGT++, $cash -= _cPGT>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Prototype Goliath Tank.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cPGT)>>@@ // <<print progress($SFUnit.PGT)>>

			<<elseif $SFUnit.PGT == _PGTU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.PGT)>>

			<<elseif $SFUnit.PGT == _PGTU>>//The Prototype Goliath Tank has been fully upgraded.// <<print progress($SFUnit.PGT)>> <</if>>
<</if>>

		<<if $SFUnit.Firebase >= 4>>''Hangar''

<<if $SFUnit.AA < 5||_T1 && $SFUnit.AA < _AAU>>

				<<set _cAA = Math.ceil(70000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.AA/100)))>>

				<<if $cash >= _cAA>>

					<<link "Upgrade Attack Aircraft Fleet">><<set $SF.U = 1, $SFUnit.AA++, $cash -= _cAA>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Attack Aircraft Fleet.//<</if>>

			//Costs @@.yellowgreen;<<print cashFormat(_cAA)>>@@ // <<print progress($SFUnit.AA)>>

			<<elseif $SFUnit.AA == _AAU>>//The Attack Aircraft Fleet has been fully upgraded.// <<print progress($SFUnit.AA)>>

			<<else>>//More upgrades are required to unlock the next tier.// <<print progress($SFUnit.AA)>> <</if>>

<<if $SFUnit.TA < 5||_T1 && $SFUnit.TA < _TAU>>

				<<set _cTA = Math.ceil(70000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.TA/100)))>>

				<<if $cash >= _cTA>>

					<<link "Upgrade Transport Aircraft Fleet">><<set $SF.U = 1, $SFUnit.TA++, $cash -= _cTA>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade the Transport Aircraft Fleet.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cTA)>>@@ // <<print progress($SFUnit.TA)>>

			<<elseif $SFUnit.TA == _TAU>>//The Transport Aircraft Fleet has been fully upgraded.// <<print progress($SFUnit.TA)>>

			<<else>>//More upgrades are required to unlock the next tier.// <<print progress($SFUnit.TA)>> <</if>>

<<if _T1 && $SFUnit.SpacePlane < _SPU>>

				<<set _cSP = Math.ceil(250000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.SpacePlane/100))*HSM())>>

				<<if $cash >= _cSP>>

					<<link "Upgrade Spaceplane">><<set $SF.U = 1, $SFUnit.SpacePlane++, $cash -= _cSP>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade the Spaceplane.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cSP)>>@@//<<print progress($SFUnit.SpacePlane)>>

			<<elseif $SFUnit.SpacePlane == _SPU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.SpacePlane)>>

			<<elseif $SFUnit.SpacePlane == _SPU>>//The Spaceplane has been fully upgraded.// <<print progress($SFUnit.SpacePlane)>> <</if>>

<<if _T1 && $SFUnit.GunS < _GunSU>>

				<<set _cGunS = Math.ceil(350000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.GunS/100))*HSM())>>

				<<if $cash >= _cGunS>>

					<<link "Upgrade Gunship">><<set $SF.U = 1, $SFUnit.GunS++, $cash -= _cGunS>><<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Gunship.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cGunS)>>@@ // <<print progress($SFUnit.GunS)>>

			<<elseif $SFUnit.GunS == _GunSU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.GunS)>>

			<<elseif $SFUnit.GunS == _GunSU>>//The Gunship has been fully upgraded.// <<print progress($SFUnit.GunS)>> <</if>>
<</if>>

		<<if _T1>>''Launch Bay''

<<if $SFUnit.Satellite < _SatU && $SatLaunched < 1>>

				<<set _cSat = Math.ceil(525000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Satellite/100))*HSM())>>

				<<if $cash >= _cSat>>

					<<link "Upgrade Satellite">><<set $SF.U = 1, $SFUnit.Satellite++, $cash -= _cSat>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Satellite.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cSat)>>@@//<<print progress($SFUnit.Satellite)>>

			<<elseif $SFUnit.Satellite == _SatU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.Satellite)>>

			<<else>>//The Satellite has been fully upgraded.//<<print progress($SFUnit.Satellite)>><</if>>

			<<if $terrain !== "oceanic">>

<<if $SFUnit.GiantRobot < _GRU>>

				<<set _cGR = Math.ceil(550000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.GiantRobot/100))*HSM())>>

				<<if $cash >= _cGR>>

					<<link "Upgrade Giant Robot">><<set $SF.U = 1, $SFUnit.GiantRobot++, $cash -= _cGR>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade the Giant Robot.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cGR)>>@@//<<print progress($SFUnit.GiantRobot)>>

			<<elseif $SFUnit.GiantRobot == _GRU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.GiantRobot)>>

			<<else>>//The Giant Robot has been fully upgraded.// <<print progress($SFUnit.GiantRobot)>> <</if>>
<</if>>

<<if $SFUnit.MissileSilo < _MSU>>

				<<set _cMS = Math.ceil(565000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.MissileSilo/100))*HSM())>>

				<<if $cash >= _cMS>>

					<<link "Upgrade Cruise Missile">><<set $SF.U = 1, $SFUnit.MissileSilo++, $cash -= _cMS>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Cruise Missile.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cMS)>>@@ //<<print progress($SFUnit.MissileSilo)>>

			<<elseif $SFUnit.MissileSilo == _MSU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.MissileSilo)>>

			<<else>>//The Cruise Missile has been fully upgraded.// <<print progress($SFUnit.MissileSilo)>> <</if>>
<</if>>

		<<if _T1 && ($terrain == "oceanic" || $terrain == "marine")>>''Naval Yard''

<<if $SFUnit.AircraftCarrier < _ACU>>

				<<set _cAC = Math.ceil(650000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.AircraftCarrier/100))*HSM())>>

				<<if $cash >= _cAC>>

					<<link "Upgrade Aircraft Carrier">><<set $SF.U = 1, $SFUnit.AircraftCarrier++, $cash -= _cAC>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Aircraft Carrier.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(Math.ceil(650000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.AircraftCarrier/100))*HSM()))>>@@ // <<print progress($SFUnit.AircraftCarrier)>>

			<<elseif $SFUnit.AircraftCarrier == _ACU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.AircraftCarrier)>>

			<<else>>//The Aircraft Carrier has been fully upgraded.// <<print progress($SFUnit.AircraftCarrier)>> <</if>>

<<if $SFUnit.Sub < _SubU>>

				<<set _cSub = Math.ceil(700000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.Sub/100))*HSM())>>

				<<if $cash >= _cSub>>

					<<link "Upgrade Submarine">><<set $SF.U = 1, $SFUnit.Sub++, $cash -= _cSub>> <<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Submarine//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cSub)>>@@ // <<print progress($SFUnit.Sub)>>

			<<elseif $SFUnit.Sub == _SubU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.Sub)>>

			<<else>>//The Submarine has been fully upgraded.// <<print progress($SFUnit.Sub)>> <</if>>

<<if $SFUnit.HAT < _HATU>>

				<<set _cHAT = Math.ceil(665000*_Env*(1.15+($SF.Units/10))*(1.15+($SFUnit.HAT/100)))>>

				<<if $cash >= _cHAT>>

					<<link "Upgrade Amphibious Transport">><<set $SF.U = 1, $SFUnit.HAT++, $cash -= _cHAT>><<goto "Firebase">><</link>>

				<<else>>//Cannot afford to upgrade Amphibious Transport.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cHAT)>>@@ // <<print progress($SFUnit.HAT)>>

			<<elseif $SFUnit.HAT == _HATU && $PC.warfare < 75>>//Your warfare skill is not high enough unlock the next upgrade.// <<print progress($SFUnit.HAT)>>

			<<else>>//The Amphibious Transport has been fully upgraded.// <<print progress($SFUnit.HAT)>> <</if>>

		<</if>>

		<<if _T1 < 1>>//More firebase upgrades are required to unlock further upgrades.//<</if>>

	<</if>>

	/*
<<if _T1 && $SF.Facility.Toggle > 0 && $SF.Facility.Active < 1>>

				<<set _cSFF = Math.ceil(735000*_Env*(1.15+($SF.Units/10))*(1.15+($SF.Facility.Active/100)))>>

					<<if $cash >= _cSFF>>

						<<link "Build $SF.Lower's support facility">><<set $SF.U = 1, $SF.Facility.Active++, $cash -= _cSFF>><<goto "Firebase">><</link>>

					<<else>>//Cannot afford to build $SF.Lower's support facility.//<</if>>

				//Costs @@.yellowgreen;<<print cashFormat(_cSFF)>>@@ //

				<</if>>*/


code:
:: WC [nobr]

<<if $SF.WG === 0 && $SFTradeShow.CanAttend === -1 && ($SFColonel.Talk + $SFColonel.Fun !== 1)>>
	The Colonel looks down a list on her tablet. "There's some things we can do to help you out, boss.

We've had some good prizes turn up, that's made us some extra money we could turn over. | <<link "Request cash""Firebase">>
	/*<<set $CashGift = ((Math.ceil((Math.abs($cash)*0.05)*(Math.max(0.99,$SF.Units))))*($arcologies[0].prosperity/100))*_Env>> OLD*/
	<<set $CashGift = Math.ceil(25000*($SF.Units/10)*_Env),$SF.WG = 1,$choice = 1>>
	<<set $CashGift = ($CashGift > 5000 ? $CashGift : 5000),$cash += $CashGift>>
	<</link>>
	<<if $rep < 20000>>

If you want we could throw a quick military parade, get the people feeling extra patriotic. | <<link "Request military parade""Firebase">>
		<<set $GoodWords1 += 50*(Math.ceil($SF.Units*0.03*_Env))>>
		<<set $GoodWords1 = (Number($GoodWords1) ? $GoodWords1 : 500),$SF.WG = 1>>
		<<set $rep += $GoodWords1,$choice = 2>>
		<</link>>
	<</if>>
	<<if $arcologies[0].prosperity < $AProsperityCap>>

Or we could hit some businesses that rival the ones in $arcologies[0].name with some sabotage. | <<link "Request sabotage""Firebase">>
		<<set $GoodWords2 = _EnvProsp+(Math.ceil($SF.Units/100*_Env)),$SF.WG = 1,$choice = 3>>
		<<if $arcologies[0].prosperity + $GoodWords2 > $AProsperityCap>>
			<<set $arcologies[0].prosperity = $AProsperityCap>>
		<<else>> <<set $arcologies[0].prosperity += $GoodWords2>> <</if>> <</link>>
	<</if>>
<<elseif $SF.WG == 0 && ($SFTradeShow.CanAttend > -1 || ($SFColonel.Talk + $SFColonel.Fun > 0))>>

He looks down a list on his tablet. "<<if $PC.title != 0>>Sir<<else>>Ma'am<</if>>, how can $SF.Lower help you this week?

$SF.Caps can spare some profits from our recent operations. | <<link "Request cash""Firebase">>
	<<set $CashGift = 25000*($SF.Units/10)*_Env,$SF.WG = 1,$choice = 1>>
	<<set $CashGift = ($CashGift > 5000 ? $CashGift : 5000),$cash += Math.ceil($CashGift * 0.8)>>
	<</link>>
	<<if $rep < 20000>>

We can set some units aside for a ceremonial march through the arcology. | <<link "Request a parade""Firebase">>
		<<set $GoodWords1 += 50*(Math.ceil($SF.Units*0.03*_Env))>>
		<<set $GoodWords1 = (Number($GoodWords1) ? $GoodWords1 : 500),$SF.WG = 1>>
		<<set $rep += Math.ceil($GoodWords1*0.8),$choice = 2>>
		<</link>>
	<</if>>
	<<if $arcologies[0].prosperity < $AProsperityCap>>

Or we can target rival businesses for sabotage. | <<link "Request sabotage""Firebase">>
		<<set $GoodWords2 = _EnvProsp+(Math.ceil($SF.Units/100*_Env)),$SF.WG = 1,$choice = 3>>
		<<if $arcologies[0].prosperity + $GoodWords2 * 0.8 > $AProsperityCap>>
			<<set $arcologies[0].prosperity = $AProsperityCap>>
		<<else>> <<set $arcologies[0].prosperity += Math.ceil($GoodWords2*0.8)>> <</if>> <</link>>
	<</if>>
<</if>>

<<if $SFColonel.Talk === 0 && $SFColonel.Fun === 0 && $SFTradeShow.CanAttend === -1>>

If you need me for anything else, let me know."

	<<if $SFColonel.Status >= 25>>
		<<link "Walk with the Colonel on the surface.">> <<replace "#result0">>
			<<set $SFColonel.Talk = 1>>

You ask the Colonel if she would like to stretch her legs up on the surface. It doesn't take much effort for her to agree.
			<<if $PC.warfare >= 100 && $PC.career == "mercenary">>
				Your mastery of wet work and prior experience in a PMC satisfies the Colonel that between you<<if $Bodyguard != 0>>, $Bodyguard.slaveName,<</if>> and her, there should be little threat to walking around the arcology. Being able to see and interact with the arcology owner directly maintains the false idea that you're just like one of them while also giving them an increased opportunity to try gaining your favor.
				<<set $rep += 10, $cash += _EnvCash2>>
			<<elseif $PC.warfare >= 100>>
				Your mastery of wet work satisfies the Colonel that you only need two soldiers <<if $Bodyguard != 0>> plus $Bodyguard.slaveName<</if>> to walk safely around the arcology. Being able to see and interact with the arcology owner directly maintains the false idea that you're just like one of them while also giving them an increased opportunity to try gaining your favor.
				<<set $rep += 5, $cash += _EnvCash3>>
			<<elseif $PC.warfare >= 60>>
				With some expertise in warfare, the Colonel believes <<if $Bodyguard != 0>>with $Bodyguard.slaveName <</if>>you only need a squad of armed soldiers for a walk through the arcology.
			<<elseif $PC.warfare >= 30>>
				As you have some skill in warfare, the Colonel believes<<if $Bodyguard != 0>> with $Bodyguard.slaveName<</if>> you only need two full squads of armed soldiers for a walk around the arcology.
			<<elseif $PC.warfare >= 10>>
				Your minor skill in warfare convinces the Colonel that <<if $Bodyguard != 0>>in addition to $Bodyguard.slaveName, <</if>>you need two full squads of armed soldiers and an armored car escort for a simple walk around the arcology.
			<<else>>
				Your complete lack of combat skill convinces the Colonel that <<if $Bodyguard != 0>>in addition to $Bodyguard.slaveName, <</if>>you need two full squads of armed soldiers, an armored car escort, and a sniper overwatch for a simple walk around the arcology.
			<</if>>
As you make your way through the arcology you stop at a
			<<if $arcologies[0].FSPaternalist != "unset">>
				paternalist shop, <<if $SFColonel.Core == "cruel">>earning a sneer from the Colonel.<<else>>helping the Colonel select some luxurious and relaxing slave treatments.<</if>>
			<<elseif $arcologies[0].FSPastoralist != "unset">>
				pastoralist shop, helping the Colonel select a more comfortable breast pump.
			<<else>>shop that catches the Colonel's eye. <</if>>
			<<if $PC.slaving >= 100 && $PC.career == "slaver">>
				Your mastery and extensive history of slaving allows you assist the Colonel greatly. The shop owner is so impressed by your understanding of slavery that she asks you for some advice. Before you leave, you manage to pass on a few tips, helping the business with future customers.
				<<if $arcologies[0].prosperity < $AProsperityCap>>
					<<set $arcologies[0].prosperity++>> <</if>>
			<<elseif $PC.slaving >= 100>>
				Your mastery and extensive history of slaving allows you assist the Colonel greatly. The shop owner is so impressed by your understanding of slavery that she asks you for some advice. Before you leave, you manage to pass on a few tips, helping the business with future customers.
				<<if $arcologies[0].prosperity < $AProsperityCap>>
					<<set $arcologies[0].prosperity++>> <</if>>
			<<elseif $PC.slaving >= 60>>
				Your expertise in slavery allows you to help the Colonel decide what to buy for her main slave.
			<<elseif $PC.slaving >= 30>>
				Your moderate skill in slavery makes you somewhat helpful to the Colonel in deciding what to buy for her main slave.
			<<elseif $PC.slaving >= 10>>
				Your basic skill level of slavery doesn't allow you to help the Colonel at all.
			<<elseif $PC.slaving < 10>>
				Your total lack of slavery skill (which is very unusual and very concerning for an arcology owner) means that you are of little to no help or even a hindrance. The shopkeeper notices your complete ineptitude, and as soon as you've left the rumor mill begins.
				<<set $rep -= 20>><</if>>

Soon the entourage heads back to the HQ of $SF.Lower.
			<<if random(1,100) > 50>>Along the route you see a homeless citizen with a serious injury begging for help.
				<<if $PC.medicine >= 100 && $PC.career == "medicine">>
					Your expertise in surgery ensures that the citizen receives the best care they'll ever experience in their life. They are so grateful that they are more than happy to try and compensate your time. Word quickly spreads of the kindly medically trained arcology owner who took the time to heal a citizen, providing confidence to the rest of the citizens.
					<<set $rep += 10, $cash += _EnvCash4>>
				<<elseif $PC.medicine >= 100>>
					Your expertise in surgery ensures that the citizen receives the best care they'll ever experience in their life. Word quickly spreads of the kindly arcology owner who took the time to heal a citizen.
					<<set $rep += 5>>
				<<elseif $PC.medicine >= 60>>
					Your proficiency in surgery allows you to properly close their wound with minimal trauma to the patient.
				<<elseif $PC.medicine >= 30>>
					Your moderate surgical skill ensures that you can close the citizen's wound, though not without likely scarring.
				<<elseif $PC.medicine >= 10>>
					Your basic surgical skill in medicine is sufficient only to stabilize the citizen's wounds before medical assistance arrives.
				<<else>>
					Your total lack of surgical skill causes the death of the citizen through repeated medical blunders.
					<<set $arcologies[0].prosperity -= .25>><</if>>
				<</if>>
			<<set $SFColonel.Status += 2>> <</replace>> <</link>>
	<</if>>

 <<link "Talk in $SF.Lower's HQ.">> <<replace "#result0">>

What do you want to do with the Colonel in the HQ?

 <<link "Talk">><<replace "#result1">>

You and the Colonel talk over some $PC.refreshment, where she ends up talking about her past. You learn a little more about her.
			<<set $SFColonel.Status +=3>>
			<<switch random(1,6)>>
			<<case 1>>
				<<set $PC.medicine += 1>><<set $PC.trading += 1>><<set $PC.slaving += 1>>
			<<case 2>>
				<<set $PC.trading += 1>><<set $PC.slaving += 1>><<set $PC.engineering += 1>>
			<<case 3>>
				<<set $PC.slaving += 1>><<set $PC.engineering += 1>><<set $PC.hacking += 1>>
			<<case 4>>
				<<set $PC.engineering += 1>><<set $PC.hacking += 1>><<set $PC.warfare += 1>>
			<<case 5>>
				<<set $PC.hacking += 1>><<set $PC.warfare += 1>><<set $PC.medicine += 1>>
			<<case 6>>
				<<set $PC.warfare += 1>><<set $PC.medicine += 1>><<set $PC.trading += 1>>
			<</switch>>
		<</replace>><</link>>

 <<link "Learn">> <<replace "#result1">>
			<<set $SFColonel.Talk = 1,$SFColonel.Status += 1>>

"Sure boss, I can use a break from all of this," she laughs. The Colonel tells a story about one time when she
			<<switch random(1,6)>>
			<<case 1>>
				used field medicine to save another merc's life, teaching you some medical procedures in the process.
				<<set $PC.medicine += 5>>
			<<case 2>>
				haggled for necessary gear with a stingy quartermaster, teaching you how to get what you want from traders.
				<<set $PC.trading += 5>>
			<<case 3>>
				found a load of human chattel in a raid and had to manage them before they could later be unloaded, teaching you how to better care for your slaves.
				<<set $PC.slaving += 5>>
			<<case 4>>
				was responsible for rebuilding a fort she had seized, teaching you how to better manage construction in your arcology.
				<<set $PC.engineering += 5>>
			<<case 5>>
				was forced to hack her way out of a trap, teaching you how to better penetrate digital security.
				<<set $PC.hacking += 5>>
			<<case 6>>
				fought off an entire battalion with only a small squad, teaching you how to think tactically in battle.
				<<set $PC.warfare += 5>>
			<</switch>>
		<</replace>> <</link>>

		<<if $SFColonel.Status >= 45>>
 <<link "Have some fun.">> <<replace "#result1">>
			<<set $SFColonel.Fun = 1,$SFColonel.Talk = 1,$SFColonel.Status += 3>>

Where should this fun take place? <<link "Go back""Firebase">>
				<<set $SFColonel.Fun = 0, $SFColonel.Talk = 0,$SFColonel.Status -= 3>>
			<</link>>

 <<link "In private">> <<replace "#result4">>

Which orifice do you wish to target?
				<<link "Go back""Firebase">> <</link>>

 <<link "Pussy">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
							<</replace>> <<set $SFColonel.Fun += 1>> <</link>>

 <<link "Ass">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
							<</replace>> <<set $SFColonel.Fun += 1>> <</link>>

 <<link "Both pussy and ass">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
							<</replace>> <<set $SFColonel.Fun += 2>> <</link>>

 <<link "Mouth">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
							<</replace>> <<set $SFColonel.Fun += 1>> <</link>>

 <<link "All three holes">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
							<</replace>> <<set $SFColonel.Fun += 3>> <</link>>
			 <</replace>> <</link>>

 <<link "On The Colonel's throne.">> <<replace "#result4">>

Which orifice do you wish to target?
					<<link "Go back""Firebase">> <</link>>

 <<link "Pussy">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
						<</replace>> <<set $SFColonel.Fun += 1>> <</link>>

 <<link "Ass">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
						<</replace>> <<set $SFColonel.Fun += 1>> <</link>>

 <<link "Both pussy and ass">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
						<</replace>> <<set $SFColonel.Fun += 2>> <</link>>

 <<link "Mouth">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
						<</replace>> <<set $SFColonel.Fun += 1>> <</link>>

 <<link "All three holes">> <<replace "#result6">>
							<<include "SFColonelSexDec">>
						<</replace>> <<set $SFColonel.Fun += 3>> <</link>>
			 <</replace>>  <</link>>
		 <</replace>> <</link>> <</if>> /*Closes fun*/
	 <</replace>> <</link>> /*Closes talk*/
 <</if>> /*Closes spend time with The Colonel*/


code:
:: art widgets [nobr widget]

/%
Call as <<SlaveArt>>
Displays slave images. Currently passage-based.
$args[0]: Slave.
$args[1]: Image size/center.
	3: Large, right. Example: long slave description.
	2: Medium, right. Example: random events.
	1: Small, left. Example: lists.
	0: Tiny, left. Example: facilities
$args[2]: icon UI Display for vector art, 1 for on.
%/
<<widget "SlaveArt">>

<<if ndef $args[0].customImage>><<set $args[0].customImage = 0>><</if>>
<<if $args[0].customImage != 0>>
	<<set _fileFormat = ($args[0].customImageFormat || "png"),
		_fileName = "'resources/" + $args[0].customImage + "." + _fileFormat + "' ",
		_fileTypeStart = (_fileFormat === "webm" ? "video loop autoplay" : "img"),
		_fileTypeEnd = (_fileFormat === "webm" ? "</video>" : "")>>
	<<if $args[1] == 3>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:right; border:3px hidden'>" + _fileTypeEnd>>
	<<elseif $args[1] == 2>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:right; border:3px hidden' width='300' height='300'>" + _fileTypeEnd>>
	<<elseif $args[1] == 1>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:left; border:3px hidden' width='150' height='150'>" + _fileTypeEnd>>
	<<else>>
		<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:left; border:3px hidden' width='120' height='120'>" + _fileTypeEnd>>
	<</if>>

<<elseif $imageChoice == 1>> /* VECTOR ART BY NOX*/

<<if ndef $seeVectorArtHighlights>>
	<<set $seeVectorArtHighlights = 1>>
<</if>>
<<set _artSlave = $args[0] >>
<<silently>>
/* prepare HTML color codes for slave display */
/* note: latex clothing is mostly emulated by rubber color for skin (and shoes) */
/* TODO: consistently use American "color" instead of "colour" for all identifiers */
<<include Art_Vector_Set_Colour_Outfit_>>
<<include Art_Vector_Set_Colour_Skin_>>
<<include Art_Vector_Set_Colour_Hair_>>
<<include Art_Vector_Set_Colour_Shoe_>>
<</silently>>
<<include Art_Vector_Generate_Stylesheet_>>
/*
each passage adds one layer of vector art
vector art added later is drawn over previously added art
(what is listed on the bottom in the code appears on the top of the image)
*/
<<include Art_Vector_Hair_Back_>>
<<include Art_Vector_Arm_>>
<<include Art_Vector_Anal_Accessories_>>
<<include Art_Vector_Butt_>>
<<include Art_Vector_Leg_>>
<<include Art_Vector_Feet_>> /* includes shoes and leg outfits*/
<<include Art_Vector_Torso_>>
<<include Art_Vector_Pussy_>>
<<include Art_Vector_Pubic_Hair_>>
<<include Art_Vector_Pussy_Piercings_>>
<<include Art_Vector_Chastity_Belt_>>
<<include Art_Vector_Torso_Outfit_>> /* note: clothing covers chastity belts */
<<include Art_Vector_Balls_>>
<<include Art_Vector_Penis_>> /* for dicks behind boobs */
<<include Art_Vector_Belly_>> /* includes navel piercing and belly-related clothing options */
<<include Art_Vector_Boob_>> /* includes areolae and piercings */
<<include Art_Vector_Penis_>> /* for dicks in front of boobs */
<<include Art_Vector_Boob_Addons_>> /* piercings always appear in front of boobs AND dick */
<<include Art_Vector_Clavicle>>
<<include Art_Vector_Collar_>>
<<include Art_Vector_Head_>> /* includes glasses */
<<include Art_Vector_Hair_Fore_>>

<<elseif $imageChoice == 2>> /* VECTOR ART BY NOX - Pregmod Legacy Version */
<<SVGFilters>>

/* 000-250-006 */
/*
 */
/* 000-250-006 */

<<set _folderLoc = "'resources/vector">>

<<if $args[2] == 1>>
	<<print "">>
<</if>>

/% Set skin color %/
<<set _skinFilter = "filter: url(#skin-" + _.kebabCase($args[0].skin) + ");">>
/% Set hair color %/
<<set _hairFilter = "filter: url(#hair-" + _.kebabCase($args[0].hColor) + ");">>
<<set _underArmFilter = "filter: url(#hair-" + _.kebabCase($args[0].underArmHColor) + ");">>
<<set _pubesFilter = "filter: url(#hair-" + _.kebabCase($args[0].pubicHColor) + ");">>
<<set _axillaryFilter = "filter: url(#hair-" + _.kebabCase($args[0].underArmHColor) + ");">>
<<if $args[0].customHairVector>>
	<<set _hairStyle = $args[0].customHairVector>>
<<else>>
	<<set _hairStyle = ["afro", "braided", "bun", "buzzcut", "dreadlocks", "eary", "luxurious", "messy", "neat", "ponytail", "strip", "tails", "trimmed", "up"].includes($args[0].hStyle) ? $args[0].hStyle : "neat">>
<</if>>
<<set _underArmHStyle = $args[0].underArmHStyle>>

<<set _imgSkinLoc = _folderLoc + "/body/white">>

/% Shoulder width and arm or no arm %/
<<if $args[0].amp != 1>>
	<<if $args[0].devotion > 50>>
		<<set _leftArmType = "high">>
		<<set _rightArmType = "high">>
	<<elseif $args[0].trust >= -20>>
		<<if $args[0].devotion < -20>>
			<<set _leftArmType = "rebel">>
			<<set _rightArmType = "low">>
		<<elseif $args[0].devotion <= 20>>
			<<set _leftArmType = "low">>
			<<set _rightArmType = "low">>
		<<else>>
			<<set _leftArmType = "mid">>
			<<set _rightArmType = "high">>
		<</if>>
	<<else>>
		<<set _leftArmType = "mid">>
		<<set _rightArmType = "mid">>
	<</if>>

	<<if $args[0].fuckdoll == 0 && $args[0].clothes != "restrictive latex" && $args[0].clothes != "a latex catsuit">>
		<<print "">>
		<<if $args[0].underArmHStyle == "bushy">>
			<<= "">>
		<</if>>
	<<else>>
		<<if $args[0].fuckdoll != 0>>
			<<set _rightArmType = "mid">>
		<</if>>
		<<print "">>
	<</if>>

<<else>>
	<<if $args[0].fuckdoll == 0 && $args[0].clothes != "restrictive latex" && $args[0].clothes != "a latex catsuit" && $args[0].underArmHStyle == "bushy">>
		<<= "">>
	<</if>>
<</if>>

/% Hair Aft %/
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0>>
	<<= "">>
<</if>>

/% Tailed Plug %/
<<if $args[0].buttplugAttachment == "tail">>
	<<= "">>
<</if>>

/% Butt %/
<<if $args[0].amp != 1>>
<<if $args[0].butt > 6>>
	<<set _buttSize = 3>>
<<elseif $args[0].butt > 4>>
	<<set _buttSize = 2>>
<<elseif $args[0].butt > 2>>
	<<set _buttSize = 1>>
<<else>>
	<<set _buttSize = 0>>
<</if>>
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<set _buttSize = _buttSize + " latex">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>
<</if>>

/% Leg + 1 size up when chubby or fat%/
<<if $args[0].hips < 0>>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _legSize = "normal">>
	<<else>>
		<<set _legSize = "narrow">>
	<</if>>
<<elseif $args[0].hips == 0>>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _legSize = "wide">>
	<<else>>
		<<set _legSize = "normal">>
	<</if>>
<<elseif $args[0].hips > 0>>
	<<set _legSize = "wide">>
<</if>>
<<if $args[0].amp == 1>>
	<<set _legSize = "stump " + _legSize>>
<</if>>
<<if ($args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit") && $args[0].amp != 1>>
	<<set _legSize = _legSize + " latex">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

/% Feet %/
<<if $args[0].amp != 1>>
<<if $args[0].shoes == "heels">>
	<<set _shoesType = "heel">>
<<elseif $args[0].shoes == "extreme heels">>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _shoesType = "extreme heel wide">>
	<<else>>
		<<set _shoesType = "extreme heel">>
	<</if>>
<<elseif $args[0].shoes == "boots">>
	<<if $args[0].weight > 95>>/%Chubby%/
		<<set _shoesType = "boot wide">>
	<<else>>
		<<set _shoesType = "boot">>
	<</if>>
<<elseif $args[0].shoes == "flats">>
	<<set _shoesType = "flat">>
<<else>>
	<<print "">>
<</if>>
<<if $args[0].shoes == "extreme heels" || $args[0].shoes == "boots">>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<set _shoesType = _shoesType + " latex">>
	<</if>>
	<<print "">>
<</if>>
<<if $args[0].shoes == "heels" || $args[0].shoes == "flats">>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<set _shoesType = _shoesType + " latex">>
		<<print "">>
	<<else>>
		<<print "">>
	<</if>>
<</if>>
<</if>>

/% Torso %/
<<if $args[0].waist < -40>>
	<<if $args[0].weight > 30>>
		<<set _torsoSize = "Hourglass">>
	<<else>>
		<<set _torsoSize = "Unnatural">>
	<</if>>
<<elseif $args[0].waist <= 10>>
	<<if $args[0].weight > 30>>
		<<set _torsoSize = "Normal">>
	<<else>>
		<<set _torsoSize = "Hourglass">>
	<</if>>
<<else>>
	<<set _torsoSize = "Normal">>
<</if>>
<<print "">>
<<set _torsoOutfit = false>>
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<set _torsoOutfit = " latex">>
<<elseif $args[0].clothes == "uncomfortable straps">>
	<<set _torsoOutfit = " straps">>
<</if>>
<<if _torsoOutfit>>
	<<print "">>
<</if>>

<<if $args[0].amp != 1>>
	<<if $args[0].fuckdoll == 0 && $args[0].clothes != "restrictive latex" && $args[0].clothes != "a latex catsuit">>
		<<if _leftArmType == "high">>
			<<print "">>
			<<if $args[0].underArmHStyle == "bushy">>
				<<= "">>
			<</if>>
		<<else>>
			<<if $args[0].underArmHStyle == "bushy">>
				<<= "">>
			<</if>>
			<<print "">>
		<</if>>
		<<print "">>
	<<else>>
		<<if $args[0].fuckdoll != 0>>
			<<set _leftArmType = "mid">>
		<</if>>
		<<print "">>
	<</if>>
<<else>>
	<<if $args[0].fuckdoll == 0 && $args[0].clothes != "restrictive latex" && $args[0].clothes != "a latex catsuit" && $args[0].underArmHStyle == "bushy">>
		<<= "">>
	<</if>>
<</if>>

/% Vagina %/
<<if $args[0].vagina >= 0>>
	<<print "">>
	<<if $args[0].clitPiercing == 1>>
		<<print "">>
	<<elseif $args[0].clitPiercing == 2>>
		<<print "">>
	<<elseif $args[0].clitPiercing == 3>>
		<<print "">>
	<</if>>
	<<if $args[0].vaginaPiercing == 1>>
		<<print "">>
	<<elseif $args[0].vaginaPiercing == 2>>
		<<print "">>
	<</if>>
<</if>>

/% Collar %/
<<switch $args[0].collar>>
<<case "bowtie">>
<<case "ancient Egyptian">>
<<case "nice retirement counter" "cruel retirement counter" "leather with cowbell" "pretty jewelry" "heavy gold" "satin choker" "stylish leather" "neck corset" "shock punishment" "tight steel" "uncomfortable leather" "dildo gag">>
	<<print "">>
<</switch>>

/% Head base image %/
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

/% Glasses %/
<<if $args[0].eyewear == "corrective glasses" || $args[0].eyewear == "glasses" || $args[0].eyewear == "blurring glasses">>
	<<print "">>
<</if>>

/% Chastity belt or Pubic hair %/
<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "anal chastity" || $args[0].dickAccessory == "combined chastity" || $args[0].vaginalAccessory == "chastity belt" || $args[0].vaginalAccessory == "anal chastity" || $args[0].vaginalAccessory == "combined chastity">>
	<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
		<<print "">>
	<</if>>
	<<if $args[0].vaginalAccessory == "chastity belt" || $args[0].vaginalAccessory == "combined chastity">>
		<<print "">>
	<</if>>
	<<print "">>
<<else>>
	<<if $args[0].pubicHStyle != "waxed">>
		<<set _pubicHStyle = ($args[0].pubicHStyle == "in a strip" ? "strip" : $args[0].pubicHStyle)>>
		<<= "">>
	<</if>>
<</if>>

/%if pregnant or has a belly%/
<<if $args[0].belly >= 5000>>
	<<print "">>
	<<if $args[0].navelPiercing >= 1>>/*Navel Piercing*/
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
<<elseif $args[0].belly <= -100>> /* condition is currently reversed until the vector can be fixed */
	<<print "">>
	/*
	<<if $args[0].navelPiercing >= 1>>/Navel Piercing/
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
	*/
<<else>>
	/*Navel Piercing*/
	<<if $args[0].navelPiercing >= 1>>
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
<</if>>

/% Boob %/
<<if $args[0].boobs < 300>>
	<<set _boobSize = 0>>
<<elseif $args[0].boobs < 500>>
	<<set _boobSize = 1>>
<<elseif $args[0].boobs < 800>>
	<<set _boobSize = 2>>
<<elseif $args[0].boobs < 1600>>
	<<set _boobSize = 3>>
<<elseif $args[0].boobs < 3200>>
	<<set _boobSize = 4>>
<<elseif $args[0].boobs < 6400>>
	<<set _boobSize = 5>>
<<elseif $args[0].boobs < 12000>>
	<<set _boobSize = 6>>
<<else>>
	<<set _boobSize = 7>>
<</if>>

/% Scrotum %/
<<if $args[0].scrotum > 0>>
	<<if $args[0].scrotum >= 6>>
		<<set _ballSize = 4>>
	<<elseif $args[0].scrotum >= 4>>
		<<set _ballSize = 3>>
	<<elseif $args[0].scrotum >= 3>>
		<<set _ballSize = 2>>
	<<elseif $args[0].scrotum >= 2>>
		<<set _ballSize = 1>>
	<<else>>
		<<set _ballSize = 0>>
	<</if>>
<</if>>

/% Penis %/
<<if $args[0].dick > 0>>
	<<if $args[0].dick >= 8>>
		<<set _penisSize = 6>>
	<<elseif $args[0].dick >= 7>>
		<<set _penisSize = 5>>
	<<elseif $args[0].dick >= 6>>
		<<set _penisSize = 4>>
	<<elseif $args[0].dick >= 5>>
		<<set _penisSize = 3>>
	<<elseif $args[0].dick >= 4>>
		<<set _penisSize = 2>>
	<<elseif $args[0].dick >= 2>>
		<<set _penisSize = 1>>
	<<else>>
		<<set _penisSize = 0>>
	<</if>>
<</if>>

/% Boob %/
<<set _needBoobs = 1>>
<<if $args[0].dick > 0>>
<<if canAchieveErection($args[0])>>
<<if _boobSize < 6>>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		/* normal case: outfit hides boobs */
		<<set _boobOutfit = " latex" >>
	<</if>>
	<<if _boobOutfit >>
		<<print "">>
		<<if $args[0].lactation > 0>>
			<<print "">>
		<</if>>
	<<else>>
		<<print "">>
		<<print "">>
	<</if>>
	/* special case: straps are actually dawn over the boobs */
	<<if $args[0].clothes == "uncomfortable straps">>
		<<set _boobOutfit = " straps" >>
		<<print "">>
	<</if>>
	<<set _needBoobs = 0>>
<</if>>
<</if>>
<</if>>
<<if $args[0].vagina > 0>>
	<<if $args[0].dick > 0>>

		<<if $args[0].scrotum > 0>>
			<<print "">>
		<</if>>
		<<if canAchieveErection($args[0])>>
			<<print "">>
		<<else>>
			<<print "">>
			<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
				<<print "">>
			<</if>>
		<</if>>

	<</if>>
<<else>>
	<<if $args[0].dick > 0>>

		<<if $args[0].scrotum > 0>>
			<<print "">>
		<</if>>
		<<if canAchieveErection($args[0])>>
			<<print "">>
		<<else>>
			<<print "">>
			<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
				<<print "">>
			<</if>>
		<</if>>

	<</if>>
<</if>>
<<if _needBoobs>>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<print "">>
		<<if $args[0].lactation > 0>><<print "">><</if>>
	<<else>>
		<<print "">>
		<<print "">>
	<</if>>
	/* special case: straps are actually dawn over the boobs */
	<<if $args[0].clothes == "uncomfortable straps">>
		<<set _boobOutfit = " straps" >>
		<<print "">>
	<</if>>
<</if>>

/% piercings %/
<<if $args[0].nipplesPiercing == 1>>
	<<print "">>
<<elseif $args[0].nipplesPiercing == 2>>
	<<print "">>
<</if>>
<<if $args[0].areolaePiercing == 1>>
	<<print "">>
<</if>>

/% clavicle %/
<<print "">>

/% Hair Foreground %/
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0>>
	<<= "">>
<</if>>

<<elseif $imageChoice == 3>> /* VECTOR ART REVAMP*/
	<<include Art_Vector_Revamped_Control_>>
<<else>> /* RENDERED IMAGES BY SHOKUSHU */

	<<= ArtControlRendered($args[0], $args[1])>>

<</if>> /* CLOSES IMAGE CHOICE */

<</widget>>


code:
:: Art_Vector_Anal_Accessories_ [nobr]

<<if _artSlave.buttplug == "long plug">>
	<<include Art_Vector_Plug_Long>>
<<elseif _artSlave.buttplug == "large plug">>
	<<include Art_Vector_Plug_Large>>
<<elseif _artSlave.buttplug == "long, large plug">>
	<<include Art_Vector_Plug_Large_Long>>
<<elseif _artSlave.buttplug == "huge plug">>
	<<include Art_Vector_Plug_Huge>>
<<elseif _artSlave.buttplug == "long, huge plug">>
	<<include Art_Vector_Plug_Huge_Long>>
<</if>>
<<if _artSlave.buttplugAttachment == "tail">>
	<<include Art_Vector_Plug_Tail>>
<</if>>
<<if _artSlave.buttplugAttachment == "cat tail">>
	<<include Art_Vector_Cat_Tail>>
<</if>>


code:
:: Art_Vector_Arm_ [nobr]

/* Arms position switch courtesy of Nov-X */
/* Updated 2018-10-25 by Fr0g */
/* - changed arm calculation block position*/
/* - added brackets to make boolean logic run */

<<if _artSlave.amp == 1>>
	<<set _leftArmType = "None">>
	<<set _rightArmType = "None">>
	<<set _art = "Art_Vector_Arm_Right_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_"+_leftArmType >>
	<<include _art>>
<<else>> /* not amputee so running arm calculation block */
	<<if _artSlave.weight <= 20>>
		<<if $args[0].devotion > 50>>
			<<set _leftArmType = "High">>
			<<set _rightArmType = "High">>
		<<elseif $args[0].trust >= -20>>
			<<if $args[0].devotion < -20>>
				<<set _leftArmType = "Rebel">>
				<<set _rightArmType = "Low">>
			<<elseif $args[0].devotion <= 20>>
				<<set _leftArmType = "Low">>
				<<set _rightArmType = "Low">>
			<<else>>
				<<set _leftArmType = "Mid">>
				<<set _rightArmType = "High">>
			<</if>>
		<<else>>
			<<set _leftArmType = "Mid">>
			<<set _rightArmType = "Mid">>
		<</if>>
	<<elseif _artSlave.weight > 20>>
		<<if $args[0].devotion > 50>>
			<<set _leftArmType = "High">>
			<<set _rightArmType = "High">>
		<<elseif $args[0].trust >= -20>>
			<<if $args[0].devotion < -20>>
				<<set _leftArmType = "Rebel">>
				<<set _rightArmType = "Low">>
			<<elseif $args[0].devotion <= 20>>
				<<set _leftArmType = "Low">>
				<<set _rightArmType = "Low">>
			<<else>>
				<<set _leftArmType = "Mid">>
				<<set _rightArmType = "High">>
			<</if>>
		<<else>>
			<<set _leftArmType = "Mid">>
			<<set _rightArmType = "Mid">>
		<</if>>
	<</if>>
<</if>>

<<if _artSlave.amp == 0>>
	<<set _art = "Art_Vector_Arm_Right_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_"+_leftArmType >>
	<<include _art>>
<</if>>

<<if _artSlave.amp == 0>>
	<<if _artSlave.muscles >= 6>>
		<<if _leftArmType == "High">>
			<<include Art_Vector_Arm_Left_High_MLight>>
		<<elseif _leftArmType == "Mid">>
			<<include Art_Vector_Arm_Left_Mid_MLight>>
		<<elseif _leftArmType == "Low">>
			<<include Art_Vector_Arm_Left_Low_MLight>>
		<<elseif _leftArmType == "Rebel">>
			<<include Art_Vector_Arm_Left_Rebel_MLight>>
		<</if>>
	<</if>>
	<<if _artSlave.muscles >= 6>>
		<<if _rightArmType == "High">>
			<<include Art_Vector_Arm_Right_High_MLight>>
		<<elseif _rightArmType == "Mid">>
			<<include Art_Vector_Arm_Right_Mid_MLight>>
		<<elseif _rightArmType == "Low">>
			<<include Art_Vector_Arm_Right_Low_MLight>>
		<</if>>
	<</if>>
<</if>>

<<if _artSlave.amp == -1 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
	<<set _art = "Art_Vector_Arm_Right_ProstheticBasic_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_ProstheticBasic_"+_leftArmType >>
	<<include _art>>
<</if>>

<<if _artSlave.amp == -2 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
	<<set _art = "Art_Vector_Arm_Right_ProstheticSexy_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_ProstheticSexy_"+_leftArmType >>
	<<include _art>>
<</if>>

<<if _artSlave.amp == -3 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
/* Reverting beauty limbs to regular SVG */
	<<set _art = "Art_Vector_Arm_Right_ProstheticBeauty_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_ProstheticBeauty_"+_leftArmType >>
	<<include _art>>
<</if>>

<<if _artSlave.amp == -4 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
	<<set _art = "Art_Vector_Arm_Right_ProstheticCombat_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_ProstheticCombat_"+_leftArmType >>
	<<include _art>>
<</if>>

<<if _artSlave.amp == -5 && (_artSlave.PLimb == 1 || _artSlave.PLimb == 2)>>
	<<set _art = "Art_Vector_Arm_Right_ProstheticSwiss_"+_rightArmType >>
	<<include _art>>
	<<set _art = "Art_Vector_Arm_Left_ProstheticSwiss_"+_leftArmType >>
	<<include _art>>
<</if>>

/* shiny clothings */
<<if $seeVectorArtHighlights == 1>>
	<<if _artSlave.fuckdoll != 0 || _artSlave.clothes == "restrictive latex" || _artSlave.clothes == "a latex catsuit" || _artSlave.clothes == "body oil">>
		/* only some arm positions have art (feel free to add more) */
		<<switch _leftArmType>>
		<<case "High">>
			<<include Art_Vector_Arm_Outfit_Shine_Left_High>>
		<<case "Mid">>
		<<include Art_Vector_Arm_Outfit_Shine_Left_Mid>>
		<<case "Low">>
			<<include Art_Vector_Arm_Outfit_Shine_Left_Low>>
		<<default>>
			/* no art for this arm position */
		<</switch>>
	<</if>>
<</if>>

/* TODO: simplify selection (select prefix, infix and suffix and combine instead of using switch statemens) */

<<switch _artSlave.clothes>>

<<case "a hijab and abaya" "cutoffs and a t-shirt" "battledress" "conservative clothing" "a huipil" "a kimono" "a nice maid outfit" "a military uniform" "a nice nurse outfit" "a slutty nurse outfit" "a schoolgirl outfit" "Western clothing" "a slutty qipao" "nice business attire" "slutty business attire" "a schutzstaffel uniform" "a red army uniform" "slutty jewelry" "a cheerleader outfit" "clubslut netting" "battlearmor" "a dirndl" "a biyelgee costume" "lederhosen" "a mounty outfit" "a long qipao" "a klan robe" "a hijab and blouse" "a burkini" "a slutty klan robe" "a button-up shirt" "a button-up shirt and panties" "a t-shirt" "a t-shirt and panties" "a t-shirt and thong" "sport shorts and a t-shirt" "a t-shirt and jeans" "an oversized t-shirt" "an oversized t-shirt and boyshorts" "a sweater" "a sweater and cutoffs" "a sweater and panties" "a police uniform" "a hanbok" "a gothic lolita dress">>
	<<set _rightArmArt = "Art_Vector_Arm_Outfit_" + clothing2artSuffix(_artSlave.clothes) + "_Right_" + _rightArmType>>
	<<set _leftArmArt = "Art_Vector_Arm_Outfit_" + clothing2artSuffix(_artSlave.clothes) + "_Left_" + _leftArmType>>
	<<include _rightArmArt>>
	<<include _leftArmArt>>

<<case "a slutty schutzstaffel uniform">>
	<<set _rightArmArt = "Art_Vector_Arm_Outfit_SchutzstaffelUniform_Right_" + _rightArmType>>
	<<set _leftArmArt = "Art_Vector_Arm_Outfit_SchutzstaffelUniform_Left_" + _leftArmType>>
	<<include _rightArmArt>>
	<<include _leftArmArt>>

<<case "a niqab and abaya" "a burqa">>
	<<set _rightArmArt = "Art_Vector_Arm_Outfit_HijabAndAbaya_Right_" + _rightArmType>>
	<<set _leftArmArt = "Art_Vector_Arm_Outfit_HijabAndAbaya_Left_" + _leftArmType>>
	<<include _rightArmArt>>
	<<include _leftArmArt>>

<<case "a slave gown">>
		/* only some arm positions have art (feel free to add more) */
		<<switch _leftArmType>>
		<<case "High">>
			<<include Art_Vector_Arm_Outfit_SlaveGown_Left_High>>
		<<case "Mid">>
			<<include Art_Vector_Arm_Outfit_SlaveGown_Left_Mid>>
		<<case "Low">>
			<<include Art_Vector_Arm_Outfit_SlaveGown_Left_Low>>
		<<default>>
			/* no art for this arm position */
		<</switch>>

<</switch>>


code:
:: Art_Vector_Body_Clothing_Control_ [nobr]

<<set _eyeBallColor = "#ffffff">>

<<if _artSlave.eyeColor != "">>
	<<if _artSlave.eyeColor.split(" ").length > 1>>
		<<set _eyeLens = _artSlave.eyeColor.split(" ")[0]>>

		<<if _eyeLens == "demonic">>
			<<set _eyeBallColor = _eyeColor>>
		<<elseif _eyeLens == "devilish">>
			<<set _eyeBallColor = "#000000">>
		<</if>>
	<</if>>
<</if>>

<<set _muscles_value = _artSlave.muscles + 101>>
<<set _art_muscle_visibility = 0.910239*Math.log(0.02*_muscles_value) >>

<<set _showEyes = 1>>
<<set _showLips = 1>>
<<set _showMouth = 1>>
<<set _showPubic = 1>>
<<set _showPussy = _artSlave.vagina >= 0>>
<<set _showArmHair = 1>>
<<set _showHair = _artSlave.hStyle != "shaved">>
<<set _showBoobs = 1>>
<<set _showNipples = 1>>
<<set _showArmHighlight = 0>>
<<set _showTorsoHighlight = 0>>
<<set _showLegHighlight = 0>>
<<set _showBoobsHighlight = 0>>
<<set _showEyesHighlight = 1>>
<<set _showHeadHighlight = 1>>
<<set _showBellyPiercings = 1>>
<<set _showNipplePiercings = 1>>
<<set _chastityAnal = _artSlave.dickAccessory == "anal chastity" || _artSlave.dickAccessory == "combined chastity" || _artSlave.vaginalAccessory == "anal chastity" || _artSlave.vaginalAccessory == "combined chastity" >>

<<set _chastityVaginal = _artSlave.vaginalAccessory == "chastity belt" || _artSlave.vaginalAccessory == "combined chastity">>

<<if _artSlave.fuckdoll > 0>>
	<<set _showEyes = 0>>
	<<set _showPubic = 0>>
	<<set _showArmHair = 0>>
	<<set _showHair = 0>>
	<<set _showArmHighlight = 1>>
	<<set _showTorsoHighlight = 1>>
	<<set _showBoobsHighlight = 1>>
	<<set _showLegHighlight = 1>>
	<<set _showHeadHighlight = 1>>
<</if>>

<<if _artSlave.clothes == "a nice maid outfit">>
	<<set _showPubic = 0>>
	<<set _showBoobs = 0>>
	<<set _showBellyPiercings = 0>>
	<<set _showNipplePiercings = 0>>
	<<set _showNipples = 0>>
<</if>>

<<if _artSlave.clothes == "a slutty maid outfit">>
	<<set _showBellyPiercings = 0>>
<</if>>

<<if _artSlave.clothes == "restrictive latex">>
	<<set _showEyes = 0>>
	<<set _showPubic = 0>>
	<<set _showArmHair = 0>>
	<<set _showHair = 0>>
	<<set _showArmHighlight = 1>>
	<<set _showTorsoHighlight = 1>>
	<<set _showLegHighlight = 1>>
	<<set _showHeadHighlight = 1>>
	<<set _showBellyPiercings = 0>>
<</if>>

<<if _artSlave.clothes == "a latex catsuit">>
	<<set _showPubic = 0>>
	<<set _showArmHair = 0>>
	<<set _showArmHighlight = 1>>
	<<set _showTorsoHighlight = 1>>
	<<set _showLegHighlight = 1>>
	<<set _showBoobsHighlight = 1>>
	<<set _showHeadHighlight = 1>>
	<<set _showBellyPiercings = 0>>
	<<set _showNipplePiercings = 0>>
	<<set _chastityAnal = 0>>
	<<set _chastityVaginal = 0>>
<</if>>

<<if $showBodyMods == 0>>
	<<set _showNipplePiercings = 0>>
<</if>>

<<if $seeVectorArtHighlights == 1>>
	<<set _showArmHighlight = 0>>
	<<set _showTorsoHighlight = 0>>
	<<set _showLegHighlight = 0>>
	<<set _showBoobsHighlight = 0>>
<</if>>


code:
:: Art_Vector_Butt_ [nobr]

/* BEWARE: _buttSize is also used in Art_Vector_Leg_ */
/* Updated 2018-10-25 by Fr0g */
/* - changed size calculation block */

/* Size calculations - needs to be done even for amputees */
<<if _artSlave.butt >= 7>>
	<<set _buttSize = 6>>
<<elseif _artSlave.butt >= 6>>
	<<set _buttSize = 5>>
<<elseif _artSlave.butt >= 5>>
	<<set _buttSize = 4>>
	<<elseif _artSlave.butt >= 4>>
	<<set _buttSize = 3>>
	<<elseif _artSlave.butt >= 3>>
	<<set _buttSize = 2>>
	<<elseif _artSlave.butt >= 2>>
	<<set _buttSize = 1>>
	<<else>>
	<<set _buttSize = 0>>
<</if>>

<<if _artSlave.amp == 0>>
	<<set _art = "Art_Vector_Butt_"+_buttSize >>
	<<include _art >>
<</if>>

<<if _artSlave.amp == -1>>
	<<set _art = "Art_Vector_Butt_ProstheticBasic_"+_buttSize >>
	<<include _art >>
<</if>>

<<if _artSlave.amp == -2>>
	<<set _art = "Art_Vector_Butt_ProstheticSexy_"+_buttSize >>
	<<include _art >>
<</if>>

<<if _artSlave.amp == -3>>
/* reverted to regular SVG to match description */
	<<set _art = "Art_Vector_Butt_ProstheticBeauty_"+_buttSize >>
	<<include _art >>
<</if>>

<<if _artSlave.amp == -4>>
	<<set _art = "Art_Vector_Butt_ProstheticCombat_"+_buttSize >>
	<<include _art >>
<</if>>

<<if _artSlave.amp == -5>>
	<<set _art = "Art_Vector_Butt_ProstheticSwiss_"+_buttSize >>
	<<include _art >>
<</if>>


code:
:: Art_Vector_Collar_ [nobr]

/* TODO: find out where "uncomfortable leather" collar art went */

<<switch _artSlave.collar>>
<<case "leather with cowbell">>
<<include Art_Vector_Collar_Cowbell >>
<<case "heavy gold">>
<<include Art_Vector_Collar_Gold_Heavy >>
<<case "neck corset">>
<<include Art_Vector_Collar_Neck_Corset >>
<<case "pretty jewelry">>
<<include Art_Vector_Collar_Pretty_Jewelry >>
<<case "cruel retirement counter">>
<<include Art_Vector_Collar_Retirement_Cruel >>
<<case "nice retirement counter">>
<<include Art_Vector_Collar_Retirement_Nice >>
<<case "satin choker">>
<<include Art_Vector_Collar_Satin_Choker >>
<<case "shock punishment">>
<<include Art_Vector_Collar_Shock_Punishment >>
<<case "stylish leather">>
<<include Art_Vector_Collar_Stylish_Leather >>
<<case "tight steel">>
<<include Art_Vector_Collar_Tight_Steel >>
<<case "uncomfortable leather">>
<<include Art_Vector_Collar_Leather_Cruel >>
<<case "silk ribbon">>
<<include Art_Vector_Collar_Silk_Ribbon >>
<<case "bowtie">>
<<include Art_Vector_Collar_Bowtie >>
<<case "ancient Egyptian">>
<<include Art_Vector_Collar_Ancientegyptian >>
<<default>>
/* collar not supported - don't display anything */
<</switch>>


code:
:: Art_Vector_Generate_Stylesheet_ [nobr]

/* _art_display_class is the style class for this display */
<<if _art_display_id > 0 >>
	<<set _art_display_id += 1>>
<<else>>
	<<set _art_display_id = 1>>
<</if>>
<<set _art_display_class = "ad"+_art_display_id >>

<<print "<style>."+_art_display_class+" {
	position: absolute;
	height: 100%;
	margin-left: auto;
	margin-right: auto;
	left: 0;
	right: 0;
}
."+_art_display_class+" .white   { fill:#FFFFFF; }
."+_art_display_class+" .skin	{ fill:"+_skinColour+"; }
."+_art_display_class+" .head	{ "+_headSkinStyle+"; }
."+_art_display_class+" .torso   { "+_torsoSkinStyle+"; }
."+_art_display_class+" .boob	{ "+_boobSkinStyle+"; }
."+_art_display_class+" .penis   { "+_penisSkinStyle+"; }
."+_art_display_class+" .scrotum { "+_scrotumSkinStyle+"; }
."+_art_display_class+" .belly   { "+_bellySkinStyle+"; }
."+_art_display_class+" .areola  { fill:"+_areolaStyle+"; }
."+_art_display_class+" .bellybutton  { fill:"+_bellybuttonStyle+"; }
."+_art_display_class+" .labia   { fill:"+_labiaStyle+"; }
."+_art_display_class+" .hair	{ fill:"+_hairColour+"; }
."+_art_display_class+" .pubic_hair	 { fill:"+_pubicHairColour+"; }
."+_art_display_class+" .underarm_hair  { fill:"+_underarmHairColour+"; }
."+_art_display_class+" .eyebrow_hair  { fill:"+_eyebrowHairColour+"; }
."+_art_display_class+" .shoe	{ fill:"+_shoeColour+"; }
."+_art_display_class+" .shoe_shadow	{ fill:"+_shoeShadowColour+"; }
."+_art_display_class+" .smart_piercing { fill:#4DB748; }
."+_art_display_class+" .steel_piercing { fill:#787878; }
."+_art_display_class+" .steel_chastity { fill:#BABABA; }
."+_art_display_class+" .outfit_base  { fill:"+_outfitBaseColour+"; }
."+_art_display_class+" .gag	 { fill:#BF2126; }
."+_art_display_class+" .shadow  { fill:#010101; }
."+_art_display_class+" .glasses { fill:"+_glassesColor+"; }
."+_art_display_class+" .eye	 { fill:"+_eyeColor+"; }
."+_art_display_class+" .sclera	 { fill:"+_sclerae+"; }
</style>" >>


code:
:: Art_Vector_Hair_Back_ [nobr]

<<if _artSlave.fuckdoll != 0 || _artSlave.bald != 0>>
	<<include Art_Vector_Hair_Back_NoHair>>
<<else>>
	<<if _artSlave.clothes != "restrictive latex" && _artSlave.clothes != "a hijab and abaya" && _artSlave.clothes != "a chattel habit" && _artSlave.clothes != "a fallen nuns habit" && _artSlave.clothes != "a penitent nuns habit" && _artSlave.clothes != "a cybersuit" && _artSlave.clothes != "Western clothing" && _artSlave.clothes != "a military uniform" && _artSlave.clothes != "a schutzstaffel uniform" && _artSlave.clothes != "a slutty schutzstaffel uniform" && _artSlave.clothes != "a red army uniform" && _artSlave.clothes != "battlearmor" && _artSlave.clothes != "a biyelgee costume" && _artSlave.clothes != "a mounty outfit" && _artSlave.clothes != "a slutty nurse outfit" && _artSlave.clothes != "a niqab and abaya" && _artSlave.clothes != "a burqa" && _artSlave.clothes != "a klan robe" && _artSlave.clothes != "a hijab and blouse" && _artSlave.clothes != "a burkini" && _artSlave.clothes != "a slutty klan robe" && _artSlave.clothes != "a police uniform">>
		<<switch _artSlave.hStyle>>
		<<case "buzzcut" "shaved" "shaved bald">>
			<<include Art_Vector_Hair_Back_NoHair>>
		<<case "strip">>
			<<if _artSlave.hLength >=0>>
				<<include Art_Vector_Hair_Back_NoHair>>
			<</if>>
		<<case "permed">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Permed_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Permed_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Permed_Short>>
			<</if>>
		<<case "up">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Up_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Up_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Up_Short>>
			<</if>>
		<<case "neat">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Neat_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Neat_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Neat_Short>>
			<</if>>
		<<case "ponytail">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Ponytail_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Ponytail_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Ponytail_Short>>
			<</if>>
		<<case "bun">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Bun_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Bun_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Bun_Short>>
			<</if>>
		<<case "curled">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Curled_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Curled_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Curled_Short>>
			<</if>>
		<<case "eary">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Eary_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Eary_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Eary_Short>>
			<</if>>
		<<case "luxurious">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Luxurious_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Luxurious_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Luxurious_Short>>
			<</if>>
		<<case "afro">>
			<<if _artSlave.hLength >= 150>>
				<<include Art_Vector_Hair_Back_Afro_Giant>>
			<<elseif _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Afro_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Afro_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Afro_Short>>
			<</if>>
		<<case "messy">> /* this isn't an option in salon.tw. What should it be? */
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Messy_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Messy_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Messy_Short>>
			<</if>>
		<<case "dreadlocks">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Dreadlocks_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Dreadlocks_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Dreadlocks_Short>>
			<</if>>
		<<case "cornrows">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Cornrows_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Cornrows_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Cornrows_Short>>
			<</if>>
		<<case "braided">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Braided_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Braided_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Braided_Short>>
			<</if>>
		<<case "tails">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Tails_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Tails_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Tails_Short>>
			<</if>>
		<<case "messy bun">>
			<<if _artSlave.hLength >= 60>>
				<<include Art_Vector_Hair_Back_Ninja_Long>>
			<<elseif _artSlave.hLength >= 30>>
				<<include Art_Vector_Hair_Back_Ninja_Medium>>
			<<elseif _artSlave.hLength >= 10>>
				<<include Art_Vector_Hair_Back_Ninja_Short>>
			<</if>>
		<<default>>
			<<include Art_Vector_Hair_Back_Messy_Medium>>
		<</switch>>
	<</if>>
<</if>>

/* note: latex clothing actually shows some hair, but there is no appropriate art for it */

<<if _artSlave.collar == "cat ears">>
	<<include Art_Vector_Cat_Ear_Back>>
<</if>>