code:
:: Widgets Named Npcs [widget]
<<widget "endnpc">>
/* We properly change how Named NPCs are ended.
* The way we want to do this is: if an argument is passed (the argument being the Named NPC's name) we clearnpc the specific NPC in question.
* If no argument is passed, we clear all the Named NPCs.
*/
<<if $args[0]>>
	<<set _passargs to $args[0]>>
	<<set _leindex to $npc.indexOf(_passargs)>>
	<<set $NPCName[$NPCNameList.indexOf(_passargs)].trust += ($enemytrust / 100)>>
	<<for _temp to 0; _temp lt $NPCList.length; _temp++>>
		<<if $NPCList[_temp].fullDescription is _passargs>>
			<<set _ii to clone(_temp)>>
		<<break>>
		<</if>>
	<</for>>

	<<if _ii is undefined>>
		Error: <<print _passargs>> is not active. Aborting.
	<<else>>
		<<set $NPCList[_ii].lefthand to "none">>
		<<set $NPCList[_ii].righthand to "none">>
		<<set $NPCList[_ii].penis to "none">>
		<<set $NPCList[_ii].vagina to "none">>
		<<set $NPCList[_ii].mouth to "none">>
		<<set $NPCList[_ii].chest to "none">>
		<<set $NPCList[_ii].gender to 0>>
		<<set $NPCList[_ii].pronoun to 0>>
		<<set $NPCList[_ii].description to 0>>
		<<set $NPCList[_ii].fullDescription to 0>>
		<<set $NPCList[_ii].insecurity to 0>>
		<<set $NPCList[_ii].lactation to 0>>
		<<set $NPCList[_ii].intro to 0>>
		<<set $NPCList[_ii].speechanusescape to 0>>
		<<set $NPCList[_ii].speechpenisescape to 0>>
		<<set $NPCList[_ii].speechvaginaescape to 0>>
		<<set $NPCList[_ii].type to 0>>
		<<set $NPCList[_ii].stance to 0>>
		<<set $NPCList[_ii].monster to 0>>
		/*multiple orgasms code needs work
		<<set $NPCList[_ii].maxOrgasms to 1>>
		<<set $NPCList[_ii].orgasms to 0>> */
		<<set $NPCList[_ii].paid to 0>>
		<<if _ii < 1>>
			<<set $NPCList[_ii].breastsize to 3>>
			<<set $NPCList[_ii].breastsdesc to "breasts">>
			<<set $NPCList[_ii].breastdesc to "breast">>
			<<set $NPCList[_ii].penisdesc to "penis">>
			<<set $NPCList[_ii].penissize to 2>>
			<<set $NPCList[_ii].health to 200>>
			<<set $NPCList[_ii].healthmax to 200>>
		<<else>>
			<<set $NPCList[_ii].breastsize to 0>>
			<<set $NPCList[_ii].breastsdesc to 0>>
			<<set $NPCList[_ii].breastdesc to 0>>
			<<set $NPCList[_ii].penisdesc to 0>>
			<<set $NPCList[_ii].penissize to 0>>
			<<set $NPCList[_ii].health to 0>>
		<</if>>
		<<set $enemyno -= 1>>
		<<set $enemynomax -= 1>>
		<<if $endeventerror is undefined>>
			<<run EventSystem.Pop(_ii)>>
		<</if>>
		<<if $enemyno is 0>>
			<<set $pronoun to 0>>
			<<if $endeventerror is undefined>>
				<<run EventSystem.Clear()>>
			<</if>>
		<</if>>
		<<set $npc.splice(_leindex, 1)>>
		<<set $npcnum.splice(_leindex, 1)>>
		<<set $npcrow.splice(_leindex, 1)>>
	<</if>>
	<<unset _temp>>
	<<unset _leindex>>
<<else>>

	<<for _temp to 0; _temp lt $npc.length; _temp++>>
		<<set _nam to clone($npc[_temp])>>
		<<set $NPCName[$NPCNameList.indexOf(_nam)].trust += ($enemytrust / 100)>>
	<</for>>
	<<clearnpc>>
	<<unset _temp>>
<</if>>
<</widget>>

/*Gender neutral names for future reference
Aiden
Akira
Alex
Alexis
Ariel
Armani
Ashanti
Ashton
Aspen
Aubrey
August
Blair
Blake
Brogan
Brooklyn
Bryce
Cameron
Carson
Casey
Chris
Courtney
Dana
Delaney
Devon
Dominique
Drew
Dylan
Easton
Elia
Elliot
Esme
Evan
Farai
Faris
Ferris
Finley
Flynn
Frankie
Genesis
Hayden
Hollis
Hudson
Ira
Ivory
Jamie
Jayden
Jean
Jeryn
Jesse
Joey
Jun
Justice
Keegan
Kendall
Kennedy
Kerry
Kim
Kirby
Kit
Kris
Kyrie
Lashawn
Lee
Lesley
Lincoln
Linden
Mackenzie
Maddox
Madison
Mel
Michael
Nakia
Nasim
Noah
Noor
Nyx
Odell
Orion
Palmer
Paris
Payson
Peyton
Phoenix
Raz
Reagan
Rebel
Rei
Ren
Rey
Riley
Roan
Rotem
Ryan
Shannon
Sharon
Shaw
Shay
Shiloh
Spencer
Sydney
Taylor
Teagan
Toby
Tracy
Tyne
Willow
Wren
Wynne
Yael
Yannick
Zain
Zane
Zephyr
Zia
Zohar
*/

<<widget "initnpcgender">>
<<for _i to 0; _i lt $NPCName.length; _i++>>

<<if $NPCName[_i].pronoun is "none" or $args[0] is "genders">>
	<<if $malechance lt random(1, 100)>>
		<<set $NPCName[_i].pronoun to "f">><<set $test to $NPCName[_i].pronoun>>
	<<else>>
		<<set $NPCName[_i].pronoun to "m">>
	<</if>>
<</if>>

<<if $NPCName[_i].gender is "none" or $args[0] is "genders">>
	<<if $NPCName[_i].pronoun is "m">>
		<<if random(0, 99) gte $cbchance>>
			<<set $NPCName[_i].gender to "m">>
		<<else>>
			<<set $NPCName[_i].gender to "f">>
		<</if>>
	<<elseif $NPCName[_i].pronoun is "f">>
		<<if random(0, 99) gte $dgchance>>
			<<set $NPCName[_i].gender to "f">>
		<<else>>
			<<set $NPCName[_i].gender to "m">>
		<</if>>
	<</if>>
<</if>>

<<if $NPCName[_i].type isnot "human">>
	<<set $NPCName[_i].penis to  ($NPCName[_i].gender !== "f" ? 0 : "none")>>
	<<set $NPCName[_i].vagina to ($NPCName[_i].gender !== "m" ? 0 : "none")>>
<<else>>
	<<set $NPCName[_i].penis to  ($NPCName[_i].gender !== "f" ? "clothed" : "none")>>
	<<set $NPCName[_i].vagina to ($NPCName[_i].gender !== "m" ? "clothed" : "none")>>
<</if>>

<<set _b_mod_lower to Math.clamp($breast_mod, 0, 12)>>
<<set _b_mod_upper to Math.clamp($breast_mod + 12, 0, 12)>>

<<if $NPCName[_i].breastdesc is 0 or $args[0] is "breasts">>
	<<if $NPCName[_i].pronoun is "m">>
		<<set $NPCName[_i].breastsize to 0>>
	<<else>>
		<<set $NPCName[_i].breastsize to random (_b_mod_lower, _b_mod_upper)>>
	<</if>>
<</if>>
<<if $NPCName[_i].breastsize gt 0>>
	<<set _brdes to ["nipple","budding","tiny","small","pert","modest","full","large","ample","massive","huge","gigantic","enormous"]>>
	<<set $NPCName[_i].breastdesc to _brdes[$NPCName[_i].breastsize]+" breast">>
<<else>>
	<<set $NPCName[_i].breastdesc to "nipple">>
<</if>>
<<set $NPCName[_i].breastsdesc to $NPCName[_i].breastdesc + "s">>

/* New way to set upper and lower bounds.
 * This method makes use of all other slider positions, but does nothing when slider is between -1 and 1,
 * for a total of 15 unique positions vs the current method's 9. (max would be 17)
 * Changing the penis_mod slider to range from -7 to 7 would work to make every slider position unique here, but potentially affects unnamed npc generation.
 */

/*
<<set _p_mod_upper to 8>><<set _p_mod_lower to 1>>
<<if $penis_mod gt 0>>
	<<set _p_mod_lower += $penis_mod - 1>>
<<elseif $penis_mod lt 0>>
	<<set _p_mod_upper += $penis_mod + 1>>
<</if>>

alternative way to write that:
<<set _p_mod_lower to ($penis_mod > 0 ? $penis_mod : 1)>>
<<set _p_mod_upper to ($penis_mod < 0 ? 9 + $penis_mod : 8)>>
 */

<<if $penis_mod is 8>>/*Clumsy way to get average penis size setting working for NNPCs.*/
	<<set _p_mod_upper to 8>><<set _p_mod_lower to 8>>
<<elseif $penis_mod gte 6>>
	<<set _p_mod_upper to 8>><<set _p_mod_lower to 7>>
<<elseif $penis_mod gte 4>>
	<<set _p_mod_upper to 8>><<set _p_mod_lower to 5>>
<<elseif $penis_mod gte 2>>
	<<set _p_mod_upper to 8>><<set _p_mod_lower to 3>>
<<elseif $penis_mod gte 0>>
	<<set _p_mod_upper to 8>><<set _p_mod_lower to 1>>
<<elseif $penis_mod gte -2>>
	<<set _p_mod_upper to 7>><<set _p_mod_lower to 1>>
<<elseif $penis_mod gte -4>>
	<<set _p_mod_upper to 5>><<set _p_mod_lower to 1>>
<<elseif $penis_mod gte -6>>
	<<set _p_mod_upper to 3>><<set _p_mod_lower to 1>>
<<else>>
	<<set _p_mod_upper to 1>><<set _p_mod_lower to 1>>
<</if>>

<<if $NPCName[_i].penissize is 0 or $args[0] is "penis">>
	<<if $NPCName[_i].gender is "f">>
		<<set $NPCName[_i].penissize to 0>>
		<<set $NPCName[_i].penisdesc to "none">>
	<<else>>
		<<switch random (_p_mod_lower, _p_mod_upper)>>
		<<case 8>>
			<<set $NPCName[_i].penisdesc to either("massive cock","huge cock","humongous cock","immense cock","gigantic cock","enormous cock")>>
			<<set $NPCName[_i].penissize to 4>>
		<<case 5 6 7>>
			<<set $NPCName[_i].penisdesc to either("thick cock","hefty cock","big cock","large cock","veiny cock","meaty cock")>>
			<<set $NPCName[_i].penissize to 3>>
		<<case 2 3 4>>
			<<set $NPCName[_i].penisdesc to "penis">>
			<<set $NPCName[_i].penissize to 2>>
		<<default>>
			<<set $NPCName[_i].penisdesc to either("tiny penis","pathetic cock","little penis","small penis","mini penis","micro penis")>>
			<<set $NPCName[_i].penissize to 1>>
		<</switch>>
	<</if>>
<</if>>

<<if $NPCName[_i].penissize isnot 0>>
	<<switch $NPCName[_i].penissize>>
	<<case 4>>
		<<set $NPCName[_i].penisdesc to either("massive cock","huge cock","humongous cock","immense cock","gigantic cock","enormous cock")>>
	<<case 3>>
		<<set $NPCName[_i].penisdesc to either("thick cock","hefty cock","big cock","large cock","veiny cock","meaty cock")>>
	<<case 1>>
		<<set $NPCName[_i].penisdesc to either("tiny penis","pathetic cock","little penis","small penis","mini penis","micro penis")>>
	<<default>>
		<<set $NPCName[_i].penisdesc to "penis">>
	<</switch>>
<</if>>

<<switch $NPCName[_i].nam>>
	<<case "Jordan">> <<set $NPCName[_i].title to ($NPCName[_i].pronoun is "m" ? "monk" : "nun")>>
	<<case "Leighton">> <<set $NPCName[_i].title to ($NPCName[_i].pronoun is "m" ? "headmaster" : "headmistress")>>
	<<case "Eden">> <<set $NPCName[_i].title to ($NPCName[_i].pronoun is "m" ? "hunter" : "huntress")>>
	<<case "Avery">> <<set $NPCName[_i].title to ($NPCName[_i].pronoun is "m" ? "businessman" : "businesswoman")>>
<</switch>>

<<generatePronouns $NPCName[_i]>>
<</for>>

<</widget>>

<<widget "initnpc">>
<<set _nam to $args[0]>>
<<set _i to $NPCNameList.indexOf(_nam)>>
<<if $NPCName[_i].init is 0>>
	<<set $NPCName[_i].init to 1>>

	<<set $NPCName[_i].trust to 0>>
	<<set $NPCName[_i].love to 0>>
	<<set $NPCName[_i].dom to 0>>
	<<set $NPCName[_i].lust to 0>>
	<<set $NPCName[_i].trauma to 0>>
	<<set $NPCName[_i].rage to 0>>
	<<set $NPCName[_i].state to "active">>
	<<set $NPCName[_i].purity to 0>>
	<<set $NPCName[_i].corruption to 0>>
	<<set $NPCName[_i].virginity to {anal:true, oral:false, penile:false, vaginal:false, handholding:false, temple: false, kiss:false}>>
	<<set _allVirginitiesPresent to {anal:true, oral:true, penile:true, vaginal:true, handholding:true, temple: false, kiss:true}>>
	<<set $NPCName[_i].chastity to {penis:"", vagina:"", anus:""}>>
	<<generatePronouns $NPCList[_i]>>

	<<switch _nam>>
	<<case Kylar>>
		<<set $NPCName[$NPCNameList.indexOf("Kylar")].state to 0>>
		<<set $NPCName[_i].virginity to clone(_allVirginitiesPresent)>>
	<<case Robin>>
		<<set $NPCName[_i].virginity to clone(_allVirginitiesPresent)>>
	<<case River>>
		<<if $NPCName[_i].pronoun is "m">>
			//River teaches maths at the local school. His short brown hair is flecked with grey and his piercing blue eyes scrutinise his surroundings. Students tend to be well-behaved in his class.//
		<<else>>
			//River teaches maths at the local school. Her long brown hair is flecked with grey and her piercing blue eyes scrutinise her surroundings. Students tend to be well-behaved in her class.//
		<</if>>
	<<case Leighton>>
		<<if $NPCName[_i].pronoun is "m">>
			<<set $NPCName[_i].title to "headmaster">>
			//Leighton is the headmaster of the local school. He has green eyes and well-kept greying black hair. Tall and stately, he has a firm attitude towards the students at his school.//
		<<else>>
			<<set $NPCName[_i].title to "headmistress">>
			//Leighton is the headmistress of the local school. She has green eyes and greying black hair, held behind her head in a bun. Tall and stately, she has a firm attitude towards the students at her school.//
		<</if>>
	<<case Mason>>
		<<if $NPCName[_i].pronoun is "m">>
			//Mason is the swimming teacher at the local school. He's the youngest teacher, only a few years older than some of the students. His toned body is naturally shown off during class, but if he notices the way he's leered at, he gives no indication.//
		<<else>>
			//Mason is the swimming teacher at the local school. She's the youngest teacher, only a few years older than some of the students. Her toned body is naturally shown off during class, but if she notices the way she's leered at, she gives no indication.//
		<</if>>
		<<set $NPCName[_i].virginity.penile to false>>
		<<set $NPCName[_i].virginity.vaginal to false>>
		<<set $NPCName[_i].virginity.kiss to false>>
		<<set $NPCName[_i].virginity.handholding to false>>
	<<case Winter>>
		<<if $NPCName[_i].pronoun is "m">>
			//Winter teaches history at the local school. He's an older gentleman, well-groomed and sophisticated.//
		<<else>>
			//Winter teaches history at the local school. She's an older lady, well-groomed and sophisticated.//
		<</if>>
	<<case Doren>>
		<<if $NPCName[_i].pronoun is "m">>
			//Doren teaches English at the local school. His shaggy red hair and beard give him a savage look.//
		<<else>>
			//Doren teaches English at the local school. Her shaggy red hair gives her a savage look.//
		<</if>>
	<<case Sirris>>
		<<if $NPCName[_i].pronoun is "m">>
			//Sirris teaches science at the local school. He's calm and patient, which sometimes leads to a disordered classroom.//
		<<else>>
			//Sirris teaches science at the local school. She's calm and patient, which sometimes leads to a disordered classroom.//
		<</if>>
		<<set $NPCName[_i].virginity to clone($NPCVirginityTypes)>>
	<<case Eden>>
		<<if $NPCName[_i].pronoun is "m">>
			<<set $NPCName[_i].title to "hunter">>
		<<else>>
			<<set $NPCName[_i].title to "huntress">>
		<</if>>
		<<set $NPCName[_i].virginity.penile to false>>
		<<set $NPCName[_i].virginity.vaginal to false>>
		<<set $NPCName[_i].virginity.kiss to false>>
	<<case Avery>>
		<<if $NPCName[_i].pronoun is "m">>
			<<set $NPCName[_i].title to "businessman">>
		<<else>>
			<<set $NPCName[_i].title to "businesswoman">>
		<</if>>
	<<case Jordan>>
		<<if $NPCName[_i].pronoun is "m">>
			<<set $NPCName[_i].title to "monk">>
		<<else>>
			<<set $NPCName[_i].title to "nun">>
		<</if>>
		<<set $NPCName[_i].virginity.handholding to false>>
	<<case Whitney>>
		<<set $NPCName[$NPCNameList.indexOf("Whitney")].dom to 10>>
	<<case "Great Hawk">>
		<<set $NPCName[$NPCNameList.indexOf("Great Hawk")].dom to 50>>
	<<case "Black Wolf">>
		<<set $NPCName[_i].virginity.penile to false>>
		<<set $NPCName[_i].virginity.vaginal to false>>
	<<case Gwylan>>
		<<set $NPCName[_i].virginity.oral to false>>
		<<set $NPCName[_i].virginity.handholding to false>>
		<<set $NPCName[_i].virginity.penile to false>>
		<<set $NPCName[_i].virginity.vaginal to false>>
		<<set $NPCName[_i].virginity.anal to false>>
		<<set $NPCName[_i].virginity.kiss to false>>
	<<case Charlie>>
		<<set $NPCName[_i].virginity.kiss to false>>
		<<set $NPCName[_i].virginity.handholding to false>>
	<<case Sam>>
		<<set $NPCName[_i].virginity.penile to false>>
		<<set $NPCName[_i].virginity.vaginal to false>>
		<<set $NPCName[_i].virginity.kiss to false>>
		<<set $NPCName[_i].virginity.handholding to false>>
	<<case Alex>>
		<<set $NPCName[_i].virginity to clone($NPCVirginityTypes)>>
	<<case Darryl>>
		<<set $NPCName[_i].virginity to clone($NPCVirginityTypes)>>
	<<case Briar>>
		<<set $NPCName[_i].virginity to clone($NPCVirginityTypes)>>
	<<case Wren>>
		<<set $NPCName[_i].virginity to clone($NPCVirginityTypes)>>
	<<case Sydney>>
		<<set $NPCName[_i].purity to 100>>
		<<set $NPCName[_i].virginity to {anal:true, oral:true, penile:true, vaginal:true, temple:true, handholding:true, kiss:true}>>
		<<set $NPCName[_i].chastity to {penis:"chastity belt", vagina:"chastity belt", anus:"anal shield"}>>
		<<set $sydneySeen to []>>
		<<set $sydneyFirstSeen to "">>
		<<set $sydney to {}>>
		<<set $sydney.glasses to "glasses">>
		<<set $sydney.hair to "ponytail">>
		<<set $sydney.swim to "school">>
		<<set $sydneyDaily to {}>>
		<<set $sydneyDaily.sex to 0>>
		<<set $sydney.sexTotal to 0>>
	<<case Piper>>
		<<set $NPCName[_i].dom to 60>>
		<<set $NPCName[_i].chastity to {penis:"chastity belt", vagina:"chastity belt", anus:"anal shield"}>>
	<<default>>
	<</switch>>
<</if>>

<</widget>>

<<widget "npc">>
/* Prepare the call for multiple Named NPCs at the same time.
* We do this by changing all $NPCList[0] calls to $NPCList[x] in which x can be any temporary variable. In this case, we'll use _npcno.
* We also give the option to set the Named NPC in any available row if so desired, by calling a second argument $args[1]. In case no $args[1] is passed, it will default to the first row.
* We also now have the option to have the Named NPC be set into the first available slot instead, by setting the secent argument $args[1] to a negative number, such as -1. However this will bypass the check for npcs that have broken free from a previous passage.
* Remember: available rows go from 0 to 5 ($NPCList[0] to $NPCList[5]). No more than that.
*/
<<if $args[1] lt 0>>
	<<for _controller to 0; _controller lte $NPCList.length; _controller++>>
		<<if _controller gte 6>>

			 Error: There are already 6 active NPCs. Clearing NPC 0 to make space for Named NPC.
			<<set _npcno to 0>>
			<<clearsinglenpc 0>>
			<<set _overwrite to true>>
			<<break>>
		<</if>>
		<<if $NPCList[_controller].gender is undefined and $NPCList[_controller].description is undefined>>

			<<set _npcno to clone(_controller)>>
			<<break>>
		<</if>>
	<</for>>
<<elseif $args[1]>>
	<<set _npcno to $args[1] - 1>>
<<else>>
	<<set _npcno to 0>>
<</if>>
<<if _npcno is 0 and $enemyno gte 1 and !_overwrite>>
	<<set $endeventerror to $lastgenerated>>
	<<endevent phaseless>>
<</if>>

<<set $lastgenerated to $passage>>

<<set _nam to $args[0]>>
<<set _i to $NPCNameList.indexOf(_nam)>>

<<if $NPCName[_i].init isnot 1>>
	<<initnpc _nam>>
<</if>>

/* Both $npc and $npcnum will keep defined NPCs in the order they were defined.
* DO NOT COMPARE NEITHER $npc NOR $npcnum TO $NPCList.
* Since when defining an NPC one can choose in which row of $NPCList to put it, comparing them could result in missmatches.
*/
<<set $npc.push(_nam)>>
<<set $npcnum.push(_i)>>
<<set $NPCList[_npcno].fullDescription to _nam>>

<<set $npcrow.push(_npcno)>>

<<if $npc.length gt 1>>
	<<set $pronoun to "t">>
<<else>>
	<<set $pronoun to $NPCName[_i].pronoun>>
<</if>>
/*Sets up multiple orgasms, code needs work*/
/*<<set $NPCList[0].maxOrgasms to 1>>
<<set $NPCList[0].orgasms to 0>>
<<if $NPCList[0].fullDescription is "Robin">>
	<<set $NPCList[0].maxOrgasms to 2>>
	<<set $setupMidOrgasm to true>>
<</if>>
*/

<<set $NPCList[_npcno].pronoun to $NPCName[_i].pronoun>>
<<set $NPCList[_npcno].pronouns to clone($NPCName[_i].pronouns)>>
<<set $NPCList[_npcno].gender to $NPCName[_i].gender>>
<<set $NPCList[_npcno].type to $NPCName[_i].type>>

<<set $NPCList[_npcno].lefthand to 0>>
<<set $NPCList[_npcno].righthand to 0>>
<<set $NPCList[_npcno].mouth to 0>>
<<set $NPCList[_npcno].anus to 0>>/* is not actually used anywhere */
<<set $NPCList[_npcno].chest to 0>>

<<switch _nam>>
<<case "Eden" "Black Wolf" "Great Hawk">>
	<<set $NPCList[_npcno].health to 600>>
	<<set $NPCList[_npcno].healthmax to 600>>
<<case "Bailey">>
	<<set $NPCList[_npcno].health to 400>>
	<<set $NPCList[_npcno].healthmax to 400>>
<<default>>
	<<set $NPCList[_npcno].health to 200>>
	<<set $NPCList[_npcno].healthmax to 200>>
<</switch>>

<<set $NPCList[_npcno].breastsize to $NPCName[_i].breastsize>>
<<set $NPCList[_npcno].breastsdesc to $NPCName[_i].breastsdesc>>
<<set $NPCList[_npcno].breastdesc to $NPCName[_i].breastdesc>>
<<set $NPCList[_npcno].vagina to $NPCName[_i].vagina>>

<<set $NPCList[_npcno].penis to $NPCName[_i].penis>>
<<set $NPCList[_npcno].penissize to $NPCName[_i].penissize>>
<<set $NPCList[_npcno].penisdesc to $NPCName[_i].penisdesc>>

<<set $NPCList[0].chastity to clone($NPCName[_i].chastity)>>

<<set $NPCList[0].insecurity to $NPCName[_i].insecurity>>
<<set $npcdescription to $NPCName[_i].title>>
<<set $NPCList[0].description to $NPCName[_i].title>>

<<set $NPCList[_npcno].insecurity to $NPCName[_i].insecurity>>
<<set $NPCList[_npcno].description to $NPCName[_i].title>>

<<set $NPCList[_npcno].adult to $NPCName[_i].adult>>
<<set $NPCList[_npcno].teen to $NPCName[_i].teen>>

<<set $NPCList[_npcno].location to {
	head: 0,
	genitals: 0,
}>>

<<set $NPCList[_npcno].condom to false>>

<<set $NPCList[_npcno].pregnancyAvoidance to $NPCName[_i].pregnancyAvoidance>>
/*ToDo: Pregnancy, remove $pregnancyTesting to properly enable*/
<<if $NPCList[_npcno].pregnancyAvoidance gt random(0,100) and $pregnancyTesting>>
	<<set $condomUse to true>>
<</if>>
<<if $NPCList[_npcno].pregnancyAvoidance gt 0>>
	<<set $npcCondoms to "normal">>
<</if>>

<<if $NPCList[0].type is "wolf">>
	<<set $beastname to "blackwolf">>
	<<set $NPCList[0].lefthand to "none">>
	<<set $NPCList[0].righthand to "none">>
	<<set $NPCList[0].stance to "approach">>
	<<if $blackWolfMonsterRoll isnot undefined and $blackwolfmonster is 1>>
		<<if $blackWolfMonsterRoll is true>>
			<<set $NPCList[0].monster to "monster">>
			<<set $monster to 1>>
			<<set $NPCList[0].type to ($NPCList[0].pronoun is "f" ? "wolfgirl" : "wolfboy")>>
			<<set $NPCList[_npcno].lefthand to 0>>
			<<set $NPCList[_npcno].righthand to 0>>
		<<else>>
			<<set $NPCList[0].monster to 0>>
			<<set $NPCList[0].pronoun to "i">>
		<</if>>
	<<elseif $blackwolfmonster gte 1>>
		<<if ($monsterchance gte $rng and ($hallucinations gte 1 or $monsterhallucinations is "f")) or ($blackwolfmonster is 2)>>
			<<set $blackWolfMonsterRoll to true>>
			<<set $NPCList[0].monster to "monster">>
			<<set $monster to 1>>
			<<set $NPCList[0].type to ($NPCList[0].pronoun is "f" ? "wolfgirl" : "wolfboy")>>
			<<set $NPCList[_npcno].lefthand to 0>>
			<<set $NPCList[_npcno].righthand to 0>>
		<<else>>
			<<set $blackWolfMonsterRoll to false>>
			<<set $NPCList[0].monster to 0>>
			<<set $NPCList[0].pronoun to "i">>
		<</if>>
	<<else>>
		<<set $blackWolfMonsterRoll to false>>
		<<set $NPCList[0].monster to 0>>
		<<set $NPCList[0].pronoun to "i">>
	<</if>>
<</if>>
/*Great hawk*/
<<if $NPCList[0].type is "hawk">>
	<<set $beastname to "greathawk">>
	<<set $NPCList[0].lefthand to "none">>
	<<set $NPCList[0].righthand to "none">>
	<<set $NPCList[0].stance to "approach">>
	<<if $greatHawkMonsterRoll isnot undefined and $greathawkmonster is 1>>
		<<if $greatHawkMonsterRoll is true>>
			<<set $NPCList[0].monster to "monster">>
			<<set $monster to 1>>
			<<set $NPCList[0].type to "harpy">>
			<<set $NPCList[_npcno].lefthand to 0>>
			<<set $NPCList[_npcno].righthand to 0>>
		<<else>>
			<<set $NPCList[0].monster to 0>>
			<<set $NPCList[0].pronoun to "i">>
		<</if>>
	<<elseif $greathawkmonster gte 1 or $bestialitydisable is "t">>
		<<if ($monsterchance gte $rng and ($hallucinations gte 1 or $monsterhallucinations is "f")) or ($greathawkmonster is 2) or ($bestialitydisable is "t")>>
			<<set $greatHawkMonsterRoll to true>>
			<<set $NPCList[0].monster to "monster">>
			<<set $monster to 1>>
			<<set $NPCList[0].type to "harpy">>
			<<set $NPCList[_npcno].lefthand to 0>>
			<<set $NPCList[_npcno].righthand to 0>>
		<<else>>
			<<set $greatHawkMonsterRoll to false>>
			<<set $NPCList[0].monster to 0>>
			<<set $NPCList[0].pronoun to "i">>
		<</if>>
	<<else>>
		<<set $greatHawkMonsterRoll to false>>
		<<set $NPCList[0].monster to 0>>
		<<set $NPCList[0].pronoun to "i">>
	<</if>>
<</if>>

<<if $enemyno lt 6>><<set $enemyno += 1>><</if>>

<<if $NPCList[0].monster is "monster">>
	<<set $monster to 1>>
<<else>>
	<<set $monster to 0>>
<</if>>

<<run EventSystem.Push($passage, _npcno, $time)>>
<<set $index to _npcno>>
<</widget>>

<<widget "npcrelationship">>

<<set _nam to $args[0]>>
<<set _i to $NPCNameList.indexOf(_nam)>>
<<if $NPCName[_i].init is 1>>
	<<set $npctextlove to $NPCName[_i].love>>
	<<set $npctextdom to $NPCName[_i].dom>>
	<<set $npctextname to _nam>>
	<<set $npctextdescription to $NPCName[_i].title>>
	<<relationshiptext _nam>>

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

<<widget "npcincr">>

	<<set _nam to $args[0]>>
	<<set _var to $args[1]>>
	<<set _val to $args[2]>>

	<<set _i to $NPCNameList.indexOf(_nam)>>

	<<switch _var>>
	<<case love>>
		<<set $NPCName[_i].love += _val>>
	<<case dom>>
		<<set $NPCName[_i].dom += _val>>
	<<case trust>>
		<<set $NPCName[_i].trust += _val>>
	<<case lust>>
		<<set $NPCName[_i].lust += _val>>
		<<set _lustincr to 1>>
	<<case rage>>
		<<set $NPCName[_i].rage += _val>>
	<<case state>>
		<<set $NPCName[_i].state to _val>>
	<<case init>>
		<<set $NPCName[_i].init to _val>>
	<<case trauma>>
		<<set $NPCName[_i].trauma += _val>>
	<<case purity>>
		<<if $NPCName[_i].corruption gt 0>>
			<<set $NPCName[_i].corruption -= _val>>
			<<if $NPCName[_i].corruption lte 0>>
				<<if $purityEvent is 1>>
					<<set _rollover to -$NPCName[_i].corruption>>
					<<set $NPCName[_i].purity += (_rollover + 4)>>
					<<set $NPCName[_i].corruption = 0>>
					<<set $purityRollover to 1>>
				<<else>>
					<<set $NPCName[_i].corruption = 1>>
				<</if>>
			<</if>>
		<<else>>
			<<set $NPCName[_i].purity += _val>>
			<<if $NPCName[_i].purity lte 0>>
				<<if $corruptionEvent is 1>>
					<<set _rollover to -$NPCName[_i].purity>>
					<<set $NPCName[_i].corruption += (_rollover + 10)>>
					<<set $NPCName[_i].purity = 0>>
					<<set $corruptionRollover to 1>>
				<<else>>
					<<set $NPCName[_i].purity = 1>>
				<</if>>
			<</if>>
			<<if $NPCName[_i].purity gte 100 and ($NPCName[_i].virginity.vaginal isnot true or $NPCName[_i].virginity.penile isnot true)>>
				<<set $NPCName[_i].purity = 99>>
			<</if>>
			<<if $NPCName[_i].purity lte 50 and _val lt 0 and _lustincr isnot 1>>
				<<npcincr Sydney lust 1>>
			<</if>>
		<</if>>
		<<unset $purityEvent>>
		<<unset $corruptionEvent>>
	<<default>>
		NPCINCR error - Unknown variable _var

	<</switch>>

<</widget>>

<<widget "npcset">>

<<set _nam to $args[0]>>
<<set _var to $args[1]>>
<<set _val to $args[2]>>

<<set _i to $NPCNameList.indexOf(_nam)>>

<<switch _var>>
	<<case love>>
		<<set $NPCName[_i].love to _val>>
	<<case dom>>
		<<set $NPCName[_i].dom to _val>>
	<<case trust>>
		<<set $NPCName[_i].trust to _val>>
	<<case lust>>
		<<set $NPCName[_i].lust to _val>>
	<<case rage>>
		<<set $NPCName[_i].rage to _val>>
	<<case state>>
		<<set $NPCName[_i].state to _val>>
	<<case init>>
		<<set $NPCName[_i].init to _val>>
	<<case trauma>>
		<<set $NPCName[_i].trauma to _val>>
	<<case purity>>
		<<set $NPCName[_i].purity to _val>>
	<<case corruption>>
		<<set $NPCName[_i].corruption to _val>>
	<<default>>
		NPCSET error - Unknown value _var

<</switch>>

<</widget>>

<<widget "relationshiptext">>
<<set _npc to $args[0]>>
<<set _i to $NPCNameList.indexOf(_npc)>>

<<switch _npc>>
	<<case Robin>>
		Robin
		<<if $robinromance is 1>>
		loves you.
		<<elseif $NPCName[_i].trauma gte 80>>
		is traumatised.
		<<elseif $NPCName[_i].trauma gte 40>>
		is in pain.
		<<elseif $NPCName[_i].trauma gte 10>>
		is troubled.
		<<elseif $NPCName[_i].dom gte 80>>
		feels protective of you.
		<<elseif $NPCName[_i].dom gte 20>>
		thinks you're their best friend.
		<<else>>
		looks up to you.
		<</if>>
	<<case Piper>>
	Piper
	<<if $NPCName[_i].dom gte 70>>
		<<if $NPCName[_i].love gte 120>>
			cannot wait to be your sacrifice.
		<<elseif $NPCName[_i].love gte 60>>
			accepts their fate with open arms.
		<<else>>
			accepts their fate.
		<</if>>
	<<elseif $NPCName[_i].dom gte 40>>
		<<if $NPCName[_i].love gte 120>>
			trusts you to decide their fate.
		<<elseif $NPCName[_i].love gte 60>>
			trusts you.
		<<else>>
			is unsure of their fate.
		<</if>>
	<<else>>
		<<if $NPCName[_i].love gte 120>>
			<<if $NPCName[_i].lust gte 66>>
				wants to worship you instead.
			<<elseif $NPCName[_i].dom lte 1>>
				wants to run away with you.
			<<else>>
				trusts you to save them.
			<</if>>
			trusts you to save them.
		<<elseif $NPCName[_i].love gte 60>>
			hopes you'll save them.
		<<else>>
			fears their fate.
		<</if>>
	<</if>>
	<<case Avery>>
		Avery
		<<if $NPCName[$NPCNameList.indexOf("Avery")].state is "dismissed">>
			has moved on.
		<<elseif $NPCName[_i].rage gte 96>>
			has given up on you.
		<<elseif $NPCName[_i].love gte 60>>
			<<if $NPCName[_i].rage gte 60>>
			is infuriated by you.
			<<elseif $NPCName[_i].rage gte 20>>
			wants you on a tighter leash.
			<<else>>
			prizes you.
			<</if>>
		<<elseif $NPCName[_i].love gte 20>>
			<<if $NPCName[_i].rage gte 60>>
			is furious with you.
			<<elseif $NPCName[_i].rage gte 20>>
			sees you as a possession.
			<<else>>
			thinks you're cute.
			<</if>>
		<<else>>
			<<if $NPCName[_i].rage gte 60>>
			thinks you're insolent.
			<<elseif $NPCName[_i].rage gte 20>>
			thinks you're a brat.
			<<else>>
			has no strong opinion of you.
			<</if>>
		<</if>>
	<<case Kylar>>
		Kylar
		<<if $NPCName[$NPCNameList.indexOf("Kylar")].state is "prison" and $location isnot "prison">>
			 is imprisoned.
		<<elseif $NPCName[_i].love gte 90>>
			<<if $NPCName[_i].rage gte 90>>
			is hysterical.
			<<elseif $NPCName[_i].rage gte 60>>
			is obsessed with you.
			<<elseif $NPCName[_i].rage gte 30>>
			is obsessed with you.
			<<else>>
			is obsessed with you.
			<</if>>
		<<elseif $NPCName[_i].love gte 60>>
			<<if $NPCName[_i].rage gte 90>>
			is hysterical.
			<<elseif $NPCName[_i].rage gte 60>>
			is enamoured with you.
			<<elseif $NPCName[_i].rage gte 30>>
			is enamoured with you.
			<<else>>
			is enamoured with you.
			<</if>>
		<<elseif $NPCName[_i].love gte 30>>
			<<if $NPCName[_i].rage gte 90>>
			is hysterical.
			<<elseif $NPCName[_i].rage gte 60>>
			is infatuated with you.
			<<elseif $NPCName[_i].rage gte 30>>
			is infatuated with you.
			<<else>>
			is infatuated with you.
			<</if>>
		<<else>>
			<<if $NPCName[_i].rage gte 90>>
			is hysterical.
			<<elseif $NPCName[_i].rage gte 60>>
			is fixated on you.
			<<elseif $NPCName[_i].rage gte 30>>
			is fixated on you.
			<<else>>
			is fixated on you.
			<</if>>
		<</if>>
	<<case Whitney>>
		Whitney
		<<if $NPCName[$NPCNameList.indexOf("Whitney")].state is "dungeon">>
			is gone.
		<<elseif $npctextlove gte $npclovehigh>>
			<<if $npctextdom gte $npcdomhigh>>
			thinks you're adorable.
			<<elseif $npctextdom lte $npcdomlow>>
			thinks you're inspiring.
			<<else>>
			thinks you're delightful.
			<</if>>
		<<elseif $npctextlove lte $npclovelow>>
			<<if $npctextdom gte $npcdomhigh>>
			thinks you're pathetic.
			<<elseif $npctextdom lte $npcdomlow>>
			thinks you're irritating.
			<<else>>
			thinks you're terrible.
			<</if>>
		<<else>>
			<<if $npctextdom gte $npcdomhigh>>
			thinks you're cute.
			<<elseif $npctextdom lte $npcdomlow>>
			looks up to you.
			<<else>>
			has no strong opinion of you.
			<</if>>
		<</if>>
	<<case Sydney>>
		Sydney
		<<if $sydneyromance is 1>>
			<<if $NPCName[_i].purity gt 80>>
				<<if $NPCName[_i].lust gte 60>>
				can't think of anything but you.
				<<else>>
				loves you beyond words.
				<</if>>
			<<elseif $NPCName[_i].purity gte 40>>
				<<if $NPCName[_i].lust gte 30>>
				yearns for your touch.
				<<else>>
				feels bound to you.
				<</if>>
			<<elseif $NPCName[_i].corruption gte 40>>
				<<if $NPCName[_i].lust gte 20>>
				wants to be <<if $NPCName[_i].virginity.vaginal is true and $NPCName[_i].virginity.penile is true>>deflowered<<else>>defiled<</if>> by you.
				<<else>>
				loves you beyond words.
				<</if>>
			<<elseif $NPCName[_i].corruption gte 10>>
				<<if $NPCName[_i].lust gte 10>>
				craves your touch.
				<<else>>
				belongs to you.
				<</if>>
			<<else>>
				loves you.
			<</if>>
		<<elseif $NPCName[_i].love gte 60>>
			<<if $NPCName[_i].purity gte 50>>
				<<if $purity lte 500 or $demon gte 6>>
					wants to save you.
				<<elseif $temple_rank is "initiate" or $angel gte 6>>
					considers you an inspiration.
				<<else>>
					is very fond of you.
				<</if>>
			<<elseif $NPCName[_i].corruption gte 10>>
				is influenced by you.
			<<else>>
				is torn.
			<</if>>
		<<elseif $NPCName[_i].love gte 30>>
			<<if $NPCName[_i].purity gte 50>>
				<<if $purity lte 500 or $demon gte 6>>
					thinks you're misguided.
				<<elseif $temple_rank is "initiate" or $angel gte 6>>
					looks up to you.
				<<else>>
					enjoys your company.
				<</if>>
			<<elseif $NPCName[_i].corruption gte 10>>
				wants to know you better.
			<<else>>
				is conflicted.
			<</if>>
		<<elseif $NPCName[_i].love gte 10>>
			<<if $sydneySeen and $sydneySeen.includes("initiate")>>
				<<if $purity lte 500 or $demon gte 6>>
					thinks you're lost.
				<<else>>
					is proud of you.
				<</if>>
			<<else>>
				is intrigued by you.
			<</if>>
		<<else>>
			<<if $sydneySeen and $sydneySeen.includes("initiate")>>
				<<if $purity lte 500 or $demon gte 6>>
					thinks you're heretical.
				<<else>>
					is happy to know another initiate.
				<</if>>
			<<else>>
				has no strong opinion of you.
			<</if>>
		<</if>>

	<<default>>
		<<if $npctextlove gte $npclovehigh>>
			<<if $npctextdom gte $npcdomhigh>>
			$npctextname thinks you're adorable.
			<<elseif $npctextdom lte $npcdomlow>>
			$npctextname thinks you're inspiring.
			<<else>>
			$npctextname thinks you're delightful.
			<</if>>
		<<elseif $npctextlove lte $npclovelow>>
			<<if $npctextdom gte $npcdomhigh>>
			$npctextname thinks you're pathetic.
			<<elseif $npctextdom lte $npcdomlow>>
			$npctextname thinks you're irritating.
			<<else>>
			$npctextname thinks you're terrible.
			<</if>>
		<<else>>
			<<if $npctextdom gte $npcdomhigh>>
			$npctextname thinks you're cute.
			<<elseif $npctextdom lte $npcdomlow>>
			$npctextname looks up to you.
			<<else>>
			$npctextname has no strong opinion of you.
			<</if>>
		<</if>>
<</switch>>
<</widget>>

<<widget "push_nnpc_genderknown">>

<<if $args[0]>>
	<<if !$worn.genitals.type.includes("hidden")>>
		<<if $npc.length gt 0>>
			<<for _i to 0; _i lt $npc.length; _i++>>
				<<set $genderknown.pushUnique($npc[_i])>>
			<</for>>
		<</if>>
	<</if>>
<<else>>
	<<if $exposed gte 2 and !$worn.genitals.type.includes("hidden")>>
		<<if $npc.length gt 0>>
			<<for _i to 0; _i lt $npc.length; _i++>>
				<<set $genderknown.pushUnique($npc[_i])>>
			<</for>>
		<</if>>
	<</if>>
<</if>>
<</widget>>

<<widget "NPCStatusCheck">>

<<if $args[0].includes("Kylar") and $NPCName[$NPCNameList.indexOf("Kylar")].init is 1>>
	<<kylarStatusCheck>>
<</if>>
<<if $args[0].includes("Sydney") and $NPCName[$NPCNameList.indexOf("Sydney")].init is 1>>
	<<sydneyStatusCheck>>
<</if>>
<</widget>>


code:
:: Widgets Nicknames [widget]
<<widget "underworld_nickname">>
<<if $famesex gte 400>>
	<<if $fameprostitution gte 400>>
		<<if $famerape gte 400>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Our Boy">>
						<<else>>
							<<set _text_output to "Our Girl">>
						<</if>>
					<<else>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "The Boy">>
						<<else>>
							<<set _text_output to "The Girl">>
						<</if>>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Plaything">>
					<<else>>
						<<set _text_output to "Fucktoy">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Pike">>
					<<else>>
						<<set _text_output to "Rapier">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Ultra Slut">>
					<<else>>
						<<set _text_output to "Super Slut">>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Milker">>
					<<else>>
						<<set _text_output to "Milky">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Kibbles">>
					<<else>>
						<<set _text_output to "Nibbles">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Weaver">>
					<<else>>
						<<set _text_output to "Needle">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Pokies">>
					<<else>>
						<<set _text_output to "Pokey">>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<<else>>
		<<if $famerape gte 400>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Wolf Whore">>
					<<else>>
						<<set _text_output to "Wolf Slut">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Dog Whore">>
					<<else>>
						<<set _text_output to "Dog Slut">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Spike">>
					<<else>>
						<<set _text_output to "Rough-and-Tumble">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Freebies">>
					<<else>>
						<<set _text_output to "Free Slut">>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Doggy Squeezer">>
					<<else>>
						<<set _text_output to "Wolf Warrior">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Doggy Milker">>
					<<else>>
						<<set _text_output to "Wolf Rider">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Pimp">>
						<<else>>
							<<set _text_output to "Madame">>
						<</if>>
					<<else>>
						<<set _text_output to "Sabre">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Slut Dad">>
						<<else>>
							<<set _text_output to "Slut Mum">>
						<</if>>
					<<else>>
						<<set _text_output to "Slut">>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<else>>
	<<if $fameprostitution gte 400>>
		<<if $famerape gte 400>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Hound Father">>
						<<else>>
							<<set _text_output to "Hound Mother">>
						<</if>>
					<<else>>
						<<set _text_output to "Hound">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Dogged One">>
					<<else>>
						<<set _text_output to "Pup">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Dagger">>
					<<else>>
						<<set _text_output to "Scar">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Sex Beggar">>
					<<else>>
						<<set _text_output to "Rape Beggar">>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Fang">>
					<<else>>
						<<set _text_output to "Claw">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "The Hound">>
					<<else>>
						<<set _text_output to "Puppy">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Stiletto">>
					<<else>>
						<<set _text_output to "Knife">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Whoredad">>
						<<else>>
							<<set _text_output to "Whoremum">>
						<</if>>
					<<else>>
						<<set _text_output to "Penny Chaser">>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<<else>>
		<<if $famerape gte 400>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Tasty">>
					<<else>>
						<<set _text_output to "The Rabbit">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Kitten">>
					<<else>>
						<<set _text_output to "Bitch">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "The Rough One">>
					<<else>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Spear-Prick">>
						<<else>>
							<<set _text_output to "Vagina Dentata">>
						<</if>>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Free Samples">>
					<<else>>
						<<set _text_output to "Rape Bait">>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $famebestiality gte 400>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Den Father">>
						<<else>>
							<<set _text_output to "Den Mother">>
						<</if>>
					<<else>>
						<<set _text_output to "The Wolf">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<set _text_output to "Rancher">>
					<<else>>
						<<set _text_output to "Paw">>
					<</if>>
				<</if>>
			<<else>>
				<<if $famescrap gte 400>>
					<<if $famepimp gte 400>>
						<<set _text_output to "The Rat">>
					<<else>>
						<<set _text_output to "Scrappy">>
					<</if>>
				<<else>>
					<<if $famepimp gte 400>>
						<<if $player.gender_appearance is "m">>
							<<set _text_output to "Dad">>
						<<else>>
							<<set _text_output to "Mum">>
						<</if>>
					<<else>>
						<<set _text_output to "meat">>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
<<print _text_output>>
<</widget>>

<<widget "overworld_nickname">>
<<if $fameexhibitionism gte 400>>
	<<if $famegood gte 400>>
		<<if $famebusiness gte 400>>
			<<if $famesocial gte 400>>
				<<set _text_output to "The Orphan">>
			<<else>>
				<<set _text_output to "Gold Heart">>
			<</if>>
		<<else>>
			<<if $famesocial gte 400>>
				<<set _text_output to "Flaunty">>
			<<else>>
				<<set _text_output to "Smiles">>
			<</if>>
		<</if>>
	<<else>>
		<<if $famebusiness gte 400>>
			<<if $famesocial gte 400>>
				<<set _text_output to "Orchid">>
			<<else>>
				<<if $player.gender_appearance is "m">>
					<<set _text_output to "Suspicious Shop Boy">>
				<<else>>
					<<set _text_output to "Suspicious Shop Girl">>
				<</if>>
			<</if>>
		<<else>>
			<<if $famesocial gte 400>>
				<<if $player.gender_appearance is "m">>
					<<set _text_output to "Party Boy">>
				<<else>>
					<<set _text_output to "Party Girl">>
				<</if>>
			<<else>>
				<<if $player.gender_appearance is "m">>
					<<set _text_output to "Lewd Boy">>
				<<else>>
					<<set _text_output to "Lewd Girl">>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<else>>
	<<if $famegood gte 400>>
		<<if $famebusiness gte 400>>
			<<if $famesocial gte 400>>
				<<set _text_output to "Flower">>
			<<else>>
				<<set _text_output to "Charity">>
			<</if>>
		<<else>>
			<<if $famesocial gte 400>>
				<<set _text_output to "Preachy">>
			<<else>>
				<<set _text_output to "Angel">>
			<</if>>
		<</if>>
	<<else>>
		<<if $famebusiness gte 400>>
			<<if $famesocial gte 400>>
				<<set _text_output to "Tulip">>
			<<else>>
				<<if $player.gender_appearance is "m">>
					<<set _text_output to "Shop Boy">>
				<<else>>
					<<set _text_output to "Shop Girl">>
				<</if>>
			<</if>>
		<<else>>
			<<if $famesocial gte 400>>
				<<set _text_output to "Wallflower">>
			<<else>>
				<<if $player.gender_appearance is "m">>
					<<set _text_output to "some orphan boy">>
				<<else>>
					<<set _text_output to "some orphan girl">>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
<<print _text_output>>
<</widget>>

repo_name: Area/degrees

license: mit


code:
:: Options [widget]

<<widget "options">>

Options

Some of these will only have an effect after changing passage. Changing location, advancing combat/sex or similar actions will be enough.

General Options

<<if $debug is 1>>
	/*<<checkbox "$notifyUpdate" false true autocheck>> Notify when there's a new game update available

*/
	<<link "Check for updates">>
		<<run checkNewVersion()>>
	<</link>>

<</if>>
Passage Line Height: <<link "1.75">><<unset $reducedLineHeight>><<removeclass "#passages" "reducedLineHeight">><</link>> | <<link "1.5">><<set $reducedLineHeight to true>><<addclass "#passages" "reducedLineHeight">><</link>>

	<<checkbox "$newWardrobeStyle" false true autocheck>>
	Show the new wardrobe style

	<<checkbox "$useNarrowMarket" false true autocheck>>
	Use "narrow screen" version of the market inventory

	<<checkbox "$neverNudeMenus" false true autocheck>>
	Hide player nudity in menus

	<<checkbox "$showCaptionText" false true autocheck>>
	Show Caption Text in Sidebar

	<<checkbox "$skipStatisticsConfirmation" false true autocheck>>
	Skip asking for confirmation when viewing Extra Stats

	<<checkbox "$autosavedisabled" false true autocheck>>
	Disable autosave on sleeping

	<<checkbox "$numpad" false true autocheck>>
	Enable numpad. Useful on mobile if links break due to translation software.

<<if $map isnot undefined>>

	Map Options

		<<checkbox "$map.movement" false true autocheck>>
		Enable map movement by clicking/touching the map icons

		<<checkbox "$map.markers" false true autocheck>>
		Show clickable area on map

	<<if $map isnot undefined>>
		<<print '<<checkbox "$map.legacy" false true '+($map.legacy is true ? "checked" : "")+'>>'>> Disable SVG map. Enable if town map is not visible. The above option will not work with this enabled.

	<</if>>
	<<print '<<checkbox "$map.top" false true '+($map.top is true ? "checked" : "")+'>>'>>
		Move the map above the map links

<</if>>

Image Options

Sidebar character renderer:
<<radiovar "$sidebarRenderer" "img" "Old">><<updatesidebarimg>><</radiovar>>
| <<radiovar "$sidebarRenderer" "canvas" "New">><<updatesidebarimg>><</radiovar>>
| <<radiovar "$sidebarRenderer" "both" "Both">><<updatesidebarimg>><</radiovar>>

Lighten the background of the character:
<<radiobutton "$imgLighten" "" autocheck>> Disabled |
<<radiobutton "$imgLighten" "imgLighten" autocheck>> Lighten |
<<radiobutton "$imgLighten" "imgLighten2" autocheck>> Lighten further

Closed sidebar stats:
<<radiobutton "$sidebarStats" "Disabled" autocheck>> Disabled |
<<radiobutton "$sidebarStats" "Limited" autocheck>> Limited to important only |
<<radiobutton "$sidebarStats" "All" autocheck>> Show all

Closed sidebar time:
<<radiobutton "$sidebarTime" "Disabled" autocheck>> Disabled |
<<radiobutton "$sidebarTime" "top" autocheck>> Above sidebar stats |
<<radiobutton "$sidebarTime" "bottom" autocheck>> Below sidebar stats

/*
	<<checkbox "$sidebarImage" false true autocheck>>
	Use sidebar icons rather than text

*/
<<checkbox "$showDebugRenderer" false true autocheck>> Enable renderer debugger

Combat Options

Combat Controls:
<<radiobutton "$combatControls" "radio" autocheck>> Radio Buttons |
<<radiobutton "$combatControls" "lists" autocheck>> Lists (No width limit) |
<<radiobutton "$combatControls" "limitedLists" autocheck>> Lists (Width Limit)

"Yourself" as a target option:
<<radiobutton "$targetYourself" false autocheck>> Disabled |
<<radiobutton "$targetYourself" true autocheck>> Enabled

To fix animations that aren't playing correctly you can click on them, or press [F] key, or use the button below.

<<if $passage isnot "Start">>
	<<button "Restart Game">>
		<>
	<</button>>
<</if>>

<<button "Fix stuck animations">>
	<<run fixStuckAnimations()>>
<</button>>

<</widget>>

<<widget "optionsExportImport">>

Saves Export/Import

File Import/Export

<<if SugarCube.Browser.isMobile.any() is true>>
	Note that saving and loading from file does not work on Android currently.
<<else>>
	Load from file: <input id="saveImport" type="file" value="Load from file" onchange="importSave(this.files)">

	<<if $passage is "Start" or $passage is "Start2">>
		Please load a save before trying to export a save file.
	<<elseif ($dancing is 0 and $combat is 0 and $replayScene is undefined) or $debug is 1>>
		<<set _exportName to "'degrees-of-lewdity"+($saveName isnot ''?'-'+$saveName:'')+ "'">>
		<input type="button" value="Save to file" @onclick="'updateExportDay();SugarCube.Save.export('+_exportName+')'">
	<<else>>
		Unable to save to file currently.
	<</if>>
<</if>>

Text Import/Export

<<if !($dancing is 0 and $combat is 0 and $replayScene is undefined)>>
	Combat event active, only use resulting save data for bug reporting!!

<</if>>
	This feature lets you transfer saves between devices when one or more does not allow access to save files, such as on Android.

	To save, click on "Get Save Data", then copy and paste the save data where required.

	To load, paste in the save data then click "Load Save Data".

	To transfer to and from Android, it is recommended to use email or a service such as pastebin. Please ensure that the start and the end of the save is exact to prevent issues.

	Click on "Copy Text Area" to copy the current contents for you. The button name will change to "Copying Error" if your device or browser does not support it.

	<textarea id="saveDataInput" rows="4" cols="40" onClick="if(V.disableAutoSelect == false)this.select();"></textarea>

	<input type="button" value="Clear Text Box" onclick="clearTextBox('saveDataInput')"/>
	<input type="button" value="Top of Text Box" onclick="topTextArea('saveDataInput')"/>
	<input type="button" value="Bottom of Text Box" onclick="bottomTextArea('saveDataInput')"/>
	<input type="button" value="Get Save Data" onclick="getSaveData()"/>
	<input type="button" value="Load Save Data" onclick="loadSaveData()"/>
	<input id="CopyTextArea" type="button" value="Copy Text Area" onclick="copySavedata('saveDataInput')">

	<<print '<<checkbox "$disableAutoSelect" false true '+($disableAutoSelect is true? "checked":"")+'>>'>>
	Disables auto select.

<</widget>>

<<widget "saveList">>
<<run prepareSaveDetails()>>
<<if $passage isnot "Start" and $passage isnot "Start2" and $replayScene is undefined>>
	<<set _saveUnlock to true>>
<</if>>
<<if $replayScene isnot undefined>>
	The scene viewer is currently in use, preventing the use of the save system.
<</if>>
<<set _saveDetails = getSaveDetails()>>

<<if _saveDetails is undefined>>
	<<set _saveDetails to returnSaveDetails()>>
<<elseif _saveDetails.autosave is undefined or _saveDetails.slots is undefined>>
	<<set _saveDetails to returnSaveDetails()>>
<</if>>
<<set _currentTime to new Date().getTime()>>

#

Save/Load

ID/Name

Details

	<<for _i to 0; _i lt 10; _i++>>

			<<if _i is 0>>
				<<if _saveDetails.autosave isnot null>>

A

							<input type="button" class="saveMenuButton" value="Load" onclick="loadSave('auto')"/>

						<<if _saveDetails.autosave.metadata isnot undefined>>

								<<if _saveDetails.autosave.metadata.saveName isnot "">>
									<<print _saveDetails.autosave.metadata.saveName.slice(0,10)>>
								<<else>>
									<<print _saveDetails.autosave.metadata.saveId>>
								<</if>>

						<<else>>

						<</if>>

							<<print _saveDetails.autosave.title.replace(/</g, "< ")>>
							<<print new Date(_saveDetails.autosave.date).toLocaleString()>>

						<input type="button" class="saveMenuButton right" value="Delete" onclick="deleteSave('auto')"/>

				<<else>>

A

							<input type="button" value="Load" disabled/>

						<input class="right" type="button" value="Delete" disabled/>

				<</if>>
			<<elseif _i lt 9>>
				<<set _slot to _i - 1>>
				<<if _saveDetails.slots[_slot] isnot null>>

<<print _i>>

							<<if _saveUnlock>>
								<<set _onclick to "save("+_slot+", false, "+_saveDetails.slots[_slot].metadata.saveId+", '"+$saveName+"')">>
								<input type="button" class="saveMenuButton" value="Save" @onclick="clone(_onclick)"/>
							<<else>>
								<input type="button" value="Save" disabled/>
							<</if>>
							<input type="button" class="saveMenuButton" value="Load" @onclick="'loadSave('+ _slot +')'"/>

							<<if _saveDetails.slots[_slot].metadata.saveName isnot "">>
								<<print _saveDetails.slots[_slot].metadata.saveName.slice(0,10)>>
							<<else>>
								<<print _saveDetails.slots[_slot].metadata.saveId>>
							<</if>>

							<<print _saveDetails.slots[_slot].title.replace(/</g, "< ")>>
							<<print new Date(_saveDetails.slots[_slot].date).toLocaleString()>>

<input type="button" class="saveMenuButton right" value="Delete" @onclick="'deleteSave('+ _slot +')'"/>

				<<else>>

<<print _i>>

							<<if _saveUnlock>>
								<input type="button" class="saveMenuButton" value="Save" @onclick="'save('+ _slot +',true,'+$saveId+', `'+$saveName+'`)'"/>
							<<else>>
								<input type="button" value="Save" disabled/>
							<</if>>
							<input type="button" value="Load" disabled/>

						<input class="right" type="button" value="Delete" disabled/>

				<</if>>
			<<else>>

<input type="button" class="saveMenuButton right" value="Delete All" onclick="deleteSave('all')"/>

			<</if>>

	<</for>>

	<<checkbox "$confirmSave" false true autocheck>>
	Require Confirmation on Save

	<<checkbox "$confirmLoad" false true autocheck>>
	Require Confirmation on Load

	<<checkbox "$confirmDelete" false true autocheck>>
	Require Confirmation on Delete

<<if $saveDetails isnot undefined>>
	How many days after exporting will the export warning show:

	<<radiobutton "$saveDetails.exported.frequency" 5 autocheck>>5 |
	<<radiobutton "$saveDetails.exported.frequency" 10 autocheck>>10 |
	<<radiobutton "$saveDetails.exported.frequency" 15 autocheck>>15 |
	<<radiobutton "$saveDetails.exported.frequency" 20 autocheck>>20 |
	<<radiobutton "$saveDetails.exported.frequency" 30 autocheck>>30 |
	<<radiobutton "$saveDetails.exported.frequency" 60 autocheck>>60 |
	<<radiobutton "$saveDetails.exported.frequency" 365 autocheck>>365
<</if>>
<<if $debug is 1>>

	<<print '<<checkbox "$prepareSaveDetails" false true '+($prepareSaveDetails is true ? "checked" : "")+'>>'>>
		Run `prepareSaveDetails`. Disabling will cause saving/deleting on older version to not update the save list on newer versions but may speed up refresh loading times.

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

<<widget "clearAllWarning">>

Warning - Are you sure you would like to delete all saves?

	<input type="button" class="close saveMenuConfirm" value="Confirm Delete All" onclick="deleteSave('all', true)"/>

	<input type="button" class="saveMenuButton saveMenuConfirm" value="Cancel" onclick="resetSaveMenu();"/>

<</widget>>

<<widget "saveWarning">>

	<<if _saveDetails.slots[$args[0]] isnot null>>
		<<if _saveDetails.slots[$args[0]].metadata isnot undefined>>
			<<if _saveDetails.slots[$args[0]].metadata.saveId isnot $saveId>>
				<<set _showSaveId to true>>
			<<else>>
				<<set _showSaveId to false>>
			<</if>>
		<<else>>
			<<set _showSaveId to "noId">>
		<</if>>
	<</if>>
	<<if _saveDetails.slots[$args[0]] is null>>

Save on slot <<print ($args[0] is "auto"? "auto": $args[0] + 1)>>

		<<if _showSaveId is true>>
		Save ID does not match, continue with overwrite?

		<</if>>
		<<if _showSaveId is "noId">>
		Save ID not found on older save, continue with overwrite?

		<</if>>
	<<else>>

Overwrite Save on slot <<print ($args[0] is "auto"? "auto": $args[0] + 1)>>?

		<<if _showSaveId is true>>
		Save ID does not match, continue with overwrite?

		<</if>>
		<<if _showSaveId is "noId">>
		Save ID not found on older save, continue with overwrite?

		<</if>>
		Old Save: <<print _saveDetails.slots[$args[0]].title>>

		<<print new Date(_saveDetails.slots[$args[0]].date).toLocaleString()>>

	<</if>>
	<<if _saveDetails.slots[$args[0]].metadata isnot undefined>>
		<<if _saveDetails.slots[$args[0]].metadata.saveName isnot undefined>>
			Older Save Name: <<print _saveDetails.slots[$args[0]].metadata.saveName>>

		<</if>>
	<</if>>
	<<if _showSaveId is true>>
		Older Save ID: <<print _saveDetails.slots[$args[0]].metadata.saveId>>

		<<if $saveName isnot undefined>>
			Current Save Name: <<print $saveName>>

		<</if>>
		Current Save ID: <<print $saveId>>

	<</if>>
	<input type="button" class="saveMenuButton saveMenuConfirm" value="Save" @onclick="'save('+ $args[0] +', true,'+$saveId+', `'+$saveName+'`)'"/>
	<input type="button" class="saveMenuButton saveMenuConfirm" value="Cancel" onclick="resetSaveMenu();"/>

<</widget>>

<<widget "loadWarning">>

Load slot <<print ($args[0] is "auto"? "auto": $args[0] + 1)>>

	<<if $args[0] is "auto">>
		<<print _saveDetails.autosave.title>>

		<<print new Date(_saveDetails.autosave.date).toLocaleString()>>

		<input type="button" class="saveMenuButton saveMenuConfirm" value="Load" onclick="loadSave('auto', true)"/>
	<<else>>
		<<print _saveDetails.slots[$args[0]].title>>

		<<print new Date(_saveDetails.slots[$args[0]].date).toLocaleString()>>

		<input type="button" class="saveMenuButton saveMenuConfirm" value="Load" @onclick="'loadSave('+ $args[0] +', true)'"/>
	<</if>>
	<input type="button" class="saveMenuButton saveMenuConfirm" value="Cancel" onclick="resetSaveMenu();"/>

<</widget>>

<<widget "deleteWarning">>

Delete Save in slot <<print ($args[0] is "auto"? "auto": $args[0] + 1)>>

	<<if $args[0] is "auto">>
		<<print _saveDetails.autosave.title>>

		<<print new Date(_saveDetails.autosave.date).toLocaleString()>>

		<input type="button" class="saveMenuButton" value="Delete Auto" onclick="deleteSave('auto', true)"/>
	<<else>>
		<<print _saveDetails.slots[$args[0]].title>>

		<<print new Date(_saveDetails.slots[$args[0]].date).toLocaleString()>>

		<input type="button" class="saveMenuButton" value="Delete" @onclick="'deleteSave('+ $args[0] +', true)'"/>
	<</if>>
	<input type="button" class="saveMenuButton saveMenuConfirm" value="Cancel" onclick="resetSaveMenu();"/>

<</widget>>

<<widget "resetSaveMenu">>
	<<replace #saveList>>
		<<saveList>>
	<</replace>>
<</widget>>

<<widget "clearSaveMenu">>
	<<replace #saveList>>
		<<clearAllWarning>>
	<</replace>>
<</widget>>

<<widget "saveConfirm">>
	<<replace #saveList>>
		<<saveWarning $args[0]>>
	<</replace>>
<</widget>>

<<widget "loadConfirm">>
	<<replace #saveList>>
		<<loadWarning $args[0]>>
	<</replace>>
<</widget>>

<<widget "deleteConfirm">>
	<<replace #saveList>>
		<<deleteWarning $args[0]>>
	<</replace>>
<</widget>>


code:
:: Widgets Orgasm [widget]

<<widget "orgasm">>
	<<if $player.penisExist and $penissize is -2>>
		<<set $femaleclimax to 1>>
	<<elseif $femaleclimax isnot -1 and $orgasmdown lt 0>>
		<<set $femaleclimax to -1>>
	<</if>>
	<<orgasmstat>><<set $orgasmcount += 1>><<set $orgasmdown to 3>>
	<<if $combat is 1>>
		<<set $speechcum to 1>><<set $speechorgasmcount += 1>>
	<</if>>
	<<if $player.penisExist and $femaleclimax is -1 and $penissize lt 0>>
		<<set $_femaleclimaxchance to 50>>
		<<if $anusstate is "penetrated" or $anusstate is "tentacle" or $anusstate is "tentacledeep" or $anusstate is "doublepenetrated">>
			<<set $_femaleclimaxchance += 40>>
			<<if $anusstate is "doublepenetrated">>
				<<set $_femaleclimaxchance += 20>>
			<</if>>
		<</if>>
		<<if $mouthstate is "penetrated" or $mouthstate is "tentacle" or $mouthstate is "tentacledeep">>
			<<set $_femaleclimaxchance += 20>>
		<</if>>
		<<if $penisstate is "penetrated" or $penisstate is "otheranus" or $penisstate is "tentacledeep" or $penisstate is "tentacle">>
			<<set $_femaleclimaxchance -= 40>>
		<</if>>
		<<if random(1, 100) lte $_femaleclimaxchance>>
			<<set $femaleclimax to 1>>
		<<else>>
			<<set $femaleclimax to 0>>
		<</if>>
	<</if>>
	<<if $player.penisExist>>
		<<if $femaleclimax is 1>>
			You are overcome by sensation and climax like a girl.
			<<semenvolume -1>>
		<<elseif $semen_volume is 0 or $semen_amount is 0>>
			You are overcome by sensation and climax, but nothing comes out.
			<<set $femaleclimax to 1>>
			<<semenvolume -1>>
		<<else>>
			<<set $player.bodyliquid.penis.semen += 1>>
			<<if $player.condom>>
				<<if $player.condom.damaged is true or ($player.condom.cum is true and random(0,100) gte 95)>>
					<<set _condom to "damaged">>
				<<else>>
					<<set _condom to true>>
				<</if>>
			<</if>>
			<<if $parasite.penis.name>>
				You are overcome by sensation. You ejaculate into the parasite latched onto your penis.
			<<elseif _condom is true>>
				You are overcome by sensation. You ejaculate into the condom that covers your penis.
				<<set $player.condom.cum to true>>
			<<elseif $penisuse is "othervagina">>
				<<for $_i = 0; $_i lt $enemynomax; $_i++>>
					<<if $NPCList[$_i].vagina is "penis">>
						<<personselect $_i>>
						<<penileejacstat>>
						You are overcome by sensation and ejaculate deep into <<his>> womb.
						<<purity -1>><<internalejac>><<creampie "npc" "vagina">>
						<<if $abomination is 1>>
							/*ToDo: Pregnancy, figure out how the Wraith, plantpeople, etc will handle pregnancy.*/
						<<else>>
							<<recordVaginalSperm $NPCList[$_i].fullDescription "pc" "human">>
						<</if>>
					<<elseif $NPCList[$_i].vagina is "penisimminent" or $NPCList[$_i].vagina is "penisentrance">>
						<<personselect $_i>>
						You are overcome by sensation and ejaculate on <<his>> pussy.
					<</if>>
				<</for>>
				<<if _condom is "damaged">>
					The condom is too damaged, and semen bursts through.
				<</if>>
			<<elseif $penisuse is "otheranus">>
				<<for $_i = 0; $_i lt $enemynomax; $_i++>>
					<<if $NPCList[$_i].penis is "otheranus" or $NPCList[$_i].vagina is "otheranus">>
						<<personselect $_i>>
						<<penileejacstat>>
						You are overcome by sensation and ejaculate deep into <<his>> bowels.
						<<purity -1>><<internalejac>><<creampie "npc" "anus">>
					<<elseif $NPCList[$_i].penis is "otheranusimminent" or $NPCList[$_i].penis is "otheranusentrance" or $NPCList[$_i].vagina is "otheranusimminent" or $NPCList[$_i].vagina is "otheranusentrance">>
						<<personselect $_i>>
						You are overcome by sensation and ejaculate on <<his>> ass.
					<</if>>
				<</for>>
				<<if _condom is "damaged">>
					The condom is too damaged, and semen bursts through.
				<</if>>
			<<elseif $penisuse is "othermouth">>
				<<for $_i = 0; $_i lt $enemynomax; $_i++>>
					<<if $NPCList[$_i].mouth is "penis">>
						<<personselect $_i>>
						<<penileejacstat>>
						You are overcome by sensation and ejaculate into <<his>> mouth.
						<<purity -1>><<internalejac>><<creampie "npc" "mouth">>
					<<elseif $NPCList[$_i].mouth is "penisimminent" or $NPCList[$_i].mouth is "penisentrance">>
						<<personselect $_i>>
						You are overcome by sensation and ejaculate on <<his>> face.
					<</if>>
				<</for>>
				<<if _condom is "damaged">>
					The condom is too damaged, and semen bursts through.
				<</if>>
			<<elseif $penisuse is "otherpenis">>
				<<for $_i = 0; $_i lt $enemyno; $_i++>>
					<<if $NPCList[$_i].penis is "penis">>
						<<personselect $_i>>
						<<penileejacstat>>
						You are overcome by sensation and ejaculate over <<his>> penis.
						<<purity -1>><<internalejac>><<creampie "npc" "penis">>
					<<elseif $NPCList[$_i].penis is "penisimminent" or $NPCList[$_i].penis is "penisentrance">>
						<<personselect $_i>>
						You are overcome by sensation and ejaculate over <<his>> cock and stomach.
					<</if>>
				<</for>>
				<<if _condom is "damaged">>
					Despite wearing a condom, it's too damaged to prevent the semen from escaping.
				<</if>>
			<<elseif $penisuse is "tentacle">>
				<<if $penisstate isnot "tentacleentrance" and $penisstate isnot "tentacleimminent">>
					<<penileejacstat>>
					You are overcome by sensation. The $tentaclePenis milks you of your semen.
					<<purity -1>><<internalejac>><<creampie "npc" "tentacle">>
				<<else>>
					You are overcome by sensation and ejaculate on the $tentaclePenis.
				<</if>>
			<<elseif $mouth is "mpenisentrance">>

					You are overcome by sensation. A surge of cum erupts from your penis onto your
					face<<if $rng gte 10 and $semen_amount gt ($semen_volume / 24) * 18>> and hair<<set $player.bodyliquid.hair.semen += 1>><</if>>.

				<<if $semen_amount gt ($semen_volume / 24) * 18>>
					<<set $player.bodyliquid.face.semen += 1>>
				<</if>>
			<<elseif $mouth is "mpenis">>
				<<if $selfsuckDepth gte 2>>
					You are overcome by sensation. A surge of cum pumps up the length of your penis and flows straight down your throat.
				<<else>>
					You are overcome by sensation and ejaculate in your mouth, forcing you to quickly drink it down.
				<</if>>
				<<set $player.bodyliquid.mouth.semen += 1>>
			<<elseif $worn.genitals.type.includes("chastity")>>
				You are overcome by sensation. A surge of cum erupts from your penis into your $worn.genitals.name.
			<<elseif $leftarm is "mpenisentrance" or $rightarm is "mpenisentrance">>
				<<if $leftarm is "mpenisentrance" and $semen_amount gte random(500,1500)>>
					<<set $leftFingersSemen to 1>>
					<<set $_hand to "left hand">>
				<</if>>
				<<if $rightarm is "mpenisentrance" and $semen_amount gte random(500,1500)>>
					<<set $rightFingersSemen to 1>>
					<<set $_hand to ($_hand is undefined ? "right hand" : "hands")>>
				<</if>>
				You are overcome by sensation. A surge of cum erupts from your penis<<if $_hand>>, and some of it gets on your $_hand<</if>>.
			<<else>>
				You are overcome by sensation. A surge of cum erupts from your penis.
			<</if>>
			<<if $semen_amount lte ($semen_volume * (6 / 24))>>
				Exhausted, your body only manages to produce a few droplets of watery cum.
				<<semenvolume -2>>
			<<elseif $semen_amount lte ($semen_volume * (12 / 24))>>
				Tired from overuse, your cum is thin and watery.
				<<semenvolume -1>>
			<<elseif $semen_amount lte ($semen_volume * (18 / 24))>>
				The repeated orgasms are taking their toll, reducing the amount of cum your body manages to produce.
				<<semenvolume -1>>
			<</if>>

		<</if>>
	<<else>>
		You are overcome by sensation and climax.
	<</if>>

	<<if $arousalmasochism/$arousal gte 0.70>>

		 Your body writhes and yearns for more pain.
		<<set $masochism += 5>>
	<</if>>

	<<if $masturbation_bowl is 1>><<set _liquid_collection_text to []>><</if>>
	<<if $player.penisExist>>
		<<semenOrgasm>>/*Makes changes to semen values*/
	<</if>>
	<<if $player.vaginaExist>>
		<<vaginaFluidOrgasm>>
		<<if _lube_released gt 10>>
			Fluids gush from your <<pussy>>.
		<<elseif _lube_released gt 0>>
			Fluids leak from your <<pussy>>.
		<</if>>
	<</if>>

	<<if $parasite.left_ear.name is "slime" and $parasite.right_ear.name is "slime">>
		A soothing warmth fills you.
		You almost forget the strife of the world. You can tell it's the slimes in your ears, rewarding you for having an orgasm.
		<<gcorruption>><<ltrauma>><<lstress>><<trauma -12>><<stress -12>><<set $corruption_slime += 2>>

	<<elseif $parasite.left_ear.name is "slime">>
		A soothing warmth fills you.
		You almost forget the strife of the world. You can tell it's the slime in your left ear, rewarding you for having an orgasm.
		<<gcorruption>><<ltrauma>><<lstress>><<trauma -6>><<stress -6>><<set $corruption_slime += 1>>

	<<elseif $parasite.right_ear.name is "slime">>
		A soothing warmth fills you.
		You almost forget the strife of the world. You can tell it's the slime in your right ear, rewarding you for having an orgasm.
		<<gcorruption>><<ltrauma>><<lstress>><<trauma -6>><<stress -6>><<set $corruption_slime += 1>>

	<</if>>

	<<if $swarmchestgrab gte 1>>
		Your convulsions launch the _swarmcreature away from your chest.
		<<set $swarmchestgrab to 0>>
	<</if>>

	<<if $orgasmcount lte 1>>
		<<set $stress -= 200>>
		<<if $drugged gte 1>>
			<<arousal -4000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -8000>>
		<</if>>
		You shudder from the sudden release.
	<<elseif $orgasmcount lte 2>>
		<<set $stress -= 200>>
		<<if $drugged gte 1>>
			<<arousal -5000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -9000>>
		<</if>>
		You shudder from the sudden release.
	<<elseif $orgasmcount lte 3>>
		<<set $stress -= 200>>
		<<if $drugged gte 1>>
			<<arousal -6000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		You shudder from the sudden release.
	<<elseif $orgasmcount lte 4>>
		<<set $stress -= 200>>
		<<if $drugged gte 1>>
			<<arousal -7000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		You shudder from the sudden release.
	<<elseif $orgasmcount lte 5>>
		<<set $stress -= 200>>
		<<if $drugged gte 1>>
			<<arousal -8000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		You feel spent.
	<<elseif $orgasmcount lte 6>>
		<<set $stress -= 100>>
		<<if $drugged gte 1>>
			<<arousal -7000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		Despite feeling like you've nothing left to give, the orgasm is intense.
	<<elseif $orgasmcount lte 7>>
		<<set $stress -= 100>>
		<<if $drugged gte 1>>
			<<arousal -6000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		Despite feeling like you've nothing left to give, the orgasm is intense.
	<<elseif $orgasmcount lte 8>>
		<<set $stress -= 100>>
		<<if $drugged gte 1>>
			<<arousal -5000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		Despite feeling like you've nothing left to give, the orgasm is intense.
	<<elseif $orgasmcount lte 9>>
		<<if $drugged gte 1>>
			<<arousal -4000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		Your body is tiring from the repeated climaxes.
	<<elseif $orgasmcount lte 10>>
		<<if $drugged gte 1>>
			<<arousal -3000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		Your body is tiring from the repeated climaxes.
	<<elseif $orgasmcount lte 11>>
		<<if $drugged gte 1>>
			<<arousal -2000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		Your body is tiring from the repeated climaxes.
	<<elseif $orgasmcount lte 18>>
		<<if $drugged gte 1>>
			<<arousal -2000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		<<set $stress += 100>>
		The repeated orgasms are causing you great strain. You don't want to cum any more.
	<<elseif $orgasmcount lte 23>>
		<<if $drugged gte 1>>
			<<arousal -2000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		<<set $stress += 100>><<combattrauma 10>>
		Your mind and body buckle under the continued orgasms.
	<<else>>
		<<if $drugged gte 1>>
			<<arousal -2000>><<set $drugged -= 20>>
		<<else>>
			<<arousal -10000>>
		<</if>>
		<<set $stress += 100>><<combattrauma 10>><<set $pain += 5>>
		You've had so many orgasms in such a short span of time that you no longer gain any pleasure from them. They're painful, both physically and psychologically.
	<</if>>

	<<set $rng to random(1, 100)>>
	<<if $player.vaginaExist and $orgasmcount gte 3 and $orgasmcount lte 8>>
		<<if $drugged gt 0 or ($consensual and $orgasmcount / 0.2 + 30 gte $rng)>>
			<<set $drunk += 25>>
			<<switch random(1, 3)>>
				<<case 1>> You feel dizzy.
				<<case 2>> You feel lightheaded.
				<<case 3>> You can't think straight.
			<</switch>>
		<</if>>
	<</if>>

	<<if $neckuse is "hand" and $oxygen lt $oxygenmax>>
		<<set $chokeorgasm += 1>>
		<<if $chokeorgasm gte 35 and $choketrait isnot 1>>
			<<set $choketrait = 1>>

You feel that your orgasms are more intense when you can't breathe and you like it.
		<</if>>
	<</if>>

	<<if $orgasmtrait gte 1>>
		<<set $stress -= 100>>
	<</if>>

	<<set $orgasmcurrent += 1>>
	<<wetnessCalculate>>

	<<if $masturbation_bowl is 1>>
		<<if $masturbation_milk gt 0>>
			<<set _liquid_collection_text.push($masturbation_milk.toFixed(1) + " mL of milk")>>
		<</if>>
		<<if _liquid_collection_text.length gte 3>>
			You've gathered _liquid_collection_text[0], _liquid_collection_text[1], and _liquid_collection_text[2].
		<<elseif _liquid_collection_text.length is 0>>
			You've failed to gather anything.
		<<else>>
			You've gathered <<print _liquid_collection_text.join(" and ")>>.
		<</if>>

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

<<widget "orgasmstreet">>
	<<orgasm>>
	<<if $exposed gte 1>>
		<<if $daystate isnot "night">>
			You steady yourself as your spasms subside, feeling exposed and hoping the noise hasn't given away your hiding place.
		<<else>>
			You steady yourself as your spasms subside, feeling exposed and hoping the noise hasn't attracted attention.
		<</if>>
	<<else>>
		<<if $daystate isnot "night">>
			The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions. Face red, you flee the scene.
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
		<<else>>
			You steady yourself as your spasms subside, and hope the noise hasn't attracted attention.
		<</if>>
	<</if>>

<</widget>>

<<widget "orgasmforest">>
	<<orgasm>>
	<<if $exposed gte 1>>
		<<if $daystate isnot "night">>
			You steady yourself against a tree as your spasms subside.
		<<else>>
			You steady yourself against a tree as your spasms subside.
		<</if>>
	<<else>>
		<<if $daystate isnot "night">>
			You steady yourself against a tree as your spasms subside.
		<<else>>
			You steady yourself against a tree as your spasms subside.
		<</if>>
	<</if>>

<</widget>>

<<widget "orgasmbeach">>
	<<orgasm>>
	<<if $exposed gte 1>>
		<<if $daystate isnot "night">>
			You steady yourself as your spasms subside, feeling exposed and hoping the noise hasn't given away your hiding place.
		<<else>>
			You steady yourself as your spasms subside, feeling exposed on the open beach.
		<</if>>
	<<else>>
		<<if $daystate isnot "night">>
			The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all across the beach. Face red, you flee the scene.
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
		<<else>>
			You steady yourself as your spasms subside, feeling exposed on the open beach.
		<</if>>
	<</if>>

<</widget>>

<<widget "orgasmLocation">>
	<<orgasm>>
	<<switch $args[0]>>
		<<case "schoolHallway">>
			<<if ["early","late","earlynoschool","latenoschool","daynoschool"].includes($schoolstate)>>
				You steady yourself as your spasms subside. You feel fortunate that the hallway is empty right now, and hope the noise hasn't attracted attention.
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions by your fellow students. A few whispers start to run down the hallway. Face red, you turn around a corner, out of sight.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "emptyClassroom">>
			You steady yourself as your spasms subside. You feel fortunate that the classroom is empty right now, and hope the noise hasn't attracted attention.
		<<case "classroom">>
			<<if $schoolstate is "second" and $whitneymaths isnot "absent">>
				Having taken notice of your orgasm, Whitney smiles at you.
				<<npcincr Whitney lust 1>><<glust>>

			<<elseif $schoolstate is "third" and $kylarenglishstate isnot "absent">>
				Kylar watches you, transfixed by your orgasm.
				<<npcincr Kylar lust 1>><<glust>>

			<<elseif $schoolstate is "fourth" and $robinhistory is "seat">>
				Robin politely tries to look away, but still can't avoid a peek.
				<<npcincr Robin lust 1>><<glust>>

			<</if>>
			You manage to keep yourself from moaning, but your spasms announce your climax to the students around you. A few whispers start to run through the classroom, but are quickly shut down by <<print _teacher>>. <<nnpc_He _teacher>> doesn't seem to know the reason, but understands that you are the talk of the class.
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>><<detention 1>><<gdelinquency>>
		<<case "swimClassroom">>
			You manage to keep quiet, so as to not draw Mason's attention. However, your spasms announce your climax to the students around you. A few whispers start to run through the pool. <<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
		<<case "emptySwimClassroom">>
			You steady yourself as your spasms subside. You feel fortunate that the pool is empty right now, and hope the noise hasn't attracted attention.
		<<case "canteen">>
			<<if ["early","late","earlynoschool","latenoschool","daynoschool"].includes($schoolstate)>>
				You steady yourself as your spasms subside. You feel fortunate that the canteen is empty right now, and hope the noise hasn't attracted attention.
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions by your fellow students. A few whispers start to run through the canteen. Face red, you attempt to conceal yourself.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "library">>
			<<if ["early","late","earlynoschool","latenoschool","daynoschool"].includes($schoolstate)>>
				You steady yourself as your spasms subside. You feel fortunate that the library is empty right now, and hope the noise hasn't attracted attention.
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<elseif _sydney_location is "library">>
				The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions by your fellow students. A few whispers start to run through the library.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>

				Sydney clears <<nnpc_his "Sydney">> throat. The other students get the message and the whispers stop.
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions by your fellow students. A few whispers start to run through the Library. Face red, you attempt to conceal yourself.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "boyChangingRoom">>
			<<if $changingroomstate is "empty">>
				You steady yourself as your spasms subside. You feel fortunate that the room is empty right now, and hope the noise hasn't attracted attention.
			<<elseif $player.gender_appearance is "f">>
				The sight and sound of a <<girl>> convulsing in climax incites the <<girls>>. Their reactions vary. Some cheer you on. Some try to look away. And some shout all kinds of insults at you.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions by your fellow students. A few whispers start to run through the room. Face red, you turn away to hide your face.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "girlChangingRoom">>
			<<if $changingroomstate is "empty">>
				You steady yourself as your spasms subside. You feel fortunate that the room is empty right now, and hope the noise hasn't attracted attention.
			<<elseif $player.gender_appearance is "m">>
				The sight and sound of a <<girl>> convulsing in climax incites the <<girls>>. Their reactions vary. Some cheer you on. Some try to look away. And some shout all kinds of insults at you.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention, and as you regain control you find yourself stared at from all directions by your fellow students. A few whispers start to run through the room. Face red, you turn away to hide your face.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "policeStation">>
			<<if $daystate is "night">>
				<<set $_quiet to "police station">>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of those in the police station. Their reactions are mixed. Some citizens filing a complaint avoid looking. Some more sketchy individuals loudly cheer you on. As you regain control of yourself, you see two officers coming in your direction. Face red, you decide it's best to flee the scene.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "danceStudio">>
			<<if $openinghours is 0 and $hour isnot $closinghour>>
				<<set $_quiet to "studio">>
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of those in the studio. Their reactions are mixed. Some avoid looking. Some stare at you with displeasure. But some also cheer you on. As you regain control of yourself, you notice how rowdy the studio has become. Face red, you try to make yourself look as small and unassumng as possible.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "danceStudioLesson">>
			The sight and sound of a <<girl>> convulsing in climax draws the attention of those in the studio. Their reactions are mostly muted, only the odd glances as they focus on their dancing. As you regain control of yourself, you notice Charlie blushing.
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>><<npcincr Charlie love 1>>
		<<case "danceStudioHeelLesson">>
			The sight and sound of a <<girl>> convulsing in climax draws the attention of those in the studio. Their reactions are mostly muted, only the odd glances as they focus on Charlie. As you regain control of yourself, you notice Charlie blushing.
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>><<npcincr Charlie love 1>>
		<<case "cafe">>
			<<if $openinghours is 0>>
				<<set $_quiet to "cafe">>
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of the patrons. Their reactions are mixed. Some avoid looking. Some stare at you with displeasure. But some also cheer you on. As you regain control of yourself, you notice how rowdy the cafe has become. Face red, you try to make yourself look as small and unassumng as possible.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "arcade">>
			<<if $daystate is "night" or $daystate is "dawn">>
				<<set $_quiet to "arcade">>
			<<else>>
				You steady yourself as your spasms subside. Fortunately, the loud ambient noise has stifled your moans, and the dim lights made your spasms almost imperceptible. Still, as you look around, you notice a <<generatey1>><<person1>><<person>> staring at you, with a look of surprise and disbelief. <<His>> attention, however, quickly goes back to the game <<he>> was playing.
				<<endevent>>
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "docks">>
			<<if $daystate is "night">>
				<<set $_quiet to "docks">>
			<<else>>
				You steady yourself as your spasms subside. You look around, and it doesn't look like anyone noticed your orgasm. That is, until you take note of a <<generate1>><<person1>><<person>> looking at you from afar. <<He>> gives you a grin, and then goes back to work.
				<<endevent>>
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "stripClub">>
			<<if $daystate isnot "night" and $daystate isnot "dusk" and $hour isnot 6>>
				<<set $_quiet to "club">>
			<<else>>
				You steady yourself as your spasms subside. Fortunately, the loud ambient noise has stifled your moans, and the dim lights made your spasms almost imperceptible. Still, as you look around, you notice a patron staring at you. <<generate1>><<person1>><<He>> grins and give you a wink, before getting up and leaving.
				<<endevent>>
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "shoppingCentre">>
			<<if $daystate is "night">>
				<<set $_quiet to "shopping centre">>
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of the other shoppers. Their reactions are mixed. Some avoid looking. Some stare at you with displeasure. But some also cheer you on. As you regain control of yourself, you notice how rowdy the place has become. Face red, you flee around a corner.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "museum">>
			<<if $daystate is "night">>
				<<set $_quiet to "museum">>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of the other visitors. As you regain control, you feel yourself stared from all directions. Face red, you flee the scene.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "brothel">>
			The sight and sound of a <<girl>> convulsing in climax draws attention. Those in the brothel cheer you on, while shouting all kinds of profanities. As you regain control of yourself, you notice how rowdy the place has become. Face red, you disappear into a crowded area.
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
		<<case "pub">>
			The sight and sound of a <<girl>> convulsing in climax draws attention. Those in the pub cheer you on, while shouting all kinds of profanities. As you regain control of yourself, you notice how rowdy the place has become. Face red, you disappear into a crowded area
			<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
		<<case "spa">>
			<<if $openinghours is 0 and $hour isnot $closinghour>>
				<<set $_quiet to "spa">>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of the patrons. Their reactions are mixed. Some avoid looking. Some stare at you with displeasure. But some also cheer you on. As you regain control of yourself, you notice how rowdy the spa has become. Face red, you duck behind a tanning bed.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "temple">>
			<<if $daystate is "night">>
				<<set $_quiet to "temple walls">>
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention. The prevalent silence only makes your moans more obvious. Most look at you with disdain, but some shower you with a lustful gaze. As you regain control, you notice yourself stared at from all directions. Face red, you duck behind a pew.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "hospital">>
			<<if $daystate is "night">>
				<<set $_quiet to "hospital">>
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws attention. The reaction of those in the hospital is mixed. Some avoid looking. Some stare at you with displeasure. But some also cheer you on. As you regain control of yourself, you notice how rowdy the place has become. Face red, you try to feign it as a medical condition.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "countryside">>
			<<switch random(1,10)>>
				<<case 1 2 3>>
					You steady yourself as your spasms subside. A car passes by your side. You wonder if the people inside noticed your climax.
					<<gtrauma>><<gstress>><<trauma 6>><<stress 6>>
				<<case 4>>
					You steady yourself as your spasms subside. A truck passes by your side. You wonder if the driver noticed your climax.
					<<gtrauma>><<gstress>><<trauma 6>><<stress 6>>
				<<case 5>>
					You steady yourself as your spasms subside. A tractor passes by your side. You wonder if the farmer noticed your climax.
					<<gtrauma>><<gstress>><<trauma 6>><<stress 6>>
				<<default>>
					<<set $_quiet to "countryside">>
			<</switch>>
		<<case "alexFarmWork">>
			<<if $daystate is "night">>
				You steady yourself as your spasms subside, and hope the noise hasn't disturbed the animals.
			<<elseif ($exposed gte 2 and $uncomfortable.nude is true) or ($exposed is 1 and $uncomfortable.underwear is true)>>
				<<set $_hidden to true>>
			<<elseif ["shower","tending","admin","clearing"].includes($farm_work.alex)>>
				The sight and sound of a <<girl>> convulsing in climax agitate the animals around you. Fortunately, Alex is not around to see you in such a state. You steady yourself and go back to work.
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax agitate the animals around you. Alex takes notice of the small commotion, looking at you as your orgasm starts to subside. Face deep red, you both avoid eye contact, and try to act like nothing happened.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<npcincr Alex lust 1>><<glust>>
			<</if>>
		<<case "alexFarmTending">>
				Noticing your spasms, Alex comes to check on you. Once <<nnpc_he "Alex">> understands what's happening, however, <<nnpc_he "Alex">> stops <<nnpc_himself "Alex">>, watching as your orgasm subsides. Face deep red, you both avoid eye contact, and try to act like nothing happened.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<npcincr Alex lust 1>><<glust>>
		<<case "alexFarmTendingAlone">>
				You steady yourself as your spasms subside, and feel grateful that Alex isn't around right now to see you in such a state.
		<<case "sewers">>
			Your loud moans echo through the tunnels.
			<<if $args[1]>>
				As your spasms subside, you hope the noise hasn't attracted further attention.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>>
				<<set $sewerschasedstep -= 1>>
			<<else>>
				As your spasms subside, you hope the noise hasn't attracted attention.
			<</if>>
		<<case "lake">>
			<<if $args[1]>>
				You steady yourself against a tree as your spasms subside. Fortunately, there's no one around right now to see you in such a state.
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				You steady yourself as your spasms subside. Fortunately, the loud ambient noise has stifled your moans, and the foliage provides cover for your spasms. Still, as you look around, you notice a <<generatey1>><<person1>><<person>> staring at you. <<He>> grins, before going back to <<his>> friends.
				<<endevent>>
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "campsite">>
			<<if $weather is "rain" or $weather is "snow" or $hour lt 18 or $lakecouple is 1>>
				You steady yourself against a tree as your spasms subside. Fortunately, there's no one around right now to see you in such a state.
			<<elseif $exposed gte 1>>
				<<set $_hidden to true>>
			<<else>>
				The sight and sound of a <<girl>> convulsing in climax draws the attention of the campers. They look surprised for a moment, but soon smile at your lewd display. As you regain control of yourself, you notice their lustful gaze. Face red, you flee the scene.
				<<gtrauma>><<gstress>><<trauma 6>><<stress 6>><<fameexhibitionism 10>>
			<</if>>
		<<case "moor">>
			You almost fall down to the short grass, but manage to steady yourself as your orgasm subsides.
	<</switch>>
	<<if $_hidden>>
		You steady yourself as your spasms subside, feeling exposed and hoping the noise hasn't given away your hiding place.
	<</if>>
	<<if $_quiet>>
		Your loud moans echo through the empty <<print $_quiet>>. As your spasms subside, you hope the noise hasn't attracted attention.
	<</if>>

<</widget>>

<<widget "breastfeed">>
	<<set $_milk_released to random(10, 50)>>
	<<if $cow gte 6>>
		<<set $_milk_released *= 2>>
	<</if>>
	<<set $_milk_released /= 10>>
	<<set $_milk_released to parseFloat($_milk_released.toFixed(1))>>

	/* if the player doesn't have enough milk, set $_milk_released to whatever they have left */
	<<if $milk_amount lt $_milk_released>>
		<<set $_milk_released to $milk_amount>>
	<</if>>
	<<set $milk_produced_stat += Math.trunc($_milk_released)>>

	<<milkvolume 1>>

	<<if $masturbation_bowl is 1 and $worn.upper.exposed gte 2 and $worn.under_upper.exposed gte 1>>
		<<set $masturbation_milk += $_milk_released>>

		<<set _milk_this_turn to (_milk_this_turn is undefined ? $_milk_released : _milk_this_turn + $_milk_released)>>

		<<if $args[0] and $args[0] is _handsOnBreasts>>
			You gather <<print (_milk_this_turn).toFixed(1)>> mL of your breast milk.
		<</if>>
	<</if>>

	<<set $milk_amount -= $_milk_released>>
<</widget>>

<<widget "orgasmHourlyRecovery">>
	<<if $purity gte 990>>
		<<set $orgasmcount -= 1>>
	<<else>>
		<<set _orgmod to Math.floor((1100-$purity)/100)>>
		<<set _orgmod to Math.clamp(_orgmod, 2, 11)>>
		<<set $orgasmcount -= _orgmod>>
	<</if>>
	<<if $cow gte 6>>
		<<semenvolume 1>>
		<<milkvolume 1>>
	<</if>>
	<<if $player.penisExist>>
		<<if $arousal gte $arousalmax * (4/5)>>
			<<set $_semen_gain to Math.floor($semen_volume * (3/24))>>
		<<elseif $arousal gte $arousalmax * (3/5)>>
			<<set $_semen_gain to Math.floor($semen_volume * (2/24))>>
		<<else>>
			<<set $_semen_gain to Math.floor($semen_volume * (1/24))>>
		<</if>>
		<<if $cow gte 6>>
			<<set $_semen_gain *= 2>>
		<</if>>
		<<if $drugged gte 1>>
			<<set $_semen_gain += Math.floor($semen_volume * (1/24))>>
		<</if>>
		<<set $semen_amount += $_semen_gain>>

		<<if $semen_amount gt $semen_volume>>
			<<if $arousal gte $arousalmax * (4/5)>>
				<<semenvolume 2>>
			<<elseif $arousal gte $arousalmax * (3/5)>>
				<<semenvolume 1>>
			<</if>>
			<<if $drugged gte 1>>
				<<semenvolume 1>>
			<</if>>
			<<set $semen_amount to $semen_volume>>
		<</if>>
	<</if>>
	<<set $milk_amount += Math.floor(($milk_volume / 24))>>
<</widget>>

<<widget "semenOrgasm">>
	<<set $_semen_released to 30>>
	<<set $_semen_released += ($semen_volume / 30)>>
	<<if $femaleclimax is 1>>
		<<set $_semen_released /= 30>>
	<</if>>
	<<if $orgasmtrait gte 1>>
		<<set $_semen_released *= 2.5>>
	<</if>>
	<<if $cow gte 6>>
		<<set $_semen_released *= 2>>
	<</if>>

	/* if the player doesn't have enough semen, set $_semen_released to whatever they have left */
	<<if $semen_amount lt $_semen_released>>
		<<set $_semen_released to $semen_amount>>
	<</if>>

	<<set $_semen_released to parseFloat($_semen_released.toFixed(1))>>

	<<if $masturbation_bowl is 1 and $semen_amount gte 1 and $worn.under_lower.vagina_exposed is 1 and $worn.lower.vagina_exposed is 1 and $mouth isnot "mpenis">>
		<<set $masturbation_semen += $_semen_released>>
		<<set _liquid_collection_text.push($masturbation_semen.toFixed(1) + " mL of <<semen>>")>>
	<</if>>

	<<if $femaleclimax isnot 1>>
		<<semenvolume 1>>
	<</if>>

	<<set $semen_produced_stat += $_semen_released>>
	<<set $semen_amount -= $_semen_released>>
<</widget>>

<<widget "wetnessCalculate">>
	<<if $player.vaginaExist>>
		<<vaginaWetnessCalculate>>
	<</if>>
	<<if $player.penisExist>>
		<<set $penisWetness to setup.bodyliquid.combined("penis") * 12>>
		<<set $penisWetness to Math.clamp($penisWetness, 0, 120)>>
	<</if>>
	<<set $anusWetness to (setup.bodyliquid.combined("anus") + setup.bodyliquid.combined("bottom")) * 6>>
	<<set $anusWetness to Math.clamp($anusWetness, 0, 120)>>
	<<if $combat is 1>>
		<<penetrationPainCalculate>>
	<</if>>
<</widget>>

<<widget "vaginaWetnessCalculate">>
<<set _totalArousal = 0>>
<<set _length to $trackedArousal.length>>
<<for _ia to 0; _ia lt _length; _ia++>>
	<<set _totalArousal += $trackedArousal[_ia] / ((_length - _ia) * 1.5)>>
<</for>>
<<if $combat is 1>>

	<<if $enemytype is "man">>
		<<set $combatWetBoost to Math.floor($promiscuity /20)>>
	<<elseif $enemytype is "tentacles" or $enemytype is "beast">>
		<<set $combatWetBoost to Math.floor($deviancy /20)>>
	<<else>>
		<<set $combatWetBoost to 0>>
	<</if>>

	/* <<set $_combatArousalWetness to 75 - Math.floor(Math.pow(0.99985,_totalArousal) * 75)>>
	<<set $combatWetBoost += $_combatArousalWetness>> */
<<else>>
	<<set $combatWetBoost to 0>>
<</if>>

<<set $vaginaWetness to $vaginaArousalWetness + $combatWetBoost + (setup.bodyliquid.combined("vagina") + setup.bodyliquid.combined("vaginaoutside")) * 6>>
<<set $vaginaWetness to Math.clamp($vaginaWetness, 0, 120)>>
<</widget>>

<<widget "penetrationPainCalculate">>
<<set $vaginalPain to 0>>
<<set $analPain to 0>>
<<set $penisPain to 0>>
<<if $demon lt 6 and $gamemode isnot "soft">>
	<<if $player.vaginaExist>>
		<<if $consensual is 1>>
			<<set $vaginalPain to Math.floor(3 * Math.pow(0.4,$vaginaWetness/8))>>
		<<else>>
			<<set $vaginalPain to Math.floor(6 * Math.pow(0.5,$vaginaWetness/25))>>
		<</if>>
	<</if>>
	<<if $player.penisExist>>
		<<if $consensual is 1>>
			<<set $penisPain to Math.floor(3 * Math.pow(0.4,$penisWetness/8))>>
		<<else>>
			<<set $penisPain to Math.floor(6 * Math.pow(0.5,$penisWetness/25))>>
		<</if>>
	<</if>>
	<<if $consensual is 1>>
		<<set $analPain to Math.floor(3 * Math.pow(0.4,$anusWetness/8))>>
	<<else>>
		<<set $analPain to Math.floor(6 * Math.pow(0.5,$anusWetness/25))>>
	<</if>>
	<<if $gamemode is "hard">>
		<<set $vaginalPain *= 2>>
		<<set $penisPain *= 2>>
		<<set $analPain *= 2>>
	<</if>>
<</if>>
<</widget>>

<<widget "vaginaFluidPassive">>
	<<set $_lube_max to Math.round(30*Math.log10($vaginaArousalWetness - 59))>>
	<<set _lube_released to random(0, $_lube_max)/20>>

	<<set _lube_released to parseFloat(_lube_released.toFixed(1))>>

	<<if $masturbation_bowl is 1>>
		<<set $masturbation_vaginaFluid += _lube_released>>
	<</if>>
	<<set $lube_produced_stat += _lube_released>>
<</widget>>

<<widget "vaginaFluidActive">>
	<<set $_lube_max to Math.ceil(30*Math.log10($vaginaArousalWetness - 59))>>
	<<set _lube_released to random(10, $_lube_max)/10>>

	<<set _lube_released to parseFloat(_lube_released.toFixed(1))>>

	<<if $masturbation_bowl is 1>>
		<<set $masturbation_vaginaFluid += _lube_released>>
	<</if>>
	<<set $lube_produced_stat += _lube_released>>
<</widget>>

<<widget "vaginaFluidOrgasm">>
	<<addVaginalWetness 10>>
	<<if $vaginaArousalWetness gte 60>>
		<<set _lube_released to (2*Math.log10($vaginaArousalWetness - 59)) + 11>>
	<<elseif $vaginaArousalWetness gte 30>>
		<<set _lube_released to ($vaginaArousalWetness / 10) + 5>>
	<<else>>
		<<set _lube_released to 0>>
	<</if>>

	<<set _lube_released to parseFloat(_lube_released.toFixed(1))>>

	<<if $masturbation_bowl is 1 and $worn.under_lower.vagina_exposed is 1 and $worn.lower.vagina_exposed is 1>>
		<<set $masturbation_vaginaFluid += _lube_released>>
		<<set _liquid_collection_text.push($masturbation_vaginaFluid.toFixed(1) + " mL of vaginal fluid")>>
	<<elseif $worn.under_lower.vagina_exposed is 0>>
		<<set $underlowerwet += Math.round(30 * Math.clamp((1 - $underlowerwet/100), 0, 1))>>
	<</if>>
	<<set $lube_produced_stat += _lube_released>>
<</widget>>