code:
:: Widgets [widget]
<<widget "toggledebug">><<nobr>>
<<if $debug>> <<set $debug to 1>>
<<else>> <<set $debug to -1>>
<</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 $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>>

<</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 $underwet gte 1>>
	<<set $underwet -= ($pass * 2)>>
	<</if>>
<<elseif $outside is 1 and $weather is "rain">>
	<<if $uppertype isnot "naked" and $uppertype isnot "swim">>
<<set $upperwet += $pass>>
	<</if>>
	<<if $lowertype isnot "naked" and $lowertype isnot "swim">>
<<set $lowerwet += $pass>>
	<</if>>
	<<if $undertype isnot "naked" and $undertype isnot "chastity">>
<<set $underwet += $pass>>
	<</if>>
<<else>>
	<<if $upperwet gte 1>>
	<<set $upperwet -= $pass>>
	<</if>>
	<<if $lowerwet gte 1>>
	<<set $lowerwet -= $pass>>
	<</if>>
	<<if $underwet gte 1>>
	<<set $underwet -= $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>>
<<if $controlled is 0 and $anxiety gte 2>>
	<<set $stress += $pass>>
<<elseif $controlled is 0 and $anxiety gte 1>>
<<else>>
	<<set $stress -= $pass>>
<</if>>
<<if $hallucinogen gt 0>><<set $hallucinogen -= $pass>><</if>>
<<if $drunk gt 0>><<set $drunk -= $pass>><</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>>
<</nobr>><</widget>>

<<widget "neutral">><<nobr>>
<<if $args[0]>>
	<<if $consensual isnot 1>>
	<<set $stress += 10 * $args[0]>>
	<<combattrauma $args[0]>>
	<</if>>
	<<set $arousal += 20 * $args[0]>>
	<<set $enemyarousal += $args[0]>>
<</if>>
<</nobr>><</widget>>

<<widget "sex">><<nobr>>
<<if $args[0]>>
	<<if $consensual isnot 1>>
	<<set $stress += 10 * $args[0]>>
	<<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]>>
	<<set $stress += 10 * $args[0]>>
	<<combattrauma $args[0]>>
	<<set $pain += $args[0]>>
	<<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>>
	<<set $stress += 10 * $args[0]>>
	<<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]>>
	<<set $stress += 10 * $args[0]>>
	<<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 $faceacc is "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 $faceacc is "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 $faceacc is "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 $faceacc is "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 $physique += 10 * _temp>><<set $physiqueuse += _temp>> You get a good workout.
<</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>>

/*
add diary entries for the 1st time each of these stats increases
if I actually knew how combat works I'd probably make <<combat_partner>> get called somewhere else or make $combat_partner be set without calling a widget

<<set $logextra to $logextra+"I lost my virginity to "+$combat_partner+". ">>
<<set $logextra to $logextra+"I lost my anal virginity to "+$combat_partner+". ">>
<<set $logextra to $logextra+"I lost my oral virginity to "+$combat_partner+". ">>
*/
<<widget "rapestat">><<if $rapestat == 0>><<combat_partner>><<set $logextra to $logextra+"The first time someone "+$aw_rapedx+" it was done by "+$combat_partner+". ">><</if>><<set $rapestat += 1>><</widget>>

<<widget "moleststat">><<if $moleststat == 0>><<combat_partner>><<set $logextra to $logextra+"I "+$aw_wasmolested+" for the first time, it was done by "+$combat_partner+". ">><</if>><<set $moleststat += 1>><</widget>>

<<widget "vaginalstat">><<if $vaginalstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to sexually use my vagina. ">><</if>><<set $vaginalstat += 1>><</widget>>

<<widget "vaginalejacstat">><<if $vaginalejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$combat_partner+" was the first to cum inside my vagina. ">><</if>><<set $vaginalejacstat += 1>><<set $purity -= 1>><<internalejac>><</widget>>

<<widget "analstat">><<if $analstat == 0>><<combat_partner>><<set $logextra to $logextra+"I had my first anal experience with "+$combat_partner+". ">><</if>><<set $analstat += 1>><</widget>>

<<widget "analejacstat">><<if $analejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to cum inside my ass. ">><</if>>	<<set $analejacstat += 1>><<set $purity -= 1>><<internalejac>><</widget>>

<<widget "oralstat">><<if $oralstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to use my mouth for sexual pleasure. ">><</if>><<set $oralstat += 1>><</widget>>

<<widget "oralejacstat">><<if $oralejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to cum inside my mouth. ">><</if>><<set $oralejacstat += 1>><<set $purity -= 1>><<internalejac>><</widget>>

<<widget "handstat">><<if $handstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I pleaured with my hand. ">><</if>><<set $handstat += 1>><</widget>>

<<widget "handejacstat">><<if $handejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I made cum using my hands. ">><</if>><<set $handejacstat += 1>><</widget>>

<<widget "feetstat">><<if $feetstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I pleaured with my feet. ">><</if>><<set $feetstat += 1>><</widget>>

<<widget "feetejacstat">><<if $feetejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I made cum using my feet. ">><</if>><<set $feetejacstat += 1>><</widget>>

<<widget "thighstat">><<if $thighstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I pleaured with my thighs. ">><</if>><<set $thighstat += 1>><</widget>>

<<widget "thighejacstat">><<if $thighejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I made cum using my thighs. ">><</if>><<set $thighejacstat += 1>><</widget>>

<<widget "cheststat">><<if $cheststat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I pleaured with my chest. ">><</if>><<set $cheststat += 1>><</widget>>

<<widget "chestejacstat">><<if $chestejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I made cum using my chest. ">><</if>><<set $chestejacstat += 1>><</widget>>

<<widget "bottomstat">><<if $bottomstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I pleaured with my butt. ">><</if>><<set $bottomstat += 1>><</widget>>

<<widget "bottomejacstat">><<if $bottomejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first one I made cum using my butt. ">><</if>><<set $bottomejacstat += 1>><</widget>>

<<widget "penilestat">><<if $penilestat == 0>><<combat_partner>><<set $logextra to $logextra+"I lost my penile virginity to "+$combat_partner+". ">><</if>><<set $penilestat += 1>><</widget>>

<<widget "penileejacstat">><<if $penileejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to make my penis cum inside them. ">><<set $penileejacstat += 1>><</widget>>

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

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

<<widget "orgasmstat">><<if $orgasmstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to make me orgasm. ">><</if>><<set $orgasmstat += 1>><</widget>>

<<widget "ejacstat">><<if $ejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to ejaculate thanks to me. ">><</if>><<set $ejacstat += 1>><</widget>>

<<widget "hitstat">><<set $hitstat += 1>><</widget>>/* add 1st time? */

<<widget "attackstat">><<set $attackstat += 1>><</widget>>/* add 1st time? */

<<widget "vaginalentranceejacstat">>
<<if $vaginalentranceejacstat == 0>>
	<<combat_partner>>
	<<set $logextra to $logextra+$Combat_partner+" was the first to cum on the entrance of my vagina. ">>/* word better? */
	<</if>>
<<set $vaginalentranceejacstat += 1>>
<</widget>>

<<widget "faceejacstat">><<if $faceejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to cum on my face. ">><</if>><<set $faceejacstat += 1>><</widget>>

<<widget "hairejacstat">><<if $hairejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to cum on my hair. ">><</if>><<set $hairejacstat += 1>><</widget>>

<<widget "tummyejacstat">><<if $tummyejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to cum on my stomach. ">><</if>><<set $tummyejacstat += 1>><</widget>>

<<widget "neckejacstat">><<if $neckejacstat == 0>><<combat_partner>><<set $logextra to $logextra+$Combat_partner+" was the first to cum on my neck. ">><</if>><<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>>

<<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 you.
<<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>>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>>
		<<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>><<set $famerape += $enemyno>><<set $fame += $enemyno>>
	<<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>><<set $famesex += $enemyno>><<set $fame += $enemyno>>
<<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">>
<<else>>
<<set $pullaway to 0>>
<<set $novaginal to 0>>
<<set $noanal to 0>>
<<set $nopenile to 0>>
	<<if $control gt 1 and $consensual is 0>>
		<<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 $lowerintegrity -= 20>><<set $upperintegrity -= 20>><<set $underintegrity -= 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 "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">>

		<<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 "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 "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 "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>>
<<set $upperintegrity -= 1>><<set $lowerintegrity -= 1>><<set $underintegrity -= 1>>
<</nobr>><</widget>>

<<widget "towelup">><<nobr>>
<<if $exposed gte 1>>
	<<if $upperwetstage gte 3>>
	<<set $uppertowelnew to 1>><<uppertowel>>
	<</if>>
	<<if $lowerwetstage gte 3>>
	<<set $lowertowelnew to 1>><<lowertowel>>
	<</if>>
	<<if $upperexposed gte 1>>
	<<set $uppertowelnew to 1>><<uppertowel>>
	<</if>>
	<<if $lowerexposed gte 1>>
	<<set $lowertowelnew to 1>><<lowertowel>>
	<</if>>
<</if>>
<</nobr>><</widget>>

<<widget "plantupper">><<nobr>>
<<if $upperexposed gte 2 or $upperwetstage gte 3>>
<<set $upperplantnew to 1>><<upperplant>>
<</if>>
<</nobr>><</widget>>

<<widget "plantlower">><<nobr>>
<<if $lowerexposed gte 2 and $underexposed gte 1 or $lowerwetstage gte 3 and $underwetstage gte 3 or $lowerwetstage gte 3 and $underexposed gte 1>>
<<set $lowerplantnew to 1>><<lowerplant>>
<</if>>
<</nobr>><</widget>>

<<widget "plantup">><<nobr>>
<<if $upperexposed gte 2 or $upperwetstage gte 3>>
<<set $upperplantnew to 1>><<upperplant>>
<</if>>
<<if $lowerexposed gte 2 and $underexposed gte 1 or $lowerwetstage gte 3 and $underwetstage gte 3 or $lowerwetstage gte 3 and $underexposed gte 1>>
<<set $lowerplantnew to 1>><<lowerplant>>
<</if>>
<</nobr>><</widget>>

<<widget "schoolspareclothes">><<nobr>>
<<if $uppertype isnot "school" and $lowertype isnot "school">>
<<set $uppertemp to "init">><<schoolshirt>><<set $uppercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $upperintegrity to $schoolshirtintegritymax / 2>>
	<<if $clothingselector is "m">><<set $lowertemp to "init">>
	<<schoolshorts>><<set $lowercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $lowerintegrity to $schoolshortsintegritymax / 2>>
	<<else>><<set $lowertemp to "init">>
	<<schoolskirt>><<set $lowercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $lowerintegrity to $schoolskirtintegritymax / 2>>
	<</if>>
<<elseif $lowertype isnot "school">><<set $lowertemp to "init">>
	<<if $clothingselector is "m">>
	<<schoolshorts>><<set $lowercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $lowerintegrity to $schoolshortsintegritymax / 2>>
	<<else>>
	<<schoolskirt>><<set $lowercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $lowerintegrity to $schoolskirtintegritymax / 2>>
	<</if>>
<<elseif $uppertype isnot "school">>
<<set $uppertemp to "init">><<schoolshirt>><<set $uppercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $upperintegrity to $schoolshirtintegritymax / 2>>
<</if>>
<</nobr>><</widget>>

<<widget "spareschoolswimsuit">><<nobr>>
<<set $uppertemp to "init">><<set $lowertemp to "init">><<upperschoolswimsuit>><<set $uppercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $upperintegrity to $schoolshirtintegritymax / 2>>
<<set $lowertemp to "init">><<lowerschoolswimsuit>><<set $lowercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $lowerintegrity to $schoolswimshortsintegritymax / 2>>
<</nobr>><</widget>>

<<widget "spareschoolswimshorts">><<nobr>>
<<set $lowertemp to "init">><<schoolswimshorts>><<set $lowercolour to either("blue", "white", "red", "green", "black", "pink", "purple", "tangerine", "yellow")>><<set $lowerintegrity to $schoolswimshortsintegritymax / 2>>
<</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 $upperexposedcarry to $upperexposed>>
<<set $lowerexposedcarry to $lowerexposed>>
<<set $underexposedcarry to $underexposed>>
<<if $upperwetstage gte 3>>
<<set $upperexposed to 2>>
<</if>>
<<if $lowerwetstage gte 3>>
<<set $lowerexposed to 2>>
<</if>>
<<if $underwetstage gte 3>>
<<set $underexposed to 1>>
<</if>>

<<set $breastindicator to 0>>

<<if $crossdressing isnot 1>>
<<if $underexposed gte 1 and $lowerexposed gte 2>>
<<set $playergenderappearance to $playergender>>
<<elseif $lowervaginaexposed gte 1 and $undervaginaexposed gte 1>>
<<set $playergenderappearance to $playergender>>
<<elseif $upperexposed gte 2 and $breastsize gte 3>>
<<set $playergenderappearance to "f">><<set $breastindicator to 1>>
<<elseif $lowergender isnot "n">>
<<set $playergenderappearance to $lowergender>>
<<elseif $uppergender isnot "n">>
<<set $playergenderappearance to $uppergender>>
<<elseif $undergender isnot "n" and $lowerexposed gte 2>>
<<set $playergenderappearance to $undergender>>
<<elseif $upperexposed gte 2 and $breastsize lte 2>>
<<set $playergenderappearance to "m">>
<<else>>
<<set $playergenderappearance to $playergender>>
<</if>>
<</if>>

<<set $exposed to 0>>
<<set $naked to "fully clothed">>
<<set $nakedness to "clothing">>
<<if $upperexposed gte 1>>
	<<if $playergenderappearance is "m">>
	<<elseif $libertine gte 1>>
	<<else>>
		<<set $exposed to 1>>
		<<set $naked to "in a state of undress">>
		<<set $nakedness to "state of undress">>
	<</if>>
<</if>>
<<if $upperexposed gte 2 and $playergenderappearance isnot "m">>
	<<set $exposed to 1>><<set $topless to 1>>
	<<set $naked to "in a state of undress">>
	<<set $nakedness to "state of undress">>
<<else>>
	<<set $topless to 0>>
<</if>>
<<if $lowerexposed gte 1>>
	<<if $libertine gte 1>>
	<<else>>
		<<set $exposed to 1>>
		<<set $naked to "in a state of undress">>
		<<set $nakedness to "state of undress">>
	<</if>>
<</if>>
<<if $lowerexposed gte 2>>
	<<if $underexposed gte 1>>
		<<set $exposed to 2>>
	<<if $uppertype is "naked" and $lowertype is "naked" and $undertype is "naked">>
		<<set $naked to "naked">>
		<<set $nakedness to either("nakedness","nudity")>>
	<<else>>
		<<set $naked to "nearly naked">>
		<<set $nakedness to "exposure of privates">>
	<</if>>
	<</if>>
<</if>>

<<set $upperexposed to $upperexposedcarry>>
<<set $lowerexposed to $lowerexposedcarry>>
<<set $underexposed to $underexposedcarry>>

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

<<widget "integritycheck">><<nobr>>
<<if $upperclothes isnot "naked">>
	<<if $upperintegrity lte 0>>Your $upperclothes <<upperplural>> ripped into scraps, exposing your <<breastsstop>>
<<upperruined>><<clothesruinstat>><<set $upperoff to 0>>
	<</if>>
<</if>>
<<if $lowerclothes isnot "naked">>
	<<if $lowerintegrity lte 0>>Your $lowerclothes <<lowerplural>> ripped into scraps, exposing your <<undiesstop>>
<<lowerruined>><<clothesruinstat>><<set $loweroff to 0>>
	<</if>>
<</if>>
<<if $underclothes isnot "naked">>
	<<if $underintegrity lte 0>>Your $underclothes <<underplural>> ripped into scraps, exposing your <<genitalsstop>>

		<<if $undertype is "chastity">>
		<<set $undertype to "brokenchastity">>
			<<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 $analshield is 1>><<set $analshield to 0>>
			<</if>>
		<</if>>
	<<underruined>><<clothesruinstat>><<set $underoff 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 "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 $uppertype isnot "swim" and $uppertype isnot "naked">>

<<set $upperwet to 200>>
<</if>>
<<if $lowertype isnot "swim" and $lowertype isnot "naked">>

<<set $lowerwet to 200>>
<</if>>
<<if $undertype isnot "swim" and $undertype isnot "naked" and $undertype isnot "chastity">>

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

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

<<widget "stripactions">><<nobr>>

<<if $actionuncladoutfit is 1>><<set $actionuncladoutfit to 0>>
	<<set $logprep to "Removed my "+$upperclothes+".">>
	<<log $logprep $exposureimportance>>
	Feeling naughty, you remove your $upperclothes.<<uppernaked>><<lowernaked>>
	<<if $undertype isnot "naked" and $undertype isnot "chastity">><<exhibitionism1>>

<<else>><<exhibitionism2>>

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

<<if $actionuncladupper is 1>><<set $actionuncladupper to 0>>
	<<set $logprep to "Removed my "+$upperclothes+".">>
	<<log $logprep $exposureimportance>>
	Feeling naughty, you remove your $upperclothes.<<uppernaked>>
	<<if $breastsize gte 3>><<exhibitionism1>><<elseif $playergenderappearance isnot "m" and $lowergender isnot "m">><<exhibitionism1>>

<<else>>

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

<<if $actionuncladlower is 1>><<set $actionuncladlower to 0>>
	<<set $logprep to "Removed my "+$lowerclothes+".">>
	<<log $logprep $exposureimportance>>
	Feeling naughty, you remove your $lowerclothes.<<lowernaked>>
	<<if $undertype isnot "naked" and $undertype isnot "chastity">><<exhibitionism1>>

<<else>><<exhibitionism2>>

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

<<if $actionuncladunder is 1>><<set $actionuncladunder to 0>>
	You remove your $underclothes with shaking fingers.<<undernaked>><<exhibitionism2>>

	<<set $logprep to "Removed my "+$underclothes+".">>
	<<log $logprep $exposureimportance>>
<</if>>

<<if $uncladoutfit is 1>>
Put your <<link $upperoff>><<set $eventskip to 1>><<outfiton>><<set $uncladoutfit to 0>><<uncladcheck>><<set $logprep to "Put on my "+$upperclothes+".">><<log $logprep $exposureimportance>><><</link>> back on

<</if>>

<<if $uncladupper is 1>>
Put your <<link $upperoff>><<set $eventskip to 1>><<upperon>><<set $uncladupper to 0>><<uncladcheck>><<set $logprep to "Put on my "+$upperclothes+".">><<log $logprep $exposureimportance>><><</link>> back on

<</if>>

<<if $uncladlower is 1>>
Put your <<link $loweroff>><<set $eventskip to 1>><<loweron>><<set $uncladlower to 0>><<uncladcheck>><<set $logprep to "Put on my "+$lowerclothes+".">><<log $logprep $exposureimportance>><><</link>> back on

<</if>>

<<if $uncladunder is 1>>
Put your <<link $underoff>><<set $eventskip to 1>><<underon>><<set $uncladunder to 0>><<uncladcheck>><<set $logprep to "Put on my "+$underclothes+".">><<log $logprep $exposureimportance>><><</link>> back on

<</if>>

<<if $undertype isnot "naked" and $undertype isnot "chastity">>
	<<if $upperset is $lowerset>>
Remove your <<link $upperclothes>><<set $eventskip to 1>><<set $actionuncladoutfit to 1>><<set $uncladoutfit to 1>><<uncladcheck>><><</link>><<exhibitionist1>>

	<</if>>
<<else>>
	<<if $upperset is $lowerset and $exhibitionism gte 15>>
Remove your <<link $upperclothes>><<set $eventskip to 1>><<set $actionuncladoutfit to 1>><<set $uncladoutfit to 1>><<uncladcheck>><><</link>><<exhibitionist2>>

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

<<if $upperset isnot $lowerset and $uppertype isnot "naked">>
Remove your <<link $upperclothes>><<set $eventskip to 1>><<set $actionuncladupper to 1>><<set $uncladupper to 1>><<uncladcheck>><><</link>><<if $breastsize gte 3>><<exhibitionist1>><<elseif $playergenderappearance isnot "m" and $lowergender isnot "m">><<exhibitionist1>><</if>>

<</if>>

<<if $undertype isnot "naked" and $undertype isnot "chastity">>
	<<if $upperset isnot $lowerset and $lowertype isnot "naked">>
Remove your <<link $lowerclothes>><<set $eventskip to 1>><<set $actionuncladlower to 1>><<set $uncladlower to 1>><<uncladcheck>><><</link>><<exhibitionist1>>

	<</if>>
<<else>>
	<<if $upperset isnot $lowerset and $lowertype isnot "naked" and $exhibitionism gte 15>>
Remove your <<link $lowerclothes>><<set $eventskip to 1>><<set $actionuncladlower to 1>><<set $uncladlower to 1>><<uncladcheck>><><</link>><<exhibitionist2>>

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

<<if $undertype isnot "naked" and $undertype isnot "chastity" and $exhibitionism gte 15>>
Remove your <<link $underclothes>><<set $eventskip to 1>><<set $actionuncladunder to 1>><<set $uncladunder to 1>><<uncladcheck>><><</link>><<exhibitionist2>>

<</if>>

<<exposure>>

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

<<widget "stripstoreactions">><<nobr>>

<<if $actionuncladoutfit is 1>><<set $actionuncladoutfit to 0>>
	<<if $storelocationinit is "wolfcave">>
	You remove your $upperclothes. They may be animals, but stripping in front of them makes a chill run through your spine.
	<<else>>
	You check to make sure no one is around, then slowly remove your $upperclothes. Despite being alone, doing this in a public space makes a chill run through your spine.
	<</if>>
	<<storeupper>><<storelower>><<storelocation>><<upperundress>><<lowerundress>>
	<<if $undertype isnot "naked" and $undertype isnot "chastity">><<exhibitionism1>>

	<<else>>
	<<exhibitionism2>>

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

<<if $actionuncladupper is 1>><<set $actionuncladupper to 0>>
	<<if $storelocationinit is "wolfcave">>
	You remove your $upperclothes. They may be animals, but stripping in front of them makes your nipples erect and your newly-exposed skin tingle.
	<<else>>
	You check to make sure no one is around, then slowly remove your $upperclothes. Despite being alone, doing this in a public space makes your nipples erect and your newly-exposed skin tingle.
	<</if>>
	<<storeupper>><<storelocation>><<upperundress>>
	<<if $breastsize gte 3>><<exhibitionism1>><<elseif $playergenderappearance isnot "m" and $lowergender isnot "m">><<exhibitionism1>>

	<<else>>

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

<<if $actionuncladlower is 1>><<set $actionuncladlower to 0>>
	<<if $storelocationinit is "wolfcave">>
	You remove your $lowerclothes. They may be animals, but stripping in front of them makes you shiver delightfully.
	<<else>>
	You check to make sure no one is around, then slowly remove your $lowerclothes. Despite being alone, doing this in a public space makes you shiver delightfully.
	<</if>>
	<<storelower>><<storelocation>><<lowerundress>>
	<<if $undertype isnot "naked" and $undertype isnot "chastity">><<exhibitionism1>>

	<<else>>
	<<exhibitionism2>>

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

<<if $actionuncladunder is 1>><<set $actionuncladunder to 0>>
	<<if $storelocationinit is "wolfcave">>
	You remove your $lowerclothes. They may be animals, but stripping in front of them makes your skin and <<genitals>> tingle.
	<<else>>
	You check to make sure no one is around, then slowly remove your $underclothes. Despite being alone, doing this in a public space makes your skin and <<genitals>> tingle.
	<</if>>
	<<storeunder>><<storelocation>><<underundress>><<exhibitionism2>>

<</if>>

<<if $storelocationinit is $storelocation>>
<<link "Get Dressed">><<storeon>><<set $eventskip to 1>><><</link>>

<</if>>

<<if $undertype isnot "naked" and $undertype isnot "chastity">>
	<<if $upperset is $lowerset>>
Remove your <<link $upperclothes>><<set $eventskip to 1>><<set $actionuncladoutfit to 1>><><</link>><<exhibitionist1>>

	<</if>>
<<else>>
	<<if $upperset is $lowerset and $exhibitionism gte 15>>
Remove your <<link $upperclothes>><<set $eventskip to 1>><<set $actionuncladoutfit to 1>><><</link>><<exhibitionist2>>

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

<<if $upperset isnot $lowerset and $uppertype isnot "naked">>
Remove your <<link $upperclothes>><<set $eventskip to 1>><<set $actionuncladupper to 1>><><</link>><<if $breastsize gte 3>><<exhibitionist1>><<elseif $playergenderappearance isnot "m" and $lowergender isnot "m">><<exhibitionist1>><</if>>

<</if>>

<<if $undertype isnot "naked" and $undertype isnot "chastity">>
	<<if $upperset isnot $lowerset and $lowertype isnot "naked">>
Remove your <<link $lowerclothes>><<set $eventskip to 1>><<set $actionuncladlower to 1>><><</link>><<exhibitionist1>>

	<</if>>
<<else>>
	<<if $upperset isnot $lowerset and $lowertype isnot "naked" and $exhibitionism gte 15>>
Remove your <<link $lowerclothes>><<set $eventskip to 1>><<set $actionuncladlower to 1>><><</link>><<exhibitionist2>>

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

<<if $undertype isnot "naked" and $undertype isnot "chastity" and $exhibitionism gte 15>>
Remove your <<link $underclothes>><<set $eventskip to 1>><<set $actionuncladunder to 1>><><</link>><<exhibitionist2>>

<</if>>

<<exposure>>

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

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

<<if $danceaction is "outfitstripbreasts">><<set $danceaction to 0>>
You gracefully remove your $upperclothes, exposing your <<breasts>> and $underclothes. The exhibition of your breasts makes them feel raw and sensitive.
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<uppernaked>><<lowernaked>><<exhibitionism4>>
<</if>>

<<if $danceaction is "outfitstripchest">><<set $danceaction to 0>>
	<<if $playergender is "f">>
	You gracefully remove your $upperclothes, exposing your <<breasts>> and $underclothes. You feel your nipples harden in response to being revealed.
	<<else>>
	You gracefully remove your $upperclothes, exposing your <<breasts>> and $underclothes. Your feminine countenance makes your revealed chest feel especially lewd.
	<</if>>
<<set $audiencearousal += 8>><<set $audienceexcitement += 8>><<set $audiencemod += 3>><<arousal 3>><<uppernaked>><<lowernaked>><<exhibitionism4>>
<</if>>

<<if $danceaction is "outfitstripunder">><<set $danceaction to 0>>
You gracefully remove your $upperclothes, exposing your <<breasts>> and $underclothes. You feel your nipples harden in response to being revealed.
<<set $audiencearousal += 6>><<set $audienceexcitement += 6>><<set $audiencemod += 2>><<arousal 3>><<uppernaked>><<lowernaked>><<exhibitionism3>>
<</if>>

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

<<if $danceaction is "upperstripbreasts">><<set $danceaction to 0>>
You gracefully remove your $upperclothes, 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>><<uppernaked>><<exhibitionism4>>
<</if>>

<<if $danceaction is "upperstripfchest">><<set $danceaction to 0>>
	<<if $playergender is "f">>
	You gracefully remove your $upperclothes, exposing your <<breastsstop>> You feel your nipples harden in response to being revealed.
	<<else>>
	You gracefully remove your $upperclothes, 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>><<uppernaked>><<exhibitionism4>>
<</if>>

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

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

<<if $danceaction is "lowerstripnude">><<set $danceaction to 0>>
You gracefully remove your $lowerclothes, exposing your <<genitalsstop>>
	<<if $uppertype is "naked">>
	You shiver with excitement, your body laid totally bare.
	<<else>>
	Your $upperclothes makes your naked lower half feel particularly conspicuous.
	<</if>>
<<set $audiencearousal += 10>><<set $audienceexcitement += 10>><<set $audiencemod += 4>><<arousal 3>><<lowernaked>><<exhibitionism5>>
<</if>>

<<if $danceaction is "understripskirt">><<set $danceaction to 0>>
You gracefully remove your $underclothes from beneath your $lowerclothes. 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>><<undernaked>><<exhibitionism3>>
<</if>>

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

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

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

	<<if $upperset is $lowerset>>
		<<if $undertype isnot "naked">>
			<<if $breastsize gte 3>>
				<<if $exhibitionism gte 55>>
				Strip $upperclothes <<combatexhibitionist4>> <<radiobutton "$danceaction" "outfitstripbreasts">> |
				<</if>>
			<<elseif $playergenderappearance isnot "m" and $lowergender isnot "m">>
				<<if $exhibitionism gte 55>>
				Strip $upperclothes <<combatexhibitionist4>> <<radiobutton "$danceaction" "outfitstripchest">> |
				<</if>>
			<<else>>
				<<if $exhibitionism gte 35>>
				Strip $upperclothes <<combatexhibitionist3>> <<radiobutton "$danceaction" "outfitstripunder">> |
				<</if>>
			<</if>>
		<<else>>
			<<if $exhibitionism gte 75>>
			Strip $upperclothes <<combatexhibitionist5>> <<radiobutton "$danceaction" "outfitstripnude">> |
			<</if>>
		<</if>>
	<</if>>

	<<if $uppertype isnot "naked" and $upperset isnot $lowerset>>
		<<if $breastsize gte 3>>
			<<if $exhibitionism gte 55>>
			Strip $upperclothes <<combatexhibitionist4>> <<radiobutton "$danceaction" "upperstripbreasts">> |
			<</if>>
		<<elseif $playergenderappearance isnot "m" and $lowergender isnot "m">>
			<<if $exhibitionism gte 55>>
			Strip $upperclothes <<combatexhibitionist4>> <<radiobutton "$danceaction" "upperstripfchest">> |
			<</if>>
		<<else>>
		Strip $upperclothes <<combatexhibitionist1>> <<radiobutton "$danceaction" "upperstripmchest">> |
		<</if>>
	<</if>>

	<<if $lowertype isnot "naked" and $upperset isnot $lowerset>>
		<<if $undertype isnot "naked" and $undertype isnot "chastity">>
			<<if $exhibitionism gte 35>>
			Strip $lowerclothes <<combatexhibitionist3>> <<radiobutton "$danceaction" "lowerstripunder">> |
			<</if>>
		<<else>>
			<<if $exhibitionism gte 75>>
			Strip $lowerclothes <<combatexhibitionist5>> <<radiobutton "$danceaction" "lowerstripnude">> |
			<</if>>
		<</if>>
	<</if>>

	<<if $undertype isnot "naked" and $undertype isnot "chastity">>
		<<if $lowertype isnot "naked" and $skirt is 1>>
			<<if $exhibitionism gte 35>>
			Strip $underclothes <<combatexhibitionist3>> <<radiobutton "$danceaction" "understripskirt">> |
			<</if>>
		<<elseif $lowertype is "naked">>
			<<if $exhibitionism gte 75>>
			Strip $underclothes <<combatexhibitionist5>> <<radiobutton "$danceaction" "understripnude">> |
			<</if>>
		<</if>>
	<</if>>

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

<<widget "uncladcheck">><<nobr>>
<<if $uncladoutfit isnot 1 and $uncladupper isnot 1 and $uncladlower isnot 1 and $uncladunder isnot 1>>
<<set $unclad to 0>>
<<else>>
<<set $unclad to 1>>
<</if>>
<</nobr>><</widget>>

<<widget "arousalpass">><<nobr>>
<<if $penilechastityparasite isnot 0>>
<<set $arousal += ($pass * 10)>>
<</if>>
<<if $vaginalchastityparasite isnot 0>>
<<set $arousal += ($pass * 10)>>
<</if>>
<<if $analchastityparasite isnot 0>>
<<set $arousal += ($pass * 10)>>
<</if>>
<<if $chestparasite isnot 0>>
<<set $arousal += ($pass * 10)>>
<</if>>
<<if $penisparasite isnot 0>>
<<set $arousal += ($pass * 10)>>
<</if>>
<<if $clitparasite isnot 0>>
<<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 $undertype isnot "naked" and $undertype isnot "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 $waterwash 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 $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>>

You make £<<print Math.trunc($tip / 100)>>.<<if $tip % 100 lte 9>>0<</if>><<print $tip % 100>>.
<<set $money += $tip>>

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

<<widget "stealclothes">><<nobr>>
<<set $stealtextskip to 1>>
<<if $upperoff isnot 0>>
<<uppersteal>>
<</if>>
<<if $loweroff isnot 0>>
<<lowersteal>>
<</if>>
<<if $underoff isnot 0>>
<<understeal>>
<</if>>
<<set $stealtextskip to 0>>
<</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>>

__Map__

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

|..╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲

|Do ─ Co ─ Hi ─ Ox ─ Ha

|..╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱

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

<</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 £$rng.<<set $money += $rng * 100>><<crimeup $rng>><<combatskulduggeryskilluse>><<combatcontrol 10>><<gcombatcontrol>>
<</if>>
<</nobr>><</widget>>

<<widget "combat_partner">><<nobr>>/* somehow set to "I" when masturbating? */
<<set $combat_partner = "">>/* hopefulyy this will fix the "An an a slight boy", it does but instead causes just "A"s to appear */
<<if $enemytype is "beast">>
	<<set $combat_partner = $beasttype>>
<<elseif $npc isnot 0>>/* is a named npc */
	<<set $combat_partner = $npcdescription + " " + $npc>>
<<elseif $npcadult is 1>>/* is a named npc */
	<<if $pronoun is "m">><<set $combat_partner = $description + " man">>
	<<elseif $pronoun is "f">><<set $combat_partner = $description + " woman">>
	<<elseif $pronoun is "i">><<set $combat_partner = $description + " thing">>
	<<else>><<set $combat_partner = $description + " person">>
	<</if>>
<<else>>
	<<if $pronoun is "m">><<set $combat_partner = $description + " boy">>
	<<elseif $pronoun is "f">><<set $combat_partner = $description + " girl">>
	<<elseif $pronoun is "i">><<set $combat_partner = $description + " thing">>
	<<else>><<set $combat_partner = $description + "kid">>/* this should appear if all else fails, hopefully preventing no description at all */
	<</if>>
<</if>>
<<set $combat_partner to jsArticle($combat_partner)>>
<<set $Combat_partner to jsCapitalize($combat_partner)>>
/*
<<set $logextra "I lost my "+$args[0]+"virginity to "+jsArticle($combat_partner)+$combat_partner+".">>
<<set $logextra "I lost my "+$args[0]+"virginity to "+$combat_partner+".">>
*/
<</nobr>><</widget>>

<<widget "remembersettings">><<nobr>>/*  */
<<remember $debug>>
<<remember $tipdisable>>
<<remember $cheatdisable>>
<<remember $compactsidebar>>

/* diary settings */
<<remember $logdebug>>
<<remember $diarymode>>
<<remember $loglocations>>
<<remember $diaryprompts>>
<<remember $diarysidebar>>
<<remember $diaryfilterA>>
<<remember $diaryfilterB>>
<<remember $compactsidebar>>
<<remember $logshowcomments>>
<<remember $logshowopinions>>
<<remember $logchangetreshold>>
<<remember $diaryshowunwritten>>
<<remember $busimportance>>
<<remember $workimportance>>
<<remember $passoutimportance>>
<<remember $exposureimportance>>
<<remember $logextraimportance>>
<<remember $locationimportance>>
/* sliders */
<<remember $malechance>>
<<remember $beastmalechance>>
<<remember $dgchance>>
<<remember $cbchance>>
<<remember $whitechance>>
<<remember $blackchance>>
<<remember $alluremod>>
/*content toggles*/
<<remember $bestialitydisable>>
<<remember $swarmdisable>>
<<remember $parasitedisable>>
<<remember $slimedisable>>
<<remember $voredisable>>
<<remember $tentacledisable>>
<<remember $analdisable>>
<<remember $transformdisable>>
<<remember $hirsutedisable>>
<<remember $breastfeedingdisable>>
/* not sure if these are really necessary */
<<remember $breastsizemax>>
<<remember $gamemode>>
<<remember $numberify_enabled>>
<<remember $silhouettedisable>>
<<remember $dev>>
<<remember $images>>
<<remember $textonly>>

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

<<widget "forgetsettings">><<nobr>>/* not sure where would be a good place to actually use this if at all */
<<remember $facreset to true>>
<<run UI.restart()>>/* will ask to restart, Engine.restart() won't ask, anyway probably not a good idea to not do a restart after undefining all of these */

/*
<<forget $debug, $tipdisable, $cheatdisable, $compactsidebar, $malechance, $beastmalechance, $dgchance, $cbchance, $whitechance, $blackchance, $alluremod>>
<<forget $logdebug, $diarysidebar, $diarymode, $loglocations, $diaryprompts, $diaryfilterA, $diaryfilterB, $logshowcomments, $logshowopinions, $logchangetreshold, $diaryshowunwritten>>
<<forget $busimportance, $workimportance, $passoutimportance, $exposureimportance, $logextraimportance>>
<<forget $bestialitydisable, $swarmdisable, $parasitedisable, $slimedisable, $voredisable, $tentacledisable, $analdisable, $transformdisable, $hirsutedisable, $breastfeedingdisable>>
<<forget $breastsizemax, $gamemode, $numberify_enabled, $silhouettedisable, $dev, $images, $textonly>>
<<run Engine.restart()>>
*/
<</nobr>><</widget>>

/*
diary stuff

*/
<<widget "loginit">><<nobr>>

/* name diaryentry array indexes to make coding easier without making the game repeatedly use the names(in save files and such) */
<<set _len to 53>>/* index of last $log.variable */
<<if $logblank is undefined or $logblank.length lte _len>>/* checking _len to trigger on version update if new ones get added */
	<<set $log to {
		time:0,text:1,importance:2,comment:3,opinion:4,
		money:5,stress:6,trauma:7,awareness:8,pain:9,
		tiredness:10,arousal:11,control:12,allure:13,antiquemoney:14,
		blackmoney:15,spray:16,spraymax:17,drunk:18,drunkgain:19,
		drugged:20,weather:21,clothupper:22,clothlower:23,clothunder:24,
		oldclothupper:25,oldclothlower:26,oldclothunder:27,collared:28,purity:29,
		submissive:30,physique:31,beauty:32,promiscuity:33,exhibitionism:34,
		deviancy:35,skulduggery:36,danceskill:37,swimmingskill:38,seductionskill:39,
		oralskill:40,vaginalskill:41,penileskill:42,analskill:43,handskill:44,
		feetskill:45,bottomskill:46,thighskill:47,chestskill:48,science:49,
		maths:50,english:51,history:52,unclad:53
	}>>
	/*
	to add: detentions, stats like number of molestations and dancings(mainly so you can talk about them in appointments )
	*/
	<<set $logblank to []>>
	<<for $logblank.length lte _len>>
		<<set $logblank.push(0)>>
	<</for>>
	<<set $logblank[$log.weather] to ("")>>
	<<set $logblank[$log.clothupper] to ("")>>
	<<set $logblank[$log.clothlower] to ("")>>
	<<set $logblank[$log.clothunder] to ("")>>
	<<set $logblank[$log.oldclothupper] to ("")>>
	<<set $logblank[$log.oldclothlower] to ("")>>
	<<set $logblank[$log.oldclothunder] to ("")>>

<</if>>

<<if $logged is undefined>><<set $logged to clone($logblank)>><</if>>

<<if $diary.length-1 lt $days>> /* fill diary with blank days to catch up to current date */
	<<for _i to 0; _i lt $days; _i++>>
		<<if $diary[_i] is undefined>>
			<<set $diary.push([])>>
			<<set $diary[_i][0] to clone($logblank)>>
			<<set $diary[_i][0][$log.text] to "Day " + _i>>
			<<set $diary[_i][0][$log.importance] to -5>>
		<</if>>
	<</for>>
	<<set $diary.push([])>>
	<<set _a to clone($logblank)>>
	<<set _a[$log.text] to $month+" "+$monthday+" "+$logprep>>
	<<set _a[$log.time] to 0>>
	<<set _a[$log.comment] to "(Day "+$days+")">>
	<<set _a[$log.importance] to 7>>
	<<set _a[$log.money] to "="+$money>>
	<<set $diary[$days][0] to _a>>
	/*<<set $diary[$days][0] to
	{text:$month + " " + $monthday, timestamp:0,comment:"",opinion:"",importance:7,effect:{money:0,stress:0,trauma:0,awareness:0,pain:0,tired:0,arousal:0,control:0,allure:0,antiquemoney:0,blackmoney:0,weather:"",clothupper:"",clothlower:"",clothunder:"",oldclothupper:(""),oldclothlower:(""),oldclothunder:("")}}>>
	*/
<</if>>

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

<<widget "log">><<nobr>>
	<<if $logdebug is 1>>log<<print $args[1]>>(<<print $args[0]>>)<</if>>

	<<if $args[0] == undefined>><<set $args[0] to "Did something.">><</if>>
	<<if $args[1] == undefined>><<set $args[1] to 1>><</if>>
	<<set $logprep to "">> /* if this didn't exist logadd wouldn't be necessary but I think it needs to since there might be some situations where logprep+"" needs to be the 1st thing */
	<<set $diarypage to $days>>
	<<set $diaryline to $diary[$days].length>>
	<<set _d to $diary[$days][$diaryline]>>
	<<if $args[1] gte $logchangetreshold or $debug is 1>>
	<<if $rng gt 110>>/* dunno which one I should keep so using random one to make sure both work */
		/* order and number of these matters so it's more error prone if things change */
		<<set $diary[$days].push([
			$time,$args[0],$args[1],"","",
			$money - $logged[$log.money],
			$stress - $logged[$log.stress],
			$trauma - $logged[$log.trauma],
			$awareness - $logged[$log.awareness],
			$pain - $logged[$log.pain],
			$tiredness - $logged[$log.tiredness],
			$arousal - $logged[$log.arousal],
			$control - $logged[$log.control],
			$allure - $logged[$log.allure],
			$antiquemoney - $logged[$log.antiquemoney],
			$blackmoney - $logged[$log.blackmoney],
			$spray - $logged[$log.spray],
			$spraymax - $logged[$log.spraymax],
			$drunk,
			$drunk - $logged[$log.drunk],
			$drugged - $logged[$log.drugged],
			"","","","","","",""
			,$collared - $logged[$log.collared]
			,$purity - $logged[$log.purity]
			,$submissive - $logged[$log.submissive]
			,$physique - $logged[$log.physique]
			,$beauty - $logged[$log.beauty]
			,$promiscuity - $logged[$log.promiscuity]
			,$exhibitionism - $logged[$log.exhibitionism]
			,$deviancy - $logged[$log.deviancy]
			,$skulduggery - $logged[$log.skulduggery]
			,$danceskill - $logged[$log.danceskill]
			,$swimmingskill - $logged[$log.swimmingskill]
			,$seductionskill - $logged[$log.seductionskill]
			,$oralskill - $logged[$log.oralskill]
			,$vaginalskill - $logged[$log.vaginalskill]
			,$penileskill - $logged[$log.penileskill]
			,$analskill - $logged[$log.analskill]
			,$handskill - $logged[$log.handskill]
			,$feetskill - $logged[$log.feetskill]
			,$bottomskill - $logged[$log.bottomskill]
			,$thighskill - $logged[$log.thighskill]
			,$chestskill - $logged[$log.chestskill]
			,$science - $logged[$log.science]
			,$maths - $logged[$log.maths]
			,$english - $logged[$log.english]
			,$history - $logged[$log.history]
			,$unclad + $logged[$log.unclad]
		])>>
	<<else>>/* order of these doesn't matter */
		<<set $diary[$days].push(clone($logblank))>>
		<<set _d to $diary[$days][$diaryline]>>
		<<set _d[$log.time] to $time>>
		<<set _d[$log.text] to $args[0]>>
		<<set _d[$log.importance] to $args[1]>>
		<<set _d[$log.comment] to "">>
		<<set _d[$log.opinion] to "">>
		<<set _d[$log.money] to ($money - $logged[$log.money])>>
		<<set _d[$log.stress] to ($stress - $logged[$log.stress])>>
		<<set _d[$log.trauma] to ($trauma - $logged[$log.trauma])>>
		<<set _d[$log.awareness] to ($awareness - $logged[$log.awareness])>>
		<<set _d[$log.pain] to ($pain - $logged[$log.pain])>>
		<<set _d[$log.tiredness] to ($tiredness - $logged[$log.tiredness])>>
		<<set _d[$log.arousal] to ($arousal - $logged[$log.arousal])>>
		<<set _d[$log.control] to ($control - $logged[$log.cotrol])>>
		<<set _d[$log.allure] to ($allure - $logged[$log.allure])>>
		<<set _d[$log.antiquemoney] to ($antiquemoney - $logged[$log.antiquemoney])>>
		<<set _d[$log.blackmoney] to ($blackmoney - $logged[$log.blackmoney])>>
		<<set _d[$log.spray] to ($spray - $logged[$log.spray])>>
		<<set _d[$log.spraymax] to ($spraymax - $logged[$log.spraymax])>>
		<<set _d[$log.drunk] to ($drunk)>>
		<<set _d[$log.drunkgain] to ($drunk - $logged[$log.drunk])>>
		<<set _d[$log.drugged] to ($drugged - $logged[$log.drugged])>>
		<<set _d[$log.weather] to ("")>>
		<<set _d[$log.clothupper] to ("")>>
		<<set _d[$log.clothlower] to ("")>>
		<<set _d[$log.clothunder] to ("")>>
		<<set _d[$log.oldclothupper] to ("")>>
		<<set _d[$log.oldclothlower] to ("")>>
		<<set _d[$log.oldclothunder] to ("")>>
		<<set _d[$log.collar] to ($collared)>>
		<<set _d[$log.purity] to ($purity - $logged[$log.purity])>>
		<<set _d[$log.submissive] to ($submissive - $logged[$log.submissive])>>
		<<set _d[$log.physique] to ($physique - $logged[$log.physique])>>
		<<set _d[$log.beauty] to ($beauty - $logged[$log.beauty])>>
		<<set _d[$log.promiscuity] to ($promiscuity - $logged[$log.promiscuity])>>
		<<set _d[$log.exhibitionism] to ($exhibitionism - $logged[$log.exhibitionism])>>
		<<set _d[$log.deviancy] to ($deviancy - $logged[$log.deviancy])>>
		<<set _d[$log.skulduggery] to ($skulduggery - $logged[$log.skulduggery])>>
		<<set _d[$log.danceskill] to ($danceskill - $logged[$log.danceskill])>>
		<<set _d[$log.swimmingskill] to ($swimmingskill - $logged[$log.swimmingskill])>>
		<<set _d[$log.seductionskill] to ($seductionskill - $logged[$log.seductionskill])>>
		<<set _d[$log.oralskill] to ($oralskill - $logged[$log.oralskill])>>
		<<set _d[$log.vaginalskill] to ($vaginalskill - $logged[$log.vaginalskill])>>
		<<set _d[$log.penileskill] to ($penileskill - $logged[$log.penileskill])>>
		<<set _d[$log.analskill] to ($analskill - $logged[$log.analskill])>>
		<<set _d[$log.handskill] to ($handskill - $logged[$log.handskill])>>
		<<set _d[$log.feetskill] to ($feetskill - $logged[$log.feetskill])>>
		<<set _d[$log.bottomskill] to ($bottomskill - $logged[$log.bottomskill])>>
		<<set _d[$log.thighskill] to ($thighskill - $logged[$log.thighskill])>>
		<<set _d[$log.chestskill] to ($chestskill - $logged[$log.chestskill])>>
		<<set _d[$log.science] to ($science - $logged[$log.science])>>
		<<set _d[$log.maths] to ($maths - $logged[$log.maths])>>
		<<set _d[$log.english] to ($english - $logged[$log.english])>>
		<<set _d[$log.history] to ($history - $logged[$log.history])>>
		<<set _d[$log.unclad] to ($unclad - $logged[$log.unclad])>>
	<</if>>
	/* add strings only when they have changed, so if entry says weather is clear then it wasn't before that*/
	<<if $logged[$log.weather] isnot $weather>><<set $diary[$days][$diaryline][$log.weather] to $weather>><</if>>
	/* need to list all clothing when something changes so that we don't need to search through previous entries to figure out if a part that didn't change is naked or not */
	<<if $logged[$log.clothupper] isnot $upperclothes or $logged[$log.clothlower] isnot $lowerclothes or $logged[$log.clothunder] isnot $underclothes>>
		<<set $diary[$days][$diaryline][$log.oldclothupper] to clone($logged[$log.clothupper])>>
		<<set $diary[$days][$diaryline][$log.oldclothlower] to clone($logged[$log.clothlower])>>
		<<set $diary[$days][$diaryline][$log.oldclothunder] to clone($logged[$log.clothunder])>>
		<<set $diary[$days][$diaryline][$log.clothupper] to $upperclothes>>
		<<set $diary[$days][$diaryline][$log.clothlower] to $lowerclothes>>
		<<set $diary[$days][$diaryline][$log.clothunder] to $underclothes>>
	<</if>>

	<<logstatsupdate>>
	<<else>> /* wait for more noteworthy event to add changes to, kind of unnecessary unless the diary actually shows changes to stats that are constantly changing */
		<<run $diary[$days].push($logblank)>>
	<</if>>
	<<if $logextra isnot "" and $logextra isnot undefined>> /* virginity loss entries should come after the event (or as some special comment like thing) */
		<<logextra $logextra $logextraimportance>>
	<</if>>
<</nobr>><</widget>>
/*<<widget "oldlog">><<nobr>>
	<<if $logdebug is 1>>log<<print $args[1]>>(<<print $args[0]>>)<</if>>

	<<if $args[0] == undefined>><<set $args[0] to "Did something.">><</if>>
	<<if $args[1] == undefined>><<set $args[1] to 1>><</if>>
	<<set $logprep to "">>
	<<set $diarypage to $days>>
	<<set $diaryline to $diary[$days].length>>
	<<if $args[1] gte $logchangetreshold or $debug is 1>>
		<<set $diary[$days].push(
			{
		    timestamp:$time,
		    text:$args[0],
				importance:$args[1],
				comment:"",
				opinion:"",
		    effect:
					{
					money:($money - $logmoney),
					stress:($stress - $logstress),
					trauma:($trauma - $logtrauma),
					awareness:($awareness - $logawareness),
					pain:($pain - $logpain),
					tired:($tiredness - $logtiredness),
					arousal:($arousal - $logarousal),
					control:($control - $logcontrol ),
					allure:($allure - $logallure),
					antiquemoney:($antiquemoney - $logantiquemoney),
					blackmoney:($blackmoney - $logblackmoney),
					spray:($spray - $logspray),
					spraymax:($spraymax - $logspraymax),
					drunk:($drunk),
					drunkgain:($drunk - $logdrunk),
					drugged:($drugged - $logdrugged),
					weather:(""),
					clothupper:(""),
					clothlower:(""),
					clothunder:(""),
					oldclothupper:(""),
					oldclothlower:(""),
					oldclothunder:(""),
					collar:()
					}
		  }
			)>>
			/% string changeds %/
			<<if $logweather isnot $weather>><<set $diary[$days][$diaryline].effect.weather to $weather>><<set $logweather to $weather>><</if>>
			/% need to list all clothing when something changes so that we don't need to search through previous entries to figure out if a part that didn't change is naked or not %/
			<<if $logupperclothes isnot $upperclothes or $loglowerclothes isnot $lowerclothes or $logunderclothes isnot $underclothes>>
				<<set $diary[$days][$diaryline].effect.clothupper to $upperclothes>>
				<<set $diary[$days][$diaryline].effect.oldclothupper to $logupperclothes>>
				<<set $diary[$days][$diaryline].effect.clothlower to $lowerclothes>>
				<<set $diary[$days][$diaryline].effect.oldclothlower to $loglowerclothes>>
				<<set $diary[$days][$diaryline].effect.clothunder to $underclothes>>
				<<set $diary[$days][$diaryline].effect.oldclothunder to $logunderclothes>>
			<</if>>
			<<logstatsupdate>>
	<<else>>
			<<set $diary[$days].push({timestamp:$time,text:$args[0],importance:$args[1],comment:"",opinion:"",effect:{money:0,stress:0,trauma:0,awareness:0,pain:0,tired:0,arousal:0,control:0,allure:0,antiquemoney:0,blackmoney:0,weather:"",clothupper:"",clothlower:"",clothunder:"",oldclothupper:(""),oldclothlower:(""),oldclothunder:("")}})>>
	<</if>>
	<<if $logextra isnot "" and $logextra isnot undefined>> /% virginity loss entries should come after the event (or as some special comment like thing) %/
		<<logextra $logextra $logextraimportance>>
	<</if>>
<</nobr>><</widget>>
*/

<<widget "logstatsupdate">><<nobr>> /* update logstats to current stats */
/* must have same length as $log has and have things in the same order(could use <<set $logged[$log.x] >> to more reliably match) */
<<set $logged to [$time,"",0,"","",
	$money,$stress,$trauma,$awareness,$pain,
	$tiredness,$arousal,$control,$allure,$antiquemoney,
	$blackmoney,$spray,$spraymax,$drunk,$drunk,
	$drugged,$weather,$upperclothes,$lowerclothes,$underclothes,
	clone($logged[$log.clothupper]),$logged[$log.clothlower],$logged[$log.clothunder],$collared,$purity,
	$submissive,$physique,$beauty,$promiscuity,$exhibitionism,
	$deviancy,$skulduggery,$danceskill,$swimmingskill,$seductionskill,
	$oralskill,$vaginalskill,$penileskill,$analskill,$handskill,
	$feetskill,$bottomskill,$thighskill,$chestskill,$science,
	$maths,$english,$history,$unclad
]>>
<</nobr>><</widget>>

<<widget "logextra">><<nobr>>
<<if $args[1] == undefined>><<set $args[1] to 8>><</if>>
<<set $logextra to "">>
<<set _ex to clone($logblank)>>
<<set _ex[$log.time] to $time>>
<<set _ex[$log.text] to $args[0]>>
<<set _ex[$log.importance] to $args[1]>>

<<set $diarypage to $days>>
<<set $diaryline to $diary[$days].length-1>>/* since <<log>> will get the correct diaryline it should be safe to set diaryline to -1 of what it really should be */
<<run $diary[$days].push(_ex)>>
<</nobr>><</widget>>

<<widget "logedit">><<nobr>> /* edit the last entry text*/
	<<set $diary[$days][$diaryline][$log.text] to $args[0]>>
<</nobr>><</widget>>

<<widget "logadd">><<nobr>> /* add to the last entry text*/
	<<set $diary[$days][$diaryline][$log.text] to $diary[$days][$diaryline][$log.text]+$args[0]>>
<</nobr>><</widget>>

<<widget "logupdateeffect">><<nobr>> /*  update the last effect(strings require $logdebug since clothing report will be buggy)	*/
<<set _l to clone($logged)>>
<<logstatsupdate>>
<<for _e to $log.money; _e lt $logblank.length; _e++>>/* assuming money is the 1st value we care about */
	/* set newvaluechange to oldvaluechange + currentvalue - oldvalue */
	<<if typeof($diary[$days][$diaryline][_e]) is "number">>
		<<set _newvalue to $diary[$days][$diaryline][_e] + $logged[_e] - _l[_e]>>
		<<set $diary[$days][$diaryline][_e] to _newvalue>>
	<<elseif typeof($diary[$days][$diaryline][_e]) is "string">>
		<<if $logdebug is 1>>
			<<if $diary[$days][$diaryline][_e] isnot _l[_e]>>/* this should break clothing report so that it'll only say the new clothing */
				<<set _newvalue to clone($logged[_e])+"¤removethis:"+clone(_l[_e])+" isnot "+$diary[$days][$diaryline][_e]+"¤">>
				<<set $diary[$days][$diaryline][_e] to _newvalue>>
			<</if>>
		<</if>>
	<<elseif typeof($diary[$days][$diaryline][_e]) is "boolean">>
		/* do something? */
	<<elseif typeof($diary[$days][$diaryline][_e]) is "undefined">>
	<</if>>
<</for>>
<</nobr>><</widget>>

<<widget "logtimeupdate">><<nobr>> /*  change entry time in case log was called early for some reason */
	$money $logmoney $awareness $awarelevel $awareselect
	<<set $diary[$days][$diaryline][$log.time] to $time>>
<</nobr>><</widget>>

<<widget "logday">><<nobr>>
	<<set $dayendreport to "">>
	/* $moneytext might be useful in other situtations so could move this to some place that gets run more often */
	<<set $moneytext to "£"+ Math.trunc($money / 100)+".">>
	<<if $money % 100 lte 9>><<set $moneytext to $moneytext+"0">><</if>>
	<<set $moneytext to $moneytext+$money % 100>>
	<<set $dayendreport to "It's the start of a new day! I have " + $moneytext + " and I feel ">>

	<<if $tiredness gte 2000>><<set $dayendreport to $dayendreport + "exhausted, ">>
	<<elseif $tiredness gte 1600>><<set $dayendreport to $dayendreport + "fatigued, ">>
	<<elseif $tiredness gte 1200>><<set $dayendreport to $dayendreport + "tired, ">>
	<<elseif $tiredness gte 800>><<set $dayendreport to $dayendreport + "wearied, ">>
	<<elseif $tiredness gte 400>><<set $dayendreport to $dayendreport + "alert, ">>
	<<elseif $tiredness gte 1>><<set $dayendreport to $dayendreport + "wide awake, ">>
	<<else>><<set $dayendreport to $dayendreport + "refreshed, ">>
	<</if>>
	<<if $stress gte 10000>><<set $dayendreport to $dayendreport + "extremely stressed out">>
	<<elseif $stress gte 8000>><<set $dayendreport to $dayendreport + "very stressed">>
	<<elseif $stress gte 6000>><<set $dayendreport to $dayendreport + "kind of stressed">>
	<<elseif $stress gte 4000>><<set $dayendreport to $dayendreport + "a bit tense">>
	<<elseif $stress gte 2000>>><<set $dayendreport to $dayendreport + "somewhat relaxed">>
	<<elseif $stress gte 1>><<set $dayendreport to $dayendreport + "rather relaxed">>
	<<else>><<set $dayendreport to $dayendreport + "serene">>
	<</if>>
	<<set $dayendreport to $dayendreport + " and ">>
	<<if $innocencestate isnot 1>>	/* would $awarelevel gte 0 work too? */
		<<if $trauma gte $traumamax>><<set $dayendreport to $dayendreport + "numb">>
		<<elseif $trauma gte ($traumamax / 5) * 4>><<set $dayendreport to $dayendreport + "tormented">>
		<<elseif $trauma gte ($traumamax / 5) * 3>><<set $dayendreport to $dayendreport + "disturbed">>
		<<elseif $trauma gte ($traumamax / 5) * 2>><<set $dayendreport to $dayendreport + "troubled">>
		<<elseif $trauma gte ($traumamax / 5) * 1>><<set $dayendreport to $dayendreport + "nervous">>
		<<elseif $trauma gte 1>><<set $dayendreport to $dayendreport + "uneasy">>
		<<else>><<set $dayendreport to $dayendreport + "healthy">>
		<</if>>
	<<else>>
		<<if $awareness gte 0>><<set $dayendreport to $dayendreport + "aware">>
		<<elseif $awareness gt -40>><<set $dayendreport to $dayendreport + "uncertain">>
		<<elseif $awareness gt -80>><<set $dayendreport to $dayendreport + "perplexed">>
		<<elseif $awareness gt -120>><<set $dayendreport to $dayendreport + "curious">>
		<<elseif $awareness gt -160>><<set $dayendreport to $dayendreport + "trusting">>
		<<elseif $awareness gt -200>><<set $dayendreport to $dayendreport + "naive">>
		<<else>><<set $dayendreport to $dayendreport + "oblivious">><</if>>
	<</if>>
	<<set $dayendreport to $dayendreport + " and the state of my body ">> /* this part could probably be worded better */

		<<if $pain gte 100>><<set $dayendreport to $dayendreport + "makes me sob uncontrollably">>
		<<elseif $pain gte 80>><<set $dayendreport to $dayendreport + "makes me cry and whimper">>
		<<elseif $pain gte 60>><<set $dayendreport to $dayendreport + "makes me cry">>
		<<elseif $pain gte 40>><<set $dayendreport to $dayendreport + "makes tears run down my face">>
		<<elseif $pain gte 20>><<set $dayendreport to $dayendreport + "makes tears well in my eyes">>
		<<elseif $pain gte 1>><<set $dayendreport to $dayendreport + "makes me upset">>
		<<else>><<set $dayendreport to $dayendreport + "feels okay">>
	<</if>>

	<<set $dayendreport to $dayendreport + " I'm also ">> /* this also could probably be worded better */

		<<if $arousal gte 10000>><<set $dayendreport to $dayendreport + "shaking with arousal">>
		<<elseif $arousal gte 8000>><<set $dayendreport to $dayendreport + "feeling like there is a heat rising within me">>
		<<elseif $arousal gte 6000>><<set $dayendreport to $dayendreport + "feeling horny">>
		<<elseif $arousal gte 4000>><<set $dayendreport to $dayendreport + "feeling lustful">>
		<<elseif $arousal gte 2000>><<set $dayendreport to $dayendreport + "feeling aroused">>
		<<elseif $arousal gte 1>><<set $dayendreport to $dayendreport + "feeling sensual">>
		<<else>><<set $dayendreport to $dayendreport + "feeling cold">>
	<</if>>

	<<set $dayendreport to "Bazang! "+ $dayendreport>>

	<<set $dayendreport to $dayendreport + ".">>
	<<set $diaryline to $diary[$days].length>> /* */
	<<set $diary[$days].push(clone($logblank))>>
	<<set $diary[$days][$diaryline][$log.time] to $time>>
	<<set $diary[$days][$diaryline][$log.text] to $dayendreport>>
	<<set $diary[$days][$diaryline][$log.importance] to 7>>
	/*
	<<set $diary[$days].push(
		{
	    timestamp:$time,
	    text:$dayendreport,
			importance:7, comment:"",	comment:"",	opinion:"", effect:{money:0,stress:0,trauma:0,awareness:0,pain:0,tired:0,arousal:0,control:0,allure:0,antiquemoney:0,blackmoney:0,weather:"",clothupper:"",clothlower:"",clothunder:"",oldclothupper:(""),oldclothlower:(""),oldclothunder:("")}
	  }
		)>>*/
<</nobr>><</widget>>

<<widget "logcomment">><<nobr>>
	<<set $diary[$args[0]][$args[1]][$log.comment] to "("+$args[2]+")">>
<</nobr>><</widget>>

<<widget "logimportance">><<nobr>>
	<<set $diary[$args[0]][$args[1]][$log.importance] to $args[2]>>
<</nobr>><</widget>>

<<widget "logopinion">><<nobr>>

<<set _c to "">>
<<set $plropinion to "">>
<<if $diaryprompts is 2 or $diaryprompts is 3>>
	Select how you feel about this event:

		<<for _i to 0;_i lt $args.length; _i++>>
			<<radiobutton "$plropinion" $args[_i]>> $args[_i]

		<</for>>
<<else>>
	<<if $args[0]>><<set _c to $args.random()>><</if>>
	/* <<set $diary[$days][$diaryline][$log.opinion] to "["+_c+"]">> /* sets opinion to whatever if you don't have opinion prompts */
<</if>>
<<if $diaryprompts is 1>>
	<<textbox "$plrcomment" _c >>
	<<link "Add a comment to your diary">><<logcomment $days $diaryline $plrcomment>><<remove "#textbox1">><</link>>

<<elseif $diaryprompts is 2>>
	Comment:<<textbox "$plrcomment" "" >>

	<<link "Add your opinion and comment to the diary">><<set $diary[$days][$diaryline][$log.opinion] to "["+$plropinion+"]">><<logcomment $days $diaryline $plrcomment>><<remove "#textbox1">><</link>>

<<elseif $diaryprompts is 3>>
	<<link "Add your opinion to the diary">><<set $diary[$days][$diaryline][$log.opinion] to "["+$plropinion+"]">><</link>>

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

<<widget "showdiaryentry">><<nobr>>
<<set _text to $diary[$args[0]][$args[1]][$log.text]>>
<<set _e to $diary[$args[0]][$args[1]]>>
<<if _e[$log.importance] lte 0 >>/* after this stuff is same as above though it used to be more different, should make a widget or something  */
	_text
<<elseif _e[$log.importance] is 1 >>
	_text
<<elseif _e[$log.importance] is 2 >>
	_text
<<elseif _e[$log.importance] is 3 >>/* combat and other events of similar importance */
	_text
<<elseif _e[$log.importance] is 4 >>
	_text
<<elseif _e[$log.importance] is 5 >>
	_text
<<elseif _e[$log.importance] is 6 >>
	_text
<<elseif _e[$log.importance] is 7 >>/* for date and end/start of day report that colors stuff on it's own */
	_text
<<elseif _e[$log.importance] is 8 >> /* virginity loss */
	_text
<<elseif _e[$log.importance] is 9 >> /* not sure, transformations? */
	_text
<<else>>
	_text
<</if>>
/* clothing change report */
/*
"Changed x to y" would be weird for situations where clothes break and such
"Now wearing x" might be best since it doesn't really mention how or why the clothing situation changed
	actually is the "now" really necessary?
this probably won't handle sets very well
*/
<<set _eqsign to "=">>/* you get an error with just <<if x is "=">> */
<<if _e[$log.clothunder] isnot undefined and _e[$log.clothunder].first() isnot _eqsign>>/* 1st entry of day lists current stats with = in front including clothes which we don't want*/
<<if _e[$log.clothupper] isnot "" or _e[$log.clothlower] isnot "" or _e[$log.clothunder] isnot "">>/*could just check 1 now that all should be set if 1 is*/
	Wearing
	<<if _e[$log.clothupper] is "naked" and _e[$log.clothlower] is "naked" and _e[$log.clothunder] is "naked">>nothing <</if>>
	<<set $listed to []>>
	<<if _e[$log.clothupper] isnot "naked">><<set $listed.push(_e[$log.clothupper])>><</if>>
	<<if _e[$log.clothlower] isnot "naked">><<set $listed.push(_e[$log.clothlower])>><</if>>
	<<if _e[$log.clothunder] isnot "naked">>
		<<if _e[$log.clothupper] is "naked" and _e[$log.clothlower] is "naked">>
			<<set $listed.push("only "+_e[$log.clothunder])>>
		<<else>>
			<<set $listed.push(_e[$log.clothunder])>>
		<</if>>
	<<elseif _e[$log.clothupper] isnot "naked" or _e[$log.clothlower] isnot "naked">>
		<<set $listed.push("no underwear")>>
	<</if>>
	<<listify $listed>>.
<</if>>
<</if>>

<<if _e[$log.drunk] gt 0>>Feeling
	<<if _e[$log.drunk] lte 120>>
		 woozy.
	<<elseif _e[$log.drunk] lte 240>>
		 tipsy.
	<<elseif _e[$log.drunk] lte 360>>
		 drunk.
	<<elseif _e[$log.drunk] lte 480>>
		 smashed.
	<<else>>
		 wasted.
	<</if>>
<</if>>

<<if _e[$log.drugged] isnot 0>>
	<<if _e[$log.drugged] lt 0>>-lewd warmth <</if>>
	<<if _e[$log.drugged] gt 0>>+lewd warmth <</if>>
<</if>>

<<if _e[$log.spray] isnot 0>>
	<<if _e[$log.spray] lt 0>>-pepper spray <</if>>
	<<if _e[$log.spray] gt 0>>+pepper spray <</if>>
<</if>>

<<if _e[$log.money] isnot 0>>
	<<if _e[$log.money] lt 0>>-£<<print Math.abs(Math.trunc(_e[$log.money] / 100))>>.<<if _e[$log.money] % 100 lte 9>>0<</if>><<print _e[$log.money] % 100>><</if>>
	<<if _e[$log.money] gt 0>>£<<print Math.trunc(_e[$log.money] / 100)>>.<<if _e[$log.money] % 100 lte 9>>0<</if>><<print _e[$log.money] % 100>><</if>>
<</if>>
<<if _e[$log.antiquemoney] gt 0>> £<<print _e[$log.antiquemoney]>><</if>>
<<if _e[$log.blackmoney] gt 0>> £<<print _e[$log.blackmoney]>><</if>>

<<if $logshowcomments is 1>><<print _e[$log.comment]>><</if>>
<<if $logshowopinions is 1>><<print _e[$log.opinion]>><</if>>

<<if $logdebug is 1>>/* Do I need the undefined checks? */
	<<if _e[$log.weather] isnot "" and _e[$log.weather] isnot undefined>>weather changed to <<print _e[$log.weather]>><</if>>
	<<if _e[$log.pain] isnot 0 and _e[$log.pain] isnot undefined>>pain:<<print _e[$log.pain]>><</if>>
	<<if _e[$log.arousal] isnot 0 and _e[$log.arousal] isnot undefined>>arousal:<<print _e[$log.arousal]>><</if>>
	<<if _e[$log.tiredness] isnot 0 and _e[$log.tiredness] isnot undefined>>tiredness:<<print _e[$log.tiredness]>><</if>>
	<<if _e[$log.stress] isnot 0 and _e[$log.stress] isnot undefined>>stress:<<print _e[$log.stress]>><</if>>
	<<if _e[$log.trauma] isnot 0 and _e[$log.trauma] isnot undefined>>trauma:<<print _e[$log.trauma]>><</if>>
	<<if _e[$log.awareness] isnot 0 and _e[$log.awareness] isnot undefined>>awareness:<<print _e[$log.awareness]>><</if>>
	<<if _e[$log.control] isnot 0 and _e[$log.control] isnot undefined>>control:<<print _e[$log.control]>><</if>>
	<<if _e[$log.allure] isnot 0 and _e[$log.allure] isnot undefined>>allure:<<print _e[$log.allure]>><</if>>
	<<if _e[$log.purity] isnot 0 and _e[$log.purity] isnot undefined>>purity:<<print _e[$log.purity]>><</if>>
	<<if _e[$log.submissive] isnot 0 and _e[$log.submissive] isnot undefined>>submissive:<<print _e[$log.submissive]>><</if>>
	<<if _e[$log.physique] isnot 0 and _e[$log.physique] isnot undefined>>physique:<<print _e[$log.physique]>><</if>>
	<<if _e[$log.promiscuity] isnot 0 and _e[$log.promiscuity] isnot undefined>>promiscuity:<<print _e[$log.promiscuity]>><</if>>
	<<if _e[$log.exhibitionism] isnot 0 and _e[$log.exhibitionism] isnot undefined>>exhibitionism:<<print _e[$log.exhibitionism]>><</if>>
	<<if _e[$log.deviancy] isnot 0 and _e[$log.deviancy] isnot undefined>>deviancy:<<print _e[$log.deviancy]>><</if>>
	<<if _e[$log.skulduggery] isnot 0 and _e[$log.skulduggery] isnot undefined>>skulduggery:<<print _e[$log.skulduggery]>><</if>>
	<<if _e[$log.danceskill] isnot 0 and _e[$log.danceskill] isnot undefined>>dancing:<<print _e[$log.danceskill]>><</if>>
	<<if _e[$log.swimmingskill] isnot 0 and _e[$log.swimmingskill] isnot undefined>>swimming:<<print _e[$log.swimmingskill]>><</if>>
	<<if _e[$log.seductionskill] isnot 0 and _e[$log.seductionskill] isnot undefined>>seduction:<<print _e[$log.seductionskill]>><</if>>
	<<if _e[$log.oralskill] isnot 0 and _e[$log.oralskill] isnot undefined>>oralskill:<<print _e[$log.oralskill]>><</if>>
	<<if _e[$log.vaginalskill] isnot 0 and _e[$log.vaginalskill] isnot undefined>>vaginalskill:<<print _e[$log.vaginalskill]>><</if>>
	<<if _e[$log.penileskill] isnot 0 and _e[$log.penileskill] isnot undefined>>penileskill:<<print _e[$log.penileskill]>><</if>>
	<<if _e[$log.analskill] isnot 0 and _e[$log.analskill] isnot undefined>>analskill:<<print _e[$log.analskill]>><</if>>
	<<if _e[$log.handskill] isnot 0 and _e[$log.handskill] isnot undefined>>handskill:<<print _e[$log.handskill]>><</if>>
	<<if _e[$log.feetskill] isnot 0 and _e[$log.feetskill] isnot undefined>>feetskill:<<print _e[$log.feetskill]>><</if>>
	<<if _e[$log.bottomskill] isnot 0 and _e[$log.bottomskill] isnot undefined>>bottomskill:<<print _e[$log.bottomskill]>><</if>>
	<<if _e[$log.thighskill] isnot 0 and _e[$log.thighskill] isnot undefined>>thighskill:<<print _e[$log.thighskill]>><</if>>
	<<if _e[$log.chestskill] isnot 0 and _e[$log.chestskill] isnot undefined>>chestskill:<<print _e[$log.chestskill]>><</if>>
	<<if _e[$log.science] isnot 0 and _e[$log.science] isnot undefined>>science:<<print _e[$log.science]>><</if>>
	<<if _e[$log.maths] isnot 0 and _e[$log.maths] isnot undefined>>maths:<<print _e[$log.maths]>><</if>>
	<<if _e[$log.english] isnot 0 and _e[$log.english] isnot undefined>>english:<<print _e[$log.english]>><</if>>
	<<if _e[$log.history] isnot 0 and _e[$log.history] isnot undefined>>history:<<print _e[$log.history]>><</if>>
	<<if _e[$log.unclad] isnot 0 and _e[$log.unclad] isnot undefined>>unclad:<<print _e[$log.unclad]>><</if>>

<</if>>

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

<<widget "listify">><<nobr>>/* put commas and ands correctly in a list(wants an array) */
<<for _i, _item range $args[0]>>_item<<if $args[0].length gte _i+3>>, <<elseif $args[0].length is _i+2>> and <</if>><</for>>

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