code:
:: Docks Sneak Start
<<effects>><<set $lock to 400>>

<<generate1>><<person1>>
You see a security guard at the gate, resting <<his>> feet on <<his>> desk and playing with <<his>> phone.

Despite <<his>> distraction, <<he>> would spot you if you approached. There's a smaller gate to the side, but it's padlocked shut.
<<if $skulduggery gte $lock>>
	The lock looks easy to pick.

	<<link [[Break in (0:05)|Docks Sneak Pick]]>><<pass 5>><<crimeup 1>><<endevent>><</link>><<crime>>

<<else>>
	The lock looks beyond your ability to pick.
	<<skulduggeryrequired>>

<</if>>

<<link [[Leave|Docks]]>><<endevent>><<set $bus to "mer">><</link>>

:: Docks Sneak Pick
<<effects>>

You successfully pick the lock, and sneak into restricted area of the docks.

<<link [[Next|Docks Sneak]]>><</link>>

:: Docks Sneak
<<effects>>
<<skul_dock_init>>
You are on the docks.

<<if $stress gte $stressmax>>
	/*ToDo: Pregnancy, remove $pregnancyTesting to properly enable*/
	<<if $sexStats.vagina.pregnancy.waterBreaking is true and $pregnancyTesting>>
		<<pregnancyWatersBrokenPassout "docksSneak">>
	<<else>>
		You've pushed yourself too much.

		<<passout>>
		<<set $danger to random(1, 10000)>>
		<<if $danger gte (9900 - $allure)>>
			<<link [[Next|Passout Docks]]>><</link>>

		<<else>>
			<<ambulance>>
		<</if>>
	<</if>>
<<elseif $daystate isnot "night">>
	The sun appears over the horizon. You hear voices from the entrance, and a clank of metal. The first workers are arriving for the day.

	<<pass 5>>
	You won't be able to steal anything in daylight.
	<<if $exposed gte 1>>
		You sneak back to the entrance, hoping to keep your <<lewdness>> concealed. You make it through the side gate without being spotted.
	<<else>>
		You walk back to the entrance. No one pays you much attention.
	<</if>>

	<<link [[Next|Docks]]>><<set $bus to "mer">><</link>>

<<elseif $eventskip is 0>>
	<<events_skul_dock>>
<<else>>
	<<switch $bus>>
	<<case "NW">>
		You sneak beside the anchored ship.
	<<case "N">>
		You sneak aboard the gangway leading atop the anchored ship.
	<<case "NE">>
		You sneak to the warehouse at the water's edge. It's full of machinery, but many containers are stacked high outside.
	<<case "W">>
		You sneak between the inert cranes.
	<<case "M">>
		You sneak between two stacks of cargo containers that tower above you.
	<<case "E">>
		You sneak beside the office building.
	<<case "SW">>
		You sneak through the lorry unloading area. Several vehicles are being stored here overnight.
	<<case "S">>
		You sneak past the front gate.
	<<case "SE">>
		You sneak through the open car park.
	<</switch>>

	<<dock_security_text>>

	<<if $skul_dock[$bus].state is "empty">>
		You've searched the containers here.

	<<elseif $skul_dock[$bus].state is "known" and $skul_dock[$bus].contents is "none">>
		The containers here hold nothing of value to you.

	<<else>>
		<<link [[Break into the containers (0:30)|Docks Search]]>><<crimeup>><<dock_security 1>><</link>><<crime>><<gsecurity>><<skul_dock_state $bus>>

	<</if>>
	<<skul_dock_nav>>
	<<if $bus is "NW" or $bus is "N" or $bus is "NE">>
		<<link [[Dive into the sea|Docks Dive]]>><</link>>

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

<<set $eventskip to 0>>

:: Docks Search
<<effects>>
<<skul_dock_init>>
The containers are virtually identical. One by one, you pick the padlocks and enter the containers.

<<if $skulduggery lt 500>>
	<<skulduggeryskilluse>>
<<else>>
	There's nothing more you can learn from locks this simple.
<</if>>

<<set $rng to random(1, 6)>>
<<if $rng is 1>>
	You find lots of construction materials.
<<elseif $rng is 2>>
	You find lots of fruit and vegetables.
<<elseif $rng is 3>>
	You find lots of farming equipment.
<<elseif $rng is 4>>
	You find lots of vehicle parts.
<<elseif $rng is 5>>
	They're all empty.
<<else>>
	You find barrels of crude oil.
<</if>>
<<if $rng isnot 5>>
	Valuable in bulk, but you can't carry much.
<</if>>

<<if $skul_dock[$bus].contents is "gold">>
	<<if $skul_dock[$bus].state is "known">>
		You know there's gold here somewhere. You break into another. It's full of brown packages. You recognise them. You search among them, and then you find it. It's heavier than the others. You tear it open, and find the small bar of gold.

		<<earnFeat "Employee Benefits">>
		<<link [[Take it|Docks Gold]]>><<crimeup 3000>><<set $blackmoney += 3000>><</link>><<crime>>

	<<else>>
		You keep searching, and come to a container full of brown packages.

		<<link [[Search carefully (1:00)|Docks Gold Careful]]>><<pass 60>><</link>>

		<<link [[Tear into them (0:05)|Docks Gold Tear]]>><<crimeup 100>><<pass 5>><</link>><<crime>>

	<</if>>

<<elseif $skul_dock[$bus].contents is "aphrodisiacs">>
	<<if $skul_dock[$bus].state is "known">>
		You know that strange fluid is here somewhere. You break into another, and a purple light greets you. A number of canisters sit inside, marked with hazard warnings. But only one emits light. The strange fluid swirls behind the glass.

	<<else>>
		You keep searching. You break into another, and a purple light greets you. A number of canisters sit inside, marked with hazard warnings. But only one emits light. A strange fluid swirls behind the glass.

	<</if>>

	<<link [[Take it|Docks Aphrodisiacs]]>><<crimeup 1200>><<set $blackmoney += 1200>><</link>><<crime>>

<<elseif $skul_dock[$bus].contents is "electronics">>
	<<if $skul_dock[$bus].state is "known">>
		You know that one of these hold something you can actually carry. You break into another. The interior is loaded with electronic goods. The televisions are too big to carry, but there are smaller items as well. You won't get their full value on the black market, but they should be valuable enough to be worth the trouble.

	<<else>>
		You search another. The interior is loaded with electronic goods. Televisions, speakers, most too big to carry. But there are smaller items as well. You won't get their full value on the black market, but they should be valuable enough to be worth the trouble.

	<</if>>

	<<link [[Take them|Docks Electronics]]>><<crimeup 300>><<set $blackmoney += 300>><</link>><<crime>>

<<elseif $skul_dock[$bus].contents is "fertiliser">>
	<<if $tending gte 400>>
		<<if $skul_dock[$bus].state is "known">>
			You know that one of these hold something you can actually carry. You break into another. The interior is loaded with fertiliser bags. While you know you can't carry much, you do know that having some on hand may be useful to you.

		<<else>>
			You search another. The interior is loaded with bags of fertiliser. While you know you can't carry much, having some on hand might be useful.

		<</if>>
		<<link [[Take some|Docks fertiliser]]>><<crimeup 200>><<set $fertiliser.current++>><</link>><<crime>>
	<<else>>
		You search another. The interior is loaded with bags of what looks like dirt filled inside.

	<</if>>

<<elseif $skul_dock[$bus].contents is "equipment">>
	<<if $skul_dock[$bus].state is "known">>
		You know there's specialist equipment here. You break into another. The interior is full of crates stamped with a pink symbol. The light catches on something in the back.

	<<else>>
		You search another. The interior is full of crates stamped with a pink symbol. The light catches on something in the back. A black catsuit.

	<</if>>

	<<link [[Next|Docks Catsuit]]>><</link>>

<<else>>
	You open the final container. It's empty.

<</if>>

<<link [[Leave|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<<set $skul_dock[$bus].state to "empty">>
<<pass 30>>

:: Docks Gold
<<effects>>

You pocket the gold, and leave the container. It'll be worth a lot on the black market.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Gold Careful
<<effects>>

You try to guess at the contents of each package. You don't want to draw more attention than necessary, after all. Most are light. Mostly cheap plastic tat, you think. Until you lift a small parcel that's heavier than the others.

You open it, just enough to peek inside. A yellow glint greets you. It's a small bar of gold.

<<link [[Take it|Docks Gold]]>><<crimeup 3000>><<set $blackmoney += 3000>><</link>><<crime>>

<<link [[Leave it|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Gold Tear
<<effects>>

You tear into the first package. Cheap toys. You tear into the next, and the next. Mostly cheap plastic tat. Nothing of value. At first.

You open a heavy parcel. The contents clatter to the floor. It's a small bar of gold.

<<link [[Take it|Docks Gold]]>><<crimeup 3000>><<set $blackmoney += 3000>><</link>><<crime>>

<<link [[Leave it|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Aphrodisiacs
<<effects>>

You take the strange fluid, and leave the container.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Electronics
<<effects>>

You snatch all the phones, cameras, and other smaller devices, and leave the container.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks fertiliser
<<effects>>

You grab a bag of fertiliser, and leave the container.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Catsuit
<<effects>>

<<npc Wren>><<person1>>
<<if $wren_seen is "cards">>
	You hear a click, and the end of a pistol emerges from the dark. A <<personsimple>> with <<if $pronoun is "m">>short<<else>>shoulder-length<</if>> hair follows. It's Wren. "Not who I was expecting," <<he>> says, lowering <<his>> gun. <<covered>>

	<<if $exposed gte 1>>
		<<He>> laughs. "You seem prone to losing your clothes, but you're in the right place." <<He>> points <<his>> gun at the black catsuit. "Should fit you."
	<<else>>
		"And here I thought you were just some <<girl>> in over <<pher>> head," <<he>> says. "Or did Bailey send you? Either way, I won't interfere." <<He>> points <<his>> gun at the black catsuit. "Should fit."
	<</if>>

	"Hope you visit the estate soon," <<he>> says as <<he>> brushes past you. "Work keeps me busy, and it's good to let my hair down."

	<<He>> disappears into the night. You turn back to the catsuit.

<<elseif $wren_seen is "prison">>
	You hear a click, and the end of a pistol emerges from the dark. A <<personsimple>> with <<if $pronoun is "m">>short<<else>>shoulder-length<</if>> hair follows. It's Wren. "Not who I was expecting," <<he>> says, lowering <<his>> gun. <<covered>>

	<<if $exposed gte 1>>
		<<He>> laughs. "I'm afraid I have nothing for sale, but you're in the right place." <<He>> points <<his>> gun at the black catsuit. "Should fit you."
	<<else>>
		"I'm shocked prison didn't reform you. Shocked." <<He>> points <<his>> gun at the black catsuit. "Should fit."
	<</if>>

	"Hope you stay a step ahead of them," <<he>> says as <<he>> brushes past you. "Work keeps me busy, but I look forward to meeting again."

	<<He>> disappears into the night. You turn back to the catsuit.

<<else>>
	You hear a click, and the end of a pistol emerges from the dark. A <<personsimple>> with <<if $pronoun is "m">>short<<else>>shoulder-length<</if>> hair follows. "Well well," <<he>> says. "Not who I was expecting." <<He>> lowers <<his>> gun, and examines you from head to toe. <<covered>>

	<<if $exposed gte 1>>
		The <<personsimple>> laughs. "You're in the right place." <<He>> points <<his>> gun at the black catsuit. "Should fit you."
	<<else>>
		"Thought I knew all the rats in town," <<he>> says. "I won't stop you." <<He>> points <<his>> gun at the black catsuit. "Should fit."
	<</if>>

	"The name's Wren," <<he>> says as <<he>> brushes past you. "Work keeps me busy, but maybe we'll meet again."

	<<He>> disappears into the night. You turn back to the catsuit.

<</if>>

<<endevent>>

<<set $wren_seen to "catsuit">>
<<link [[Wear it|Docks Catsuit Wear]]>><</link>>

<<link [[Take it|Docks Catsuit Take]]>><</link>>

:: Docks Catsuit Wear
<<effects>>

<<set $catsuit_found to true>>
<<upperwear 75 black>>

It's tight, but you pull on the catsuit. It hugs your skin, and shows off your figure.

You'll leave fewer traces of yourself while wearing the catsuit. Crime will increase more slowly.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Catsuit Take
<<effects>>

<<set $catsuit_found to true>>
<<uppersend 75 wardrobe black>>

You take the catsuit. It might be handy later.

You'll leave fewer traces of yourself while wearing the catsuit. Crime will increase more slowly.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Hide
<<effects>>

You try to break into one of the cargo containers.

<<skulduggerycheck>>
<<if $skulduggerysuccess is 1>>

	You manage to pick the padlock just in time. You close it behind you, and wait for the sound of footsteps to pass.

	<<if $skulduggery lte ($skulduggerydifficulty + 100)>>
		<<skulduggeryskilluse>>
	<<else>>
		That was too easy. You didn't learn anything.

	<</if>>

	<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

<<else>>

	You're still fumbling, when a <<person>> walks around the corner. <<He>> drops the torch in surprise, and reaches for <<his>> radio. You turn and run.<<gsecurity>><<dock_security 1>>

	<<if $skulduggery lte ($skulduggerydifficulty + 100)>>
		<<skulduggeryskilluse>>
	<<else>>
		That was too easy. You didn't learn anything.

	<</if>>
	<<athleticsdifficulty 1 1100 true>>
	<<if $athleticsSuccess>>
		The guard chases after you, but you manage to outpace <<him>>.<<gtiredness>><<gstress>><<stress 6>><<tiredness 6>>

		<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

	<<else>>
		The guard chases after you, and gains ground, until <<he>> manages to tackle you to the floor.<<gpain>><<gstress>><<pain 4>><<stress 6>>

		"Gotcha," <<he>> says, pinning you. "Backup will be here soon." <<He>> leans closer. "But first, how's about a little fun?"

		<<link [[Next|Docks Sneak Rape]]>><<set $molestationstart to 1>><</link>>

	<</if>>

<</if>>

:: Docks Run
<<effects>>

You turn and run. You've almost made it around the corner when you hear a <<personsimple>>'s voice call behind you.

"Stop!" <<he>> shouts. You glance back. The <<person>> reaches for a radio, <<his>> torch discarded, as <<he>> runs after you. You have enough of a lead, and manage to lose <<him>> in the maze of containers.

<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

:: Docks Squeeze
<<effects>>

You squeeze between two containers, and escape to the other side.

<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

:: Docks Sneak Rape
<<effects>>

<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>

	<<maninit>>

<</if>>

<<effects>>

<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $enemyhealth lte 0>>
	<<link [[Next|Docks Sneak Rape Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Docks Sneak Rape Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Docks Sneak Rape]]>><</link>><<nexttext>>
<</if>>

:: Docks Sneak Rape Finish
<<effects>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	The <<person>> pushes you in front of <<him>>. "They'll be here soon," <<he>> says. "To take you off my hands."

	<<clotheson>>
	<<endcombat>>

	The guard is right. Two others, a <<generate1>><<person1>><<person>> and <<generate2>><<person2>><<person>>, walk around the corner.
	<<if $exposed gte 1>>
		You feel them ogle your <<nudity>>. <<covered>>
	<</if>>

	"What do we have here?" the <<person1>><<person>> asks, grasping one of your arms.

	"A scoundrel by the looks of it," the <<person2>><<person>> replies, grasping your other. Together they pull you towards the entrance.

	<<link [[Next|Docks Caught]]>><</link>>

<<else>>
	You kick the <<person>> away from you. <<His>> back collides with metal, and <<he>> falls to the ground.

	<<tearful>> you seize the opportunity. You run, and manage to lose <<him>> in the maze of containers.

	<<clotheson>>
	<<endcombat>>
	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<</if>>

:: Docks Caught
<<effects>>

You're sat in the guardhouse beside the front gate. The <<person1>><<person>> watches you while the <<person2>><<person>> phones the police.

<<if $crime gte 5000>>
	"Is that so?" <<he>> says. "Alright. We'll keep <<phim>> here." <<He>> hangs up. "Looks like there's a warrant out for your arrest. You've been a naughty <<girl>>."

	<<link [[Wait (0:10)|Docks Caught Wait]]>><<pass 10>><</link>>

	<<link [[Run for it|Docks Caught Run]]>><<crimeup 100>><</link>><<athleticsdifficulty 600 1200>><<crime>>

<<elseif $crime gte 1000>>
	"Is that so?" <<he>> says. "Alright. We'll keep <<phim>> here." <<He>> hangs up. "Looks like there's a warrant out for your arrest. From the sounds of it, you've been a bit of a nuisance."

	<<link [[Wait (0:10)|Docks Caught Wait]]>><<pass 10>><</link>>

	<<link [[Run for it|Docks Caught Run]]>><<crimeup 100>><</link>><<athleticsdifficulty 600 1200>><<crime>>

<<else>>
	"Right," <<he>> says. "Alright." <<He>> hangs up. "Looks like you're not worth the trouble. Lucky you."

	<<if $exposed gte 1>>
		They give you some towels, and escort you through the gate.
		<<towelup>>
	<<else>>
		They escort you through the gate.
	<</if>> "I don't want to catch you tresspassing again," the <<person1>><<person>> says. "Go on. Off with you."

	<<endcombat>>

	<<link [[Next|Docks]]>><</link>>

<</if>>

:: Docks Caught Wait
<<effects>>

<<if $exposed gte 1>>
	You wait in the guardhouse, trying to ignore the <<person1>><<persons>> leering gaze. You hear a car pull up outside.
<<else>>
	You wait in the guardhouse, until you hear a car pull up outside.
<</if>>

"It's them," the <<person2>><<person>> says, pulling you to your feet. "Hope they don't go too easy on you." You're pushed outside, where two police officers wait.

<<link [[Next|Hospital Arrest Journey]]>><<endcombat>><<generate1>><<generate2>><<person1>><</link>>

:: Docks Caught Run
<<effects>>

You jump from your seat, and run for the door.
<<if $athleticsSuccess>>
	The <<person1>><<person>> tries to grab you, but you're too quick. You escape the guardhouse. Security gives chase, but you lose them in the maze of cargo containers.

	<<link [[Next|Docks Sneak]]>><<endcombat>><<set $eventskip to 1>><</link>>

<<else>>
	The <<person1>><<person>> tries to grab you, and manages to catch your waist with <<his>> arm. <<He>> and the <<person2>><<person>> make sure you can't run again.

	<<pass 10>>
	<<if $exposed gte 1>>
		You wait in the guardhouse, trying to ignore the <<person1>><<persons>> leering gaze. You hear a car pull up outside.
	<<else>>
		You wait in the guardhouse, until you hear a car pull up outside.
	<</if>>

	"It's them," the <<person2>><<person>> says, pulling you to your feet. "Hope they don't go too easy on you." You're pushed outside, where two police officers wait.

	<<link [[Next|Hospital Arrest Journey]]>><<endcombat>><<generate1>><<generate2>><<person1>><</link>>

<</if>>

:: Docks Sacrifice
<<effects>>

You remove your
<<if $phase is 0>>
	$worn.upper.name
	<<upperruined>><<lowerruined>>
<<elseif $phase is 1>>
	$worn.upper.name
	<<upperruined>>
<<elseif $phase is 2>>
	$worn.lower.name
	<<lowerruined>>
<<elseif $phase is 3>>
	$worn.under_upper.name
	<<underupperruined>><<underlowerruined>>
<<elseif $phase is 4>>
	$worn.under_upper.name
	<<underupperruined>>
<<else>>
	$worn.under_lower.name
	<<underlowerruined>>
<</if>>
and hurl the fabric atop a two story stack of cargo containers.

<<generate1>><<person1>>
You run before the

<<if $dock_dog is "girl">>
	doggirl arrives.

	"Up there!" you hear her shout soon after.

<<elseif $dock_dog is "boy">>
	dogboy arrives.

	"Up there!" you hear him shout soon after.

<<else>>
	dog arrives. You hear it bark soon after.

<</if>>
"Gonna need a ladder then," answers a <<personsimple>>'s voice. <<He>> sounds resigned.

That should keep them distracted.

<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><<unset $dock_dog>><</link>>

:: Docks Ambush
<<effects>>

You wait around the corner, listening for the patter of feet.

<<if $dock_dog is "girl">>
	The doggirl should arrive soon. You'll need to subdue her before help arrives.

	You pounce as soon as she appears. "Intruder!" she shouts.

	<<if $monster is 1 or $bestialitydisable is "f">>
		<<link [[Next|Docks Dog]]>><<set $molestationstart to 1>><</link>>

	<<else>>
		<<beastescape>>
		It's a struggle, but you manage to cow her into rolling onto her back in submission, and escape before help arrives. That should keep them off your trail for now.

		<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><<unset $dock_dog>><</link>>

	<</if>>
<<elseif $dock_dog is "boy">>
	The dogboy should arrive soon. You'll need to subdue him before help arrives.

	You pounce as soon as he appears. "Intruder!" he shouts.

	<<if $monster is 1 or $bestialitydisable is "f">>
		<<link [[Next|Docks Dog]]>><<set $molestationstart to 1>><</link>>

	<<else>>
		<<beastescape>>
		It's a struggle, but you manage to cow him into rolling onto his back in submission, and escape before help arrives. That should keep them off your trail for now.

		<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><<unset $dock_dog>><</link>>

	<</if>>
<<else>>
	The dog should arrive soon. You'll need to subdue it before help arrives.

	You pounce as soon as it appears.

	<<if $bestialitydisable is "f">>
		<<link [[Next|Docks Dog]]>><<set $molestationstart to 1>><</link>>

	<<else>>
		<<beastescape>>
		It's a struggle, but you manage to cow it into rolling onto its back in submission, and escape before help arrives. That should keep them off your trail for now.

		<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><<unset $dock_dog>><</link>>

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

:: Docks Dog
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>

	<<if $dock_dog is "girl">>
		<<if $dgchance gte random(1, 100)>>
			<<beastNEWinit 1 dog f penis monster>>
		<<else>>
			<<beastNEWinit 1 dog f vagina monster>>
		<</if>>
	<<elseif $dock_dog is "boy">>
		<<if $cbchance gte random(1, 100)>>
			<<beastNEWinit 1 dog m vagina monster>>
		<<else>>
			<<beastNEWinit 1 dog m penis monster>>
		<</if>>
	<<elseif $dock_dog is "dog">>
		<<beastNEWinit 1 dog m penis beast>>
	<<else>>
		<<beastNEWinit 1 dog f vagina beast>>
	<</if>>
	<<beastCombatInit>>
	<<set $timer to 10>>
<</if>>

<<effects>>
<<effectsman>>

<<beast $enemyno>>

<<stateman>>

<<actionsman>>

<<if $enemyhealth lte 0>>
	<<link [[Next|Docks Dog Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Docks Dog Finish]]>><</link>><<nexttext>>
<<elseif $timer lte 0>>
	<<link [[Next|Docks Dog Finish]]>><</link>><<nexttext>>
<<else>>
	<<link "Next">><><</link>><<nexttext>>
<</if>>

:: Docks Dog Finish
<<effects>>

<<if $enemyarousal gte $enemyarousalmax>>

	<<beastejaculation knot>>

	<<if _knotted is true>>
		<<set $dock_knot to true>>
		You remain knotted together as footsteps draw closer.

		<<endcombat>>
		<<link [[Next|Docks Knot]]>><</link>>

	<<else>>
		The <<if $dock_dog is "girl">>doggirl<<elseif $dock_dog is "boy">>dogboy<<else>>dog<</if>> lies panting on the ground. That should keep them off your trail for a while.

		<<tearful>> you flee into the maze of containers.

		<<clotheson>>
		<<endcombat>>

		<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><<unset $dock_dog>><</link>>

	<</if>>
<<elseif $enemyhealth lte 0>>

	The <<if $dock_dog is "girl">>doggirl rolls onto her back in submission<<elseif $dock_dog is "boy">>dogboy rolls onto his back in submission.<<else>>dog rolls onto its back in submission.<</if>>

	<<tearful>> you gather yourself.

	<<clotheson>>
	<<endcombat>>

	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><<unset $dock_dog>><</link>>

<<else>>

	<<endcombat>>
	<<generate1>><<person1>>
	"What do we have here?" says a <<person>>.

	<<if $anusfucked is 1 or $vaginafucked is 1 or $penisfucked is 1>>
		<<famebestiality 1>>
		<<He>> shines a torch on you, and laughs. "Looks like you got more than you hoped for." You try to stand, but the <<if $dock_dog is "girl">>doggirl uses her weight<<elseif $dock_dog is "boy">>dogboy uses his weight<<else>>dog uses its weight<</if>> to force you back down.

		The <<person1>><<person>> reaches for his radio. "Yeah," <<he>> says. "I got the intruder. You're gonna want to see this. Bring everyone."

		<<if $submissive gte 1500>>
			<<link [[Beg|Docks Beg]]>><><</link>><<submissivetext>>

		<</if>>
		<<link [[Plead|Docks Plead]]>><</link>>

		<<link [[Remain silent|Docks Silent]]>><</link>>

	<<else>>
		<<He>> shines a torch on you, and laughs.
		<<if $dock_dog is "girl">>
			"Easy girl," <<he>> says, grabbing the doggirl by the collar and pulling her off you. "You'll get a treat later." She practically jumps with joy.
		<<elseif $dock_dog is "boy">>
			"Easy boy," <<he>> says, grabbing the dogboy by the collar and pulling him off you. "You'll get a treat later." He practically jumps with joy.
		<<elseif $dock_dog is "dog">>
			"Easy boy," <<he>> says, grabbing the dog by the collar and pulling it off you. "You'll get a treat later." It barks with joy.
		<<else>>
			"Easy girl," <<he>> says, grabbing the dog by the collar and pulling it off you. "You'll get a treat later." It barks with joy.
		<</if>>

		<<generate2>>
		"As for you," the <<person>> continues, turning to face you again just as another guard, a <<person2>><<person>>, arrives. "You're coming with us."

		They grasp your arms, haul you to your feet, and drag you through the maze of containers.
		<<if $exposed gte 1>>
			You feel them ogle your <<nudity>>. <<covered>>
		<</if>>

		<<link [[Next|Docks Caught]]>><<clotheson>><<unset $dock_dog>><</link>>

	<</if>>

<</if>>

:: Docks Knot
<<effects>>

<<generate1>><<person1>>
"What do we have here?" says a <<person>>. You try to pull free, but the knot holds you tight.

<<famebestiality 1>>
<<He>> shines a torch on you, and laughs. "Looks like you got more than you hoped for." You try to stand again, but the <<if $dock_dog is "girl">>doggirl uses her weight<<elseif $dock_dog is "boy">>dogboy uses his weight<<else>>dog uses its weight<</if>> to force you back down.

The <<person1>><<person>> reaches for his radio. "Yeah," <<he>> says. "I got the intruder. You're gonna want to see this. Bring everyone."

<<if $submissive gte 1500>>
	<<link [[Beg|Docks Beg]]>><><<unset $dock_knot>><</link>>

<</if>>
<<link [[Plead|Docks Plead]]>><</link>>

<<link [[Remain silent|Docks Silent]]>><</link>>

:: Docks Beg
<<effects>>

"P-please help me," you whimper. "I didn't mean to be bad. I just got lost. I-I-I don't want more people to see me."

The <<person1>><<person>> hesitates, then reaches for <<his>> radio once more. "Me again. False alarm. I got the intruder, but you don't need to bring anyone else. Alright." <<He>> sighs as <<he>>

<<if $dock_dog is "girl">>
	grabs the doggirl by the collar and pulling her off you. "You'll get a treat later." She practically jumps with joy.
<<elseif $dock_dog is "boy">>
	grabs the dogboy by the collar and pulling him off you. "You'll get a treat later." He practically jumps with joy.
<<elseif $dock_dog is "dog">>
	grabs the dog by the collar and pulling it off you. "You'll get a treat later." It barks with joy.
<<else>>
	grabs the dog by the collar and pulling it off you. "You'll get a treat later." It barks with joy.
<</if>>

<<generate2>>
"As for you," the <<person>> continues, turning to face you again just as another guard, a <<person2>><<person>>, arrives. "You're coming with us."

They grasp your arms, haul you to your feet, and drag you through the maze of containers.
<<if $exposed gte 1>>
	You feel them ogle your <<nudity>>. <<covered>>
<</if>>

<<link [[Next|Docks Caught]]>><<clotheson>><<unset $dock_dog>><</link>>

:: Docks Plead
<<effects>>

<<if $submissive gte 1150>>
	"P-please help me," you say.
<<elseif $submissive lte 850>>
	"Get this thing off me," you say. "At once."
<<else>>
	"Please help me," you say.
<</if>>

The <<person1>><<person>> laughs. "Sure," <<he>> reaches into <<his>> pocket. "Once I have backup." <<He>> pulls out <<his>> phone. "And proper evidence of your trespassing."

<<link [[Next|Docks Watch]]>><</link>>

:: Docks Silent
<<effects>>

You remain silent as the <<person1>><<person>> reaches into <<his>> pocket, and pulls out <<his>> phone.

<<link [[Next|Docks Watch]]>><</link>>

:: Docks Watch
<<effects>>

<<generate2>><<generate3>><<generate4>><<generate5>><<generate6>>

More footsteps. You make a final, weak attempt to pull away from the <<if $dock_dog is "girl">>doggirl<<elseif $dock_dog is "boy">>doggirl<<else>>dog<</if>>, but it's no use. You're soon surrounded. They watch as the <<if $dock_dog is "girl">>doggirl<<elseif $dock_dog is "boy">>dogboy<<else>>dog<</if>> fucks you.<<ggtrauma>><<ggstress>><<trauma 12>><<stress 12>>

"I can't believe it."

"How humiliating."

"That'll teach <<phim>> for trespassing."

"I bet <<pshe>> loves getting fucked by a dog."

More phones emerge from pockets as they continue to make degrading comments.

<<if $dock_knot is true>>
	<<unset $dock_knot>>
	At last, the knot shrinks enough for the
	<<if $dock_dog is "girl">>
		doggirl to wiggle free. The audience cheer, but they're not finished. They goad and encourage her to mount you again. It works. The doggirl leaps atop you once more.

	<<elseif $dock_dog is "boy">>
		dogboy to wiggle free. The audience cheer, but they're not finished. They goad and encourage him to mount you again. It works. The dogboy leaps atop you once more.

	<<else>>
		dog to wiggle free. The audience cheer, but they're not finished. They goad and encourage it to mount you again. It works. The dog leaps atop you once more.

	<</if>>

<<else>>
	<<if $dock_dog is "girl">>
		At last, the doggirl releases you, accompanied by a cheer from the audience. They goad and encourage her to mount you again. It works. The doggirl leaps atop you once more.
	<<elseif $dock_dog is "boy">>
		At last, the dogboy releases you, accompanied by a cheer from the audience. They goad and encourage him to mount you again. It works. The dogboy leaps atop you once more.
	<<else>>
		At last, the dog releases you, accompanied by a cheer from the audience. They goad and encourage it to mount you again. It works. The dog leaps atop you once more.
	<</if>>
<</if>>

<<endevent>>
<<link [[Next|Docks Watch Dog]]>><<set $molestationstart to 1>><</link>>

:: Docks Watch Dog
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>

	<<if $dock_dog is "girl">>
		<<if $dgchance gte random(1, 100)>>
			<<beastNEWinit 1 dog f penis monster>>
		<<else>>
			<<beastNEWinit 1 dog f vagina monster>>
		<</if>>
	<<elseif $dock_dog is "boy">>
		<<if $cbchance gte random(1, 100)>>
			<<beastNEWinit 1 dog m vagina monster>>
		<<else>>
			<<beastNEWinit 1 dog m penis monster>>
		<</if>>
	<<elseif $dock_dog is "dog">>
		<<beastNEWinit 1 dog m penis beast>>
	<<else>>
		<<beastNEWinit 1 dog f vagina beast>>
	<</if>>
	<<beastCombatInit>>
	<<set $timer to 10>>
<</if>>

<<effects>>
<<effectsman>>

<<beast $enemyno>>

<<audience>>

<<stateman>>

<<actionsman>>

<<if $enemyhealth lte 0>>
	<<link [[Next|Docks Watch Dog Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Docks Watch Dog Finish]]>><</link>><<nexttext>>
<<else>>
	<<link "Next">><><</link>><<nexttext>>
<</if>>

:: Docks Watch Dog Finish
<<effects>>

<<if $enemyarousal gte $enemyarousalmax>>

	<<beastejaculation>>

	The assembled guards cheer as the creature cums. One grasps the <<if $dock_dog is "girl">>doggirl<<elseif $dock_dog is "boy">>dogboy<<else>>dog<</if>>, and pulls it away from you.

<<else>>

	The <<if $dock_dog is "girl">>doggirl<<elseif $dock_dog is "boy">>dogboy<<else>>dog<</if>> whimpers and backs away, but you're still surrounded.

<</if>>

<<tearful>> you lie on the hard ground.

<<endcombat>>

<<generate1>><<generate2>><<person1>>
A <<person>> and <<person2>><<person>> grasp your arms, and haul you to your feet.
<<if $exposed gte 1>>
	<<covered>>
<</if>>
They drag you into the maze of containers, leaving the audience to examine their footage.

<<link [[Next|Docks Caught]]>><<clotheson>><<unset $dock_dog>><</link>>

:: Docks Slip
<<effects>>

You manage to break your fall, but your hands are left a bit sore.

<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

:: Docks Upright
<<effects>>

You try to recover your balance,
<<if $danceSuccess>>
	and manage to stay upright.

	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<<else>>
	but lose your footing. The momentum carries you into one of the cargo containers. You bounce off with a clang.<<gsecurity>><<ggpain>><<gstress>><<dock_security 1>><<pain 8>><<stress 6>>

	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<</if>>

:: Docks Dive
<<effects>>

You walk to the edge of the <<if $bus is "N">>ship<<else>>dock<</if>>, take a deep breath, and dive into the cool water.

They won't follow you here.

<<link [[Next|Sea Docks]]>><</link>>

:: Docks Find
<<effects>>

You find another way through the maze of cargo containers.

<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

:: Docks Sneak By
<<effects>>

You see the pair up ahead, a <<person1>><<person>> and <<person2>><<person>>. You keep low and dart between containers when they look away.

<<set $rng to random(1, 5)>>
<<if $rng is 1>>
	"...smells sweet," the <<person1>><<person>> says. "Whatever it is."

	"Keep your nose out," the <<person2>><<person>> responds. "Not worth prying into."

	The <<person1>><<person>> nods.

<<elseif $rng is 2>>
	"Night shifts are quiet," the <<person1>><<person>> says. "I'd like some action."

	"No you don't," the <<person2>><<person>> responds. "Boredom is better than the shit I've been through."

<<elseif $rng is 3>>
	"...not worth the risk," the <<person1>><<person>> says. "They're watching us, you know."

	The <<person2>><<person>> looks over <<his>> shoulder, as if the <<person1>><<person>> meant it literally.

<<elseif $rng is 4>>
	"Glad to work away from the compound," the <<person1>><<person>> says.

	The <<person2>><<person>> nods. "Don't care what the company line is," <<he>> says. "Those fumes make me lightheaded."

<<else>>
	They remain silent.

<</if>>

<<skulduggerycheck>>
<<if $skulduggerysuccess is 1>>

	You sneak past them, and continue through the maze of containers.

	<<if $skulduggery lte ($skulduggerydifficulty + 100)>>
		<<skulduggeryskilluse>>
	<<else>>
		That was too easy. You didn't learn anything.

	<</if>>

	<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

<<else>>

	You hear a crunch underfoot. The guards swivel to face you as their torches light you up. "You'd best come quietly," the <<person1>><<person>> says, taking a step forward.<<gsecurity>><<dock_security 1>>

	<<if $skulduggery lte ($skulduggerydifficulty + 100)>>
		<<skulduggeryskilluse>>
	<<else>>
		That was too easy. You didn't learn anything.

	<</if>>

	<<link [[Go quietly|Docks Quiet]]>><</link>>

	<<link [[Fight|Docks Fight]]>><<set $fightstart to 1>><</link>>

<</if>>

:: Docks Quiet
<<effects>>

You remain still as the pair approach. They grasp your arms, and pull you towards the entrance.

<<link [[Next|Docks Caught]]>><</link>>

:: Docks Fight
<<if $fightstart is 1>>
	<<set $fightstart to 0>>

	<<neutral 1>>

	<<maninit>>
	<<set $enemytrust -= 100>>
	<<set $enemyanger += 200>>
	<<npcidlegenitals>>
	You wait until the guards are close, then strike, smacking the <<person2>><<person>> across the face.<<set $enemyhealth -= 20>>

	<<person1>>
<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $enemyhealth lte 0>>
	<<link [[Next|Docks Fight Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Docks Fight Finish]]>><</link>><<nexttext>>
<<elseif $pain gte 100 and $willpowerpain is 0>>
	<<link [[Next|Docks Fight Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Docks Fight]]>><</link>><<nexttext>>
<</if>>

:: Docks Fight Finish
<<effects>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	You run, leaving the guards slumped on the ground. <<tearful>> you escape into the maze of cargo containers.

	<<clotheson>>
	<<endcombat>>
	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<<elseif $enemyhealth lte 0>>
	The guards back away from you. You seize the chance, and run. <<tearful>> you escape into the maze of cargo containers.

	<<clotheson>>
	<<endcombat>>
	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<<else>>
	You fall to the ground, too hurt to keep fighting.

	The guards grasp your arms, and haul you to your feet. <<tearful>> you're led through the maze of cargo containers.

	<<link [[Next|Docks Caught]]>><<clotheson>><</link>>

<</if>>

:: Docks Machine Dodge
<<effects>>

<<if $danceSuccess>>
	You jump out of the way. The arms grope empty air. An alarm blares, but you escape into the maze of containers.<<gsecurity>><<dock_security 1>>

	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<<else>>
	You try to move out of the way, but the metal closes around your wrists, and forces you to the ground as an alarm blares.<<gsecurity>><<dock_security 1>>

	Another hatch opens, and a phallic instrument springs forth.

	<<link [[Next|Docks Machine]]>><<set $molestationstart to 1>><</link>>

<</if>>

:: Docks Machine Struggle
<<effects>>

<<if $physiqueSuccess>>
	The metal arms grasp your wrists, and try to force you to the ground. You resist, and pull free from their grip. An alarm blares, but you escape into the maze of containers.<<gsecurity>><<dock_security 1>>

	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<<else>>
	The metal grasps your wrists. You resist, but the machine is too strong. It forces you to the ground as an alarm blares.<<gsecurity>><<dock_security 1>>

	Another hatch opens, and a phallic instrument springs forth.

	<<link [[Next|Docks Machine]]>><<set $molestationstart to 1>><</link>>

<</if>>

:: Docks Machine Brace
<<effects>>

You brace as the machine grasps your wrists, and forces you to the ground. "SUBJECT RESTRAINED," the voice intones. "AWAITING BACKUP."

<<generate1>><<generate2>><<person1>>

You don't need to wait long. A <<person>> and <<person2>><<person>> round the corner, and smirk when they see you.

<<if $exposed gte 1>>
	You feel their eyes on your <<nudity>>.
<</if>>

"Good bot," the <<person>> laughs as <<he>> crouches beside the machine. <<He>> presses a button, and it releases you. The <<person2>><<person>> grasps your arms, and pulls you to your feet.

They push you towards the entrance.

<<link [[Next|Docks Caught]]>><</link>>

:: Docks Machine
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>

	<<set $machine_health to 10>><<set $machine_ammo to 8>>
	<<if $player.vaginaExist and $analdisable is "f">>
		<<machine_init vaginal arm_chains>>
		<<set $machine.vaginal.armed to 1>>
	<<elseif $player.vaginaExist>>
		<<machine_init vaginal arm_chains>>
		<<set $machine.vaginal.armed to 1>>
	<<else>>
		<<machine_init anal arm_chains>>
		<<set $machine.anal.armed to 1>>
	<</if>>
	<<set $timer to 10>>
<</if>>

<<effects>>

<<if $timer gte 7>>
	An alarm blares.
<<elseif $timer gte 4>>
	You hear shouting.
<<elseif $timer gte 2>>
	You hear approaching footsteps.
<<else>>
	Security is close!
<</if>>

<<machine_effects>><<machine_combat>>
<<machine_state>>

<<machine_actions>>

<<if $machine.number lte 0 or $finish is 1 or $timer lte 0>>
	<<link [[Next|Docks Machine End]]>><</link>>
<<else>>
	<<link [[Next|Docks Machine]]>><</link>>
<</if>>

:: Docks Machine End
<<effects>>

<<if $timer lte 0>>

	<<if $anusfucked is 1 or $vaginafucked is 1 or $penisfucked is 1>>
		<<machine_end>>
		<<generate1>><<generate2>><<person1>>
		You hear laughter. A <<person>> and <<person2>><<person>> in security uniforms stand to the side. You're not sure how long they were watching, but they don't seem in a hurry to intervene. They hold their phones, cameras pointed right at you.

		<<famesex 20>>

		"Thanks for the show," the <<person1>><<person>> says. "Not every day you see a criminal slut get fucked by a machine."

		The <<person2>><<person>> steps forward, and crouches beside the hatch. <<He>> reaches in, you hear a click, and the machine falls inert. The <<person1>><<person>> is on top of you before you can recover, grasping your arms and forcing you to your feet.

	<<else>>
		<<machine_end>>
		<<generate1>><<generate2>><<person1>>

		A <<person1>><<person>> and <<person2>><<person>> in security uniforms arrive. The <<person1>><<person>> smirks, and crouches beside the hatch. <<He>> reaches in, you hear a click, and the machine falls inert.

		The <<person2>><<person>> is on you before you have a chance to recover, grasping your arms and pulling you to your feet.

	<</if>>
	They push you towards the entrance.

	<<link [[Next|Docks Caught]]>><<clotheson>><</link>>

<<else>>

	The machine retracts, leaving you free to stand. <<tearful>> you run. You escape into the maze of containers before backup arrives.

	<<machine_end>>
	<<clotheson>>

	<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

<</if>>

repo_name: Area/degrees

license: mit


code:
:: Widgets Docks [widget]

<<widget "dockclotheson">>
<<storeon "docks" "check">>
<<if _store_check is 1>>
You find your clothes where you left them.
<<storeon "docks">>

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

<<widget "dockeffects">>

<</widget>>

<<widget "dockunbindoffer">>
<<endevent>>
A <<generate1>><<person1>><<person>> approaches you, smiling. "Rope accident?" <<he>> asks. "Come here, I'll sort it out."

<<link [[Accept|Docks Binding]]>><</link>>

<<link [[Refuse|Docks Binding Refuse]]>><</link>>

<</widget>>

<<widget "dockoptions">>

<<endevent>>
<<link [[Work (1:00)|Docks Work]]>><<set $phase to 0>><<pass 60>><<tiredness 6>><</link>><<gtiredness>>

<<link [[Slack (1:00)|Docks Work]]>><<set $phase to 1>><<pass 60>><<dockstatus -1>><</link>><<lcool>>

<<link [[Leave|Docks]]>><<storeon "docks">><</link>>

<</widget>>

<<widget "dockstatustext">>
<<set $dockstatus = Math.clamp($dockstatus, 0, 100)>>
<<if $dockstatus gte 100>>
	The other workers respect you.
<<elseif $dockstatus gte 80>>
	The other workers accept you.
<<elseif $dockstatus gte 30>>
	The other workers tolerate you.
<<elseif $dockstatus gte 10>>
	The other workers view you with suspicion.
<<else>>
	The other workers view you with contempt.
<</if>>

<</widget>>

<<widget "dockstatus">>
<<if $args[0]>>
	<<set $dockstatus += ($args[0] * 2)>>
<</if>>
<</widget>>

<<widget "dockwork">>
<<set $dockhours += 1>>
<<if $stress gte $stressmax>>
	/*ToDo: Pregnancy, remove $pregnancyTesting to properly enable*/
	<<if $sexStats.vagina.pregnancy.waterBreaking is true and $pregnancyTesting>>
		<<pregnancyWatersBrokenPassout "docks">>
	<<else>>
		You've pushed yourself too much.

		<<passout>>

		<<if $danger gte (9900 - $allure)>>
			<<link [[Next|Passout Docks]]>><</link>>

		<<else>>
			<<ambulance>>
		<</if>>
	<</if>>
<<elseif $hour gte 19>>
	You help put away equipment and make sure the containers are locked for the night.

	<<dockclotheson>>
	You join the queue in front of security, where a surly <<generate1>><<person1>><<person>> hands out brown envelopes containing the day's pay.
	<<endevent>>

	You make £<<print (($dockwage * 12) / 100)>>.
	<<set $money += ($dockwage * 12)>>

	<<if $dockstatus gte 80>>
		<<generate1>><<person1>>A group of your colleagues gather at the gate. A <<person>> waves you over. "We're going on a pub crawl," <<he>> says. "You in?"

		<<endevent>>
		<<if $money gte 500>>
			<<link [[Accept (1:00 £5)|Docks Pub Crawl]]>><<set $dockpubcount to 0>><<set $money -= 500>><<alcohol 120>><<dockstatus 1>><<stress -6>><<pass 60>><</link>><<gcool>><<lstress>>

		<</if>>
		<<link [[Decline|Docks]]>><</link>>

	<<else>>
		<<link [[Next|Docks]]>><</link>>

	<</if>>
<<else>>
	<<if $rng gte 91>>
		You're tasked with inspecting the contents of the containers after they're lifted from the deck.
		<<set $rng to random(1, 100)>>
		<<if $rng gte 81 and $money gte 12000 and $dockslave isnot 1>>
			<<generatey1>><<generate2>><<person2>>You hear a muffled cry from one of them.

			You enter the keycode, but it doesn't unlock. "Not that one," another docker says. <<He>> points at the initials printed on the door. "We don't inspect these." If <<he>> hears the crying, <<he>> ignores it.

			<<set $lock to 400>>
			<<if $skulduggery gte $lock>>
				The lock looks easy to pick.

				<<link [[Break in anyway (£100 1:00)|Docks Slave Open]]>><<set $dockslave to 1>><<crimeup 1>><</link>><<crime>>

			<<else>>
				The lock looks beyond your ability to pick.<<skulduggeryrequired>>

			<</if>>
			<<link [[Ignore the voice|Docks Slave Ignore]]>><</link>>

		<<else>>
			<<set $rng to random(1, 100)>>
			<<if $rng gte 81>>
				Many containers contain goods ordered by private citizens. A package in one of them is torn open, and something glints from inside.

				<<link [[Steal|Docks Steal]]>><<crimeup 60>><<set $blackmoney += 60>><</link>><<crime>>

				<<link [[Don't steal|Docks Don't Steal]]>><</link>>

			<<else>>
				There's lots of machinery. You don't understand what it's for, but it's all tagged properly.

				<<dockoptions>>
			<</if>>
		<</if>>
	<<elseif $rng gte 81>>
		A vessel requests help making it to the dock. You, a <<generate1>><<person1>><<person>>, and a <<generate2>><<person2>><<person>> are tasked with helping. You board a small ship and sail to meet it.

		<<set $danger to random(1, 10000)>><<set $dangerevent to 0>>
		<<if $danger gte (9900 - $allure)>>
			You're halfway there when the <<person>> cuts out the engine. <<He>> and the <<person1>><<person>> stare at you. "A little <<girl>>, all alone at sea," <<he>> says. "Hows about you let us have some fun, and we won't need to hurt you." The <<person>> brandishes a length of rope.

			<<link [[Nod|Docks Rape]]>><<set $molestationstart to 1>><</link>>

			<<link [[Fight|Docks Rape]]>><<set $fightstart to 1>><</link>>

			<<link [[Capsize the boat|Docks Rape Capsize]]>><<dockstatus -1>><</link>><<lcool>>

		<<else>>
			The <<person>> guides the captain while you and the <<person1>><<person>> help the crew with the spring lines. <<if $exposed gte 1>>The sailors ogle you, though they try to hide it. <</if>>You swing the vessel around and make a successful landing.

			<<endevent>>
			<<dockoptions>>
		<</if>>
	<<elseif $rng gte 71>>
		A tourist vessel cuts across the docks, delaying the launch of other ships. They won't respond to hails. You're sent in a small boat to deliver a message.

		<<generate1>><<person1>>
		<<if $exposed gte 1>>
			You climb aboard. The arrival of an undressed <<girl>> aboard the ship sends murmurs through the well-dressed crowd. You find the captain flirting with a passenger. <<He>> drops <<his>> glass when <<he>> sees you.
		<<else>>
			You climb aboard and push through the well-dressed crowd in search of the captain. You find <<him>> flirting with a passenger.

		<</if>>
		<<if $submissive gte 1150>>
			"Please <<sir>>," you say. "Your ship isn't meant to approach this way. You're blocking other ships."
		<<elseif $submissive lte 850>>
			"Sorry to interrupt," you say. "But your dumb arse is about to collide with another ship."
		<<else>>
			"I'm delivering a message," you say. "Your course is wrong. You need to pull away and approach from the proper angle. You're delaying other ships."
		<</if>>

		"They can wait," <<he>> laughs. "Lots of important passengers. They're anxious to be back on land." <<He>> turns away.

		<<link [[Return to dock|Docks Tourist Return]]>><</link>>

		<<if $promiscuity gte 55>>
			<<link [[Seduce|Docks Tourist Seduce]]>><</link>><<promiscuous4>>

		<</if>>
		<<if $submissive lte 500>>
			<<link [[Scare the passengers|Docks Tourist Intimidate]]>><<dockstatus 3>><</link>><<defianttext>><<ggcool>>

		<</if>>
	<<elseif $rng gte 61>>
		You're tasked with unloading a lorry. You notice another vehicle being unloaded nearby, but the workers wear a strange uniform. A <<generate1>><<person1>><<generate2>><<person>> supervises them.

		"Don't pay them no mind," the <<person2>><<person>> working beside you says. "They handle their own shipments."

		<<link [[Sneak closer for a look|Docks Compound]]>><<drugs 240>><<stress -6>><</link>><<garousal>><<lstress>>

		<<link [[Ignore|Docks Compound Ignore]]>><</link>>

	<<elseif $rng gte 51>>
		You're tasked with recording cargo information onto a computer. While working through the notes you notice an inconsistency.

		<<link [[Examine the inconsistency|Docks Examine]]>><<set $phase to 0>><<stress 6>><</link>><<skill_difficulty maths "Maths" 1 1000>><<gstress>>

		<<if $skulduggery gte 400>>
			<<set $skulduggerydifficulty to 500>>
			<<link [[Note the location of valuable goods|Docks Examine Valuables]]>><<set $phase to 2>><</link>><<skulduggerydifficulty>>

		<</if>>
		<<link [[Ignore|Docks Examine]]>><<set $phase to 1>><</link>>

	<<elseif $rng gte 41>>
		You're tasked with cleaning the pier.
		<<set $rng to random(1, 100)>>
		<<if $rng gte 61>>
			You notice a pink shape in the water, in front of an approaching ship.

			<<link [[Examine|Docks History]]>><<set $phase to 0>><<stress 6>><</link>> | History<<gstress>>

			<<link [[Ignore|Docks History]]>><<set $phase to 1>><</link>>

		<<else>>
			You finish without a problem.

			<<dockoptions>>
		<</if>>
	<<elseif $rng gte 31>>
		You're tasked with moving some crates so they can be loaded onto vehicles. <<generate1>><<person1>>"You'll need a forklift," the supervisor says. "Let me find the keys."

		<<if $physique gte 15000>>
			The crates don't look too heavy. By the time <<he>> returns you've already finished. "You're stronger than you look," <<he>> chuckles.
			<<gcool>><<dockstatus 1>>

			<<dockoptions>>
		<<else>>
			<<He>> keeps an eye on you as you move the crates, but you manage it without a problem.

			<<dockoptions>>
		<</if>>
	<<elseif $rng gte 21>>

		You're tasked with untying a moored ship from the pier. The ropes are thick and heavy, and you don't have long before another ship needs the space.

		<<if $physique gte 5000 and $feetuse isnot "bound">>
			You make it in time.

		<<else>>
			You manage to make it in time. Just.
			<<if $feetuse is "bound">>
				It's sort of miraculous that you did so while your legs were restrained.
			<</if>>
			<<gtiredness>><<tiredness 6>>

		<</if>>

		<<if $leftarm is "bound" or $rightarm is "bound" or $feetuse is "bound">>
			<<dockunbindoffer>>
		<<else>>
			<<dockoptions>>
		<</if>>

	<<elseif $rng gte 11 and $exposed lte 0>>
		You're tasked with lubricating machinery.
		<<if $dockstatus gte 30>>
			You manage it without a problem.

			<<dockoptions>>
		<<elseif !$worn.over_lower.type.includes("naked")>>
			You're working on a crane when it roars to life, and the boom rises. You find yourself yanked upwards by a hook embedded in your $worn.over_lower.name.

			<<generate1>><<person1>>The crane stops, leaving you suspended in the air. The <<person>> manning the crane waves at you as you spin. Other dockers step into view. They whistle and applaud.

			<<set $worn.over_lower.integrity -= 10>>
			<<if $worn.over_lower.integrity lte 0 and !$worn.lower.type.includes("naked")>>
				<<overlowerruined>><<exposure>>
				Your weight tears you free of your clothing. <<generate2>><<person2>>A <<person>> catches you. <<He>> ogles your <<lewdness>>. So does everyone else. <<covered>> You squirm free and dash for safety, chased by jeers. You find a sheet to cover with.
				<<gtrauma>><<gstress>><<garousal>><<trauma 6>><<stress 6>><<arousal 600>>

				<<towelup>>
				<<dockoptions>>
			<<else>>
				<<if $worn.over_lower.integrity lte 0>>
					Your weight tears you free from your <<print $worn.over_lower.name>>.
				<<else>>
					Your weight tears you free from the hook.
				<</if>>
				<<generate2>><<person2>>A <<person>> catches you, but you squirm free.
				<<gstress 6>>

				<<link [[Get angry|Docks Angry]]>><<stress -3>><<dockstatus 1>><</link>><<gcool>><<lstress>>

				<<link [[Walk away|Docks Walk]]>><</link>>

			<</if>>
		<<else>>
			You're working on a crane when it roars to life, and the boom rises. You find yourself yanked upwards by a hook embedded in your $worn.lower.name.

			<<generate1>><<person1>>The crane stops, leaving you suspended in the air. The <<person>> manning the crane waves at you as you spin. Other dockers step into view. They whistle and applaud.

			<<set $worn.lower.integrity -= 10>>
			<<if $worn.lower.integrity lte 0>>
				<<lowerruined>><<exposure>>
				Your weight tears you free of your clothing. <<generate2>><<person2>>A <<person>> catches you. <<He>> ogles your <<lewdness>>. So does everyone else. <<covered>> You squirm free and dash for safety, chased by jeers. You find a sheet to cover with.
				<<gtrauma>><<gstress>><<garousal>><<trauma 6>><<stress 6>><<arousal 600>>

				<<towelup>>
				<<dockoptions>>
			<<else>>
				Your weight tears you free from the hook. <<generate2>><<person2>>A <<person>> catches you, but you squirm free.
				<<gstress 6>>

				<<link [[Get angry|Docks Angry]]>><<stress -3>><<dockstatus 1>><</link>><<gcool>><<lstress>>

				<<link [[Walk away|Docks Walk]]>><</link>>

			<</if>>
		<</if>>
	<<else>>
		You lift crates from a moored ship, and drop them off on the dock. They're small compared to the rest of the cargo, but heavy.
		<<if $physique gte 15000 and $leftarm isnot "bound" and $rightarm isnot "bound">>
			You have no trouble. You keep going while the other dockers stop to rest.
			<<gcool>><<dockstatus 1>>

		<<elseif $physique gte 5000 and $leftarm isnot "bound" and $rightarm isnot "bound">>
			You manage to keep up with the other dockers.

		<<else>>
			So heavy you don't even make it off the deck before stopping to rest. The other dockers make several deliveries before you make one.
			<<if $leftarm is "bound" and $rightarm is "bound">>
				Your bound arms make the process far more difficult than it would otherwise be as you can't manage a proper grip.
			<</if>>

			You're struggling with the second crate when a muscular docker takes it from your hands. "Last one," <<generate1>><<person1>><<he>> says. <<He>> doesn't look at you.
			<<lcool>><<dockstatus -1>>

		<</if>>
		<<endevent>>

		<<if $leftarm is "bound" or $rightarm is "bound" or $feetuse is "bound">>
			<<dockunbindoffer>>
		<<else>>
			<<dockoptions>>
		<</if>>

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

<</widget>>

<<widget "dockpubdestination">>
	<<if $bus is "high">>
		<<link [[Stop|High Street]]>><<endevent>><<set $eventskip to 1>><</link>>
	<<elseif $bus is "harvest">>
		<<link [[Stop|Harvest Street]]>><<endevent>><<set $eventskip to 1>><</link>>
	<<elseif $bus is "connudatus">>
		<<link [[Stop|Connudatus Street]]>><<endevent>><<set $eventskip to 1>><</link>>
	<<elseif $bus is "barb">>
		<<link [[Stop|Barb Street]]>><<endevent>><<set $eventskip to 1>><</link>>
	<<else>>
		<<link [[Stop|Mer Street]]>><<endevent>><<set $eventskip to 1>><</link>>
	<</if>>
<</widget>>

<<widget "dockpuboptions">>
	<<endevent>>
	<<if $money gte 500>>
		<<link [[Continue (1:00 £5)|Docks Pub Crawl]]>><<set $dockpubcount to 0>><<set $money -= 500>><<alcohol 120>><<dockstatus 1>><<stress -6>><<pass 60>><</link>><<gcool>><<lstress>>

	<</if>>
	<<dockpubdestination>>
<</widget>>

<<widget "dockpubquiz">>

<<if $rng gte 81>>

is science.

<<link [[Let your colleagues answer|Docks Pub Crawl Science]]>><<set $phase2 to 0>><</link>>

<<link [[Answer yourself|Docks Pub Crawl Science]]>><<set $phase2 to 1>><</link>><<skill_difficulty science "Science" 1 1000>>

<<link [[Give the wrong answers|Docks Pub Crawl Science]]>><<set $phase2 to 2>><</link>>

<<elseif $rng gte 61>>

is arithmetic. One of your colleagues gets their fingers ready for counting.

<<link [[Let your colleagues answer|Docks Pub Crawl Maths]]>><<set $phase2 to 0>><</link>>

<<link [[Answer yourself|Docks Pub Crawl Maths]]>><<set $phase2 to 1>><</link>><<skill_difficulty maths "Maths" 1 1000>>

<<link [[Give the wrong answers|Docks Pub Crawl Maths]]>><<set $phase2 to 2>><</link>>

<<elseif $rng gte 41>>

is literature.

<<link [[Let your colleagues answer|Docks Pub Crawl English]]>><<set $phase2 to 0>><</link>>

<<link [[Answer yourself|Docks Pub Crawl English]]>><<set $phase2 to 1>><</link>><<englishdifficulty 1 1000>>

<<link [[Give the wrong answers|Docks Pub Crawl English]]>><<set $phase2 to 2>><</link>>

<<elseif $rng gte 21>>

is local history.

<<link [[Let your colleagues answer|Docks Pub Crawl History]]>><<set $phase2 to 0>><</link>>

<<link [[Answer yourself|Docks Pub Crawl History]]>><<set $phase2 to 1>><</link>><<skill_difficulty history "History" 1 1000>>

<<link [[Give the wrong answers|Docks Pub Crawl History]]>><<set $phase2 to 2>><</link>>

<<else>>

is lovemaking, which prompts a bawdy cheer. Your colleagues insist this will be easy.

<<link [[Let your colleagues answer|Docks Pub Crawl Love]]>><<set $phase2 to 0>><</link>>

<<link [[Answer yourself|Docks Pub Crawl Love]]>><<set $phase2 to 1>><<dockstatus 1>><</link>><<skill_difficulty promiscuity "Promiscuity" 1 100>><<gcool>>

<<link [[Give the wrong answers|Docks Pub Crawl Love]]>><<set $phase2 to 2>><<dockstatus 1>><</link>><<gcool>>

<</if>>

<</widget>>

<<widget "skul_dock_init">>
<<if $skul_dock_init is undefined>>
	<<unset $catsuit_spawned>>
	<<set $skul_dock_init to 1>>
	<<set $dock_security to 1>>
	<<set $skul_dock to {}>>
	<<set $skul_dock.NW to {}>>
	<<set $skul_dock.N to {}>>
	<<set $skul_dock.NE to {}>>
	<<set $skul_dock.W to {}>>
	<<set $skul_dock.M to {}>>
	<<set $skul_dock.E to {}>>
	<<set $skul_dock.SW to {}>>
	<<set $skul_dock.S to {}>>
	<<set $skul_dock.SE to {}>>
	<<set _skul_dock_keys to Object.keys($skul_dock)>>
	<<set _count to 0>>
	<<for _i to 0; _i lt _skul_dock_keys.length; _i++>>
		<<set $rng to random(1, 100)>>
		<<if $rng gte 100>>
			<<set $skul_dock[_skul_dock_keys[_i]].contents to "gold">>
			<<set _count++>>
		<<elseif $rng gte 95>>
			<<set $skul_dock[_skul_dock_keys[_i]].contents to "aphrodisiacs">>
			<<set _count++>>
		<<elseif $rng gte 75>>
			<<set $skul_dock[_skul_dock_keys[_i]].contents to "electronics">>
			<<set _count++>>
		<<elseif $rng gte 65>>
			<<set $skul_dock[_skul_dock_keys[_i]].contents to "fertiliser">>
			<<set _count++>>
		<<elseif $rng gte 55 and $catsuit_found isnot true and $catsuit_spawned is undefined>>
			<<set $catsuit_spawned to 1>>
			<<set $skul_dock[_skul_dock_keys[_i]].contents to "equipment">>
			<<set _count++>>
		<<else>>
			<<set $skul_dock[_skul_dock_keys[_i]].contents to "none">>
		<</if>>
	<</for>>
	<<if _count lte 1>>
		<<for _i to 0; _i lt _skul_dock_keys.length; _i++>>
			<<if $skul_dock[_skul_dock_keys[_i]].contents is "none">>
				<<set $rng to random(1, 100)>>
				<<if $rng gte 95>>
					<<set $skul_dock[_skul_dock_keys.pluck()].contents to "aphrodisiacs">>
					<<set _count++>>
				<<elseif $rng gte 75>>
					<<set $skul_dock[_skul_dock_keys.pluck()].contents to "electronics">>
					<<set _count++>>
				<<elseif $rng gte 65>>
					<<set $skul_dock[_skul_dock_keys.pluck()].contents to "fertiliser">>
					<<set _count++>>
				<</if>>
				<<if _count is 2>>
					<<break>>
				<</if>>
			<</if>>
		<</for>>

		<<set _skul_dock_keys to Object.keys($skul_dock)>>
	<</if>>
<</if>>
<</widget>>

<<widget "skul_dock_contents">>
<<set _skul_dock_keys to Object.keys($skul_dock)>>
<<for _i to 0; _i lt _skul_dock_keys.length; _i++>>
	<<if $skul_dock[_skul_dock_keys[_i]].contents is $args[0] and $skul_dock[_skul_dock_keys[_i]].state isnot "known">>
		<<set $skul_dock[_skul_dock_keys[_i]].state to "known">>
		<<set _dock_location to _skul_dock_keys[_i]>>
		<<set _dock_contents to $skul_dock[_skul_dock_keys[_i]].contents>>
		<<break>>
	<</if>>
<</for>>
<</widget>>

<<widget "skul_dock_location">>
<<switch $args[0]>>
<<case "NW">>
	<<set _text_output to "moorings">>
<<case "N">>
	<<set _text_output to "anchored ship">>
<<case "NE">>
	<<set _text_output to "warehouse">>
<<case "W">>
	<<set _text_output to "cranes">>
<<case "M">>
	<<set _text_output to "tallest stacks of cargo containers">>
<<case "E">>
	<<set _text_output to "office building">>
<<case "SW">>
	<<set _text_output to "lorry unloading area">>
<<case "S">>
	<<set _text_output to "front gate">>
<<case "SE">>
	<<set _text_output to "car park">>
<</switch>>
<<print _text_output>>
<</widget>>

<<widget "skul_dock_nav">>
<<if $bus is "W">>
	<<link [[Sneak to the anchored ship (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "NW">><</link>><<skul_dock_state NW>>

<</if>>
<<if $bus is "N">>
	<<link [[Sneak off the ship (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "NW">><</link>><<skul_dock_state NW>>

<</if>>
<<if $bus is "NW">>
	<<link [[Sneak aboard the anchored ship (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "N">><</link>><<skul_dock_state N>>

<</if>>
<<if $bus is "E">>
	<<link [[Sneak to the warehouse (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "NE">><</link>><<skul_dock_state NE>>

<</if>>
<<if $bus is "SW" or $bus is "NW">>
	<<link [[Sneak to the cranes (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "W">><</link>><<skul_dock_state W>>

<</if>>
<<if $bus is "E">>
	<<link [[Sneak to the tallest stacks of cargo containers (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "M">><</link>><<skul_dock_state M>>

<</if>>
<<if $bus is "SE" or $bus is "M" or $bus is "NE">>
	<<link [[Sneak to the office (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "E">><</link>><<skul_dock_state E>>

<</if>>
<<if $bus is "W" or $bus is "S">>
	<<link [[Sneak to the lorry unloading area (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "SW">><</link>><<skul_dock_state SW>>

<</if>>
<<if $bus is "SE" or $bus is "SW">>
	<<link [[Sneak to the gate (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "S">><</link>><<skul_dock_state S>>

<</if>>
<<if $bus is "S" or $bus is "E">>
	<<link [[Sneak to the car park (0:05)|Docks Sneak]]>><<pass 5>><<set $bus to "SE">><</link>><<skul_dock_state SE>>

<</if>>
<<if $bus is "S">>
	<<link [[Leave|Docks]]>><<set $bus to "mer">><</link>>

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

<<widget "skul_dock_state">>
<<if $skul_dock[$args[0]].state is "known">>
	<<if $skul_dock[$args[0]].contents is "none">>
		The containers here contain nothing of value to you.
	<<elseif $skul_dock[$args[0]].contents is "fertiliser" and $tending lt 400>>
		The containers here contain nothing of value to you.
	<<else>>
		A container here contains valuable <<print $skul_dock[$args[0]].contents>>.
	<</if>>
<<elseif $skul_dock[$args[0]].state is "empty">>
	You've checked here.
<<else>>
	Unknown contents.
<</if>>
<</widget>>

<<widget "events_skul_dock">>
<<if $dock_security gte random(1, 4)>>
	<<set $rng to random(1, 5)>>
	<<if $rng is 1>>
		<<generate1>><<person1>>
		You hear footsteps approach. You take cover behind a container, and wait for the noise to pass. You exhale.<<gstress>><<stress 6>>

		<<link [[Next|Docks Sneak]]>><<endevent>><<set $eventskip to 1>><</link>>

	<<elseif $rng is 2>>
		<<generate1>><<person1>>
		Torchlight appears on the container in front of you. Whoever's holding it is close, and getting closer.

		You look around. The containers are packed tight. You could run the way you came, but it's some distance and you don't have long.

		<<set $skulduggerydifficulty to 500>>
		<<link [[Hide|Docks Hide]]>><</link>><<skulduggerydifficulty>>

		<<link [[Run|Docks Run]]>><<crimeup 100>><<tiredness 6>><<dock_security 1>><</link>><<crime>><<gtiredness>><<gsecurity>>

		<<if $physiquesize lte 6000>>
			<<link [[Squeeze between the containers|Docks Squeeze]]>><</link>><<small_text>>

		<</if>>
	<<elseif $rng is 3>>
		You hear a patter of feet on the other side of a row of containers.

		<<if ($monsterchance gte random(1, 100) and ($hallucinations gte 1 or $monsterhallucinations is "f"))>>
			<<if $beastmalechance lt random(1, 100)>>
				<<set $dock_dog to "girl">>
				You peer between them, and see a doggirl on all fours sniffing the ground. You walked there not long ago. She has your scent.

				"This way!" she exclaims, breaking into a run. You glimpse someone in a security uniform follow.

			<<else>>
				<<set $dock_dog to "boy">>
				You peer between them, and see a dogboy on all fours sniffing the ground. You walked there not long ago. He has your scent.

				"This way!" he exclaims, breaking into a run. You glimpse someone in a security uniform follow.

			<</if>>
		<<else>>
			<<if $beastmalechance lt random(1, 100)>>
				<<set $dock_dog to "bitch">>
			<<else>>
				<<set $dock_dog to "dog">>
			<</if>>
			You peer between them, and see a dog sniffing the ground. You walked there not long ago. It has your scent.

			It barks and breaks into a run. You glimpse someone in a security uniform follow.

		<</if>>

		They'll find you soon.

		<<link [[Ambush|Docks Ambush]]>><<dock_security 1>><</link>><<gsecurity>>

		<<if $worn.upper.set is $worn.lower.set>>
			<<link [[Sacrifice your outfit to leave a false trail|Docks Sacrifice]]>><<set $phase to 0>><<dock_security -1>><</link>><<lsecurity>>

		<<else>>
			<<if $worn.upper.name isnot "naked">>
				<<link [[Sacrifice your top to leave a false trail|Docks Sacrifice]]>><<set $phase to 1>><<dock_security -1>><</link>><<lsecurity>>

			<</if>>
			<<if $worn.lower.name isnot "naked">>
				<<link [[Sacrifice your bottoms to leave a false trail|Docks Sacrifice]]>><<set $phase to 2>><<dock_security -1>><</link>><<lsecurity>>

			<</if>>
		<</if>>
		<<if $worn.under_upper.set is $worn.under_lower.set>>
			<<link [[Sacrifice your under outfit to leave a false trail|Docks Sacrifice]]>><<set $phase to 3>><<dock_security -1>><</link>><<lsecurity>>

		<<else>>
			<<if $worn.under_upper.name isnot "naked">>
				<<link [[Sacrifice your under top to leave a false trail|Docks Sacrifice]]>><<set $phase to 4>><<dock_security -1>><</link>><<lsecurity>>

			<</if>>
			<<if $worn.under_lower.name isnot "naked">>
				<<link [[Sacrifice your underwear to leave a false trail|Docks Sacrifice]]>><<set $phase to 5>><<dock_security -1>><</link>><<lsecurity>>

			<</if>>
		<</if>>
		<<if $bus is "NW" or $bus is "N" or $bus is "NE">>
			<<link [[Dive into the sea|Docks Dive]]>><</link>>

		<</if>>

	<<elseif $rng is 4>>
		You hear a click underfoot. INTRUDER DETECTED. Intones a voice. "DO NOT RESIST." A hatch springs open, and metal arms shoot out.

		<<link [[Dodge|Docks Machine Dodge]]>><</link>><<dancedifficulty 500 1200>>

		<<link [[Struggle|Docks Machine Struggle]]>><</link>><<physiquedifficulty 12000 20000>>

		<<link [[Go quietly|Docks Machine Brace]]>><</link>>

	<<else>>
		<<generate1>><<person1>>
		A <<person>> in a security uniform rounds a corner up ahead. You dive between two containers. You don't think <<he>> saw you.
		<<if random(1, 2) is 1>>
			As <<he>> passes by however, <<he>> reaches into your hiding place. "Got you," <<he>> says, grasping your arm and pulling you out.

			<<He>> reaches for <<his>> radio. "Got the blighter," <<he>> says, shoving you against a container. "Roger." <<He>> lets the radio fall to <<his>> side. "Backup will be here soon. How's about we have a little fun while we wait?"

			<<link [[Next|Docks Sneak Rape]]>><<set $molestationstart to 1>><</link>>

		<<else>>
			<<He>> passes without looking.<<gstress>><<stress 6>>

			<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><<endevent>><</link>>

		<</if>>
	<</if>>
<<else>>
	<<set $rng to random(1, 6)>>
	<<if $rng is 1>>
		You slip! Something slick, like oil, covers the ground.

		<<link [[Hold out your arms|Docks Slip]]>><<pain 8>><<stress 6>><</link>><<ggpain>><<gstress>>

		<<link [[Try to stay upright|Docks Upright]]>><</link>><<dancedifficulty 400 1200>>

	<<elseif $rng is 2>>
		<<if $weather is "clear">>
			Moonlight reflects off the ocean. It captures you for a moment.<<lstress>><<stress -6>>

		<<else>>
			A cool breeze ruffles your hair.

		<</if>>
		<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

	<<elseif $rng is 3>>
		<<generate1>><<generate2>>
		You hear voices up ahead. Two guards are in the way.

		<<set $skulduggerydifficulty to 500>>
		<<link [[Find a different way (0:10)|Docks Find]]>><<pass 10>><<dock_security 1>><</link>><<gsecurity>>

		<<link [[Sneak by|Docks Sneak By]]>><</link>><<skulduggerydifficulty>>

	<<elseif $rng is 4>>
		You're quiet as you move through the dark, but you're leaving traces of yourself. Security is paying more attention.<<gsecurity>><<dock_security 1>>

		<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

	<<elseif $rng is 5>>
		<<if $skulduggery gte random(1, 1000)>>
			There's a security camera up ahead. You avoid it. You're glad you spotted it in time.

			<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

		<<else>>
			You spot a security camera too late. You hide, but anyone paying attention would have seen you.<<gsecurity>><<dock_security 1>><<crimeup 10>><<crime>>

			<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

		<</if>>
	<<else>>
		These containers all look alike. They stack high around you. For a while, you're not quite sure where you are.<<gstress>><<stress 6>>

		<<link [[Next|Docks Sneak]]>><<set $eventskip to 1>><</link>>

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

<</widget>>

<<widget "dock_security">>
<<if $args[0]>>
	<<set $dock_security += $args[0]>>
<</if>>
<</widget>>

<<widget "dock_security_text">>
<<if $dock_security gte 4>>
	Security are on high alert.
<<elseif $dock_security gte 3>>
	Security are aware of an intruder.
<<elseif $dock_security gte 2>>
	Security are suspicious.
<<else>>
	Security are relaxed.
<</if>>
<</widget>>


code:
:: Domus House Nude

<<set $outside to 1>><<set $location to "town">><<effects>><<set $bus to "domus">>
You walk up to one of the homes and knock.

<<if $rng gte 51>>
	There's no response.

	<<link [[Break in|Domus House Lock]]>><</link>>

	<<link [[Go to the next house (0:02)|Domus House Nude]]>><<pass 2>><</link>><<exhibitionist5>>

	<<link [[Stop|Domus Street]]>><</link>>

<<elseif $rng gte 41>>
	<<generate1>><<person1>>A <<person>> answers the door. <<Hes>> shocked by your nudity. "What on earth?" <<he>> mutters.

	<<fameexhibitionism 1>>
	<<link [[Ask for clothes|Domus House Beg]]>><<set $phase to 1>><</link>>

<<elseif $rng gte 31>>
	<<generate1>><<person1>>A <<person>> answers the door. "Whaddya wa-" <<his>> eyes widen. "Why is there a naked <<girl>> in front of me?"

	<<fameexhibitionism 1>>
	<<link [[Ask for clothes|Domus House Beg]]>><<set $phase to 2>><</link>>

<<elseif $rng gte 21>>
	<<generate1>><<person1>>A <<person>> answers the door. "Oh, you're naked," <<his>> eyes wander across your body. "Is there anything you can d-" <<he>> coughs. "I can do for you?"

	<<fameexhibitionism 1>>
	<<link [[Ask for clothes|Domus House Beg]]>><<set $phase to 3>><</link>>

<<elseif $rng gte 11 and $schoolday is 0>>
	<<generatey1>><<person1>>A <<person>> answers the door. <<He>> looks shocked, then grins. "I know you from school," <<he>> says.
		<<if $player.gender is "h" and !$worn.genitals.type.includes("hidden")>>
			<<if $schoolrep.herm gte 3>>
				 "I guess the rumours about you are true. You must be really embarrassed, huh?"
			<<else>>
				 "I never guessed you were..." <<He>> trails off and shakes <<his>> head. "You must be really embarrassed, huh?"
			<</if>>
			<<schoolrep herm 1>>
		<<elseif ($schoolrep.crossdress gte 1 or $backgroundTraits.includes("crossdresser")) and !$worn.genitals.type.includes("hidden")>>
			<<if $schoolrep.crossdress gte 3>>
				 "I guess the rumours about you are true. You must be really embarrassed, huh?"
			<<elseif $schoolrep.crossdress gte 1>>
				 "Someone said you were a crossdresser, but I never thought it was true. You must be really embarrassed, huh?"
			<<else>>
				 "I never guessed you were a crossdresser. You must be really embarrassed, huh?"
			<</if>>
			<<schoolrep crossdress 1>>
		<</if>>

	<<fameexhibitionism 1>>
	<<link [[Ask for clothes|Domus House Beg]]>><<set $phase to 4>><</link>>

<<else>>
	<<generate1>><<person1>>A <<person>> answers the door. <<He>> grins as <<he>> sees you. "My my, what do we have here?"

	<<link [[Ask for clothes|Domus House Beg]]>><<set $phase to 5>><</link>>

	<<fameexhibitionism 1>>
<</if>>

:: Domus House Beg

<<set $outside to 1>><<set $location to "town">><<effects>><<set $bus to "domus">>
<<if $phase is 1>>
	<<if $rng gte 20>>
		<<if $player.gender is "m">>
			<<set $clothingselector to "m">>
			"Very well then," <<he>> says. "I'll fetch some clothes."

			<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

		<<else>>
			"Very well then," <<he>> says. "I'll fetch some clothes."

			<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

		<</if>>
	<<else>>
		"I'm sorry," <<he>> says. "I have nothing to spare you. Sorry, <<girl>>."

		<<link [[Try another house|Domus House Nude]]>><<endevent>><</link>>

		<<link [[Stop|Domus Street]]>><<endevent>><</link>>

	<</if>>
<<elseif $phase is 2>>
	"I'm not getting scammed like that again," <<he>> says. "Go be naked somewhere else."

	<<link [[Try another house|Domus House Nude]]>><<endevent>><</link>>

	<<link [[Stop|Domus Street]]>><<endevent>><</link>>

<<elseif $phase is 3>>
	<<if $rng gte 20>>
		The <<person>> thinks for a moment. "If you clean my living room for me, I'll find you something to wear," <<he>> says. <<if $leftarm is "bound" and $rightarm is "bound">>"You'll have to hold the duster in your mouth."<<else>>"It should only take ten minutes."<</if>>

		<<link [[Accept|Domus Nude Exhibit]]>><</link>>

		<<link [[Refuse|Domus Street]]>><<endevent>><</link>>

	<<else>>
		<<He>> bites <<his>> lip and considers. "I don't have any," <<he>> says, with a sly smile. "Turn that cute butt around and ask somebody else."

		<<link [[Try another house|Domus House Nude]]>><<endevent>><</link>>

		<<link [[Stop|Domus Street]]>><<endevent>><</link>>

	<</if>>
<<elseif $phase is 4>>
	<<if $rng gte 20>>
		<<He>> smiles. "I've got some spares you can have if you fuck me," <<he>> says.

		<<link [[Accept|Domus Nude Sex]]>><<set $sexstart to 1>><</link>><<promiscuous1>>

		<<link [[Refuse|Domus Street]]>><<endevent>><</link>>

	<<else>>
		"I have nothing to get you," <<he>> shrugs <<his>> shoulders. "See you at school."

		<<link [[Try another house|Domus House Nude]]>><<endevent>><</link>>

		<<link [[Stop|Domus Street]]>><<endevent>><</link>>

	<</if>>
<<else>>
	<<if $rng gte 20>>
		"Sure," <<he>> says. "Just press the buzzer on that house over there and run back quickly."

		<<He>> points at a building across the road.

		<<link [[Accept|Domus Streak]]>><</link>>

		<<link [[Refuse|Domus Street]]>><<endevent>><</link>>

	<<else>>
		"And ruin such a nice view?" <<he>> laughs. "Not likely."

		<<He>> leers at you.

		<<link [[Try another house|Domus House Nude]]>><<endevent>><</link>>

		<<link [[Stop|Domus Street]]>><<endevent>><</link>>

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

:: Domus Nude Exhibit

<<set $outside to 0>><<set $location to "town">><<effects>><<set $bus to "domus">>
<<He>> hands you a feather duster and sends you inside with a slap on your rear. "No slacking."

<<pass 5>>
<<set $danger to random(1, 10000)>><<set $dangerevent to 0>>
<<if $danger gte (9900 - $allure)>>
	<<generate2>><<generate3>>You enter the living room, only to find it occupied by a <<person2>><<person>> and <<person3>><<person>>.
	<<garousal>><<gtrauma>><<gstress>><<arousal 600>><<trauma 6>><<stress 3>>

	"Don't mind them," <<he>> says. "They won't touch you."

	<<if $leftarm is "bound" and $rightarm is "bound">>
		You nod in agreement and begin your work, made more difficult by the guest's loud comments. Not only that, but your bindings make it hard to reach specific places without bending over to show your <<genitals>> to the guests lazing on the chair.

		"Don't mind us," the <<person3>><<person>> says as you bend over to dust the lower half of a cabinet. "Though, can you bend your knees a little less?"

	<<else>>
		You nod and get to work, crouching when you can and covering your <<genitals>> with your free hand.
		"<<pShes>> shy," the <<person3>><<person>> says as you cover your rear while reaching up to brush a cabinet.
	<</if>>

	You finish cleaning the living room, and leave the gaze of the guests and report to the <<person>> for payment. "Good job," <<He>> says, still leering at you. "Here's some stuff I found in a closet. Thanks for entertaining my guests."

	<<pass 5>>
	<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

<<else>>
	Once the living room is cleaned, you report to the <<person>> for payment. "Good job," <<He>> says, still leering at you. "Here's some stuff I found in a closet."

	<<pass 5>>
	<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

<</if>>

:: Domus Nude Sex

<<if $sexstart is 1>>
	<<set $sexstart to 0>>
	<<consensual>>
	<<set $consensual to 1>>
	<<neutral 1>>
	<<maninit>>
	<<set $enemytrust to $enemytrust + 100>>
	You follow the <<person>> into the house. The door is barely shut before <<hes>> pawing at you.
	<<promiscuity1>>
<</if>>
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<set $consensual to 0>>
	<<neutral 1>>
	<<controlloss>>
	<<molested>>
	<<maninit>>
	<<hand_gag 0 left>>
<</if>>
<<effects>>
<<effectsman>><<man>>
<<stateman>>

<<actionsman>>
<<if $finish is 1>>
	<<link [[Next|Domus Nude Sex Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Domus Nude Sex Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next|Domus Nude Sex Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Domus Nude Sex]]>><</link>><<nexttext>>
<</if>>

:: Domus Nude Sex Finish

<<set $outside to 1>><<set $location to "town">><<effects>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	"Thank you for cooperating. Here's the clothes." <<tearful>> you take the clothing and leave.

	<<set $prostitutionstat += 1>>
	<<fameprostitution 1>>
	<<clotheson>>
	<<endcombat>>
	<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

<<elseif $enemyhealth lte 0>>
	<<He>> recoils in pain, giving the chance you need. <<tearful>> you run through the building and back out onto the street.

	<<clotheson>>
	<<endcombat>>
	<<link [[Next|Domus Street]]>><</link>>

<<elseif $finish is 1>>
	"That's a shame. Here are the clothes." <<tearful>> you take the clothes and leave.

	<<clotheson>>
	<<endcombat>>
	<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

<</if>>

:: Domus Streak

<<set $outside to 1>><<set $location to "town">><<effects>>
You see the house <<he>> is pointing at. You run between two parked cars, giving yourself a moment. After a deep breath you leave the cover, your <<lewdness>> on display.

Running as fast as you can, you reach the house and hit the buzzer before turning tail and running the opposite direction.
<<if $rng gte 20>>
	You manage to make it back to the house, and as you reach the steps <<he>> hands you some clothes.

	"That was easy, wasn't it?" <<he>> asks. "You should come again."

	<<link [[Get changed and leave (0:01)|Domus Street]]>><<spareclothesdomus>><<endevent>><<pass 1>><</link>>

<<else>>
	You manage to make it across the street, but as you approach the steps <<he>> grins and slams the door, leaving you alone.

	You dive behind the cars again to avoid being seen as the door opposite opens.

	<<link [[Try another house|Domus House Nude]]>><<endevent>><</link>>

	<<link [[Stop|Domus Street]]>><<endevent>><</link>>

<</if>>

:: Widgets Spare Clothes Domus [widget]

<<widget "spareclothesdomus">>
	<<if $player.gender_appearance is "m">>
		<<upperwear 4>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow")>><<set $worn.upper.integrity /= 2>>
		<<lowerwear 5>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow")>><<set $worn.lower.integrity /= 2>>
	<<else>>
		<<upperwear 1>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow")>><<set $worn.upper.colour to $worn.lower.colour>>
		<<set $worn.lower.integrity /= 2>><<set $worn.upper.integrity /= 2>>
	<</if>>
<</widget>>