code:
:: Widgets [widget]

<<widget "toggledebug">><<nobr>>
	<<if $debug>>
		<<set $debug to 1>>
	<<else>>
		<<set $debug to 0>>
	<</if>>
<</nobr>><</widget>>

<<widget "statbar">><<nobr>>
	<<set _now to $args[0]>><<set _max to $args[1]>>

		<<set _percent=Math.floor((_now/_max)*100)>>
		<<if _now gte _max>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 4>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 3>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 2>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 1>>
			<<print '

'>>
		<<elseif _now gte 1>>
			<<print '

'>>
		<<else>>
			<<print '

'>>
		<</if>>

<</nobr>><</widget>>

<<widget "statbarinverted">><<nobr>>
	<<set _now to $args[0]>><<set _max to $args[1]>>

		<<set _percent=Math.floor((_now/_max)*100)>>
		<<if _now gte _max>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 4>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 3>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 2>>
			<<print '

'>>
		<<elseif _now gte (_max / 5) * 1>>
			<<print '

'>>
		<<elseif _now gte 1>>
			<<print '

'>>
		<<else>>
			<<print '

'>>
		<</if>>

<</nobr>><</widget>>

<<widget "statbarinvertedneg">><<nobr>>
	<<set _now to $args[0]>><<set _max to $args[1]>>

		<<set _percent=Math.floor((_now/_max)*100)>>
		<<if _now lte _max>>
			<<print '

'>>
		<<elseif _now lte (_max / 5) * 4>>
			<<print '

'>>
		<<elseif _now lte (_max / 5) * 3>>
			<<print '

'>>
		<<elseif _now lte (_max / 5) * 2>>
			<<print '

'>>
		<<elseif _now lte (_max / 5) * 1>>
			<<print '

'>>
		<<elseif _now lte -1>>
			<<print '

'>>
		<<else>>
			<<print '

'>>
		<</if>>

<</nobr>><</widget>>

<<widget "wateraction">><<nobr>>
	<<if $swimmingskill lt 100>>
		<<set $seconds += 18>><<set $oxygen -= 180>>
	<<elseif $swimmingskill lt 200>>
		<<set $seconds += 15>><<set $oxygen -= 150>>
	<<elseif $swimmingskill lt 300>>
		<<set $seconds += 12>><<set $oxygen -= 120>>
	<<elseif $swimmingskill lt 400>>
		<<set $seconds += 10>><<set $oxygen -= 100>>
	<<elseif $swimmingskill lt 500>>
		<<set $seconds += 8>><<set $oxygen -= 80>>
	<<elseif $swimmingskill lt 600>>
		<<set $seconds += 8>><<set $oxygen -= 80>>
	<<elseif $swimmingskill lt 700>>
		<<set $seconds += 7>><<set $oxygen -= 70>>
	<<elseif $swimmingskill lt 800>>
		<<set $seconds += 7>><<set $oxygen -= 70>>
	<<elseif $swimmingskill lt 900>>
		<<set $seconds += 6>><<set $oxygen -= 60>>
	<<elseif $swimmingskill lt 1000>>
		<<set $seconds += 6>><<set $oxygen -= 60>>
	<<else>>
		<<set $seconds += 5>><<set $oxygen -= 50>>
	<</if>>
<</nobr>><</widget>>

<<widget "underwater">><<nobr>>
	<<water>><<set $underwater to 1>><<set $underwatercheck to 1>>
	<<if $combat isnot 1>>
		<<if $seconds gte 60>>
			<<set $seconds -= 60>>
			<<pass 1>>
		<</if>>
		<<if $oxygen lt 0 and $nooxygen is 1>>
			<<set $stress += 1000>>
		<<elseif $oxygen lt 0 and $nooxygen isnot 1>>
			<<set $nooxygen to 1>>
		<<else>>
			<<set $nooxygen to 0>>
		<</if>>
		Air:
		<<if $oxygen lt 0>>
			You can't breathe! Your stress will increase and you'll soon pass out if you can't find air.
		<</if>>
		<<oxygencaption>>
		<<if $underwaterintro isnot 1 and $combat isnot 1>>
			<<set $underwaterintro to 1>>
			You can't hold your breath forever. You will pass less time and use less air per action with a higher swimming skill.

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

<<widget "oxygenrefresh">><<nobr>>
	<<set $oxygen to $oxygenmax>>
<</nobr>><</widget>>

<<widget "passwater">><<nobr>>
	<<if $outside is 1 and $weather is "clear">>
		<<if $upperwet gte 1>>
			<<set $upperwet -= ($pass * 2)>>
		<</if>>
		<<if $lowerwet gte 1>>
			<<set $lowerwet -= ($pass * 2)>>
		<</if>>
		<<if $underlowerwet gte 1>>
			<<set $underlowerwet -= ($pass * 2)>>
		<</if>>
		<<if $underupperwet gte 1>>
			<<set $underupperwet -= ($pass * 2)>>
		<</if>>
	<<elseif $outside is 1 and $weather is "rain">>
		<<if !$worn.upper.type.includes("naked") and !$worn.upper.type.includes("swim")>>
			<<set $upperwet += $pass>>
		<</if>>
		<<if !$worn.lower.type.includes("naked") and !$worn.lower.type.includes("swim")>>
			<<set $lowerwet += $pass>>
		<</if>>
		<<if !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity")>>
			<<set $underlowerwet += $pass>>
		<</if>>
		<<if !$worn.under_upper.type.includes("naked") and !$worn.under_upper.type.includes("chastity")>>
			<<set $underupperwet += $pass>>
		<</if>>
	<<else>>
		<<if $upperwet gte 1>>
			<<set $upperwet -= $pass>>
		<</if>>
		<<if $lowerwet gte 1>>
			<<set $lowerwet -= $pass>>
		<</if>>
		<<if $underlowerwet gte 1>>
			<<set $underlowerwet -= $pass>>
		<</if>>
		<<if $underupperwet gte 1>>
			<<set $underupperwet -= $pass>>
		<</if>>
	<</if>>
<</nobr>><</widget>>

<<widget "pass">><<nobr>>
	<<if $args[1]>>
		<<if $args[1].includes("h", 0)>>
			<<set $pass to ($args[0]*60)>>
		<<elseif $args[1].includes("d", 0)>>
			<<set $pass to ($args[0]*1440)>>
		<</if>>
	<<elseif $args[0]>>
		<<set $pass to $args[0]>>
	<<else>>
		<<set $pass to 0>>
	<</if>>
	<<passwater>>
	<<pregProgressTime $pass>>
	<<if $controlled is 0 and $anxiety gte 2>>
		<<set $stress += $pass>>
		<<if $background is "crossdresser" and ($player.gender is $player.appearance)>>
			<<set $stress += $pass>>
		<</if>>
	<<elseif $controlled is 0 and $anxiety gte 1>>
	<<else>>
		<<set $stress -= $pass>>
		<<if $background is "crossdresser" and ($player.gender isnot $player.appearance)>>
			<<set $stress -= $pass>>
		<</if>>
	<</if>>
	<<if $hallucinogen gt 0>>
		<<set $hallucinogen -= $pass>>
	<</if>>
	<<if $drunk gt 0>>
		<<set $drunk -= $pass>>
		<<set $tiredness += ($pass * ($drunk / 200))>>
	<</if>>
	<<if $drugged gt 0>>
		<<set $drugged -= $pass>>
	<</if>>
	<<if $pain gt 0>>
		<<set $pain -= $pass>>
	<</if>>
	<<if $pass gt 1200>>
		<<set $hunger to 0>><<set $thirst to 0>><<set $hygiene to 0>><<set $tiredness to 0>>
	<<else>>
		<<set $hunger += $pass>><<set $thirst += $pass>><<set $hygiene += $pass>><<set $tiredness += $pass>>
	<</if>>
	<<set $time += $pass>> <<set $minute += $pass>>
	<<set $arousal -= $pass*10>><<arousalpass>>
	<<if $daystate is "day" and $weather is "clear" and $outside is 1>>
		<<tanned $pass/10>>
	<</if>>
<</nobr>><</widget>>

<<widget "neutral">><<nobr>>
	<<if $args[0]>>
		<<if $consensual isnot 1>>
			<<if $drunk gte 480>>
				<<set $stress += ($args[0] * 3)>>
			<<elseif $drunk gte 360>>
				<<set $stress += ($args[0] * 4)>>
			<<elseif $drunk gte 240>>
				<<set $stress += ($args[0] * 6)>>
			<<elseif $drunk gte 120>>
				<<set $stress += ($args[0] * 8)>>
			<<elseif $drunk gte 1>>
				<<set $stress += ($args[0] * 9)>>
			<<else>>
				<<set $stress += ($args[0] * 10)>>
			<</if>>
			<<combattrauma $args[0]>>
		<</if>>
		<<set $arousal += 20 * $args[0]>>
		<<set $enemyarousal += $args[0]>>
	<</if>>
<</nobr>><</widget>>

<<widget "neutralbreast">><<nobr>>
	<<if $args[0]>>
		<<if $consensual isnot 1>>
			<<if $drunk gte 480>>
				<<set $stress += ($args[0] * 3)>>
			<<elseif $drunk gte 360>>
				<<set $stress += ($args[0] * 4)>>
			<<elseif $drunk gte 240>>
				<<set $stress += ($args[0] * 6)>>
			<<elseif $drunk gte 120>>
				<<set $stress += ($args[0] * 8)>>
			<<elseif $drunk gte 1>>
				<<set $stress += ($args[0] * 9)>>
			<<else>>
				<<set $stress += ($args[0] * 10)>>
			<</if>>
			<<combattrauma $args[0]>>
		<</if>>
		<<set $arousal += 20 * $args[0] * $breastsensitivity>>
		<<set $enemyarousal += $args[0]>>
	<</if>>
<</nobr>><</widget>>

<<widget "neutralgenitals">><<nobr>>
	<<if $args[0]>>
		<<if $consensual isnot 1>>
			<<if $drunk gte 480>>
				<<set $stress += ($args[0] * 3)>>
			<<elseif $drunk gte 360>>
				<<set $stress += ($args[0] * 4)>>
			<<elseif $drunk gte 240>>
				<<set $stress += ($args[0] * 6)>>
			<<elseif $drunk gte 120>>
				<<set $stress += ($args[0] * 8)>>
			<<elseif $drunk gte 1>>
				<<set $stress += ($args[0] * 9)>>
			<<else>>
				<<set $stress += ($args[0] * 10)>>
			<</if>>
			<<combattrauma $args[0]>>
		<</if>>
		<<set $arousal += 20 * $args[0] * $genitalsensitivity>>
		<<set $enemyarousal += $args[0]>>
	<</if>>
<</nobr>><</widget>>

<<widget "sex">><<nobr>>
	<<if $args[0]>>
		<<if $consensual isnot 1>>
			<<if $drunk gte 480>>
				<<set $stress += ($args[0] * 3)>>
			<<elseif $drunk gte 360>>
				<<set $stress += ($args[0] * 4)>>
			<<elseif $drunk gte 240>>
				<<set $stress += ($args[0] * 6)>>
			<<elseif $drunk gte 120>>
				<<set $stress += ($args[0] * 8)>>
			<<elseif $drunk gte 1>>
				<<set $stress += ($args[0] * 9)>>
			<<else>>
				<<set $stress += ($args[0] * 10)>>
			<</if>>
			<<combattrauma $args[0]>>
		<<else>>
			<<set $stress -= 10 * $args[0]>>
		<</if>>
		<<set $arousal += 20 * $args[0]>>
		<<set $enemyarousal += 2 * $args[0]>>
	<</if>>
<</nobr>><</widget>>

<<widget "violence">><<nobr>>
	<<if $args[0]>>
		<<if $drunk gte 480>>
			<<set $stress += ($args[0] * 3)>>
		<<elseif $drunk gte 360>>
			<<set $stress += ($args[0] * 4)>>
		<<elseif $drunk gte 240>>
			<<set $stress += ($args[0] * 6)>>
		<<elseif $drunk gte 120>>
			<<set $stress += ($args[0] * 8)>>
		<<elseif $drunk gte 1>>
			<<set $stress += ($args[0] * 9)>>
		<<else>>
			<<set $stress += ($args[0] * 10)>>
		<</if>>
		<<combattrauma $args[0]>>
		<<set $pain += ($args[0] * (1 - ($masochism / 1200)))>>
		<<set $arousal += ($args[0] * (0 + ($masochism / 50)))>>/*Max masochism will give 20x the normal pain value in arousal, roughly the same as sex.*/
		<<if $orgasmdown gte 1>>
			<<if $masochism gte 800>>
				<<set $masochism += ($args[0] / 20)>>
			<<elseif $masochism gte 500>>
				<<set $masochism += ($args[0] / 10)>>
			<<elseif $masochism gte 300>>
				<<set $masochism += ($args[0] / 6)>>
			<<elseif $masochism gte 100>>
				<<set $masochism += ($args[0] / 2)>>
			<<else>>
				<<set $masochism += $args[0]>>
			<</if>>
		<</if>>
		<<if $args[0] gt 6>>
			<<set $enemyanger -= 5>>
		<<else>>
			<<set $enemyanger -= $args[0]>>
		<</if>>
	<</if>>
<</nobr>><</widget>>

<<widget "submission">><<nobr>>
	<<if $args[0]>>
		<<if $consensual isnot 1>>
			<<if $drunk gte 480>>
				<<set $stress += ($args[0] * 3)>>
			<<elseif $drunk gte 360>>
				<<set $stress += ($args[0] * 4)>>
			<<elseif $drunk gte 240>>
				<<set $stress += ($args[0] * 6)>>
			<<elseif $drunk gte 120>>
				<<set $stress += ($args[0] * 8)>>
			<<elseif $drunk gte 1>>
				<<set $stress += ($args[0] * 9)>>
			<<else>>
				<<set $stress += ($args[0] * 10)>>
			<</if>>
			<<set $submissive += 1>>
		<<else>>
			<<set $stress -= 10 * $args[0]>>
			<<set $assertive += 1>>
		<</if>>
		<<set $arousal += 20 * $args[0]>>
		<<set $enemyarousal += 3 * $args[0]>>
		<<set $enemytrust += 2>>
	<</if>>
<</nobr>><</widget>>

<<widget "defiance">><<nobr>>
	<<if $args[0]>>
		<<set _negargs = -$args[0]>>
		<<set $stress -= 10 * $args[0]>>
		<<combattrauma _negargs>>
		<<set $enemyanger += 5 * $args[0]>>
		<<set $enemyhealth -= (2 * $args[0] * ($physique / 4000))>>
		<<set $submissive -= 1>>
		<<set $enemytrust -= 4>>
	<</if>>
<</nobr>><</widget>>

<<widget "brat">><<nobr>>
	<<if $args[0]>>
		<<set _negargs = -$args[0]>>
		<<if $drunk gte 480>>
			<<set $stress += ($args[0] * 3)>>
		<<elseif $drunk gte 360>>
			<<set $stress += ($args[0] * 4)>>
		<<elseif $drunk gte 240>>
			<<set $stress += ($args[0] * 6)>>
		<<elseif $drunk gte 120>>
			<<set $stress += ($args[0] * 8)>>
		<<elseif $drunk gte 1>>
			<<set $stress += ($args[0] * 9)>>
		<<else>>
			<<set $stress += ($args[0] * 10)>>
		<</if>>
		<<combattrauma _negargs>>
		<<set $enemyanger += 5 * $args[0]>>
		<<set $submissive -= 1>>
		<<set $enemytrust -= 2>>
	<</if>>
<</nobr>><</widget>>

<<widget "meek">><<nobr>>
	<<if $args[0]>>
		<<if $consensual isnot 1>>
			<<set $submissive += 1>>
		<<else>>
			<<set $assertive += 1>>
		<</if>>
		<<set $arousal += 20 * $args[0]>>
		<<set $enemyarousal += $args[0]>>
		<<set $enemytrust += 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "crimeup">><<nobr>>
	<<if $args[0]>>
		<<set $crime += $args[0]>>
		<<set $crimehistory += $args[0]>>
	<</if>>
<</nobr>><</widget>>

<<widget "seductionskilluse">>
	<<set $enemyarousal += ($seductionskill / 100)>><<set $seductionskill += 5>>
<</widget>>

<<widget "seductionskillusecombat">>
	<<set $enemyarousal += ($seductionskill / 100)>><<set $seductionskill += 5>><<set $seductionskillup to 1>>
<</widget>>

<<widget "oralskilluse">>
	<<set $enemyarousal += ($oralskill / 100)>><<set $oralskill += 5>><<set $oralskillup to 1>>
<</widget>>

<<widget "vaginalskilluse">>
	<<set $enemyarousal += ($vaginalskill / 100)>><<set $vaginalskill += 5>><<set $vaginalskillup to 1>>
<</widget>>

<<widget "analskilluse">>
	<<set $enemyarousal += ($analskill / 100)>><<set $analskill += 5>><<set $analskillup to 1>>
<</widget>>

<<widget "handskilluse">>
	<<set $enemyarousal += ($handskill / 100)>><<set $handskill += 5>><<set $handskillup to 1>>
<</widget>>

<<widget "feetskilluse">>
	<<set $enemyarousal += ($feetskill / 100)>><<set $feetskill += 5>><<set $feetskillup to 1>>
<</widget>>

<<widget "bottomskilluse">>
	<<set $enemyarousal += ($bottomskill / 100)>><<set $bottomskill += 5>><<set $bottomskillup to 1>>
<</widget>>

<<widget "thighskilluse">>
	<<set $enemyarousal += ($thighskill / 100)>><<set $thighskill += 5>><<set $thighskillup to 1>>
<</widget>>

<<widget "chestskilluse">>
	<<set $enemyarousal += ($chestskill / 100)>><<set $chestskill += 5>><<set $chestskillup to 1>>
<</widget>>

<<widget "penileskilluse">>
	<<set $enemyarousal += ($penileskill / 100)>><<set $penileskill += 5>><<set $penileskillup to 1>>
<</widget>>

<<widget "skulduggeryskilluse">><<nobr>>
	<<set $skulduggery += 3>>
	<<if $skulduggery lt 1000>>
		 You learned a thing or two about skulduggery.

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

<<widget "combatskulduggeryskilluse">><<nobr>>
	<<set $skulduggery += 3>>
	<<if $skulduggery lt 1000>>
		 You learned a thing or two about skulduggery.
	<</if>>
<</nobr>><</widget>>

<<widget "swimmingskilluse">><<nobr>>
	<<set $swimmingskill += 9>>
	<<if $swimmingskill lt 1000>>
		 You've become more confident at swimming.

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

<<widget "danceskilluse">><<nobr>>
	<<set $danceskill += 1>>
	<<if $danceskill lt 1000>>
		 You feel more confident in your dancing abilities.
	<</if>>
<</nobr>><</widget>>

<<widget "historyskill">><<nobr>>
	<<set $history += 2>><<set $school += 2>>
	<<if $worn.face.type.includes("glasses")>>
		<<set $history += 1>><<set $school += 1>>
	<</if>>
	<<if $exposed gte 1>>
		<<set $history += 1>><<set $school += 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "mathsskill">><<nobr>>
	<<set $maths += 2>><<set $school += 2>>
	<<if $worn.face.type.includes("glasses")>>
		<<set $maths += 1>><<set $school += 1>>
	<</if>>
	<<if $exposed gte 1>>
		<<set $maths += 1>><<set $school += 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "scienceskill">><<nobr>>
	<<set $science += 2>><<set $school += 2>>
	<<if $worn.face.type.includes("glasses")>>
		<<set $science += 1>><<set $school += 1>>
	<</if>>
	<<if $exposed gte 1>>
		<<set $science += 1>><<set $school += 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "englishskill">><<nobr>>
	<<set $english += 2>><<set $school += 2>>
	<<if $worn.face.type.includes("glasses")>>
		<<set $english += 1>><<set $school += 1>>
	<</if>>
	<<if $exposed gte 1>>
		<<set $english += 1>><<set $school += 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "schoolskill">><<nobr>>
	<<historyskill>>
	<<mathsskill>>
	<<scienceskill>>
	<<englishskill>>
<</nobr>><</widget>>

<<widget "physique">><<nobr>>
	<<if $args[0]>><<set _temp to $args[0]>><<else>><<set _temp to 1>><</if>>
	<<if $exposed gte 2>>
		<<set _temp *= 1.2>>
	<<elseif $exposed is 1>>
		<<set _temp *= 1.1>>
	<</if>>
	<<set $bottomgrowthtimer += 5 * _temp>>
	<<set $physique += 10 * _temp>><<set $physiqueuse += _temp>>
	<<if $combat isnot 1>>
		 You get a good workout.
	<<else>>
		 It invigorates you.
	<</if>>
<</nobr>><</widget>>

<<widget "bruise">><<nobr>>
	<<if $args[0]>>
		<<switch $args[0]>>
		<<case "face">>
			<<set $facebruise += 1>>
		<<case "neck">>
			<<set $neckbruise += 1>>
		<<case "chest">>
			<<set $chestbruise += 1>>
		<<case "rightarm">>
			<<set $rightarmbruise += 1>>
		<<case "leftarm">>
			<<set $leftarmbruise += 1>>
		<<case "tummy">>
			<<set $tummybruise += 1>>
		<<case "bottom">>
			<<set $bottombruise += 1>>
		<<case "thigh">>
			<<set $thighbruise += 1>>
		<<case "anus">>
			<<set $anusbruise += 1>>
		<<case "vagina">>
			<<set $vaginabruise += 1>>
		<<case "penis">>
			<<set $penisbruise += 1>>
		<<case "full">>
			<<set $facebruise += 1>>
			<<set $neckbruise += 1>>
			<<set $chestbruise += 1>>
			<<set $rightarmbruise += 1>>
			<<set $leftarmbruise += 1>>
			<<set $tummybruise += 1>>
			<<set $bottombruise += 1>>
			<<set $thighbruise += 1>>
		<</switch>>
	<</if>>
<</nobr>><</widget>>

<<widget "rapestat">><<set $rapestat += 1>><</widget>>

<<widget "moleststat">><<set $moleststat += 1>><</widget>>

<<widget "vaginalstat">><<set $vaginalstat += 1>><</widget>>

<<widget "vaginalejacstat">><<set $vaginalejacstat += 1>><<set $purity -= 1>><<internalejac>><<creampie "self" "vagina">><</widget>>

<<widget "analstat">><<set $analstat += 1>><</widget>>

<<widget "analejacstat">><<set $analejacstat += 1>><<set $purity -= 1>><<internalejac>><<fertilize>><<creampie "self" "anus">><</widget>>

<<widget "oralstat">><<set $oralstat += 1>><</widget>>

<<widget "oralejacstat">><<set $oralejacstat += 1>><<set $purity -= 1>><<internalejac>><<creampie "self" "mouth">><</widget>>

<<widget "handstat">><<set $handstat += 1>><</widget>>

<<widget "handejacstat">><<set $handejacstat += 1>><</widget>>

<<widget "feetstat">><<set $feetstat += 1>><</widget>>

<<widget "feetejacstat">><<set $feetejacstat += 1>><</widget>>

<<widget "thighstat">><<set $thighstat += 1>><</widget>>

<<widget "thighejacstat">><<set $thighejacstat += 1>><</widget>>

<<widget "cheststat">><<set $cheststat += 1>><</widget>>

<<widget "chestejacstat">><<set $chestejacstat += 1>><</widget>>

<<widget "bottomstat">><<set $bottomstat += 1>><</widget>>

<<widget "bottomejacstat">><<set $bottomejacstat += 1>><</widget>>

<<widget "penilestat">><<set $penilestat += 1>><</widget>>

<<widget "penileejacstat">><<set $penileejacstat += 1>><</widget>>

<<widget "clothesstripstat">><<set $clothesstripstat += 1>><</widget>>

<<widget "clothesruinstat">><<set $clothesruinstat += 1>><</widget>>

<<widget "orgasmstat">><<set $orgasmstat += 1>><</widget>>

<<widget "ejacstat">><<set $ejacstat += 1>><</widget>>

<<widget "hitstat">><<set $hitstat += 1>><</widget>>

<<widget "attackstat">><<set $attackstat += 1>><</widget>>

<<widget "vaginalentranceejacstat">><<set $vaginalentranceejacstat += 1>><</widget>>

<<widget "faceejacstat">><<set $faceejacstat += 1>><</widget>>

<<widget "hairejacstat">><<set $hairejacstat += 1>><</widget>>

<<widget "tummyejacstat">><<set $tummyejacstat += 1>><</widget>>

<<widget "neckejacstat">><<set $neckejacstat += 1>><</widget>>

<<widget "dancestat">><<set $dancestat += 1>><</widget>>

<<widget "hunger">><<nobr>>
<<if $hunger gte 2000>>You are starving!
<<elseif $hunger gte 1600>>You are famished.
<<elseif $hunger gte 1200>>You are hungry.
<<elseif $hunger gte 800>>You are peckish.
<<elseif $hunger gte 400>>You are satisfied.
<<elseif $hunger gte 1>>You are satiated.
<<elseif $hunger lte 0>>You are full.
<</if>>
<</nobr>><</widget>>

<<widget "thirst">><<nobr>>
<<if $thirst gte 2000>>You are dehydrated!
<<elseif $thirst gte 1600>>You are really thirsty.
<<elseif $thirst gte 1200>>You are thirsty.
<<elseif $thirst gte 800>>Your throat is dry.
<<elseif $thirst gte 400>>You are satisfied.
<<elseif $thirst gte 1>>You are satiated.
<<elseif $thirst lte 0>>You are full.
<</if>>
<</nobr>><</widget>>

<<widget "tirednesscaption">><<nobr>>
<<if $tiredness gte 2000>>You are exhausted.
<<elseif $tiredness gte 1600>>You are fatigued.
<<elseif $tiredness gte 1200>>You are tired.
<<elseif $tiredness gte 800>>You are wearied.
<<elseif $tiredness gte 400>>You are alert.
<<elseif $tiredness gte 1>>You are wide awake.
<<else>>You are refreshed.
<</if>>

<<if $tiredness gte 2000>><<set $stress += (($tiredness - 2000) * 16)>><<set $trauma += (($tiredness - 2000) / 3)>>
<</if>>
<<set $tiredness = Math.clamp($tiredness, 0, $tirednessmax)>>
<<statbar $tiredness $tirednessmax>>

<</nobr>><</widget>>

<<widget "hygiene">><<nobr>>
<<if $hygiene gte 2000>>You are filthy.
<<elseif $hygiene gte 1600>>You are soiled.
<<elseif $hygiene gte 1200>>You are smelly.
<<elseif $hygiene gte 800>>You are messy.
<<elseif $hygiene gte 400>>You are neat.
<<elseif $hygiene gte 1>>You are clean.
<<elseif $hygiene lte 0>>You are speckless.
<</if>>
<</nobr>><</widget>>

<<widget "stresscaption">><<nobr>>
<<if $stress gte 10000>>You are overwhelmed!
<<elseif $stress gte 8000>>You are distressed.
<<elseif $stress gte 6000>>You are strained.
<<elseif $stress gte 4000>>You are tense.
<<elseif $stress gte 2000>>You are calm.
<<elseif $stress gte 1>>You are placid.
<<else>>You are serene.

<</if>>
<<set $stress = Math.clamp($stress, 0, $stressmax)>>
<<statbar $stress $stressmax>>

<</nobr>><</widget>>

<<widget "traumacaption">><<nobr>>
<<if $trauma gte $traumamax>>You feel numb.
<<elseif $trauma gte ($traumamax / 5) * 4>>You are tormented.
<<elseif $trauma gte ($traumamax / 5) * 3>>You are disturbed.
<<elseif $trauma gte ($traumamax / 5) * 2>>You are troubled.
<<elseif $trauma gte ($traumamax / 5) * 1>>You are nervous.
<<elseif $trauma gte 1>>You are uneasy.
<<else>>You are healthy.
<</if>>

<<statbar $trauma $traumamax>>

<</nobr>><</widget>>

<<widget "innocencecaption">><<nobr>>
<<if $awareness gte 0>>You understand.
<<elseif $awareness gt -40>>You are uncertain.
<<elseif $awareness gt -80>>You are perplexed.
<<elseif $awareness gt -120>>You are curious.
<<elseif $awareness gt -160>>You are trusting.
<<elseif $awareness gt -200>>You are naive.
<<else>>You are oblivious.
<</if>>

<<statbarinvertedneg $awareness -200>>

<</nobr>><</widget>>

<<widget "controlcaption">><<nobr>>
<<if $control gte $controlmax>>You are confident.
<<elseif $control gte ($controlmax / 5) * 4>>You are insecure.
<<elseif $control gte ($controlmax / 5) * 3>>You are worried.
<<elseif $control gte ($controlmax / 5) * 2>>You are anxious.
<<elseif $control gte ($controlmax / 5) * 1>>You are scared.
<<elseif $control gte 1>>You are frightened.
<<else>>You are terrified.
<</if>>

<<statbarinverted $control $controlmax>>

<</nobr>><</widget>>

<<widget "arousalcaption">><<nobr>>
<<if $arousal gte 10000>>You shake with arousal.
<<elseif $arousal gte 8000>>A heat rises within.
<<elseif $arousal gte 6000>>You feel horny.
<<elseif $arousal gte 4000>>You feel lustful.
<<elseif $arousal gte 2000>>You feel aroused.
<<elseif $arousal gte 1>>You feel sensual.
<<else>>You feel cold.
<</if>>

<<statbar $arousal $arousalmax>>

<</nobr>><</widget>>

<<widget "allurecaption">><<nobr>>

<<if $allure gte (6000 * $alluremod)>>You look like you need to be ravaged.
<<elseif $allure gte (4000 * $alluremod)>>You look perverted.
<<elseif $allure gte (3000 * $alluremod)>>You look lewd.
<<elseif $allure gte (2000 * $alluremod)>>You stand out.
<<elseif $allure gte (1500 * $alluremod)>>You attract attention.
<<elseif $allure gte (1000 * $alluremod)>>You attract glances.
<<else>>You look unremarkable.
<</if>>

		<<set $percent=Math.floor(($allure/(8000 * $alluremod))*100)>>
		<<if $allure gte (6000 * $alluremod)>>
		<<print '

'>>
		<<elseif $allure gte (4000 * $alluremod)>>
		<<print '

'>>
		<<elseif $allure gte (3000 * $alluremod)>>
		<<print '

'>>
		<<elseif $allure gte (2000 * $alluremod)>>
		<<print '

'>>
		<<elseif $allure gte (1500 * $alluremod)>>
		<<print '

'>>
		<<elseif $allure gte (1000 * $alluremod)>>
		<<print '

'>>
		<<else>>
		<<print '

'>>
		<</if>>

<<if $allure gte 8000>><<set $allure to 8000>><</if>>
<<if $alluretest is 1>>
<<set $allure += 100000>>
<</if>>
<</nobr>><</widget>>

<<widget "oxygencaption">><<nobr>>
<<statbarinverted $oxygen $oxygenmax>>
<</nobr>><</widget>>

<<widget "flashbacktown">><<nobr>>
You hear a car horn blare somewhere in the distance, and you panic. Phantom tendrils probe your body and restrict your limbs as a wordless voice jeers and promises endless debasement. It lasts only a moment, but the impression of violation remains.
<<garousal>><<gstress>><<gtrauma>><<arousal 6>><<stress 12>><<trauma 6>>

<</nobr>><</widget>>

<<widget "flashbackhome">><<nobr>>
You hear a car drive past, and you panic. Phantom tendrils probe your body and restrict your limbs as a wordless voice jeers and promises endless debasement. It lasts only a moment, but the impression of violation remains.
<<garousal>><<gstress>><<gtrauma>><<arousal 6>><<stress 6>><<trauma 6>>

<</nobr>><</widget>>

<<widget "flashbackbeach">><<nobr>>
You hear a gull squawk, and you panic. Phantom tendrils probe your body and restrict your limbs as a wordless voice jeers and promises endless debasement. It lasts only a moment, but the impression of violation remains.
<<garousal>><<gstress>><<gtrauma>><<arousal 6>><<stress 6>><<trauma 6>>

<</nobr>><</widget>>

<<widget "flashbackunderground">><<nobr>>
You feel a tremor through the earth, and you panic. Phantom tendrils probe your body and restrict your limbs as a wordless voice jeers and promises endless debasement. It lasts only a moment, but the impression of violation remains.
<<garousal>><<gstress>><<gtrauma>><<arousal 6>><<stress 6>><<trauma 6>>

<</nobr>><</widget>>

<<widget "flashbackschool">><<nobr>>
You remember the last time you were molested at school, and you panic. Phantom tendrils probe your body and restrict your limbs as a wordless voice jeers and promises endless debasement. It lasts only a moment, but the impression of violation remains.
<<garousal>><<gstress>><<gtrauma>><<arousal 6>><<stress 6>><<trauma 6>>

<</nobr>><</widget>>

<<widget "drunk">><<nobr>>

<<if $drunk gt 0>>
	<<if $drunk lte 120>>
	You are woozy.
	<<elseif $drunk lte 240>>
	You are tipsy.
	<<elseif $drunk lte 360>>
	You are drunk.
	<<elseif $drunk lte 480>>
	You are smashed
	<<else>>
	You are wasted
	<</if>>

		<<set $percent=Math.floor(($drunk/1000)*100)>>
		<<if $drunk gte 500>>
		<<print '

'>>
		<<elseif $drunk gte 400>>
		<<print '

'>>
		<<elseif $drunk gte 300>>
		<<print '

'>>
		<<elseif $drunk gte 200>>
		<<print '

'>>
		<<elseif $drunk gte 100>>
		<<print '

'>>
		<<elseif $drunk gte 1>>
		<<print '

'>>
		<<else>>
		<<print '

'>>
		<</if>>

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

<<widget "drugged">><<nobr>>

<<if $drugged gt 0>>
A lewd warmth fills you

		<<set $percent=Math.floor(($drugged/1000)*100)>>
		<<if $drugged gte 500>>
		<<print '

'>>
		<<elseif $drugged gte 400>>
		<<print '

'>>
		<<elseif $drugged gte 300>>
		<<print '

'>>
		<<elseif $drugged gte 200>>
		<<print '

'>>
		<<elseif $drugged gte 100>>
		<<print '

'>>
		<<elseif $drugged gte 1>>
		<<print '

'>>
		<<else>>
		<<print '

'>>
		<</if>>

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

<<widget "hallucinogen">><<nobr>>

<<if $hallucinogen gt 0>>
Your perception is altered

		<<set $percent=Math.floor(($hallucinogen/1000)*100)>>
		<<if $hallucinogen gte 500>>
		<<print '

'>>
		<<elseif $hallucinogen gte 400>>
		<<print '

'>>
		<<elseif $hallucinogen gte 300>>
		<<print '

'>>
		<<elseif $hallucinogen gte 200>>
		<<print '

'>>
		<<elseif $hallucinogen gte 100>>
		<<print '

'>>
		<<elseif $hallucinogen gte 1>>
		<<print '

'>>
		<<else>>
		<<print '

'>>
		<</if>>

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

<<widget "paincaption">><<nobr>>
<<if $pain gte 100 and $willpowerpain is 0>>You sob uncontrollably.
<<elseif $pain gte 80>>You cry and whimper.
<<elseif $pain gte 60>>You are crying.
<<elseif $pain gte 40>>Tears run down your face.
<<elseif $pain gte 20>>Tears well in your eyes.
<<elseif $pain gte 1>>You are upset.
<<else>>You feel okay.
<</if>>

		<<set $percent=Math.floor(($pain/200)*100)>>
		<<if $pain gte 100 and $willpowerpain is 0>>
		<<print '

'>>
		<<elseif $pain gte 80>>
		<<print '

'>>
		<<elseif $pain gte 60>>
		<<print '

'>>
		<<elseif $pain gte 40>>
		<<print '

'>>
		<<elseif $pain gte 20>>
		<<print '

'>>
		<<elseif $pain gte 1>>
		<<print '

'>>
		<<else>>
		<<print '

'>>
		<</if>>

<</nobr>><</widget>>

<<widget "raped">><<nobr>>
<<if $rapeavoid is 1 and $consensual is 0 and $gamemode isnot "soft">>
<<set $rapeavoid to 0>><<set $rapestat += 1>>
	<<if $face isnot "covered" and !$worn.face.type.includes("mask")>>
	<<set $famerape += $enemyno>><<set $fame += $enemyno>>
	<</if>>
	<<if $awareness lte 200>>
	<<set $awareness += 5>>
	<<elseif $awareness lte 400>>
	<<set $awareness += 1>>
	<</if>>
	<<if $enemytype is "beast">>
	<<set $beastrapestat += 1>>
		<<if $awareness lte 300>>
		<<set $awareness += 1>>
		<</if>>
	<</if>>
	<<if $enemytype is "tentacles">>
	<<set $tentaclerapestat += 1>>
		<<if $awareness lte 400>>
		<<set $awareness += 1>>
		<</if>>
	<</if>>
<<controlloss>>
<<elseif $sexavoid is 1 and $consensual is 1>>
<<set $sexavoid to 0>>
	<<if $face isnot "covered" and !$worn.face.type.includes("mask")>>
	<<set $famesex += $enemyno>><<set $fame += $enemyno>>
	<</if>>
<<controlloss>>
<</if>>
<</nobr>><</widget>>

<<widget "molested">><<nobr>>
<<if $gamemode is "soft">>
<<set $consensual to 1>>
<</if>>
<<if $molestavoid is 1 and $consensual is 0 and $gamemode isnot "soft">>
<<set $molestavoid to 0>>
<<moleststat>>

	<<if $location is "town" and $flashbacktown is 0>>
	<<set $flashbacktown to 7>>
	<</if>>
	<<if $location is "home" and $flashbackhome is 0>>
	<<set $flashbackhome to 7>>
	<</if>>
	<<if $location is "beach" and $flashbackbeach is 0>>
	<<set $flashbackbeach to 7>>
	<</if>>
	<<if $awareness lte 200>>
	<<set $awareness += 5>>
	<<elseif $awareness lte 400>>
	<<set $awareness += 1>>
	<</if>>
	<<if $enemytype is "beast">>
		<<if $awareness lte 300>>
		<<set $awareness += 1>>
		<</if>>
	<</if>>
	<<if $enemytype is "tentacles">>
		<<if $awareness lte 400>>
		<<set $awareness += 1>>
		<</if>>
	<</if>>
<</if>>
<</nobr>><</widget>>

<<widget "consensual">><<nobr>>

	<<if $awareness lte 200>>
	<<set $awareness += 5>>
	<<elseif $awareness lte 400>>
	<<set $awareness += 1>>
	<</if>>
	<<if $enemytype is "beast">>
		<<if $awareness lte 300>>
		<<set $awareness += 1>>
		<</if>>
	<</if>>
	<<if $enemytype is "tentacles">>
		<<if $awareness lte 400>>
		<<set $awareness += 1>>
		<</if>>
	<</if>>
<<set $trueconsensual to 1>>
<</nobr>><</widget>>

<<widget "controlloss">><<nobr>>
<<if $gamemode is "soft">>
<<elseif $consensual is 0>>
<<set $pullaway to 0>>
<<set $novaginal to 0>>
<<set $noanal to 0>>
<<set $nopenile to 0>>
	<<if $control gt 1>>
		<<if $molesttrait gte 1 and $rapeavoid is 1>>
		<<else>>
		<<set $controlstart to $control>><<control -25>>
			<<if $control gte ($controlmax * 0.74)>>
			Your sense of control wavers.
			<<elseif $control gte ($controlmax * 0.49)>>
			Your sense of control falters.
			<<elseif $control gte ($controlmax * 0.24)>>
			Your sense of control cracks.
			<<elseif $control gte 1>>
			Your sense of control breaks down.
			<<else>>
			Your sense of control shatters.
			<</if>>
		<</if>>
	<</if>>
<</if>>
<</nobr>><</widget>>

<<widget "beastescape">><<nobr>>
<<trauma 12>><<set $pain += 40>><<set $stress += 400>><<set $worn.lower.integrity -= 20>><<set $worn.upper.integrity -= 20>><<set $worn.under_lower.integrity -= 20>><<set $worn.under_upper.integrity -= 20>><<bruise full>><<gstress>><<gtrauma>>
<</nobr>><</widget>>

<<widget "weatherdisplay">><<nobr>>
<<if $images is 1>>
	<<if $daystate is "day">>
		<<if $location is "tentworld">>

		<<else>>

		<</if>>
		<<if $location is "tentworld">>

		<<elseif $weather is "clear">>

		<<elseif $weather is "overcast">>

		<<elseif $weather is "rain">>

		<</if>>
		<<if $location is "beach">>

		<<elseif $location is "sea">>

		<<elseif $location is "home">>

		<<elseif $location is "town">>

		<<elseif $location is "docks">>

		<<elseif $location is "pub">>

		<<elseif $location is "forest">>

		<<elseif $location is "lake">>

		<<elseif $location is "asylum">>
			<<if $hallucinations gte 1>>

			<<else>>

			<</if>>
		<<elseif $location is "tentworld">>

		<<elseif $location is "underground">>

		<<elseif $location is "sewers">>

		<<elseif $location is "school">>

		<<elseif $location is "cabin">>

		<<elseif $location is "pool">>

		<</if>>
	<<elseif $daystate is "night">>
		<<if $location is "tentworld">>

		<<elseif $moonstate is "evening" and $hour gte 21 or $moonstate is "morning" and $hour lte 6>>

		<<else>>

		<</if>>
		<<if $location is "tentworld">>

		<<elseif $weather is "clear">>

		<<elseif $weather is "overcast">>

		<<elseif $weather is "rain">>

		<</if>>
		<<if $location is "beach">>

		<<elseif $location is "sea">>

		<<elseif $location is "home">>

		<<elseif $location is "town">>

		<<elseif $location is "docks">>

		<<elseif $location is "pub">>

		<<elseif $location is "forest">>

		<<elseif $location is "lake">>

		<<elseif $location is "asylum">>
			<<if $hallucinations gte 1>>

			<<else>>

			<</if>>
		<<elseif $location is "tentworld">>

		<<elseif $location is "underground">>

		<<elseif $location is "sewers">>

		<<elseif $location is "school">>

		<<elseif $location is "cabin">>

		<<elseif $location is "pool">>

		<</if>>
	<<elseif $daystate is "dawn">>
		<<if $location is "tentworld">>

		<<else>>

		<</if>>
		<<if $location is "tentworld">>

		<<elseif $weather is "clear">>

		<<elseif $weather is "overcast">>

		<<elseif $weather is "rain">>

		<</if>>
		<<if $location is "beach">>

		<<elseif $location is "sea">>

		<<elseif $location is "home">>

		<<elseif $location is "town">>

		<<elseif $location is "docks">>

		<<elseif $location is "pub">>

		<<elseif $location is "forest">>

		<<elseif $location is "lake">>

		<<elseif $location is "asylum">>
			<<if $hallucinations gte 1>>

			<<else>>

			<</if>>
		<<elseif $location is "tentworld">>

		<<elseif $location is "underground">>

		<<elseif $location is "sewers">>

		<<elseif $location is "school">>

		<<elseif $location is "cabin">>

		<<elseif $location is "pool">>

		<</if>>
	<<elseif $daystate is "dusk">>
		<<if $location is "tentworld">>

		<<else>>

		<</if>>
		<<if $location is "tentworld">>

		<<elseif $weather is "clear">>

		<<elseif $weather is "overcast">>

		<<elseif $weather is "rain">>

		<</if>>
		<<if $location is "beach">>

		<<elseif $location is "sea">>

		<<elseif $location is "home">>

		<<elseif $location is "town">>

		<<elseif $location is "docks">>

		<<elseif $location is "pub">>

		<<elseif $location is "forest">>

		<<elseif $location is "lake">>

		<<elseif $location is "asylum">>
			<<if $hallucinations gte 1>>

			<<else>>

			<</if>>
		<<elseif $location is "tentworld">>

		<<elseif $location is "underground">>

		<<elseif $location is "sewers">>

		<<elseif $location is "school">>

		<<elseif $location is "cabin">>

		<<elseif $location is "pool">>

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

<<else>>

<<if $daystate is "day">>
	<<if $weather is "clear">>
		It's a bright and sunny day.

	<<elseif $weather is "rain">>
		It's a rainy day.

	<<elseif $weather is "overcast">>
		Clouds are hiding the sun.

	<</if>>
<<elseif $daystate is "night">>
	<<if $weather is "clear">>
		The stars are shining.

	<<elseif $weather is "rain">>
		It's a rainy night.

	<<elseif $weather is "overcast">>
		All starlight is blocked by the clouds.

	<</if>>
<<elseif $daystate is "dawn">>
	<<if $weather is "clear">>
		The sun is rising.

	<<elseif $weather is "rain">>
		It's a rainy morning.

	<<elseif $weather is "overcast">>
		It's a cloudy morning.

	<</if>>
<<elseif $daystate is "dusk">>
	<<if $weather is "clear">>
		The sun is setting.

	<<elseif $weather is "rain">>
		It's a rainy evening.

	<<elseif $weather is "overcast">>
		It's cloudy evening.

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

<<widget "wearandtear">><<nobr>>
<<if $args[0] is "dance">>
	<<if !$worn.upper.type.includes("dance")>>
	<<set $worn.upper.integrity -= 1>>
	<</if>>
	<<if !$worn.lower.type.includes("dance")>>
	<<set $worn.lower.integrity -= 1>>
	<</if>>
	<<if !$worn.under_lower.type.includes("dance")>>
	<<set $worn.under_lower.integrity -= 1>>
	<</if>>
	<<if !$worn.under_upper.type.includes("dance")>>
	<<set $worn.under_upper.integrity -= 1>>
	<</if>>
<<else>>
<<set $worn.upper.integrity -= 1>><<set $worn.lower.integrity -= 1>><<set $worn.under_lower.integrity -= 1>><<set $worn.under_upper.integrity -= 1>>
<</if>>
<</nobr>><</widget>>

<<widget "towelup">><<nobr>>
<<if $exposed gte 1>>
	<<if $upperwetstage gte 3>>
	<<upperwear 3>>
	<</if>>
	<<if $lowerwetstage gte 3>>
	<<lowerwear 3>>
	<</if>>
	<<if $worn.upper.exposed gte 1>>
	<<upperwear 14>>
	<<elseif $worn.lower.exposed gte 1>>
	<<lowerwear 3>>
	<</if>>
<</if>>
<</nobr>><</widget>>

<<widget "plantupper">><<nobr>>
<<if $worn.upper.exposed gte 2 or $upperwetstage gte 3>>
<<upperwear 6>>
<</if>>
<</nobr>><</widget>>

<<widget "plantlower">><<nobr>>
<<if $worn.lower.exposed gte 2 and $worn.under_lower.exposed gte 1 or $lowerwetstage gte 3 and $underlowerwetstage gte 3 or $lowerwetstage gte 3 and $worn.under_lower.exposed gte 1>>
<<lowerwear 8>>
<</if>>
<</nobr>><</widget>>

<<widget "plantup">><<nobr>>
<<if $worn.upper.exposed gte 2 and $worn.under_upper.exposed gte 1 or $upperwetstage gte 3 and $underupperwetstage gte 3>>
<<upperwear 6>>
<</if>>
<<if $worn.lower.exposed gte 2 and $worn.under_lower.exposed gte 1 or $lowerwetstage gte 3 and $underlowerwetstage gte 3 or $lowerwetstage gte 3 and $worn.under_lower.exposed gte 1>>
<<lowerwear 8>>
<</if>>
<</nobr>><</widget>>

<<widget "schoolspareclothes">><<nobr>>
<<if !$worn.upper.type.includes("school") and !$worn.lower.type.includes("school")>>
<<upperwear 5>><<set $worn.upper.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.upper.integrity /= 2>>
	<<if $clothingselector is "m">>
	<<lowerwear 6>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.lower.integrity /= 2>>
	<<else>>
	<<lowerwear 7>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.lower.integrity /= 2>>
	<</if>>
<<elseif !$worn.lower.type.includes("school")>>
	<<if $clothingselector is "m">>
	<<lowerwear 6>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.lower.integrity /= 2>>
	<<else>>
	<<lowerwear 7>><<set $worn.lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.lower.integrity /= 2>>
	<</if>>
<<elseif !$worn.upper.type.includes("school")>>
<<upperwear 5>><<set $worn.upper.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.upper.integrity /= 2>>
<</if>>
<</nobr>><</widget>>

<<widget "spareschoolswimsuit">><<nobr>>
<<underupperwear 2>><<set $worn.under_upper.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.under_upper.integrity /= 2>>
<<set $worn.under_lower.colour to clone($worn.under_upper.colour)>><<set $worn.under_lower.integrity /= 2>>
<</nobr>><</widget>>

<<widget "spareschoolswimshorts">><<nobr>>
<<underlowerwear 7>><<set $worn.under_lower.colour to either("black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "white", "yellow")>><<set $worn.under_lower.integrity /= 2>>
<</nobr>><</widget>>

<<widget "exposedcheck">><<nobr>>

<<set $breastindicator to 0>>

<<if $worn.under_lower.exposed gte 1>>
<<set $toplessgender to $player.gender>>
<<elseif $breastsize gte 8>>
<<set $toplessgender to "f">>
<<elseif $worn.under_upper.exposed gte 1>>
	<<if $breastsize gte 3>>
	<<set $toplessgender to "f">>
	<<else>>
		<<if $worn.under_lower.gender is "f">>
		<<set $toplessgender to "f">>
		<<elseif $worn.under_lower.gender is "m">>
		<<set $toplessgender to "m">>
		<<else>>
			<<if $worn.lower.gender is "f">>
			<<set $toplessgender to "f">>
			<<elseif $worn.lower.gender is "m">>
			<<set $toplessgender to "m">>
			<<else>>
			<<set $toplessgender to $player.gender>>
			<</if>>
		<</if>>
	<</if>>
<<else>>
	<<if $worn.under_lower.gender is "f">>
	<<set $toplessgender to "f">>
	<<elseif $worn.under_lower.gender is "m">>
	<<set $toplessgender to "m">>
	<<else>>
		<<if $worn.under_upper.gender is "f">>
		<<set $toplessgender to "f">>
		<<elseif $worn.under_upper.gender is "m">>
		<<set $toplessgender to "m">>
		<<else>>
			<<if $worn.lower.gender is "f">>
			<<set $toplessgender to "f">>
			<<elseif $worn.lower.gender is "m">>
			<<set $toplessgender to "m">>
			<<else>>
			<<set $toplessgender to $player.gender>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $crossdressing isnot 1>>
<<if $worn.under_lower.exposed gte 1 and $worn.lower.exposed gte 2>>
<<set $player.appearance to $player.gender>>
<<elseif $worn.lower.vagina_exposed gte 1 and $worn.under_lower.vagina_exposed gte 1>>
<<set $player.appearance to $player.gender>>
<<elseif $worn.upper.exposed gte 2 and $worn.under_upper.exposed gte 1 and $breastsize gte 3>>
<<set $player.appearance to "f">><<set $breastindicator to 1>>
<<elseif $worn.lower.gender isnot "n">>
<<set $player.appearance to $worn.lower.gender>>
<<elseif $worn.upper.gender isnot "n">>
<<set $player.appearance to $worn.upper.gender>>
<<elseif $worn.under_lower.gender isnot "n" and $worn.lower.exposed gte 2>>
<<set $player.appearance to $worn.under_lower.gender>>
<<elseif $worn.under_upper.gender isnot "n" and $worn.upper.exposed gte 2>>
<<set $player.appearance to $worn.under_upper.gender>>
<<elseif $worn.upper.exposed gte 2 and $worn.under_upper.exposed gte 1 and $breastsize lte 2>>
<<set $player.appearance to "m">>
<<else>>
<<set $player.appearance to $player.gender>>
<</if>>
<</if>>

<</nobr>><</widget>>

<<widget "exposure">><<nobr>>

<<if $location isnot "beach" and $location isnot "pool" and $location isnot "sea" and $location isnot "lake">>
<<set $libertine to 0>>
<<else>>
<<set $libertine to 1>>
<</if>>

<<set $worn.upper.exposedcarry to $worn.upper.exposed>>
<<set $worn.lower.exposedcarry to $worn.lower.exposed>>
<<set $worn.under_lower.exposedcarry to $worn.under_lower.exposed>>
<<set $worn.under_upper.exposedcarry to $worn.under_upper.exposed>>

<<if $upperwetstage gte 3>>
<<set $worn.upper.exposed to 2>>
<</if>>
<<if $lowerwetstage gte 3>>
<<set $worn.lower.exposed to 2>>
<</if>>
<<if $underlowerwetstage gte 3>>
<<set $worn.under_lower.exposed to 1>>
<</if>>
<<if $underupperwetstage gte 3>>
<<set $worn.under_upper.exposed to 1>>
<</if>>

<<exposedcheck>>

<<set $exposed to 0>>
<<if $worn.upper.exposed gte 1>>
	<<if $player.appearance is "m">>
	<<elseif $libertine gte 1>>
	<<else>>
	<<set $exposed to 1>>
	<</if>>
<</if>>
<<if $worn.upper.exposed gte 2 and $player.appearance isnot "m">>
	<<if $libertine is 1>>
	<<set $topless to 1>>
	<<else>>
	<<set $exposed to 1>>
	<</if>>
<<else>>
<<set $topless to 0>>
<</if>>
<<if $worn.lower.exposed gte 1>>
	<<if $libertine gte 1>>
	<<else>>
	<<set $exposed to 1>>
	<</if>>
<</if>>

<<if $worn.lower.exposed gte 2>>
	<<if $worn.under_lower.exposed gte 1>>
	<<set $exposed to 2>>
	<<elseif $libertine gte 1>>
	<<else>>
	<<set $exposed to 1>>
	<</if>>
<</if>>

<<set $worn.upper.exposed to $worn.upper.exposedcarry>>
<<set $worn.lower.exposed to $worn.lower.exposedcarry>>
<<set $worn.under_lower.exposed to $worn.under_lower.exposedcarry>>
<<set $worn.under_upper.exposed to $worn.under_upper.exposedcarry>>

<</nobr>><</widget>>

<<widget "integritycheck">><<nobr>>
<<if $worn.upper.name isnot "naked">>
	<<if $worn.upper.integrity lte 0>>Your $worn.upper.name <<upperplural>> ripped into scraps, exposing your <<breastsstop>>

	<<upperruined>><<clothesruinstat>><<set $upperoff to 0>>
	<</if>>
<</if>>
<<if $worn.lower.name isnot "naked">>
	<<if $worn.lower.integrity lte 0>>Your $worn.lower.name <<lowerplural>> ripped into scraps, exposing your <<undiesstop>>

	<<lowerruined>><<clothesruinstat>><<set $loweroff to 0>>
	<</if>>
<</if>>
<<if $worn.under_upper.name isnot "naked">>
	<<if $worn.under_upper.integrity lte 0>>Your $worn.under_upper.name <<underupperplural>> ripped into scraps, exposing your <<breastsstop>>

	<<underupperruined>><<clothesruinstat>><<set $underupperoff to 0>>
	<</if>>
<</if>>
<<if $worn.under_lower.name isnot "naked">>
	<<if $worn.under_lower.integrity lte 0>>Your $worn.under_lower.name <<underlowerplural>> ripped into scraps, exposing your <<genitalsstop>>

		<<if $worn.under_lower.type.includes("chastity")>>
		<<set $worn.under_lower.type.push("broken")>>
			<<if $vaginalchastityparasite isnot 0>>
With the chastity belt gone, the $vaginalchastityparasite fall out of your vagina.

<<set $vaginalchastityparasite to 0>>
			<</if>>
			<<if $penilechastityparasite isnot 0>>
			With the chastity belt gone, the $penilechastityparasite fall off of your penis.

			<<set $penilechastityparasite to 0>>
			<</if>>
			<<if $analchastityparasite isnot 0>>
			With the chastity belt gone, the $analchastityparasite fall out of your anus.

			<<set $analchastityparasite to 0>>
			<</if>>
			<<if $worn.under_lower.anal_shield is 1>><<set $worn.under_lower.anal_shield to 0>>
			<</if>>
		<</if>>
	<<underlowerruined>><<clothesruinstat>><<set $underloweroff to 0>>
	<</if>>
<</if>>
<</nobr>><</widget>>

<<widget "unbind">><<nobr>>
<<set $rightboundcarry to 0>>
<<set $leftboundcarry to 0>>
<<set $leftarm to 0>>
<<set $rightarm to 0>>
<</nobr>><</widget>>

<<widget "bind">><<nobr>>
<<set $leftarm to "bound">>
<<set $rightarm to "bound">>
<</nobr>><</widget>>

<<widget "bindings">><<nobr>>
<<if $leftarm is "bound" and $position isnot "wall">><<set $leftboundcarry to 1>><</if>>
<<if $rightarm is "bound" and $position isnot "wall">><<set $rightboundcarry to 1>><</if>>
<<if $rightboundcarry is 1 and $rightarm isnot "bound">>
<<set $rightarm to "bound">>
<</if>>
<<if $leftboundcarry is 1 and $leftarm isnot "bound">>
<<set $leftarm to "bound">>
<</if>>
<</nobr>><</widget>>

<<widget "water">><<nobr>>
<<if !$worn.upper.type.includes("swim") and !$worn.upper.type.includes("naked")>>

<<set $upperwet to 200>>
<</if>>
<<if !$worn.lower.type.includes("swim") and !$worn.lower.type.includes("naked")>>

<<set $lowerwet to 200>>
<</if>>
<<if !$worn.under_lower.type.includes("swim") and !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity")>>

<<set $underlowerwet to 200>>
<</if>>
<<if !$worn.under_upper.type.includes("swim") and !$worn.under_upper.type.includes("naked") and !$worn.under_upper.type.includes("chastity")>>

<<set $underupperwet to 200>>
<</if>>

<<waterwash>>
<<set $inwater to 1>>
<</nobr>><</widget>>

<<widget "storecleanup">><<nobr>>

<<set $action_unclad_outfit to 0>>
<<set $action_unclad_upper to 0>>
<<set $action_unclad_lower to 0>>
<<set $action_unclad_under_outfit>>
<<set $action_unclad_under_lower to 0>>
<<set $action_unclad_under_upper to 0>>

<</nobr>><</widget>>

<<widget "activeclothes">><<nobr>>/*For use at the start of a loop with _e as the variable. Sets _active_clothes to each category of clothing in turn to simulate the functionality of an array.*/
<<if _e is 0>><<set _active_clothes to "upper">><</if>>
<<if _e is 1>><<set _active_clothes to "lower">><</if>>
<<if _e is 2>><<set _active_clothes to "under_upper">><</if>>
<<if _e is 3>><<set _active_clothes to "under_lower">><</if>>
<<if _e is 4>><<set _active_clothes to "head">><</if>>
<<if _e is 5>><<set _active_clothes to "face">><</if>>
<<if _e is 6>><<set _active_clothes to "neck">><</if>>
<<if _e is 7>><<set _active_clothes to "legs">><</if>>
<<if _e is 8>><<set _active_clothes to "feet">><</if>>
<</nobr>><</widget>>

<<widget "storeactions">><<nobr>>
<<set _temp_strip to $args[0]>>
<<exposure>>

<<if $action_unclad_outfit is 1>><<set $action_unclad_outfit to 0>>
	<<if _temp_strip is "wolfcave">>
	You remove your $worn.upper.name. They may be animals, but stripping in front of them makes a chill run through your spine.

	<<elseif $location is "pool">>
	<<else>>
	You check to make sure no one is around, then slowly remove your $worn.upper.name. Despite being alone, doing this in a public space makes a chill run through your spine.

	<</if>>
	<<upperundress _temp_strip>>
<</if>>

<<if $action_unclad_upper is 1>><<set $action_unclad_upper to 0>>
	<<if _temp_strip is "wolfcave">>
	You remove your $worn.upper.name. They may be animals, but stripping in front of them makes your nipples erect and your newly-exposed skin tingle.

	<<elseif $location is "pool">>
	<<else>>
	You check to make sure no one is around, then slowly remove your $worn.upper.name. Despite being alone, doing this in a public space makes your nipples erect and your newly-exposed skin tingle.

	<</if>>
	<<upperundress _temp_strip>>
<</if>>

<<if $action_unclad_lower is 1>><<set $action_unclad_lower to 0>>
	<<if _temp_strip is "wolfcave">>
	You remove your $worn.lower.name. They may be animals, but stripping in front of them makes you shiver delightfully.

	<<elseif $location is "pool">>
	<<else>>
	You check to make sure no one is around, then slowly remove your $worn.lower.name. Despite being alone, doing this in a public space makes you shiver delightfully.

	<</if>>
	<<lowerundress _temp_strip>>
<</if>>

<<if $action_unclad_under_outfit is 1>><<set $action_unclad_under_outfit to 0>>
	<<if _temp_strip is "wolfcave">>
	You remove your $worn.under_upper.name. They may be animals, but stripping in front of them makes a chill run through your spine.

	<<elseif $location is "pool">>
	<<else>>
	You check to make sure no one is around, then slowly remove your $worn.under_upper.name. Despite being alone, doing this in a public space makes a chill run through your spine.

	<</if>>
	<<underlowerundress _temp_strip>><<underupperundress _temp_strip>>
<</if>>

<<if $action_unclad_under_upper is 1>><<set $action_unclad_under_upper to 0>>
	<<if _temp_strip is "wolfcave">>
	You remove your $worn.under_upper.name. They may be animals, but stripping in front of them makes your skin and <<genitals>> tingle.

	<<elseif $location is "pool">>
	<<else>>
	You check to make sure no one is around, then slowly remove your $worn.under_upper.name. Despite being alone, doing this in a public space makes your skin and <<genitals>> tingle.

	<</if>>
	<<underupperundress _temp_strip>>
<</if>>

<<if $action_unclad_under_lower is 1>><<set $action_unclad_under_lower to 0>>
	<<if _temp_strip is "wolfcave">>
	You remove your $worn.under_lower.name. They may be animals, but stripping in front of them makes your skin and <<genitals>> tingle.

	<<elseif $location is "pool">>
	<<else>>
	You check to make sure no one is around, then slowly remove your $worn.under_lower.name. Despite being alone, doing this in a public space makes your skin and <<genitals>> tingle.

	<</if>>
	<<underlowerundress _temp_strip>>
<</if>>

<<for _e to 0; _e lt $clothing_number; _e++>>
<<activeclothes>>
	<<for _i to 0; _i lt $store[_active_clothes].length; _i++>>
		<<if $store[_active_clothes][_i].location is _temp_strip>>
		<<set _temp_clothes_present to 1>>
		<</if>>
	<</for>>
<</for>>

<<if _temp_clothes_present is 1>>
<<link [[Get Dressed|$passage]]>><<storeon _temp_strip>><<set $eventskip to 1>><</link>>

<</if>>

<<if $worn.upper.cursed isnot 1 and $worn.lower.cursed isnot 1>>
	<<if $worn.under_lower.exposed lte 0 and !$worn.under_lower.type.includes("chastity")>>
		<<if $worn.upper.set is $worn.lower.set>>
	Remove and hide your <<link [[$worn.upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_outfit to 1>><</link>>

		<</if>>
	<<else>>
		<<if $worn.upper.set is $worn.lower.set and $exhibitionism gte 15>>
	Remove and hide your <<link [[$worn.upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_outfit to 1>><</link>>

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

<<if $worn.upper.cursed isnot 1>>
	<<if $worn.upper.set isnot $worn.lower.set and !$worn.upper.type.includes("naked")>>
		<<if $worn.under_upper.type.includes("naked") and $toplessgender is "f" and $exhibitionism gte 15>>
		Remove and hide your <<link [[$worn.upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_upper to 1>><</link>>

		<<else>>
		Remove and hide your <<link [[$worn.upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_upper to 1>><</link>>

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

<<if $worn.lower.cursed isnot 1>>
	<<if !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity")>>
		<<if $worn.upper.set isnot $worn.lower.set and !$worn.lower.type.includes("naked")>>
	Remove and hide your <<link [[$worn.lower.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_lower to 1>><</link>>

		<</if>>
	<<else>>
		<<if $worn.upper.set isnot $worn.lower.set and !$worn.lower.type.includes("naked") and $exhibitionism gte 15>>
	Remove and hide your <<link [[$worn.lower.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_lower to 1>><</link>>

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

<<if $worn.under_upper.cursed isnot 1 and $worn.under_lower.cursed isnot 1>>
	<<if $worn.under_upper.set is $worn.under_lower.set and $exhibitionism gte 15 and $worn.upper.exposed gte 2 and $worn.lower.exposed gte 2>>
	Remove and hide your <<link [[$worn.under_upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_under_outfit to 1>><</link>>

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

<<if $worn.under_upper.cursed isnot 1>>
	<<if $worn.under_upper.set isnot $worn.under_lower.set and !$worn.under_upper.type.includes("naked") and $worn.upper.exposed gte 2>>
		<<if $toplessgender isnot "f">>
		Remove and hide your <<link [[$worn.under_upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_under_upper to 1>><</link>>

		<<elseif $exhibitionism gte 15>>
		Remove and hide your <<link [[$worn.under_upper.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_under_upper to 1>><</link>>

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

<<if $worn.under_lower.cursed isnot 1>>
	<<if !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity") and $worn.under_upper.set isnot $worn.under_lower.set and $exhibitionism gte 15 and ($worn.lower.skirt is 1 or $worn.lower.exposed gte 2)>>
	Remove and hide your <<link [[$worn.under_lower.name|$passage]]>><<set $eventskip to 1>><<set $action_unclad_under_lower to 1>><</link>>

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

<<exposure>>

<</nobr>><</widget>>

<<widget "dancestripeffects">><<nobr>>

<<if $danceaction is "outfitstripbreasts">><<set $danceaction to 0>>
You gracefully remove your $worn.upper.name, exposing your <<undertop>> and $worn.under_lower.name. The exhibition of your breasts makes them feel raw and sensitive.
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<upperstrip>><<lowerstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "outfitstripchest">><<set $danceaction to 0>>
	<<if $player.gender is "f">>
	You gracefully remove your $worn.upper.name, exposing your <<undertop>> and $worn.under_lower.name. You feel your nipples harden in response to being revealed.
	<<else>>
	You gracefully remove your $worn.upper.name, exposing your <<undertop>> and $worn.under_lower.name. Your feminine countenance makes your revealed chest feel especially lewd.
	<</if>>
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<upperstrip>><<lowerstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "outfitstripunder">>
<<set $danceaction to 0>>
You gracefully remove your $worn.upper.name, exposing your <<undertop>> and $worn.under_lower.name. You feel your nipples harden in response to being revealed.
<<set $audiencearousal += 6>><<set $audienceexcitement += 6>><<set $audiencemod += 2>><<arousal 3>><<upperstrip>><<lowerstrip>><<exhibitionism3>>
<</if>>

<<if $danceaction is "outfitstripnude">>
<<set $danceaction to 0>>
You gracefully remove your $worn.upper.name, exposing your nude form. You shiver with excitement, your body laid totally bare.
<<set $audiencearousal += 10>><<set $audienceexcitement += 10>><<set $audiencemod += 4>><<arousal 3>><<upperstrip>><<lowerstrip>><<exhibitionism5>>
<</if>>

<<if $danceaction is "upperstripbreasts">>
<<set $danceaction to 0>>
You gracefully remove your $worn.upper.name, exposing your <<breastsstop>> The exhibition of your breasts makes them feel raw and sensitive.
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<upperstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "upperstripfchest">>
<<set $danceaction to 0>>
	<<if $player.gender is "f">>
	You gracefully remove your $worn.upper.name, exposing your <<breastsstop>> You feel your nipples harden in response to being revealed.
	<<else>>
	You gracefully remove your $worn.upper.name, exposing your <<breastsstop>> Your feminine countenance makes your revealed chest feel especially lewd.
	<</if>>
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<upperstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "upperstripmchest">>
<<set $danceaction to 0>>
You gracefully remove your $worn.upper.name, exposing your <<breastsstop>> You feel your nipples harden in response to being revealed.
<<set $audiencearousal += 2>><<set $audienceexcitement += 2>><<set $audiencemod += 1>><<arousal 3>><<upperstrip>><<exhibitionism1>>
<</if>>

<<if $danceaction is "underoutfitstripbreasts">>
<<set $danceaction to 0>>
You gracefully remove your $worn.under_upper.name, exposing your <<breasts>> and $worn.under_lower.name. The exhibition of your breasts makes them feel raw and sensitive.
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<underupperstrip>><<underlowerstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "underoutfitstripchest">>
<<set $danceaction to 0>>
	<<if $player.gender is "f">>
	You gracefully remove your $worn.under_upper.name, exposing your <<breasts>> and $worn.under_lower.name. You feel your nipples harden in response to being revealed.
	<<else>>
	You gracefully remove your $worn.under_upper.name, exposing your <<breasts>> and $worn.under_lower.name. Your feminine countenance makes your revealed chest feel especially lewd.
	<</if>>
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<underupperstrip>><<underlowerstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "underoutfitstripunder">>
<<set $danceaction to 0>>
You gracefully remove your $worn.under_upper.name, exposing your <<breasts>> and $worn.under_lower.name. You feel your nipples harden in response to being revealed.
<<set $audiencearousal += 6>><<set $audienceexcitement += 6>><<set $audiencemod += 2>><<arousal 3>><<underupperstrip>><<underlowerstrip>><<exhibitionism3>>
<</if>>

<<if $danceaction is "underoutfitstripnude">>
<<set $danceaction to 0>>
You gracefully remove your $worn.under_upper.name, exposing your nude form. You shiver with excitement, your body laid totally bare.
<<set $audiencearousal += 10>><<set $audienceexcitement += 10>><<set $audiencemod += 4>><<arousal 3>><<underupperstrip>><<underlowerstrip>><<exhibitionism5>>
<</if>>

<<if $danceaction is "underupperstripbreasts">>
<<set $danceaction to 0>>
You gracefully remove your $worn.under_upper.name, exposing your <<breastsstop>> The exhibition of your breasts makes them feel raw and sensitive.
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<underupperstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "underupperstripfchest">>
<<set $danceaction to 0>>
	<<if $player.gender is "f">>
	You gracefully remove your $worn.under_upper.name, exposing your <<breastsstop>> You feel your nipples harden in response to being revealed.
	<<else>>
	You gracefully remove your $worn.under_upper.name, exposing your <<breastsstop>> Your feminine countenance makes your revealed chest feel especially lewd.
	<</if>>
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<underupperstrip>><<exhibitionism4>>
<</if>>

<<if $danceaction is "underupperstripmchest">>
<<set $danceaction to 0>>
You gracefully remove your $worn.under_upper.name, exposing your <<breastsstop>> You feel your nipples harden in response to being revealed.
<<set $audiencearousal += 2>><<set $audienceexcitement += 2>><<set $audiencemod += 1>><<arousal 3>><<underupperstrip>><<exhibitionism1>>
<</if>>

<<if $danceaction is "lowerstripunder">><<set $danceaction to 0>>
You gracefully remove your $worn.lower.name, exposing your $worn.under_lower.name. Being seen in your underwear excites you.
<<set $audiencearousal += 6>><<set $audienceexcitement += 6>><<set $audiencemod += 2>><<arousal 3>><<lowerstrip>><<exhibitionism3>>
<</if>>

<<if $danceaction is "lowerstripnude">><<set $danceaction to 0>>
You gracefully remove your $worn.lower.name, exposing your <<genitalsstop>>
	<<if $worn.upper.type.includes("naked")>>
	You shiver with excitement, your body laid totally bare.
	<<else>>
	Your $worn.upper.name makes your naked lower half feel particularly conspicuous.
	<</if>>
<<set $audiencearousal += 10>><<set $audienceexcitement += 10>><<set $audiencemod += 4>><<arousal 3>><<lowerstrip>><<exhibitionism5>>
<</if>>

<<if $danceaction is "underupperstripopen">><<set $danceaction to 0>>
You gracefully remove your $worn.under_upper.name from beneath your $worn.upper.name. You're careful not to give too much away, but such a lewd gesture thrills you nonetheless.
<<set $audiencearousal += 3>><<set $audienceexcitement += 3>><<set $audiencemod += 1>><<arousal 1>><<underupperstrip>><<exhibitionism1>>
<</if>>

<<if $danceaction is "understripskirt">><<set $danceaction to 0>>
You gracefully remove your $worn.under_lower.name from beneath your $worn.lower.name. You're careful not to give too much away, but such a lewd gesture thrills you nonetheless.
<<set $audiencearousal += 6>><<set $audienceexcitement += 6>><<set $audiencemod += 2>><<arousal 3>><<underlowerstrip>><<exhibitionism3>>
<</if>>

<<if $danceaction is "understripnude">><<set $danceaction to 0>>
You gracefully remove your $worn.under_lower.name, exposing your <<genitalsstop>> You shiver with excitement, your body laid totally bare.
<<set $audiencearousal += 10>><<set $audienceexcitement += 10>><<set $audiencemod += 4>><<arousal 3>><<underlowerstrip>><<exhibitionism5>>
<</if>>

<</nobr>><</widget>>

<<widget "dancestripactions">><<nobr>>

	<<if $worn.upper.set is $worn.lower.set>>
		<<if !$worn.under_lower.type.includes("naked")>>
			<<if $breastsize gte 3>>
				<<if $exhibitionism gte 55>>
				Strip $worn.upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "outfitstripbreasts">> |
				<</if>>
			<<elseif $player.appearance isnot "m" and $worn.lower.gender isnot "m">>
				<<if $exhibitionism gte 55>>
				Strip $worn.upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "outfitstripchest">> |
				<</if>>
			<<else>>
				<<if $exhibitionism gte 35>>
				Strip $worn.upper.name <<combatexhibitionist3>> <<radiobutton "$danceaction" "outfitstripunder">> |
				<</if>>
			<</if>>
		<<else>>
			<<if $exhibitionism gte 75>>
			Strip $worn.upper.name <<combatexhibitionist5>> <<radiobutton "$danceaction" "outfitstripnude">> |
			<</if>>
		<</if>>
	<</if>>

	<<if !$worn.upper.type.includes("naked") and $worn.upper.set isnot $worn.lower.set>>
		<<if $breastsize gte 3>>
			<<if $exhibitionism gte 55>>
			Strip $worn.upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "upperstripbreasts">> |
			<</if>>
		<<elseif $player.appearance isnot "m" and $worn.lower.gender isnot "m">>
			<<if $exhibitionism gte 55>>
			Strip $worn.upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "upperstripfchest">> |
			<</if>>
		<<else>>
		Strip $worn.upper.name <<combatexhibitionist1>> <<radiobutton "$danceaction" "upperstripmchest">> |
		<</if>>
	<</if>>

	<<if !$worn.lower.type.includes("naked") and $worn.upper.set isnot $worn.lower.set>>
		<<if !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity")>>
			<<if $exhibitionism gte 35>>
			Strip $worn.lower.name <<combatexhibitionist3>> <<radiobutton "$danceaction" "lowerstripunder">> |
			<</if>>
		<<else>>
			<<if $exhibitionism gte 75>>
			Strip $worn.lower.name <<combatexhibitionist5>> <<radiobutton "$danceaction" "lowerstripnude">> |
			<</if>>
		<</if>>
	<</if>>

	<<if $worn.under_upper.set is $worn.under_lower.set>>
		<<if !$worn.under_lower.type.includes("naked")>>
			<<if $breastsize gte 3>>
				<<if $exhibitionism gte 55>>
				Strip $worn.under_upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "underoutfitstripbreasts">> |
				<</if>>
			<<elseif $player.appearance isnot "m" and $worn.under_lower.gender isnot "m">>
				<<if $exhibitionism gte 55>>
				Strip $worn.under_upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "underoutfitstripchest">> |
				<</if>>
			<<else>>
				<<if $exhibitionism gte 35>>
				Strip $worn.under_upper.name <<combatexhibitionist3>> <<radiobutton "$danceaction" "underoutfitstripunder">> |
				<</if>>
			<</if>>
		<<else>>
			<<if $exhibitionism gte 75>>
			Strip $worn.under_upper.name <<combatexhibitionist5>> <<radiobutton "$danceaction" "underoutfitstripnude">> |
			<</if>>
		<</if>>
	<</if>>

	<<if !$worn.under_upper.type.includes("naked") and $worn.under_upper.set isnot $worn.under_lower.set>>
		<<if !$worn.upper.type.includes("naked") and $worn.upper.open is 1>>
		Strip $worn.under_upper.name <<combatexhibitionist1>> <<radiobutton "$danceaction" "underupperstripopen">> |
		<<elseif $breastsize gte 3>>
			<<if $exhibitionism gte 55>>
			Strip $worn.under_upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "underupperstripbreasts">> |
			<</if>>
		<<elseif $player.appearance isnot "m" and $worn.under_lower.gender isnot "m">>
			<<if $exhibitionism gte 55>>
			Strip $worn.under_upper.name <<combatexhibitionist4>> <<radiobutton "$danceaction" "underupperstripfchest">> |
			<</if>>
		<<else>>
		Strip $worn.under_upper.name <<combatexhibitionist1>> <<radiobutton "$danceaction" "underupperstripmchest">> |
		<</if>>
	<</if>>

	<<if !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity") and $worn.under_upper.set isnot $worn.under_lower.set>>
		<<if !$worn.lower.type.includes("naked") and $worn.lower.skirt is 1>>
			<<if $exhibitionism gte 35>>
			Strip $worn.under_lower.name <<combatexhibitionist3>> <<radiobutton "$danceaction" "understripskirt">> |
			<</if>>
		<<elseif $worn.lower.type.includes("naked")>>
			<<if $exhibitionism gte 75>>
			Strip $worn.under_lower.name <<combatexhibitionist5>> <<radiobutton "$danceaction" "understripnude">> |
			<</if>>
		<</if>>
	<</if>>

<</nobr>><</widget>>

<<widget "arousalpass">><<nobr>>
<<if $penilechastityparasite isnot 0>>
<<set $arousal += ($pass * 10 * $genitalsensitivity)>>
<</if>>
<<if $vaginalchastityparasite isnot 0>>
<<set $arousal += ($pass * 10 * $genitalsensitivity)>>
<</if>>
<<if $analchastityparasite isnot 0>>
<<set $arousal += ($pass * 10)>>
<</if>>
<<if $parasite.nipples.name>>
<<set $arousal += ($pass * 10 * $breastsensitivity)>>
<</if>>
<<if $parasite.penis.name>>
<<set $arousal += ($pass * 10 * $genitalsensitivity)>>
<</if>>
<<if $parasite.clit.name>>
<<set $arousal += ($pass * 10 * $genitalsensitivity)>>
<</if>>
<<if $parasite.bottom.name>>
<<set $arousal += ($pass * 10)>>
<</if>>
<</nobr>><</widget>>

<<widget "swimmingcheck">><<nobr>>
<<if $swimmingskill gte $swimmingdifficulty>>
<<set $swimmingcheck to "pass">>
<<else>>
<<set $swimmingcheck to "fail">>
<</if>>
<</nobr>><</widget>>

<<widget "undiestrauma">><<nobr>>
<<if !$worn.under_lower.type.includes("naked") and !$worn.under_lower.type.includes("chastity")>>
<<gtrauma>><<gstress>><<trauma 1>><<stress 1>>
<<else>>
<<gtrauma>><<gstress>><<trauma 3>><<stress 3>>
<</if>>
<</nobr>><</widget>>

<<widget "goo">><<nobr>>
<<goooutsidecount>>

<<if $goooutsidecount gte 1 and $semenoutsidecount gte 1>>
	<<if $goooutsidecount + $semenoutsidecount gte 100>>
	Lewd fluid drenches you from head to toe.

	<<elseif $goooutsidecount + $semenoutsidecount gte 25>>
	You are drenched in slime and semen.

	<<elseif $goooutsidecount + $semenoutsidecount gte 20>>
	You are soaked with slime and semen.

	<<elseif $goooutsidecount + $semenoutsidecount gte 15>>
	Your skin is slick with slime and semen.

	<<elseif $goooutsidecount + $semenoutsidecount gte 10>>
	You are wet with slime and semen.

	<<elseif $goooutsidecount + $semenoutsidecount gte 5>>
	Your skin is moist with slime and semen.

	<<else>>
	You feel slime and semen on your skin.

	<</if>>

<<elseif $goooutsidecount gte 1>>
	<<if $goooutsidecount gte 25>>
	You are drenched in slime.

	<<elseif $goooutsidecount gte 20>>
	You are soaked with slime.

	<<elseif $goooutsidecount gte 15>>
	Your skin is slick with slime.

	<<elseif $goooutsidecount gte 10>>
	You are wet with slime.

	<<elseif $goooutsidecount gte 5>>
	Your skin is moist with slime.

	<<else>>
	You feel slime on your skin.

	<</if>>

<<elseif $semenoutsidecount gte 1>>
	<<if $semenoutsidecount gte 25>>
	You are drenched in semen.

	<<elseif $semenoutsidecount gte 20>>
	You are soaked with semen.

	<<elseif $semenoutsidecount gte 15>>
	Your skin is slick with semen.

	<<elseif $semenoutsidecount gte 10>>
	You are wet with semen.

	<<elseif $semenoutsidecount gte 5>>
	Your skin is moist with semen.

	<<else>>
	You feel semen on your skin.

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

<<if $vaginagoo gte 1 and $vaginasemen gte 1>>
	<<if $vaginagoo + $vaginasemen gte 5>>
	Your womb overflows with slime and semen.

	<<elseif $vaginagoo + $vaginasemen gte 4>>
	Your <<pussy>> overflows with slime and semen.

	<<elseif $vaginagoo + $vaginasemen gte 3>>
	Slime and semen flows from your <<pussystop>>

	<<elseif $vaginagoo + $vaginasemen gte 2>>
	Slime and semen stream from your <<pussystop>>

	<<elseif $vaginagoo + $vaginasemen gte 1>>
	Slime and semen drip from your <<pussystop>>

	<</if>>

<<elseif $vaginagoo gte 1>>
	<<if $vaginagoo gte 5>>
	Your womb overflows with slime.

	<<elseif $vaginagoo gte 4>>
	Your <<pussy>> overflows with slime.

	<<elseif $vaginagoo gte 3>>
	Slime flows from your <<pussystop>>

	<<elseif $vaginagoo gte 2>>
	Slime streams from your <<pussystop>>

	<<elseif $vaginagoo gte 1>>
	Slime drips from your <<pussystop>>

	<</if>>

<<elseif $vaginasemen gte 1>>
	<<if $vaginasemen gte 5>>
	Your womb overflows with semen.

	<<elseif $vaginasemen gte 4>>
	Your <<pussy>> overflows with semen.

	<<elseif $vaginasemen gte 3>>
	Semen flows from your <<pussystop>>

	<<elseif $vaginasemen gte 2>>
	Semen streams from your <<pussystop>>

	<<elseif $vaginasemen gte 1>>
	Semen drips from your <<pussystop>>

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

<<if $anusgoo gte 1 and $anussemen gte 1>>
	<<if $anusgoo + $anussemen gte 5>>
	Your bowels overflow with slime and semen.

	<<elseif $anusgoo + $anussemen gte 4>>
	Your <<bottom>> overflows with slime and semen.

	<<elseif $anusgoo + $anussemen gte 3>>
	Slime and semen flows from your <<bottomstop>>

	<<elseif $anusgoo + $anussemen gte 2>>
	Slime and semen stream from your <<bottomstop>>

	<<elseif $anusgoo + $anussemen gte 1>>
	Slime and semen drip from your <<bottomstop>>

	<</if>>

<<elseif $anusgoo gte 1>>
	<<if $anusgoo gte 5>>
	Your bowels overflow with slime.

	<<elseif $anusgoo gte 4>>
	Your <<bottom>> overflows with slime.

	<<elseif $anusgoo gte 3>>
	Slime flows from your <<bottomstop>>

	<<elseif $anusgoo gte 2>>
	Slime streams from your <<bottomstop>>

	<<elseif $anusgoo gte 1>>
	Slime drips from your <<bottomstop>>

	<</if>>

<<elseif $anussemen gte 1>>
	<<if $anussemen gte 5>>
	Your bowels overflow with semen.

	<<elseif $anussemen gte 4>>
	Your <<bottom>> overflows with semen.

	<<elseif $anussemen gte 3>>
	Semen flows from your <<bottomstop>>

	<<elseif $anussemen gte 2>>
	Semen streams from your <<bottomstop>>

	<<elseif $anussemen gte 1>>
	Semen drips from your <<bottomstop>>

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

<<if $mouthgoo gte 1 and $mouthsemen gte 1>>
	<<if $mouthgoo + $mouthsemen gte 5>>
	You keep coughing up slime and semen.

	<<elseif $mouthgoo + $mouthsemen gte 4>>
	Slime and semen dribble down your chin.

	<<elseif $mouthgoo + $mouthsemen gte 3>>
	Slime and semen line the sides of your throat.

	<<elseif $mouthgoo + $mouthsemen gte 2>>
	Slime and semen layer the back of your throat.

	<<elseif $mouthgoo + $mouthsemen gte 1>>
	The taste of slime and semen permeates your mouth.

	<</if>>

<<elseif $mouthgoo gte 1>>
	<<if $mouthgoo gte 5>>
	You keep coughing up slime.

	<<elseif $mouthgoo gte 4>>
	Slime dribbles down your chin.

	<<elseif $mouthgoo gte 3>>
	Slime lines the sides of your throat.

	<<elseif $mouthgoo gte 2>>
	Slime layers the back of your throat.

	<<elseif $mouthgoo gte 1>>
	The taste of slime permeates your mouth.

	<</if>>

<<elseif $mouthsemen gte 1>>
	<<if $mouthsemen gte 5>>
	You keep coughing up semen.

	<<elseif $mouthsemen gte 4>>
	Semen dribbles down your chin.

	<<elseif $mouthsemen gte 3>>
	Semen lines the sides of your throat.

	<<elseif $mouthsemen gte 2>>
	Semen layers the back of your throat.

	<<elseif $mouthsemen gte 1>>
	The taste of semen permeates your mouth.

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

<</nobr>><</widget>>

<<widget "goocount">><<nobr>>
<<if $neckgoo gte 5>><<set $neckgoo to 5>><</if>>
<<if $rightarmgoo gte 5>><<set $rightarmgoo to 5>><</if>>
<<if $leftarmgoo gte 5>><<set $leftarmgoo to 5>><</if>>
<<if $thighgoo gte 5>><<set $thighgoo to 5>><</if>>
<<if $bottomgoo gte 5>><<set $bottomgoo to 5>><</if>>
<<if $tummygoo gte 5>><<set $tummygoo to 5>><</if>>
<<if $chestgoo gte 5>><<set $chestgoo to 5>><</if>>
<<if $facegoo gte 5>><<set $facegoo to 5>><</if>>
<<if $hairgoo gte 5>><<set $hairgoo to 5>><</if>>
<<if $feetgoo gte 5>><<set $feetgoo to 5>><</if>>
<<if $vaginaoutsidegoo gte 5>><<set $vaginaoutsidegoo to 5>><</if>>
<<if $vaginagoo gte 5>><<set $vaginagoo to 5>><</if>>
<<if $penisgoo gte 5>><<set $penisgoo to 5>><</if>>
<<if $anusgoo gte 5>><<set $anusgoo to 5>><</if>>
<<if $mouthgoo gte 5>><<set $mouthgoo to 5>><</if>>
<<set $goocount to $neckgoo + $rightarmgoo + $leftarmgoo + $thighgoo + $bottomgoo + $tummygoo + $chestgoo + $facegoo + $hairgoo + $feetgoo + $vaginaoutsidegoo + ($vaginagoo * 3) + ($penisgoo * 3) + ($anusgoo * 3) + ($mouthgoo * 3)>>

<<if $necksemen gte 5>><<set $necksemen to 5>><</if>>
<<if $rightarmsemen gte 5>><<set $rightarmsemen to 5>><</if>>
<<if $leftarmsemen gte 5>><<set $leftarmsemen to 5>><</if>>
<<if $thighsemen gte 5>><<set $thighsemen to 5>><</if>>
<<if $bottomsemen gte 5>><<set $bottomsemen to 5>><</if>>
<<if $tummysemen gte 5>><<set $tummysemen to 5>><</if>>
<<if $chestsemen gte 5>><<set $chestsemen to 5>><</if>>
<<if $facesemen gte 5>><<set $facesemen to 5>><</if>>
<<if $hairsemen gte 5>><<set $hairsemen to 5>><</if>>
<<if $feetsemen gte 5>><<set $feetsemen to 5>><</if>>
<<if $vaginaoutsidesemen gte 5>><<set $vaginaoutsidesemen to 5>><</if>>
<<if $vaginasemen gte 5>><<set $vaginasemen to 5>><</if>>
<<if $penissemen gte 5>><<set $penissemen to 5>><</if>>
<<if $anussemen gte 5>><<set $anussemen to 5>><</if>>
<<if $mouthsemen gte 5>><<set $mouthsemen to 5>><</if>>
<<set $semencount to $necksemen + $rightarmsemen + $leftarmsemen + $thighsemen + $bottomsemen + $tummysemen + $chestsemen + $facesemen + $hairsemen + $feetsemen + $vaginaoutsidesemen + ($vaginasemen * 3) + ($penissemen * 3) + ($anussemen * 3) + ($mouthsemen * 3)>>
<</nobr>><</widget>>

<<widget "goooutsidecount">><<nobr>>
<<if $neckgoo gte 5>><<set $neckgoo to 5>><</if>>
<<if $rightarmgoo gte 5>><<set $rightarmgoo to 5>><</if>>
<<if $leftarmgoo gte 5>><<set $leftarmgoo to 5>><</if>>
<<if $thighgoo gte 5>><<set $thighgoo to 5>><</if>>
<<if $bottomgoo gte 5>><<set $bottomgoo to 5>><</if>>
<<if $tummygoo gte 5>><<set $tummygoo to 5>><</if>>
<<if $chestgoo gte 5>><<set $chestgoo to 5>><</if>>
<<if $facegoo gte 5>><<set $facegoo to 5>><</if>>
<<if $hairgoo gte 5>><<set $hairgoo to 5>><</if>>
<<if $feetgoo gte 5>><<set $feetgoo to 5>><</if>>
<<if $vaginaoutsidegoo gte 5>><<set $vaginaoutsidegoo to 5>><</if>>
<<if $penisgoo gte 5>><<set $penisgoo to 5>><</if>>
<<set $goooutsidecount to $neckgoo + $rightarmgoo + $leftarmgoo + $thighgoo + $bottomgoo + $tummygoo + $chestgoo + $facegoo + $hairgoo + $feetgoo + $vaginaoutsidegoo + ($penisgoo * 3)>>

<<if $necksemen gte 5>><<set $necksemen to 5>><</if>>
<<if $rightarmsemen gte 5>><<set $rightarmsemen to 5>><</if>>
<<if $leftarmsemen gte 5>><<set $leftarmsemen to 5>><</if>>
<<if $thighsemen gte 5>><<set $thighsemen to 5>><</if>>
<<if $bottomsemen gte 5>><<set $bottomsemen to 5>><</if>>
<<if $tummysemen gte 5>><<set $tummysemen to 5>><</if>>
<<if $chestsemen gte 5>><<set $chestsemen to 5>><</if>>
<<if $facesemen gte 5>><<set $facesemen to 5>><</if>>
<<if $hairsemen gte 5>><<set $hairsemen to 5>><</if>>
<<if $feetsemen gte 5>><<set $feetsemen to 5>><</if>>
<<if $vaginaoutsidesemen gte 5>><<set $vaginaoutsidesemen to 5>><</if>>
<<if $penissemen gte 5>><<set $penissemen to 5>><</if>>
<<set $semenoutsidecount to $necksemen + $rightarmsemen + $leftarmsemen + $thighsemen + $bottomsemen + $tummysemen + $chestsemen + $facesemen + $hairsemen + $feetsemen + $vaginaoutsidesemen + ($penissemen * 3)>>
<</nobr>><</widget>>

<<widget "outergoo">><<nobr>>
<<set $neckgoo += 1>>
<<set $rightarmgoo += 1>>
<<set $leftarmgoo += 1>>
<<set $thighgoo += 1>>
<<set $bottomgoo += 1>>
<<set $tummygoo += 1>>
<<set $chestgoo += 1>>
<<set $facegoo += 1>>
<<set $hairgoo += 1>>
<<set $feetgoo += 1>>
<</nobr>><</widget>>

<<widget "waterwash">><<nobr>>

<<if $combat isnot 1>>
	<<if $neckgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $neckgoo -= 1>><</if>>
	<<if $rightarmgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $rightarmgoo -= 1>><</if>>
	<<if $leftarmgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $leftarmgoo -= 1>><</if>>
	<<if $thighgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $thighgoo -= 1>><</if>>
	<<if $bottomgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $bottomgoo -= 1>><</if>>
	<<if $tummygoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $tummygoo -= 1>><</if>>
	<<if $chestgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $chestgoo -= 1>><</if>>
	<<if $facegoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $facegoo -= 1>><</if>>
	<<if $hairgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $hairgoo -= 1>><</if>>
	<<if $feetgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $feetgoo -= 1>><</if>>
	<<if $vaginaoutsidegoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $vaginaoutsidegoo -= 1>><</if>>
	<<if $vaginagoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $vaginagoo -= 1>><</if>>
	<<if $penisgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $penisgoo -= 1>><</if>>
	<<if $anusgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $anusgoo -= 1>><</if>>
	<<if $mouthgoo gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $mouthgoo -= 1>><</if>>

	<<if $necksemen gte 1>><<set $waterwash += 1>><<set $necksemen -= 1>><</if>>
	<<if $rightarmsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $rightarmsemen -= 1>><</if>>
	<<if $leftarmsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $leftarmsemen -= 1>><</if>>
	<<if $thighsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $thighsemen -= 1>><</if>>
	<<if $bottomsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $bottomsemen -= 1>><</if>>
	<<if $tummysemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $tummysemen -= 1>><</if>>
	<<if $chestsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $chestsemen -= 1>><</if>>
	<<if $facesemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $facesemen -= 1>><</if>>
	<<if $hairsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $hairsemen -= 1>><</if>>
	<<if $feetsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $feetsemen -= 1>><</if>>
	<<if $vaginaoutsidesemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $vaginaoutsidesemen -= 1>><</if>>
	<<if $vaginasemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $vaginasemen -= 1>><</if>>
	<<if $penissemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $penissemen -= 1>><</if>>
	<<if $anussemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $anussemen -= 1>><</if>>
	<<if $mouthsemen gte 1>><<set $waterwash += 1>><<set $allure += 500>><<set $mouthsemen -= 1>><</if>>
<</if>>

<<if $waterwsh gte 10>>
Copious amounts of lewd fluid washes into the water. You hope it doesn't attract attention.
<<elseif $waterwash gte 5>>
Lots of lewd fluid washes into the water. You hope it doesn't attract attention.
<<elseif $waterwash gte 2>>
Lewd fluid washes into the water. You hope it doesn't attract attention.
<<elseif $waterwash is 1>>
Some lewd fluid washes into the water. You hope it doesn't attract attention.
<</if>>
<<set $waterwash to 0>>

<</nobr>><</widget>>

<<widget "wash">><<nobr>>
	<<set $neckgoo to 0>>
	<<set $rightarmgoo to 0>>
	<<set $leftarmgoo to 0>>
	<<set $thighgoo to 0>>
	<<set $bottomgoo to 0>>
	<<set $tummygoo to 0>>
	<<set $chestgoo to 0>>
	<<set $facegoo to 0>>
	<<set $hairgoo to 0>>
	<<set $feetgoo to 0>>
	<<set $vaginagoo to 0>>
	<<set $vaginaoutsidegoo to 0>>
	<<set $penisgoo to 0>>
	<<set $anusgoo to 0>>
	<<set $mouthgoo to 0>>
	<<set $necksemen to 0>>
	<<set $rightarmsemen to 0>>
	<<set $leftarmsemen to 0>>
	<<set $thighsemen to 0>>
	<<set $bottomsemen to 0>>
	<<set $tummysemen to 0>>
	<<set $chestsemen to 0>>
	<<set $facesemen to 0>>
	<<set $hairsemen to 0>>
	<<set $feetsemen to 0>>
	<<set $vaginasemen to 0>>
	<<set $vaginaoutsidesemen to 0>>
	<<set $penissemen to 0>>
	<<set $anussemen to 0>>
	<<set $mouthsemen to 0>>
<</nobr>><</widget>>

<<widget "tipset">><<nobr>>

<<set $tip to random(1000, 3000)>>
	<<if $tip lte 2000>>
	<<set $tipreaction to "low">>
	<<else>>
	<<set $tipreaction to "mid">>
	<</if>>
<<set _temp_tip to $tip>>/*Remembers base tip value*/

	<<if $args[0] is "serving">>
		<<if $worn.upper.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>/*20% increase on base value*/
		<</if>>
		<<if $worn.lower.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.under_upper.type.includes("serving") and $worn.upper.exposed gte 2>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.under_lower.type.includes("serving") and $worn.lower.exposed gte 2>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.head.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.face.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.neck.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.legs.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
		<<if $worn.feet.type.includes("serving")>>
		<<set $tip += ((_temp_tip * 1.2) - _temp_tip)>>
		<</if>>
	<</if>>

<<set $tip to $tipmod * $tip>>
<<set $tip *= (1 + ($attractiveness / 10000))>>
<<if $mathstrait gte 1>>
<<set $tip *= (1 + ($mathstrait / 4))>>
<</if>>

<<set $tip to Math.trunc($tip)>>

<</nobr>><</widget>>

<<widget "tipreceive">><<nobr>>
	<<if random(1, 10000) is 10000>>You gain Brouzouf<<else>>You make<</if>> £<<print Math.trunc($tip / 100)>>.<<if $tip % 100 lte 9>>0<</if>><<print $tip % 100>>.
	<<set $money += $tip>>
<</nobr>><</widget>>

<<widget "passout">><<nobr>>
	<<set $stress -= 5000>>
	<<set $passoutstat += 1>>
<</nobr>><</widget>>

<<widget "vaginaraped">><<nobr>>
	<<if $angel gte 1>>
		<<set $transformed to 0>>
	<</if>>
	<<if $angel gte 6>>
		Your halo shatters and your wings blacken. An overwhelming sense of loss overcomes you.
		<<set $trauma to $traumamax>><<set $fallenangel to 2>><<set $transformed to 1>>
	<<elseif $angel gte 4>>
		Your halo shatters and fades.
	<</if>>
	<<set $angel to 0>><<set $angelbuild to 0>>
	<<set $vaginafucked to 1>>
<</nobr>><</widget>>

<<widget "penisraped">><<nobr>>
	<<if $angel gte 1>>
		<<set $transformed to 0>>
	<</if>>
	<<if $angel gte 6>>
		Your halo shatters and your wings blacken. An overwhelming sense of loss overcomes you.
		<<set $trauma to $traumamax>><<set $fallenangel to 2>><<set $transformed to 1>>
	<<elseif $angel gte 4>>
		Your halo shatters and fades.
	<</if>>
	<<set $angel to 0>><<set $angelbuild to 0>>
	<<set $penisfucked to 1>>
<</nobr>><</widget>>

<<widget "anusraped">><<nobr>>

<</nobr>><</widget>>

<<widget "internalejac">><<nobr>>
	<<if $demon gte 6>>
		<<set $demonabsorb += 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "textmap">><<nobr>>

<<if $map.movement is true>>
__Map__

|.....Ba ─ Cl ─ St ─ Me

|..╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲

|Do ─ Co ─ Hi ─ Ox ─ Ha

|..╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱

|.....Da ─ Wo ─ Ni ─ El

<<else>>
__Map__

|.....Ba ─ Cl ─ St ─ Me

|..╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲

|Do ─ Co ─ Hi ─ Ox ─ Ha

|..╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱

|.....Da ─ Wo ─ Ni ─ El

<</if>>

<</nobr>><</widget>>

<<widget map>><<nobr>>
<<set $map.location to $args[0]>>
<<if $images is 1 and $map.movement is true and $map.legacy isnot true>>
	<<set _visibility to []>>
	<<for _i to 0; _i lt $map.arrayList.length; _i++>>
		<<if $passage is $map.arrayList[_i]>>
			<<set _visibility.push("current")>>
		<<elseif $debug is 1 or $map.avaliable[$passage].includes($map.arrayList[_i])>>
			<<set _visibility.push(true)>>
		<<else>>
			<<set _visibility.push(false)>>
		<</if>>
	<</for>>
	<<if $map.markers is true>>
		<<set _opacity to 0.6>>
	<<else>>
		<<set _opacity to 0>>
	<</if>>
	<<print '
	<svg width="260" height="130">
		<image x="2" xlink:href="img/misc/map.png"/>
		<image x="2" xlink:href="img/misc/maparrow'+$map.location+'.png"/>

			<rect x="1" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[0] isnot false ? _opacity : "0")+';"/>

			<rect x="38" y="9" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[1] isnot false ? _opacity : "0")+';"/>

			<rect x="38" y="83" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[2] isnot false ? _opacity : "0")+';"/>

			<rect x="63" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[3] isnot false ? _opacity : "0")+';"/>

			<rect x="88" y="9" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[4] isnot false ? _opacity : "0")+';"/>

			<rect x="88" y="83" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[5] isnot false ? _opacity : "0")+';"/>

			<rect x="114" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[6] isnot false ? _opacity : "0")+';"/>

			<rect x="146" y="9" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[7] isnot false ? _opacity : "0")+';"/>

			<rect x="146" y="83" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[8] isnot false ? _opacity : "0")+';"/>

			<rect x="176" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[9] isnot false ? _opacity : "0")+';"/>

			<rect x="204" y="9" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[10] isnot false ? _opacity : "0")+';"/>

			<rect x="204" y="83" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[11] isnot false ? _opacity : "0")+';"/>

			<rect x="230" y="46" height="34" width="28" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[12] isnot false ? _opacity : "0")+';"/>

			<rect x="38" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[13] isnot false ? _opacity : "0")+';"/>

			<rect x="88" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[14] isnot false ? _opacity : "0")+';"/>

			<rect x="146" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[15] isnot false ? _opacity : "0")+';"/>

			<rect x="204" y="46" height="34" width="30" style="stroke:cyan;fill-opacity:0;stroke-opacity:'+(_visibility[16] isnot false ? _opacity : "0")+';"/>

	</svg>'>>

<<elseif $images is 1 and $map.legacy isnot true>>
	<<print '
	<svg width="260" height="130">
		<image x="2" xlink:href="img/misc/map.png"/>
		<image x="2" xlink:href="img/misc/maparrow'+$map.location+'.png"/>
	</svg>'>>
<<elseif $images is 1>>
	<<if $images is 1 and $map.movement is true>>

		<map id="town-image-map" name="town-image-map">
			<area class="nonumberify" alt="Barb Street" title="Barb Street" coords="62,20,39,42" shape="rect" onclick="mapMove('Barb Street')">
			<area class="nonumberify" alt="Domus Street" title="Domus Street" coords="2,75,26,49" shape="rect" onclick="mapMove('Domus Street')">
			<area class="nonumberify" alt="Danube Street" title="Danube Street" coords="33,110,70,84" shape="rect" onclick="mapMove('Danube Street')">
			<area class="nonumberify" alt="Wolf Street" title="Wolf Street" coords="86,117,114,86" shape="rect" onclick="mapMove('Wolf Street')">
			<area class="nonumberify" alt="High Street" title="High Street" coords="116,77,139,46" shape="rect" onclick="mapMove('High Street')">
			<area class="nonumberify" alt="Connudatus Street" title="Connudatus Street" coords="64,77,88,49" shape="rect" onclick="mapMove('Connudatus Street')">
			<area class="nonumberify" alt="Cliff Street" title="Cliff Street" coords="88,40,117,-1" shape="rect" onclick="mapMove('Cliff Street')">
			<area class="nonumberify" alt="Starfish Street" title="Starfish Street" coords="147,41,172,12" shape="rect" onclick="mapMove('Starfish Street')">
			<area class="nonumberify" alt="Nightingale Street" title="Nightingale Street" coords="143,115,170,82" shape="rect" onclick="mapMove('Nightingale Street')">
			<area class="nonumberify" alt="Oxford Street" title="Oxford Street" coords="170,73,203,45" shape="rect" onclick="mapMove('Oxford Street')">
			<area class="nonumberify" alt="Mer Street" title="Mer Street" coords="202,42,229,14" shape="rect" onclick="mapMove('Mer Street')">
			<area class="nonumberify" alt="Elk Street" title="Elk Street" coords="197,111,238,77" shape="rect" onclick="mapMove('Elk Street')">
			<area class="nonumberify" alt="Harvest Street" title="Harvest Street" coords="252,46,228,76" shape="rect" onclick="mapMove('Harvest Street')">
			<area class="nonumberify" alt="Industrial Alley" title="Industrial Alley" coords="225,73,209,53" shape="rect" onclick="mapMove('Industrial alleyways')">
			<area class="nonumberify" alt="Park" title="Park" coords="154,65,170,52" shape="rect" onclick="mapMove('Park')">
			<area class="nonumberify" alt="Commercial Alley" title="Commercial Alley" coords="94,69,110,56" shape="rect" onclick="mapMove('Commercial alleyways')">
			<area class="nonumberify" alt="Residential Alley" title="Residential Alley" coords="38,70,57,56" shape="rect" onclick="mapMove('Residential alleyways')">
		</map>
	<</if>>

<<else>>
	<<textmap>>
<</if>>
<</nobr>><</widget>>

<<widget "rentday">><<nobr>>
	<<if $rentday is 1>>
		Sunday.
	<<elseif $rentday is 2>>
		Monday.
	<<elseif $rentday is 3>>
		Tuesday.
	<<elseif $rentday is 4>>
		Wednesday.
	<<elseif $rentday is 5>>
		Thursday.
	<<elseif $rentday is 6>>
		Friday.
	<<else>>
		Saturday.
	<</if>>
<</nobr>><</widget>>

<<widget "tearup">><<nobr>>
	<<if $pain lte 20>>
		<<set $pain to 20>>
	<</if>>
<</nobr>><</widget>>

<<widget "roomoptions">><<nobr>>
	<<pilloptions>>

<</nobr>><</widget>>

<<widget "pilloptions">><<nobr>>
	<<if $pillstaken is 1>>
		<<set $pillstaken to 0>>
		You take the pills Doctor Harper prescribed. You feel dizzy.
		<<gcontrol>><<lawareness>><<awareness -1>><<control 10>>

	<</if>>
	<<if $pills gte 1 and $medicated is 0>>
		<<link "Take pills">><<set $medicated += 1>><<set $pillstaken to 1>><><</link>>

	<</if>>
	<<if $asylumpillstaken is 1>>
		<<set $asylumpillstaken to 0>>
		You take the pills prescribed in the asylum. You feel hazy.
		<<ggcontrol>><<llawareness>><<awareness -5>><<control 25>>

	<</if>>
	<<if $asylumpills gte 1 and $asylummedicated lt 1>>
		<<link "Take strong pills">><<set $asylummedicated += 1>><<set $asylumpillstaken to 1>><><</link>>

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

<<widget "encountersteal">><<nobr>>
	<<set $rng to random(1, 100)>>
	<<if $rng gte 96 and $spray lt $spraymax>>
		<<spray 1>>
		You steal a charge for your pepper spray.
		<<crimeup 50>><<combatskulduggeryskilluse>><<combatcontrol 10>><<gcombatcontrol>>
	<<elseif $rng gte 90 and $compoundstate is undefined and $compoundcard is undefined>>
		<<set $compoundcard to 1>>
		You steal a strange card. There's an address on it, for a location on Elk Street.
	<<else>>
		<<set $rng to random(5, 100)>>
		You steal £<<print $rng>>.
		<<set $money += $rng * 100>><<crimeup $rng>><<combatskulduggeryskilluse>><<combatcontrol 10>><<gcombatcontrol>>
	<</if>>
<</nobr>><</widget>>

<<widget "statbaricons">><<nobr>>
	<<if $images is 1 and $args[0]>>
		<<if $args[1] gte 1>>

		<<elseif $args[2] gte 1>>

		<</if>>
		<<if $args[1] gte 2>>

		<<elseif $args[2] gte 2>>

		<</if>>
		<<if $args[1] gte 3>>

		<<elseif $args[2] gte 3>>

		<</if>>
		<<if $args[1] gte 4>>

		<<elseif $args[2] gte 4>>

		<</if>>
		<<if $args[1] gte 5>>

		<<elseif $args[2] gte 5>>

		<</if>>
		<<if $args[1] gte 6>>

		<<elseif $args[2] gte 6>>

		<</if>>
		<<if $args[1] gte 7>>

		<<elseif $args[2] gte 7>>

		<</if>>
		<<if $args[1] gte 8>>

		<<elseif $args[2] gte 8>>

		<</if>>
		<<if $args[1] gte 9>>

		<<elseif $args[2] gte 9>>

		<</if>>
		<<if $args[1] gte 10>>

		<<elseif $args[2] gte 10>>

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

<<widget "oralpassage">><<nobr>>
	<<set $oralvirginity to 0>><<oralstat>><<oralejacstat>><<ejacstat>><<set $hunger -= 200>><<set $thirst -= 200>><<set $mouthsemen += 1>>
<</nobr>><</widget>>

<<widget "relationshipclamp">><<nobr>>
	<<set _i to $NPCNameList.indexOf("Robin")>>
	<<set $NPCName[_i].love = Math.clamp($NPCName[_i].love, 0, 100)>>
	<<set $NPCName[_i].lust = Math.clamp($NPCName[_i].lust, 0, 100)>>
	<<set $NPCName[_i].trauma = Math.clamp($NPCName[_i].trauma, 0, 100)>>
	<<set _i to $NPCNameList.indexOf("Whitney")>>
	<<set $NPCName[_i].love = Math.clamp($NPCName[_i].love, 0, 30)>>
	<<set $NPCName[_i].lust = Math.clamp($NPCName[_i].lust, 0, 100)>>
	<<set $NPCName[_i].dom = Math.clamp($NPCName[_i].dom, 0, 20)>>
	<<set _i to $NPCNameList.indexOf("Eden")>>
	<<set $NPCName[_i].love = Math.clamp($NPCName[_i].love, 0, 200)>>
	<<set $NPCName[_i].lust = Math.clamp($NPCName[_i].lust, 0, 100)>>
	<<set _i to $NPCNameList.indexOf("Kylar")>>
	<<set $NPCName[_i].love = Math.clamp($NPCName[_i].love, 0, 100)>>
	<<set $NPCName[_i].lust = Math.clamp($NPCName[_i].lust, 0, 100)>>
	<<set $NPCName[_i].rage = Math.clamp($NPCName[_i].rage, 0, 100)>>
	<<set _i to $NPCNameList.indexOf("Avery")>>
	<<set $NPCName[_i].love = Math.clamp($NPCName[_i].love, 0, 100)>>
	<<set $NPCName[_i].rage = Math.clamp($NPCName[_i].rage, 0, 100)>>
<</nobr>><</widget>>

<<widget "fringecheck">><<nobr>>
	<<if $fringetype is "default">>
		<<set $fringetype to "messy">>
	<</if>>
<</nobr>><</widget>>

<<widget "haircheck">><<nobr>>
	<<if $hairtype is "default">>
		<<set $hairtype to "messy">>
	<</if>>
<</nobr>><</widget>>

<<widget "fringelength">><<nobr>>
	<<if $fringelength gte 980>>
		and your fringe is very long.
	<<elseif $fringelength gte 800>>
		and your fringe is long.
	<<elseif $fringelength gte 600>>
		and your fringe is somewhat long.
	<<elseif $fringelength gte 400>>
		and your fringe is quite normal.
	<<elseif $fringelength gte 200>>
		and your fringe is short.
	<<else>>
		and your fringe is very short.
	<</if>>
<</nobr>><</widget>>

<<widget "beasttype">><<nobr>>
	<<if $args[0]>>
		<<set $basebeasttype to $args[0]>>
		<<if $beastname is "blackwolf">>
			<<if $hallucinations gte 1 and $blackwolfmonster is 1 or $blackwolfmonster is 1 and $monsterhallucinations is "f">>
				<<set $monster to 1>>
				<<if $blackwolfgender is "f">>
					<<set $beasttype to $args[0] + "girl">>
				<<else>>
					<<set $beasttype to $args[0] + "boy">>
				<</if>>
			<<else>>
				<<set $monster to 0>>
				<<set $beasttype to $args[0]>>
			<</if>>
		<<elseif $monsterchance gte $rng and $hallucinations gte 1 or $monsterchance gte $rng and $monsterhallucinations is "f">>
			<<set $monster to 1>>
			<<if $args[0] is "creature">>
				<<if $beastgender is "f">>
					<<set $beasttype to "strange " + "girl">>
				<<else>>
					<<set $beasttype to "strange " + "boy">>
				<</if>>
			<<else>>
				<<if $beastgender is "f">>
					<<set $beasttype to $args[0] + "girl">>
				<<else>>
					<<set $beasttype to $args[0] + "boy">>
				<</if>>
			<</if>>
		<<else>>
			<<set $monster to 0>>
			<<set $beasttype to $args[0]>>
		<</if>>
	<<else>>
		<<set $monster to 0>>
		<<set $beasttype to "beast">>
	<</if>>
	<<beastgenitalsselect>>
<</nobr>><</widget>>

<<widget "beastgenitalsselect">><<nobr>>
	<<if $monster is 1>>
		<<if $beastname is "blackwolf">>
			<<if $blackwolfgenitals is "penis">>
				<<set $NPCList[0].penis to 0>>
				<<set $NPCList[0].vagina to "none">>
			<<else>>
				<<set $NPCList[0].vagina to 0>>
				<<set $NPCList[0].penis to "none">>
			<</if>>
		<<elseif $beastgender is "m">>
			<<if random(0, 99) gte $cbchance>>
				<<set $NPCList[0].penis to 0>>
				<<set $NPCList[0].vagina to "none">>
			<<else>>
				<<set $NPCList[0].vagina to 0>>
				<<set $NPCList[0].penis to "none">>
			<</if>>
		<<elseif $beastgender is "f">>
			<<if random(0, 99) gte $dgchance>>
				<<set $NPCList[0].vagina to 0>>
				<<set $NPCList[0].penis to "none">>
			<<else>>
				<<set $NPCList[0].penis to 0>>
				<<set $NPCList[0].vagina to "none">>
			<</if>>
		<</if>>
	<<else>>
		<<if $beastgender is "m">>
			<<set $NPCList[0].penis to 0>>
			<<set $NPCList[0].vagina to "none">>
		<<else>>
			<<set $NPCList[0].vagina to 0>>
			<<set $NPCList[0].penis to "none">>
		<</if>>
	<</if>>
<</nobr>><</widget>>

<<widget "willpowerpain">><<nobr>>
	<<if $pain gte 100 and $willpowerpain is undefined>>
		<<if ($willpower / 10) gte (($pain - 100) + random(1, 100))>>
			The pain threatens to overwhelm, but you endure it.
			<<gwillpower>><<willpower 1>>

		<<else>>
			The pain overwhelms you.
			<<ggwillpower>><<willpower 5>><<set $willpowerpain to 0>>

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

<<widget "willpowerorgasm">><<nobr>>
	<<if $orgasmdown gte 1>>
		<<if ($willpower / 10) gte (($orgasmdown * 30) + random(1, 80))>>
			You endure the orgasmic shivers running through you.
			<<gwillpower>><<willpower 1>><<set $orgasmdown to 0>>

		<<else>>
			You struggle against the orgasmic spasms overwhelming you.
			<<gwillpower>><<willpower 1>>

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

<<widget "upperclothescolour">><<nobr>>
	<<if $upperwetstage gte 3>>
		<<if $worn.upper.colour is "wetgreen">>
			green
		<<elseif $worn.upper.colour is "wetred">>
			red
		<<elseif $worn.upper.colour is "wetwhite">>
			white
		<<elseif $worn.upper.colour is "wetblue">>
			blue
		<<elseif $worn.upper.colour is "wetyellow">>
			yellow
		<<elseif $worn.upper.colour is "wetpink">>
			pink
		<<elseif $worn.upper.colour is "wetpurple">>
			purple
		<<elseif $worn.upper.colour is "wettangerine">>
			tangerine
		<<elseif $worn.upper.colour is "wetblack">>
			black
		<<elseif $worn.upper.colour is "wetbrown">>
			brown
		<</if>>
	<<elseif $worn.upper.colour isnot 0>>
		$worn.upper.colour
	<</if>>
<</nobr>><</widget>>

<<widget "lowerclothescolour">><<nobr>>
	<<if $lowerwetstage gte 3>>
		<<if $worn.lower.colour is "wetgreen">>
			green
		<<elseif $worn.lower.colour is "wetred">>
			red
		<<elseif $worn.lower.colour is "wetwhite">>
			white
		<<elseif $worn.lower.colour is "wetblue">>
			blue
		<<elseif $worn.lower.colour is "wetyellow">>
			yellow
		<<elseif $worn.lower.colour is "wetpink">>
			pink
		<<elseif $worn.lower.colour is "wetpurple">>
			purple
		<<elseif $worn.lower.colour is "wettangerine">>
			tangerine
		<<elseif $worn.lower.colour is "wetblack">>
			black
		<<elseif $worn.lower.colour is "wetbrown">>
			brown
		<</if>>
	<<elseif $worn.lower.colour isnot 0>>
		$worn.lower.colour
	<</if>>
<</nobr>><</widget>>

<<widget "underlowerclothescolour">><<nobr>>
	<<if $underlowerwetstage gte 3>>
		<<if $worn.under_lower.colour is "wetgreen">>
			green
		<<elseif $worn.under_lower.colour is "wetred">>
			red
		<<elseif $worn.under_lower.colour is "wetwhite">>
			white
		<<elseif $worn.under_lower.colour is "wetblue">>
			blue
		<<elseif $worn.under_lower.colour is "wetyellow">>
			yellow
		<<elseif $worn.under_lower.colour is "wetpink">>
			pink
		<<elseif $worn.under_lower.colour is "wetpurple">>
			purple
		<<elseif $worn.under_lower.colour is "wettangerine">>
			tangerine
		<<elseif $worn.under_lower.colour is "wetblack">>
			black
		<<elseif $worn.under_lower.colour is "wetbrown">>
			brown
		<</if>>
	<<elseif $worn.under_lower.colour isnot 0>>
		$worn.under_lower.colour
	<</if>>
<</nobr>><</widget>>

<<widget "underupperclothescolour">><<nobr>>
	<<if $underupperwetstage gte 3>>
		<<if $worn.under_upper.colour is "wetgreen">>
			green
		<<elseif $worn.under_upper.colour is "wetred">>
			red
		<<elseif $worn.under_upper.colour is "wetwhite">>
			white
		<<elseif $worn.under_upper.colour is "wetblue">>
			blue
		<<elseif $worn.under_upper.colour is "wetyellow">>
			yellow
		<<elseif $worn.under_upper.colour is "wetpink">>
			pink
		<<elseif $worn.under_upper.colour is "wetpurple">>
			purple
		<<elseif $worn.under_upper.colour is "wettangerine">>
			tangerine
		<<elseif $worn.under_upper.colour is "wetblack">>
			black
		<<elseif $worn.under_upper.colour is "wetbrown">>
			brown
		<</if>>
	<<elseif $worn.under_upper.colour isnot 0>>
		$worn.under_upper.colour
	<</if>>
<</nobr>><</widget>>

<<widget "nounderwearcheck">><<nobr>>
	/*Checks if the PC is pantiless, but otherwise decent. Results in low level exhibitionism increases.*/
	<<if !$worn.lower.type.includes("naked") and $worn.under_lower.type.includes("naked") and $exposed lte 0 and $exhibitionism lt 19>>
		<<set $no_underwear += 1>>
	<</if>>
	<<if $no_underwear gte 8>>
		<<set $no_underwear to 0>>
		<<set $effectsmessage to 1>>
		<<set $exhibitionism_message to 1>>
	<</if>>
<</nobr>><</widget>>

<<widget "breastfed">><<nobr>>
	<<set $milk_drank_stat += random(1, 5)>>
	<<if random(1, 100) gte 70>><<set $catbuild += 1>><</if>>
	<<set $purity -= 1>>
	<<if $milkdranktrait is 1>><<physique 1>><</if>>
<</nobr>><</widget>>

<<widget "setup_pillory">><<nobr>>
	<<set $pillory_tenant to 	{person : clone($baseNPC), exists : 0, duration : 0, served : 0, startday: 0, starthour : 0, endday : 0, endhour : 0,
								 crowd : 0, wet : 0, upperexposed : 0 , lowerexposed : 0, fruit : 0, fruitstock: 0, face : 0, ass : 0, genital : 0, broken : 0,
								 lastviewed : { day : 0, hour: 0}, special : {name : "", desc : ""}}>>
<</nobr>><</widget>>

<<widget "new_npc_pillory">><<nobr>>
	<<if not $args[0]>>
		<<if $rng gte 20>><<generate1>><<else>><<generatec1>><</if>>
		<<set _already_served to random(0,2)>>
	<<else>>
		<<set _already_served to 0>>
	<</if>>
	<<set $pillory_tenant.exists to 1>>
	<<set $pillory_tenant.person to clone($NPCList[0])>>
	<<set $pillory_tenant.duration to random(4,27)>>
	<<set $pillory_tenant.startday to $days>>
	<<set $pillory_tenant.starthour to ($hour - _already_served)>>
	<<set _endhour to ($pillory_tenant.starthour + $pillory_tenant.duration)>>
	<<set $pillory_tenant.endday to $days>>
	<<if _endhour gte 24>><<set $pillory_tenant.endday += 1>><<set _endhour -= 24>><</if>>
	/*Repeat incase $duration is gte 24hrs and starting time gte 21. E.g. worst case: $hour = 23 and duration=27hrs, end time should be 0200 @ +2days.
	So 23 + 27 = 50; add 1 to end-day and minus 24hrs gives 26; add 1 to end-day and minus 24 gives hr 2.*/
	<<if _endhour gte 24>><<set $pillory_tenant.endday += 1>><<set _endhour -= 24>><</if>>
	<<set $pillory_tenant.endhour to _endhour>>
	<<set $pillory_tenant.crowd to 1>>
	<<set $pillory_tenant.wet to 0>>
	<<set $pillory_tenant.upperexposed to 0>>
	<<set $pillory_tenant.lowerexposed to 0>>
	<<set $pillory_tenant.fruit to 0>>
	<<set $pillory_tenant.fruitstock to 3>>
	<<set $pillory_tenant.spank to 0>>
	<<set $pillory_tenant.face to 0>>
	<<set $pillory_tenant.ass to 0>>
	<<set $pillory_tenant.genital to 0>>
	<<set $pillory_tenant.broken to 0>>
	<<set $pillory_tenant.lastviewed.day to $days>>
	<<set $pillory_tenant.lastviewed.hour to $hour>>

	<<person1>>
	<<if $pillory_tenant.special.name is "">>
		A <<person>> <<if _already_served is 0>>is currently being locked into the pillory.<<else>>has recently been locked in the pillory.<</if>>
		<<endevent>>
		<<npc_pillory_release_schedule>>

	<<else>>
		Rumour has it <<he>> is being sent to the pillory.

		<<endevent>>
	<</if>>

<</nobr>><</widget>>

<<widget "imprison_whitney">><<nobr>>
	<<setup_pillory>>
	<<npc Whitney>>
	<<set $pillory_tenant.special.name to "Whitney">>
	<<set $pillory_tenant.special.desc to "bully">>
	<<new_npc_pillory $NPCList[0]>>
	<<set $pillory_tenant.person.pronoun to $NPCName[$npcnum].pronoun>>
	<<set $pillory_tenant.person.gender to $NPCName[$npcnum].pronoun>>
	<<if $NPCName[$npcnum].pronoun is "f">><<set $pillory_tenant.person.breastdesc to "breast">><<set $pillory_tenant.person.breastsdesc to "breasts">><</if>>
	<<endevent>>
	<<set $framed to 0>>
<</nobr>><</widget>>

<<widget "imprison_leighton">><<nobr>>
	<<setup_pillory>>
	<<npc Leighton>>
	<<set $pillory_tenant.special.name to "Leighton">>
	<<if $NPCList[0].pronoun is "f">>
		<<set $pillory_tenant.special.desc to "headmistress">>
	<<else>>
		<<set $pillory_tenant.special.desc to "headmaster">>
	<</if>>
	<<new_npc_pillory $NPCList[0]>>
	<<set $pillory_tenant.person.pronoun to $NPCName[$npcnum].pronoun>>
	<<set $pillory_tenant.person.gender to $NPCName[$npcnum].pronoun>>
	<<if $NPCName[$npcnum].pronoun is "f">><<set $pillory_tenant.person.breastdesc to "breast">><<set $pillory_tenant.person.breastsdesc to "breasts">><</if>>
	<<endevent>>
	<<set $framed to 0>>
<</nobr>><</widget>>

<<widget "get_pillory_npc">><<nobr>>
	<<set $NPCList[0] to clone($pillory_tenant.person)>><<person1>>
<</nobr>><</widget>>

<<widget "A_pillory_person">><<nobr>>
	<<get_pillory_npc>>
	<<if $pillory_tenant.special.name is "">>
		A <<person>>
	<<else>>
		$pillory_tenant.special.name
	<</if>>
<</nobr>><</widget>>

<<widget "The_pillory_person">><<nobr>>
	<<get_pillory_npc>>
	<<if $pillory_tenant.special.name is "">>
		The <<person>>
	<<else>>
		$pillory_tenant.special.name
	<</if>>
<</nobr>><</widget>>

<<widget "the_pillory_person">><<nobr>>
	<<get_pillory_npc>>
	<<if $pillory_tenant.special.name is "">>
		the <<person>>
	<<else>>
		$pillory_tenant.special.name
	<</if>>
<</nobr>><</widget>>

<<widget "the_pillory_person_stop">><<nobr>>
	<<get_pillory_npc>>
	<<if $pillory_tenant.special.name is "">>
		the <<personstop>>
	<<else>>
		$pillory_tenant.special.name.
	<</if>>
<</nobr>><</widget>>

<<widget "the_pillory_persons">><<nobr>>
	<<get_pillory_npc>>
	<<if $pillory_tenant.special.name is "">>
		the <<persons>>
	<<else>>
		$pillory_tenant.special.name's
	<</if>>
<</nobr>><</widget>>

<<widget "the_pillory_type">><<nobr>>
	<<get_pillory_npc>>the
	<<if $pillory_tenant.special.name is "">>
		<<person>>
	<<else>>
		$pillory_tenant.special.desc
	<</if>>
<</nobr>><</widget>>

<<widget "the_pillory_type_stop">><<nobr>>
	<<get_pillory_npc>>the
	<<if $pillory_tenant.special.name is "">>
		<<personstop>>
	<<else>>
		$pillory_tenant.special.desc.
	<</if>>
<</nobr>><</widget>>

<<widget "the_pillory_types">><<nobr>>
	<<get_pillory_npc>>the
	<<if $pillory_tenant.special.name is "">>
		<<persons>>
	<<else>>
		$pillory_tenant.special.desc's
	<</if>>
<</nobr>><</widget>>

<<widget "npc_pillory">><<nobr>>
	<<A_pillory_person>> is locked in the town pillory.
	<<npc_pillory_release_schedule>>

	<<endevent>>
<</nobr>><</widget>>

<<widget "npc_pillory_detail">><<nobr>>
	<<get_pillory_npc>>
	<<A_pillory_person>> is locked in the town pillory.
	<<npc_pillory_appearance>>
	<<npc_pillory_abuse>>
	<<npc_pillory_release_schedule>>

	<<endevent>>
<</nobr>><</widget>>

<<widget "npc_pillory_appearance">><<nobr>>
	<<update_npc_pillory_appearance>>
	/*Desc*/
	<<if $daystate is "night">>
		<<if $pillory_tenant.crowd gte 10>>A huge, drunken mob surround
		<<elseif $pillory_tenant.crowd gte 6>>A large, rowdy mob crowd around
		<<elseif $pillory_tenant.crowd gte 4>>A sinister crowd huddle around
		<<else>>A small but sinister group lurk around
		<</if>>
	<<else>>
		<<if $pillory_tenant.crowd gte 10>>An excited, jeering crowd surround
		<<elseif $pillory_tenant.crowd gte 6>>A large crowd press around
		<<elseif $pillory_tenant.crowd gte 4>>A curious group hang around
		<<else>>A small group watch
		<</if>>
	<</if>><<the_pillory_person>> locked prone in the pillory.
	<<if $pillory_tenant.broken gte 32>><<He>> looks traumatised, perhaps permanently broken by the abuse <<hes>> already suffered.
	<<elseif $pillory_tenant.broken gte 16>><<He>> is weeping from the abuse <<hes>> already suffered.
	<<elseif $pillory_tenant.broken gte 8>><<He>> is sobbing from the abuse.
	<<elseif $pillory_tenant.broken gte 4>><<He>> is visibly upset, but trying hard to hide it.
	<<else>><<He>> is defiant, showing a brave face.
	<</if>>

	/*describe exposure*/
	<<if $pillory_tenant.upperexposed gte 3>>
		<<His>> $pillory_tenant.person.breastsdesc are fully exposed to the crowd.
		<<if $pillory_tenant.spank gte 8>><<His>> nipples are red from being pinched, slapped, sucked, bitten and pulled.
		<<elseif $pillory_tenant.spank gte 4>><<His>> nipples looks sore from abuse.
		<</if>>
	<<elseif $pillory_tenant.upperexposed gte 2>>
		<<if $pronoun is "f">>
			<<His>> top has been bared, exposing <<his>> bra to the crowd.
		<<else>>
			<<His>> top has been bared, fully exposing <<his>> $pillory_tenant.person.breastsdesc to the crowd.
			<<if $pillory_tenant.spank gte 8>><<His>> nipples are red from being pinched, slapped, bitten and pulled.
			<<elseif $pillory_tenant.spank gte 4>><<His>> nipples looks sore from abuse.
			<</if>>
		<</if>>
	<<elseif $pillory_tenant.upperexposed gte 1>><<His>> upper clothes have been mauled, partially exposing <<his>> $pillory_tenant.person.breastsdesc to the crowd.
	<</if>>
	<<if $pillory_tenant.lowerexposed gte 2>><<His>> ass has <<if $pillory_tenant.upperexposed gte 1>>also<</if>> been exposed, making
		<<if $pronoun is "f">>her pussy
		<<else>>his $pillory_tenant.person.penisdesc
		<</if>>visible to all.
		<<if $pillory_tenant.spank gte 5>><<His>> ass shows signs of rough spanking
			<<if $pillory_tenant.fruit gte 5>>, and <<his>> face is a mess of bruises and broken fruit.
			<<else>>.
			<</if>>
		<<elseif $pillory_tenant.fruit gte 6>><<His>> face is a mess of bruises and broken fruit.
		<<elseif $pillory_tenant.fruit gte 2>><<His>> face is marked by bruises and broken fruit.
		<</if>>
		<<if $pillory_tenant.ass gte 2>><<His>> ass has been raped more than once
			<<if $pillory_tenant.genital gte 2>>and
				<<if $pronoun is "m">>slime coats his <<print either("raw","abused","sorry")>> penis.
				<<else>>semen drips from her <<print either("raw","reddened","abused")>> pussy.
				<</if>>
			<<else>>.
			<</if>>
		<<elseif $pillory_tenant.genital gte 5>><<His>> <<if $pronoun is "m">>penis<<else>>pussy<</if>> has been raped raw.
		<<elseif $pillory_tenant.genital gte 2>><<He>> has been raped more than once.
		<</if>>
	<<elseif $pillory_tenant.lowerexposed gte 1>>
		<<His>> <<if $pronoun is "f">>dress has been pulled up over <<his>> waist,<<else>>trousers have been pulled down,<</if>>
		exposing <<his>> underwear to the crowd.
	<<elseif $pillory_tenant.wet is 2>><<His>> clothes are see-through from the rain.
	<<elseif $pillory_tenant.wet is 1>><<His>> clothes are semi-translucent from damp, but are drying out.
	<</if>>
	<<if $pillory_tenant.upperexposed is 0 and $pillory_tenant.lowerexposed is 0 and $pillory_tenant.face is 0 and $pillory_tenant.fruit gte 1>>
		<<if $pillory_tenant.fruit gte 6>><<His>> face is a mess of bruises and broken fruit.
		<<elseif $pillory_tenant.fruit gte 2>><<His>> face is marked by bruises and broken fruit.
		<</if>>
	<</if>>
<</nobr>><</widget>>

<<widget "update_npc_pillory_appearance">><<nobr>>
	<<if ($pillory_tenant.lastviewed.day isnot $days) or ($hour gte $pillory_tenant.lastviewed.hour + 2)>>
		/* last viewed time tracked to avoid this firing on every viewing */
		<<set $pillory_tenant.lastviewed.day to $days>>
		<<set $pillory_tenant.lastviewed.hour to $hour>>

		/*Weather effects*/
		<<if $weather is "rain">><<set $pillory_tenant.wet to 2>>
		<<elseif $pillory_tenant.wet is 2>><<set $pillory_tenant.wet to 1>>
		<<else>><<set $pillory_tenant.wet to 0>>
		<</if>>

		/*Chance of abuse based on crowd and time passed*/
		<<if $days - $pillory_tenant.startday is 2>><<set _chance to 24>>
		<<elseif $days - $pillory_tenant.startday is 1>><<set _chance to 12>>
		<<else>><<set _chance to ($hour - $pillory_tenant.starthour)>>
		<</if>>
		<<set _chance *= $pillory_tenant.crowd>>
		/*increased by spectacle*/
		<<set _factor to ($pillory_tenant.wet + $pillory_tenant.upperexposed + $pillory_tenant.lowerexposed + $pillory_tenant.fruit
							+ $pillory_tenant.spank + $pillory_tenant.face + $pillory_tenant.ass + $pillory_tenant.genital)>>
		<<set _prob to (_chance * _factor)>>

		/*Out of sight changes to tenant */
		<<set $rng to random(0,100)>>
		<<if $rng gte (40 - _prob)>><<set $pillory_tenant.fruit += 1>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (60 - _prob)>><<set $pillory_tenant.crowd += 2>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (60 - _prob)>><<set $pillory_tenant.upperexposed += 1>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (80 - _prob)>><<set $pillory_tenant.lowerexposed += 1>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (100 - _prob)>><<set $pillory_tenant.crowd += 2>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (100 - _prob)>><<set $pillory_tenant.fruit += 2>><<set $pillory_tenant.face += 1>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (100 - _prob) and $pillory_tenant.lowerexposed gte 2>><<set $pillory_tenant.spank += 2>><<else>><<set $pillory_tenant.spank += 1>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (100 - _prob) and $pillory_tenant.lowerexposed gte 2>><<set $pillory_tenant.genital += 1>><</if>>
		<<set $rng to random(0,100)>>
		<<if $rng gte (100 - _prob) and $pillory_tenant.lowerexposed gte 2>><<set $pillory_tenant.ass += 1>><</if>>

		/*lock down exposure and replenish fruit */
		<<if $pillory_tenant.upperexposed gte 3>><<if $pillory_tenant.person.gender is "f" or $pillory_tenant.person.pronoun is "f">><<set $pillory_tenant.upperexposed to 3>><<else>><<set $pillory_tenant.upperexposed to 2>><</if>><</if>>
		<<if $pillory_tenant.lowerexposed gt 2>><<set $pillory_tenant.lowerexposed to 2>><</if>>
		<<set $pillory_tenant.fruitstock to 3>>
		<<set $pillory_tenant.broken += ($pillory_tenant.ass + $pillory_tenant.genital + $pillory_tenant.face + $pillory_tenant.fruit + $pillory_tenant.spank)>>
	<</if>>
<</nobr>><</widget>>

<<widget "npc_pillory_abuse">><<nobr>>
	<<if ($pillory_tenant.lastviewed.day isnot $days) or ($hour gte $pillory_tenant.lastviewed.hour + 1)>>
		<<set $pillory_tenant.lastviewed.hour to $hour>>
		<<set $rng to random(1,100)>><<generate2>><<person2>>
		<<set _ly to either("violently","openly","angrily","furiously","cheekily","repeatedly","clumsily", "stoically","theatrically","dutifully","merrily","gleefully","drunkenly","ineptly")>>
		<<if $daystate isnot "night">>
			<<if $rng gte 41>> /* 60% chance of jeer and shout only, 40% chance of something active */
				A number of people, led by a <<person>> jeer and shout abuse at the prisoner.
			<<elseif $rng gte 36>> /* 5% */
				A <<person>> throws fruit at <<the_pillory_type_stop>> Unable to move or defend, it hits <<him>> directly in the face.
				It looks painful, especially as <<he>> cannot wipe the acids out of <<his>> eyes.<<set $pillory_tenant.fruit += 1>>
			<<elseif $rng gte 26>> /* 10% */
				A <<person>> throws fruit at <<the_pillory_type>> but misses completely.
			<<elseif $rng gte 16>> /* 10% */
				A <<person>> walks up to the pillory and _ly fondles <<the_pillory_types>> <<if $pronoun is "f">>breasts.<<else>>balls.<</if>>
			<<elseif $rng gte 11 and $pillory_tenant.upperexposed lt 3>>/* 5% */
				A <<person>> walks up to <<the_pillory_type>> and
				<<if $pillory_tenant.upperexposed is 2>>
					<<if $pronoun is "f">>_ly removes <<his>> bra, fully exposing <<his>> $pillory_tenant.person.breastsdesc to a jeering crowd.
					<<else>>_ly twists <<his>> nipples.
					<</if>>
				<<elseif $pillory_tenant.upperexposed is 1>>
					<<if $pronoun is "f">>fully removes <<his>> top, leaving <<him>> with <<his>> bra exposed to the jeering crowd.
					<<else>>fully removes <<his>> top, exposing <<his>> naked $pillory_tenant.person.breastsdesc to the jeering crowd.
					<</if>>
				<<else>>
					<<if $pronoun is "f">>lifts <<his>> top, partially exposing <<his>> bra to a jeering crowd.
					<<else>>lifts <<his>> top, exposing much of <<his>> chest to the jeering crowd.
					<</if>>
				<</if>><<set $pillory_tenant.upperexposed += 1>>
			<<elseif $rng gte 6 and $pillory_tenant.lowerexposed lt 2>>/* 5% */
				A <<person>> walks up to the helpless <<the_pillory_type>> and
				<<if $pillory_tenant.lowerexposed is 1>>
					<<if $pronoun is "f">>removes <<his>> underwear, fully exposing <<his>> ass and pussy to the jeering crowd.
					<<else>>fully removes <<his>> underwear, exposing <<his>> ass and <<his>> $pillory_tenant.person.penisdesc to the jeering crowd.
					<</if>>
				<<else>>
					<<if $pronoun is "f">>lifts <<his>> skirt,<<else>>pulls down <<his>> trousers,<</if>> exposing <<his>> underwear to a jeering crowd.
				<</if>><<set $pillory_tenant.lowerexposed += 1>>
			<<else>><<set $pillory_tenant.spank += 1>>/* 5% */
				A <<person>> walks up to <<the_pillory_type>> and spanks <<him>> hard on the ass. The thwack echoes across the street.
			<</if>>
		<<else>> /*night*/
			<<if $rng gte 86>> /* 15% chance of jeer and shout only, 85% chance of something active */
				A number of people, led by a <<person>> jeer and shout at the prisoner.
			<<elseif $rng gte 81>> /* 5% */
				A <<person>> throws fruit at <<the_pillory_type>>. Unable to move or defend, it hits <<him>> directly in the face.
				It looks painful, especially as <<he>> cannot wipe the acids out of <<his>> eyes.<<set $pillory_tenant.fruit += 1>>
			<<elseif $rng gte 76>> /* 5% */
				A <<person>> throws fruit at <<the_pillory_type>> but misses completely.
			<<elseif $pillory_tenant.upperexposed lt 3>><<set $pillory_tenant.upperexposed to 3>>
				A <<person>> walks up to the helpless <<the_pillory_type>> and removes all <<his>> upper clothes, fully baring <<his>> <<if $pronoun is "f">>$pillory_tenant.person.breastsdesc<<else>>chest<</if>> to the crowd.
			<<elseif $pillory_tenant.lowerexposed lt 2>><<set $pillory_tenant.lowerexposed to 2>>
				A <<person>> walks up to the helpless <<the_pillory_type>> and removes all <<his>> lower clothes, fully baring <<his>> <<if $pronoun is "f">>pussy<<else>>$pillory_tenant.person.penisdesc<</if>> to the crowd. There is a loud cheer.
			<<elseif $rng gte 66>> /* 10% */
				A <<person>> tries to incite a nearby dog to mount the naked prisoner. It
				<<if $rng % 2>>gives <<the_pillory_persons>> ass a few tentative sniffs, but
				<</if>>is not interested.
			<<elseif $rng gte 56>><<set $pillory_tenant.spank += 1>> /* 10% */
				A <<person>> sneaks up behind the pillory and _ly slaps <<the_pillory_types>> exposed <<if $pronoun is "f">>cunt.<<else>>balls.<</if>> The crowd jeer and laugh as <<he>> howls in pain.
			<<elseif $rng gte 41>><<set $pillory_tenant.face += 1>> /* 15% */
				A <<person>> walks in front of the pillory and _ly masturbates in front of <<the_pillory_type_stop>>
				<<if $pronoun is "m">>Cum splatters across <<the_pillory_persons>> face. The crowd cheer and laugh.
				<<else>><<She>> _ly grinds <<his>> cunt against <<the_pillory_persons>> face as <<he>> orgasms. The crowd cheer and laugh.
				<</if>>
			<<elseif $rng gte 31>><<set $pillory_tenant.ass += 1>> /* 10% */
				A <<person>> walks behind the pillory and _ly <<if $pronoun is "m">>rapes<<else>>fingers<</if>> <<the_pillory_types>> ass. The crowd cheer <<person2>><<him>> on.
			<<elseif $rng gte 21>><<set $pillory_tenant.genital += 1>> /* 10% */
				A <<person>> walks behind the pillory and rapes <<if $pronoun is "m">><<the_pillory_personstop>><<else>><<the_pillory_person>> with a strap-on.<</if>> The crowd watch and cheer <<him>> on.
			<<elseif $rng gte 11>><<set $pillory_tenant.genital += 1>><<set $pillory_tenant.ass += 1>> /* 10% */
				The crowd watch and photograph _ly as a horny dog rapes <<the_pillory_person_stop>> The crowd enjoys such a perverted spectacle.
			<<elseif $rng gte 6>><<set $pillory_tenant.ass += 1>><<set $pillory_tenant.face += 1>> /* 5% */
				Two men _ly <<if $pronoun is "m">>anally-<</if>>spit-roast <<the_pillory_person_stop>> The crowd enjoys the spectacle.
			<<else>>
			<<set $pillory_tenant.spank += 1>>/* 5% */
				A <<person>> walks up to <<the_pillory_type>> and spanks <<him>> hard on the ass. The thwack echoes across the street.
			<</if>>
		<</if>>
	<<else>>/* already abused this hour - no action, don't want spamming this scene to accelerate things ridiculously */
		The people around <<print either("jeer at","laugh at","point at","shout abuse at","taunt","mock","leer at")>>
		<<if $daystate isnot "night">>
			<<if $rng lte 80>>
				<<the_pillory_type>> and <<print either("mutter among themselves.","take photos.","amuse themselves.")>>
			<<elseif $rng lte 93>>
				<<the_pillory_type_stop>> Some get bored and leave.
				<<set $pillory_tenant.crowd -= 1>>
			<<else>>
				<<the_pillory_type_stop>> A bus drops some people off nearby. A few join the crowd around the pillory.
				<<set $pillory_tenant.crowd += 1>>
			<</if>>
		<<else>>
			<<if $rng lte 67>>
				<<the_pillory_type>> and <<print either("mutter darkly.","drink.","throw empty beer cans.","make sinister threats.","take selfies with the prisoner.","tell dirty jokes.")>>
			<<elseif $rng lte 85>>
				<<the_pillory_type_stop>> Some get tired and leave.
				<<set $pillory_tenant.crowd -= 1>>
			<<else>>
				<<the_pillory_type_stop>> A few people passing by join the crowd around the pillory.
				<<set $pillory_tenant.crowd += 1>>
			<</if>>
		<</if>>
	<</if>>
	<<if $pillory_tenant.upperexposed gte 3>><<if $pillory_tenant.person.gender is "f" or $pillory_tenant.person.pronoun is "f">><<set $pillory_tenant.upperexposed to 3>><<else>><<set $pillory_tenant.upperexposed to 2>><</if>><</if>>
	<<if $pillory_tenant.lowerexposed gt 2>><<set $pillory_tenant.lowerexposed to 2>><</if>>
<</nobr>><</widget>>

<<widget "npc_pillory_release_schedule">><<nobr>>
	<<get_pillory_npc>>

	<<if $days is $pillory_tenant.endday>>
	<<set _a_few to ($pillory_tenant.endhour - $hour)>>
		<<He>> will be released
		<<if _a_few gt 0>>in _a_few hours.
		<<else>>imminently.
		<</if>>
	<<else>>
		<<set _days_left to ($pillory_tenant.endday - $days)>>
		<<He>> is scheduled for release <<if _days_left is 1>>tomorrow<<else>>in two days<</if>> at
		<<if $pillory_tenant.endhour is 0>>midnight
		<<elseif $pillory_tenant.endhour lte 9>>0$pillory_tenant.endhour:00.
		<<elseif $pillory_tenant.endhour is 12>>noon.
		<<else>>$pillory_tenant.endhour:00
		<</if>>
	<</if>>
	<<endevent>>
<</nobr>><</widget>>

<<widget "end_npc_pillory">><<nobr>>
	<<get_pillory_npc>>
	<<if $minute lte 15>>
		A police officer <<print either("is releasing","has just released","is struggling to release","is about to release")>>
		<<the_pillory_person>> from the pillory. <<if $weather is "rain">><<His>> clothes are see-through from the rain.<</if>>
	<<elseif $minute lte 30>>
		<<The_pillory_person>> staggers away from the pillory with <<print either("tears","defiance","signs of trauma","fury")>> in <<his>> eyes.
		<<if $weather is "rain">><<His>> clothes are see-through from the rain.<</if>>
	<<else>>
		<<The_pillory_person>> was released and has left. A couple of civil servants clean the pillory.
	<</if>>
	<<set $rng += $pillory_tenant.duration>>
	<<if $rng gte 67 or $rng gte 33 and $weather is "rain">>A large crowd jeers and shouts.<</if>>

	<<setup_pillory>>
	<<endevent>>
<</nobr>><</widget>>