code:
:: Widgets Vore Actions Generation [widget]
<<widget "generateActionsVore">>
<<set $combat to 1>>
<<if _targetlist is undefined>>
	<<getTargetList>>
<</if>>

		<<leftActionInitVore>>

		<<rightActionInitVore>>

	<<if ($mouthuse is 0 and !($dissociation lte 1 and $orgasmdown lte 0 and ($pain lt 100 or $willpowerpain is undefined)))>>

			<<mouthActionInit>>

	<</if>>

<</widget>>

<<widget "leftActionInitVore">>
<<set $lefttarget to "vore">>
<<switch $leftarm>>
<<case 0>>
	<<set $lefttarget to "vore">>
	<<if $orgasmdown gte 1>>
		<<set _leftOptions to "orgasm">>
		Your left arm is free, but you can't stop the spasms.
	<<elseif $pain gte 100 and $willpowerpain is 0>>
		<<set _leftOptions to "pain">>
		Your left arm is free, but hurts to move.
	<<elseif $dissociation gte 2>>
		<<set _leftOptions to "unreal">>
		Your left arm is free, but doesn't feel real.
	<<else>>
		<<if _targetYourself is true and _targetnumber gt 1>>
			<<set _targetlistarms["Yourself"] to "self">>
		<</if>>
		<<if $combatControls isnot "radio" and _targetnumber gt 1>>
			Target:
			<<listbox "$lefttarget" autoselect>>
				<<optionsfrom _targetlistarms>>
			<</listbox>>

		<</if>>
		<<set _leftOptions to "free">>
		Your left arm is free.
		<<if $combatControls is "radio" and _targetnumber gt 1>>

			Target:
			<<listbox "$lefttarget" autoselect>>
				<<optionsfrom _targetlistarms>>
			<</listbox>>

		<</if>>
	<</if>>
<<case "bound">>
	<<set _leftOptions to "bound">>
	<<if $orgasmdown gte 1>>
		Your left arm jerks against its bonds.
	<<elseif $pain gte 100 and $willpowerpain is 0>>
		Your left arm is held in a painful bind.
	<<elseif $dissociation gte 2>>
		Your left arm lies limp in its bonds.
	<<else>>
		Your left arm is bound.
	<</if>><<if $combatControls is "radio">>
<</if>>
<<case "trapped">>
	<<set _leftOptions to "trapped">>
	Your left arm is trapped by the $vorecreature.<<if $combatControls is "radio">>
<</if>>
<<case "grappled" "penis" "othervagina" "vagina" "coverpenis" "anus" "behind">>
	<<set $_changetype to true>><<leftActionInit>>
<<case "struggle">>
	<<set $_changetype to true>><<leftActionInitStruggle>>
<<case "swarmgrappled">>
	<<set $_changetype to true>><<leftActionInitSwarm>>
<<case "mechgrappled">>
	<<set $_changetype to true>><<leftActionInitMachine>>
<<default>>
	<<set $_changetype to true>><<leftActionInitTentacle>>
<</switch>>
<<if $_changetype isnot true>>
	<<leftActionsVore>>
	<<if Object.keys(_leftaction).length gt 0>>
		<<if !(Object.values(_leftaction).includes($leftactiondefault))>>
			<<set $leftactiondefault to "rest">>
		<</if>>
		<<set $leftaction to $leftactiondefault>>
		<<set _textColor to combatListColor('leftaction', (Object.values(_leftaction).includes($leftaction) ? $leftaction : Object.values(_leftaction)[0]), "Vore")>>

			<<generateCombatActionOthers _leftaction "leftaction" _textColor $leftaction "Vore">>

		<<if $combatControls.includes("ists")>>

				<<leftactionDifficulty>>

		<</if>>
	<</if>>
	<<set $lastOptions.left to clone(_leftOptions)>>
<</if>>
<</widget>>

<<widget "leftactionDifficultyVore">>/* Blank widget to pacify the JavaScript Gods. */
<</widget>>

<<widget "leftActionsVore">>
<<set _leftaction to {}>>
<<if !(["orgasm", "pain", "unreal"].includes(_leftOptions))>>
	<<set _leftaction["Rest"] to "rest">>
<</if>>
<<switch _leftOptions>>
<<case "free">>
	<<set _leftaction["Escape the "+$vorecreature] to "leftescape">>
	<<if $vorestage lte 6>>
		<<set _leftaction["Hold on to the "+$vorecreature] to "lefthold">>
	<</if>>
	<<if $rightarm is "trapped">>
		<<set _leftaction["Free your right arm"] to "leftvorefree">>
	<</if>>
<<case "bound" "trapped">>
<<case "orgasm">>
	<<set _leftaction["Fold"] to "leftfold">>
	<<set _leftaction["Grip"] to "leftgrip">>
<<case "pain">>
	<<set _leftaction["Struggle"] to "leftstruggleweak">>
	<<set _leftaction["Protect"] to "leftprotect">>
<<case "unreal">>
	<<set _leftaction["Poke yourself"] to "leftpoke">>
	<<set _leftaction["Keep your arms out of the way"] to "leftcurl">>
<</switch>>
<</widget>>

<<widget "rightActionInitVore">>
<<set $righttarget to "vore">>
<<switch $rightarm>>
<<case 0>>
	<<if $orgasmdown gte 1>>
		<<set _rightOptions to "orgasm">>
		Your right arm is free, but you can't stop the spasms.
	<<elseif $pain gte 100 and $willpowerpain is 0>>
		<<set _rightOptions to "pain">>
		Your right arm is free, but hurts to move.
	<<elseif $dissociation gte 2>>
		<<set _rightOptions to "unreal">>
		Your right arm is free, but doesn't feel real.
	<<else>>
		<<if _targetYourself is true and _targetnumber gt 1>>
			<<set _targetlistarms["Yourself"] to "self">>
		<</if>>
		<<if $combatControls isnot "radio" and _targetnumber gt 1>>
			Target:
			<<listbox "$righttarget" autoselect>>
				<<optionsfrom _targetlistarms>>
			<</listbox>>

		<</if>>
		<<set _rightOptions to "free">>
		Your right arm is free.
		<<if $combatControls is "radio" and _targetnumber gt 1>>

			Target:
			<<listbox "$righttarget" autoselect>>
				<<optionsfrom _targetlistarms>>
			<</listbox>>

		<</if>>
	<</if>>
<<case "bound">>
	<<set _rightOptions to "bound">>
	<<if $orgasmdown gte 1>>
		Your right arm jerks against its bonds.
	<<elseif $pain gte 100 and $willpowerpain is 0>>
		Your right arm is held in a painful bind.
	<<elseif $dissociation gte 2>>
		Your right arm lies limp in its bonds.
	<<else>>
		Your right arm is bound.
	<</if>>
<<case "trapped">>
	<<set _rightOptions to "trapped">>
	Your right arm is trapped by the $vorecreature.

<<case "grappled" "penis" "othervagina" "vagina" "coverpenis" "anus" "behind">>
	<<set $_changetype to true>><<rightActionInit>>
<<case "struggle">>
	<<set $_changetype to true>><<rightActionInitStruggle>>
<<case "swarmgrappled">>
	<<set $_changetype to true>><<rightActionInitSwarm>>
<<case "mechgrappled">>
	<<set $_changetype to true>><<rightActionInitMachine>>
<<default>>
	<<set $_changetype to true>><<rightActionInitTentacle>>
<</switch>>
<<if $_changetype isnot true>>
	<<rightActionsVore>>
	<<if Object.keys(_rightaction).length gt 0>>
		<<if !(Object.values(_rightaction).includes($rightactiondefault))>>
			<<set $rightactiondefault to "rest">>
		<</if>>
		<<set $rightaction to $rightactiondefault>>
		<<set _textColor to combatListColor('rightaction', (Object.values(_rightaction).includes($rightaction) ? $rightaction : Object.values(_rightaction)[0]), "Vore")>>

			<<generateCombatActionOthers _rightaction "rightaction" _textColor $rightaction "Vore">>

		<<if $combatControls.includes("ists")>>

				<<rightactionDifficulty>>

		<</if>>
	<</if>>
	<<set $lastOptions.right to clone(_rightOptions)>>
<</if>>
<</widget>>

<<widget "rightactionDifficultyVore">>/* But seriously, not having this blank widget will cause red blocks of error in the "lists" actions types */
<</widget>>

<<widget "rightActionsVore">>
<<set _rightaction to {}>>
<<if !(["orgasm", "pain", "unreal"].includes(_rightOptions))>>
	<<set _rightaction["Rest"] to "rest">>
<</if>>
<<switch _rightOptions>>
<<case "free">>
	<<set _rightaction["Escape the "+$vorecreature] to "rightescape">>
	<<if $vorestage lte 6>>
		<<set _rightaction["Hold on to the "+$vorecreature] to "righthold">>
	<</if>>
	<<if $rightarm is "trapped">>
		<<set _rightaction["Free your right arm"] to "rightvorefree">>
	<</if>>
<<case "bound" "trapped">>
<<case "orgasm">>
	<<set _rightaction["Fold"] to "rightfold">>
	<<set _rightaction["Grip"] to "rightgrip">>
<<case "pain">>
	<<set _rightaction["Struggle"] to "rightstruggleweak">>
	<<set _rightaction["Protect"] to "rightprotect">>
<<case "unreal">>
	<<set _rightaction["Poke yourself"] to "rightpoke">>
	<<set _rightaction["Keep your arms out of the way"] to "rightcurl">>
<</switch>>
<</widget>>

:: Widgets Vore [widget]
<<widget "vore">>
<<set $rng to random(1, 100)>>
<<if $vorestage is 1>>
	Your thighs are gripped by the $vorecreature's mouth, your shins and feet at the mercy of its probing tongue.
	<<neutral 5>>
<<elseif $vorestage is 2>>
	Your waist is gripped by the $vorecreature's mouth, your delicate parts at the mercy of its probing tongue.
	<<neutral 5>>
<<elseif $vorestage is 3>>
	Your chest is gripped by the $vorecreature's mouth, your body at the mercy of its probing tongue.
	<<neutral 10>>
<<elseif $vorestage is 4>>
	Your shoulders are gripped by the $vorecreature's mouth, your body at the mercy of its probing tongue.
	<<neutral 10>>
<<elseif $vorestage is 5>>
	Your entire body is in the $vorecreature's mouth.
	<<neutral 15>>
<<elseif $vorestage is 6>>
	You are in the $vorecreature's gullet, pushed along by movements in the walls.
	<<neutral 15>>
<<elseif $vorestage is 7>>
	You are in the $vorecreature's stomach, it's a struggle to keep your head above the slimy liquid.
	<<neutral 20>>
<</if>>
<<if $vorestage is 1>>
	<<if ($vorestruggle * $physique) gte $vorestrength>>
		<<if $vorestruggle is 2>>
			You push down on the $vorecreature's maw with both your arms, preventing it from swallowing you further.
		<<elseif $vorestruggle is 1>>
			You push down on the $vorecreature's maw with one arm, preventing it from swallowing you further.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, but it doesn't take advantage of your vulnerability.
		<</if>>
	<<else>>
		<<set $vorestage += 1>>
		<<if $vorestruggle is 2>>
			You push down on the $vorecreature's maw with both your arms, but it isn't enough. You slide deeper into its mouth, until it swallows you up to the waist.
		<<elseif $vorestruggle is 1>>
			You push down on the $vorecreature's maw with one arm, but it isn't enough. You slide deeper into its mouth, until it swallows you up to the waist.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, and it takes advantage of your vulnerability. You slide deeper into its mouth, until it swallows you up to the waist.
		<</if>>
	<</if>>
<<elseif $vorestage is 2>>
	<<if $worn.over_lower.integrity gt 0>>
		<<set $worn.over_lower.integrity -= 1>>
	<<elseif $worn.lower.integrity lte 0>>
		<<set $worn.lower.integrity -= 1>>
	<<elseif $worn.under_lower.integrity lte 0>>
		<<set $worn.under_lower.integrity -= 1>>
	<</if>>
	<<if ($vorestruggle * $physique) gte $vorestrength>>
		<<if $vorestruggle is 2>>
			You push down on the $vorecreature's maw with both your arms, preventing it from swallowing you further.
		<<elseif $vorestruggle is 1>>
			You push down on the $vorecreature's maw with one arm, preventing it from swallowing you further.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, but it doesn't take advantage of your vulnerability.
		<</if>>
	<<else>>
		<<set $vorestage += 1>>
		<<if $vorestruggle is 2>>
			You push down on the $vorecreature's maw with both your arms, but it isn't enough. You slide deeper into its mouth, until it swallows you up to your chest.
		<<elseif $vorestruggle is 1>>
			You push down on the $vorecreature's maw with one arm, but it isn't enough. You slide deeper into its mouth, until it swallows you up to your chest.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, and it takes advantage of your vulnerability. You slide deeper into its mouth, until it swallows you up to your chest.
		<</if>>
	<</if>>
<<elseif $vorestage is 3>>
	<<if $worn.over_lower.integrity gt 0>>
		<<set $worn.over_lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.under_lower.integrity -= 1>>
	<</if>>
	<<if $worn.over_upper.integrity gt 0>>
		<<set $worn.over_upper.integrity -= 1>>
	<<elseif $worn.upper.integrity gt 0>>
		<<set $worn.upper.integrity -= 1>>
	<<elseif $worn.under_upper.integrity gt 0>>
		<<set $worn.under_upper.integrity -= 1>>
	<</if>>
	<<set $worn.upper.integrity -= 1>>
	<<if ($vorestruggle * $physique) gte $vorestrength>>
		<<if $vorestruggle is 2>>
			You push down on the $vorecreature's maw with both your arms, preventing it from swallowing you further.
		<<elseif $vorestruggle is 1>>
			You push down on the $vorecreature's maw with one arm, preventing it from swallowing you further.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, but it doesn't take advantage of your vulnerability.
		<</if>>
	<<else>>
		<<set $vorestage += 1>>
		<<if $vorestruggle is 2>>
			You push down on the $vorecreature's maw with both your arms, but it isn't enough. You slide deeper into its mouth, until it swallows you up to your neck.
		<<elseif $vorestruggle is 1>>
			You push down on the $vorecreature's maw with one arm, but it isn't enough. You slide deeper into its mouth, until it swallows you up to your neck.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, and it takes advantage of your vulnerability. You slide deeper into its mouth, until it swallows you up to your neck.
		<</if>>
	<</if>>
<<elseif $vorestage is 4>>
	<<if $worn.over_lower.integrity gt 0>>
		<<set $worn.over_lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.under_lower.integrity -= 1>>
	<</if>>
	<<if $worn.over_upper.integrity gt 0>>
		<<set $worn.over_upper.integrity -= 1>>
	<<elseif $worn.upper.integrity gt 0>>
		<<set $worn.upper.integrity -= 1>>
	<<elseif $worn.under_upper.integrity gt 0>>
		<<set $worn.under_upper.integrity -= 1>>
	<</if>>
	<<if ($vorestruggle * $physique) gte $vorestrength>>
		<<if $vorestruggle is 2>>
			You grab the inside of the $vorecreature's maw with both arms, preventing it from swallowing you further.
		<<elseif $vorestruggle is 1>>
			You grab the inside of the $vorecreature's maw with one arm, preventing it from swallowing you further.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, but it doesn't take advantage of your vulnerability.
		<</if>>
	<<else>>
		<<set $vorestage += 1>>
		<<if $vorestruggle is 2>>
			You grab the inside of the $vorecreature's maw with both your arms, but it isn't enough. The last of your body slides into its mouth, its lips closing behind you.
		<<elseif $vorestruggle is 1>>
			You grab the inside of the $vorecreature's maw with one arm, but it isn't enough. The last of your body slides into its mouth, its lips closing behind you.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, and it takes advantage of your vulnerability. The last of your body slides into its mouth, its lips closing behind you.
		<</if>>
	<</if>>
<<elseif $vorestage is 5>>
	<<if $worn.over_lower.integrity gt 0>>
		<<set $worn.over_lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.under_lower.integrity -= 1>>
	<</if>>
	<<if $worn.over_upper.integrity gt 0>>
		<<set $worn.over_upper.integrity -= 1>>
	<<elseif $worn.upper.integrity gt 0>>
		<<set $worn.upper.integrity -= 1>>
	<<elseif $worn.under_upper.integrity gt 0>>
		<<set $worn.under_upper.integrity -= 1>>
	<</if>>
	<<if ($vorestruggle * $physique) gte $vorestrength>>
		<<if $vorestruggle is 2>>
			You grab the inside of the $vorecreature's maw with both arms, preventing it from swallowing you further.
		<<elseif $vorestruggle is 1>>
			You grab the inside of the $vorecreature's maw with one arm, preventing it from swallowing you further.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, but it doesn't take advantage of your vulnerability.
		<</if>>
	<<else>>
		<<set $vorestage += 1>>
		<<if $vorestruggle is 2>>
			You grab the inside of the $vorecreature's maw with both your arms, but it isn't enough. The $vorecreature sucks you further down, sliding you into its gullet.
		<<elseif $vorestruggle is 1>>
			You grab the inside of the $vorecreature's maw with one arm, but it isn't enough. The $vorecreature sucks you further down, sliding you into its gullet.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, and it takes advantage of your vulnerability. The $vorecreature sucks you further down, sliding you into its gullet.
		<</if>>
	<</if>>
<<elseif $vorestage is 6>>
	<<if $worn.over_lower.integrity gt 0>>
		<<set $worn.over_lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.lower.integrity -= 1>>
	<<elseif $worn.lower.integrity gt 0>>
		<<set $worn.under_lower.integrity -= 1>>
	<</if>>
	<<if $worn.over_upper.integrity gt 0>>
		<<set $worn.over_upper.integrity -= 1>>
	<<elseif $worn.upper.integrity gt 0>>
		<<set $worn.upper.integrity -= 1>>
	<<elseif $worn.under_upper.integrity gt 0>>
		<<set $worn.under_upper.integrity -= 1>>
	<</if>>
	<<if ($vorestruggle * $physique) gte $vorestrength>>
		<<if $vorestruggle is 2>>
			You grab the inside of the $vorecreature's maw with both arms, preventing it from swallowing you further.
		<<elseif $vorestruggle is 1>>
			You grab the inside of the $vorecreature's maw with one arm, preventing it from swallowing you further.
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, but it doesn't take advantage of your vulnerability.
		<</if>>
	<<else>>
		<<set $vorestomach to 0>>
		<<set $vorestage += 1>>
		<<if $vorestruggle is 2>>
			You grab the inside of the $vorecreature's maw with both your arms, but it isn't enough. The $vorecreature sucks you further down, depositing you in a fleshy chamber.
			<<if $leftarm is "trapped">><<set $leftarm to 0>><</if>><<if $rightarm is "trapped">><<set $rightarm to 0>><<swallowed>><</if>>
		<<elseif $vorestruggle is 1>>
			You grab the inside of the $vorecreature's maw with one arm, but it isn't enough. The $vorecreature sucks you further down, depositing you in a fleshy chamber.
			<<if $leftarm is "trapped">><<set $leftarm to 0>><</if>><<if $rightarm is "trapped">><<set $rightarm to 0>><<swallowed>><</if>>
		<<else>>
			There's nothing preventing the $vorecreature from swallowing you further, and it takes advantage of your vulnerability. The $vorecreature sucks you further down, depositing you in a fleshy chamber.
			<<if $leftarm is "trapped">><<set $leftarm to 0>><</if>><<if $rightarm is "trapped">><<set $rightarm to 0>><</if>><<swallowed>>
		<</if>>
	<</if>>
<<else>>
	<<if $worn.over_lower.integrity gt 0>>
		<<set $worn.over_lower.integrity -= 5>>
	<</if>>
	<<if ($worn.over_lower.name is "naked" or $worn.over_lower.integrity lte clothingData('over_lower',$worn.over_lower,'integrity_max') / 5) and $worn.lower.integrity gt 0>>
		<<set $worn.upper.integrity -= 5>>
	<</if>>
	<<if ($worn.over_lower.name is "naked" or $worn.over_lower.integrity lte clothingData('over_lower',$worn.over_lower,'integrity_max') / 5)
		and ($worn.lower.name is "naked" or $worn.lower.integrity lte clothingData('lower',$worn.lower,'integrity_max') / 5) and $worn.under_lower.integrity gt 0>>
		<<set $worn.under_lower.integrity -= 5>>
	<</if>>
	<<if $worn.over_upper.integrity gt 0>>
		<<set $worn.over_upper.integrity -= 5>>
	<</if>>
	<<if ($worn.over_upper.name is "naked" or $worn.over_upper.integrity lte clothingData('over_upper',$worn.over_upper,'integrity_max') / 5) and $worn.upper.integrity gt 0>>
		<<set $worn.upper.integrity -= 5>>
	<</if>>
	<<if ($worn.over_upper.name is "naked" or $worn.over_upper.integrity lte clothingData('over_upper',$worn.over_upper,'integrity_max') / 5) and
		($worn.upper.name is "naked" or $worn.upper.integrity lte clothingData('upper',$worn.upper,'integrity_max') / 5) and $worn.under_upper.integrity gt 0>>
		<<set $worn.under_upper.integrity -= 5>>
	<</if>>
<</if>>

<<set $vorestruggle to 0>>
<<set $rng to random(1, 100)>>
<<if $vorestage is 1>>
	<<if $rng gte 66>>
		You feel the $vorecreature licking your feet.
		<<neutral 5>>
	<<elseif $rng gte 33>>
		The $vorecreature's tongue protrudes from its maw, and licks your inner thighs.
		<<neutral 5>>
	<<else>>
		The $vorecreature's tongue protrudes from its maw, and licks your butt.
		<<neutral 5>>
	<</if>>
<<elseif $vorestage is 2>>
	<<if $rng gte 66>>
		You feel the $vorecreature licking your butt.
		<<neutral 5>>
	<<elseif $rng gte 33>>
		The $vorecreature gently licks your <<groin>>.
		<<neutral 10>>
	<<else>>
		The $vorecreature's tongue wraps around your pelvis, and rubs up and down the length of your thighs.
		<<neutral 5>>
	<</if>>
<<elseif $vorestage is 3>>
	<<if $rng gte 66>>
		The $vorecreature's tongue presses your body against the roof of its maw.
		<<neutral 5>>
	<<elseif $rng gte 33>>
		The $vorecreature gently prods your <<groin>>.
		<<neutral 10>>
	<<else>>
		The $vorecreature's tongue caresses your inner thighs.
		<<neutral 5>>
	<</if>>
<<elseif $vorestage is 4>>
	<<if $rng gte 66>>
		The $vorecreature runs the tip of its tongue down the length of your body.
		<<neutral 5>>
	<<elseif $rng gte 33>>
		The $vorecreature gently prods your <<groin>>.
		<<neutral 10>>
	<<else>>
		The $vorecreature's tongue caresses your inner thighs.
		<<neutral 10>>
	<</if>>
<<elseif $vorestage is 5>>
	<<if $rng gte 66>>
		The $vorecreature runs the tip of its tongue down the length of your body.
		<<neutral 10>>
	<<elseif $rng gte 33>>
		The $vorecreature wraps its tongue around your body.
		<<neutral 10>>
	<<else>>
		The $vorecreature flicks your <<groin>> with the tip of its tongue.
		<<neutral 15>>
	<</if>>
<<elseif $vorestage is 6>>
	<<if $rng gte 81 and $leftarm is 0>>
		A groove in the side of the gullet constricts around your left arm, trapping it.
		<<set $leftarm to "trapped">><<set $lefttarget to "vore">><<neutral 10>>
	<<elseif $rng gte 61 and $rightarm is 0>>
		A groove in the side of the gullet constricts around your right arm, trapping it.
		<<set $rightarm to "trapped">><<set $righttarget to "vore">><<neutral 10>>
	<<elseif $rng gte 41>>
		The gullet tightens around your entire body, holding you in place.
		<<neutral 10>>
	<<elseif $rng gte 21>>
		Valves open at the side of the tube and release a warm liquid, coating you in a slimy goo.
		<<neutral 15>>
	<<elseif $rng gte 1>>
		The sides of the gullet push against you, sliding you along the tube.
		<<neutral 15>>
	<</if>>
<<elseif $vorestage is 7>>
	<<if $rng gte 81 and $rightarm is 0>>
		A groove in the side of the chamber constricts around your right arm, trapping it.
		<<set $rightarm to "trapped">><<set $righttarget to "vore">><<neutral 15>>
	<<elseif $rng gte 61>>
		More liquid squirts out the side of the chamber, covering you in a slimy goo.
		<<neutral 15>><<outergoo>>
	<<elseif $rng gte 41 and $leftarm is 0>>
		A groove in the side of the chamber constricts around your left arm, trapping it.
		<<set $leftarm to "trapped">><<set $lefttarget to "vore">><<neutral 15>>
	<<elseif $rng gte 21>>
		The chamber pulses to a gentle rhythm.
		<<neutral 15>>
	<<elseif $rng gte 1>>
		The entire chamber pulsates and rubs against you.
		<<neutral 20>>
	<</if>>
	<<if $vorestomach is 0>>
		<<set $vorestomach to 1>>
		The walls close in around you.
	<<elseif $vorestomach is 1>>
		<<set $vorestomach to 2>>
		The walls close in around you.
	<<elseif $vorestomach is 2>>
		<<set $vorestomach to 3>>
		The walls close in around you, squeezing your body and stealing your breath.
	<<elseif $vorestomach is 3>>
		<<set $vorestomach to 4>>
		The walls close in around you. You soon won't be able to move at all.
	<<else>>
		<<set $vorestomach to 5>>
		The walls close in around you. The world starts to fade.
	<</if>>
<</if>>

<<set $rng to random(1, 100)>>
<<if $vorestage lte 5>>
	<<if $rng gte 75>>
		<<set $vorestrength to random(0, 0)>>
		The $vorecreature seems content to savour your taste, for now.
	<<elseif $rng gte 50>>
		<<set $vorestrength to random(-5000, 10000)>>
		The $vorecreature salivates in anticipation.
	<<elseif $rng gte 25>>
		<<set $vorestrength to random(-5000, 20000)>>
		The $vorecreature prepares to suck you in.
	<<elseif $rng gte 1>>
		<<set $vorestrength to random(1, 20000)>>
		The $vorecreature prepares to gulp you down.
	<</if>>

<<else>>
	<<if $rng gte 75>>
		<<set $vorestrength to random(0, 0)>>
	<<elseif $rng gte 50>>
		<<set $vorestrength to random(-5000, 10000)>>
	<<elseif $rng gte 25>>
		<<set $vorestrength to random(-5000, 20000)>>
	<<elseif $rng gte 1>>
		<<set $vorestrength to random(1, 20000)>>
	<</if>>
<</if>>
<<if $voretrait gte 1>>
	<<set $vorestrength -= 2500>>
<</if>>
<<if $panicattacks gte 1 and $panicviolence is 0 and $panicparalysis is 0 and $controlled is 0 and _panicchecked isnot true>>
	<<set $rng to random(1, 100)>>
	<<if $rng is 100>>
		<<set $panicparalysis to 5>>
	<</if>>
	<<set _panicchecked to true>>
<</if>>
<<if $panicattacks gte 2 and $panicviolence is 0 and $panicparalysis is 0 and $controlled is 0 and _paniccheckedviolence isnot true>>
	<<set $rng to random(1, 100)>>
	<<if $rng is 100>>
		<<set $panicviolence to 3>>
	<</if>>
	<<set _paniccheckedviolence to true>>
<</if>>
<<if $arousal gte $arousalmax and $orgasmdown lte 0>>
	<<orgasm>>
<</if>>
<</widget>>
<<widget "swallowedstat">>
<<set $swallowedstat += 1>>
<</widget>>
<<widget "swallowed">>
<<if $swallowed isnot 1>>
	<<set $swallowed to 1>>
	<<swallowedstat>>
<</if>>
<</widget>>
:: Widgets Vore Actions [widget]
<<widget "voreactions">>
<<if $images is 1>>
	<<timed 100ms>>
	<<combatimg>>

	<</timed>>
<</if>>
<<willpowerpain>>
<<willpowerorgasm>>
<<actioncarry>>
<<actioncarrydrop>>

<<combatstate>>
<<carryblock>>

<<if $trance lte 0 and $panicparalysis is 0 and $panicviolence is 0>>
	<<generateActionsVore>>
<</if>>

<</widget>>
:: Widgets Vore Effects [widget]
<<widget "voreeffects">>
<<set $rng to random(1, 100)>>
<<effectspain>>
<<effectsorgasm>>
<<effectsdissociation>>
<<if $leftaction is "leftescape" and $rightaction is "rightescape">>
	<<set $leftaction to 0>><<set $rightaction to 0>><<set $leftactiondefault to "leftescape">><<set $rightactiondefault to "rightescape">><<set $attackstat += 2>><<set $leftactiondefault to "leftescape">><<set $rightactiondefault to "rightescape">>
	<<if $rng gte 40>>
		<<if $leftarm is "trapped">><<set $leftarm to 0>><</if>><<if $rightarm is "trapped">><<set $rightarm to 0>><</if>>
		<<if $vorestage is 1>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's maw with both arms, and make it spit you out.
		<<elseif $vorestage is 2>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's mouth with both arms. It gags, letting you slide your body out, freeing your <<genitals>> from its maw.
		<<elseif $vorestage is 3>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's mouth with both arms. It gags, letting you slide your body out, freeing your <<breasts>> from its maw.
		<<elseif $vorestage is 4>>
			<<set $vorestage -= 1>>
			You hit the inside of the $vorecreature's mouth with both arms. It gags, letting you slide your body out, freeing your arms from its maw.
		<<elseif $vorestage is 5>>
			<<set $vorestage -= 1>>
			You hit the inside of the $vorecreature's mouth with both arms. It gags, letting you slide your head back out.
		<<elseif $vorestage is 6>>
			<<set $vorestage -= 1>>
			You hit the walls of the $vorecreature's gullet with both arms. It convulses, violently pushing you up into its mouth.
		<<elseif $vorestage is 7>>
			<<set $vorestage -= 1>>
			You pound the walls of the $vorecreature's stomach with both arms. It convulses, violently pushing you up into its gullet.
		<</if>>
	<<else>>
		<<if $vorestage is 1>>
			You hit the $vorecreature's maw with both arms, but it doesn't react.
		<<elseif $vorestage is 2>>
			You hit the $vorecreature's mouth with both arms, but it doesn't react.
		<<elseif $vorestage is 3>>
			You hit the $vorecreature's mouth with both arms, but it doesn't react.
		<<elseif $vorestage is 4>>
			You hit the inside of the $vorecreature's mouth with both arms, but it doesn't react.
		<<elseif $vorestage is 5>>
			You hit the inside of the $vorecreature's mouth with both arms, but it doesn't react.
		<<elseif $vorestage is 6>>
			You hit the walls of the $vorecreature's gullet with both arms, but it doesn't react.
		<<elseif $vorestage is 7>>
			You pound the walls of the $vorecreature's stomach with both arms, but it doesn't react.
		<</if>>
	<</if>>
<<elseif $leftaction is "leftescape">>
	<<set $leftaction to 0>><<set $leftactiondefault to "leftescape">><<set $attackstat += 1>><<set $leftactiondefault to "leftescape">>
	<<if $rng gte 20>>
		<<if $leftarm is "trapped">><<set $leftarm to 0>><</if>><<if $rightarm is "trapped">><<set $rightarm to 0>><</if>>
		<<if $vorestage is 1>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's maw with your left arm, and make it spit you out.
		<<elseif $vorestage is 2>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's mouth with your left arm. It gags, letting you slide your body out, freeing your <<genitals>> from its maw.
		<<elseif $vorestage is 3>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's mouth with your left arm. It gags, letting you slide your body out, freeing your <<breasts>> from its maw.
		<<elseif $vorestage is 4>>
			<<set $vorestage -= 1>>
			You hit the inside of the $vorecreature's mouth with your left arm. It gags, letting you slide your body out, freeing your arms from its maw.
		<<elseif $vorestage is 5>>
			<<set $vorestage -= 1>>
			You hit the inside of the $vorecreature's mouth with your left arm. It gags, letting you slide your head back out.
		<<elseif $vorestage is 6>>
			<<set $vorestage -= 1>>
			You hit the walls of the $vorecreature's gullet with your left arm. It convulses, violently pushing you up into its mouth.
		<<elseif $vorestage is 7>>
			<<set $vorestage -= 1>>
			You pound the walls of the $vorecreature's stomach with your left arm. It convulses, violently pushing you up into its gullet.
		<</if>>
	<<else>>
		<<if $vorestage is 1>>
			You hit the $vorecreature's maw with your left arm, but it doesn't react.
		<<elseif $vorestage is 2>>
			You hit the $vorecreature's mouth with your left arm, but it doesn't react.
		<<elseif $vorestage is 3>>
			You hit the $vorecreature's mouth with your left arm, but it doesn't react.
		<<elseif $vorestage is 4>>
			You hit the inside of the $vorecreature's mouth with your left arm, but it doesn't react.
		<<elseif $vorestage is 5>>
			You hit the inside of the $vorecreature's mouth with your left arm, but it doesn't react.
		<<elseif $vorestage is 6>>
			You hit the walls of the $vorecreature's gullet with your left arm, but it doesn't react.
		<<elseif $vorestage is 7>>
			You pound the walls of the $vorecreature's stomach with your left arm, but it doesn't react.
		<</if>>
	<</if>>
<<elseif $rightaction is "rightescape">>
	<<set $rightaction to 0>><<set $rightactiondefault to "rightescape">><<set $attackstat += 1>><<set $rightactiondefault to "rightescape">>
	<<if $rng gte 20>>
		<<if $leftarm is "trapped">><<set $leftarm to 0>><</if>><<if $rightarm is "trapped">><<set $rightarm to 0>><</if>>
		<<if $vorestage is 1>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's maw with your right arm, and make it spit you out.
		<<elseif $vorestage is 2>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's mouth with your right arm. It gags, letting you slide your body out, freeing your <<genitals>> from its maw.
		<<elseif $vorestage is 3>>
			<<set $vorestage -= 1>>
			You hit the $vorecreature's mouth with your right arm. It gags, letting you slide your body out, freeing your <<breasts>> from its maw.
		<<elseif $vorestage is 4>>
			<<set $vorestage -= 1>>
			You hit the inside of the $vorecreature's mouth with your right arm. It gags, letting you slide your body out, freeing your arms from its maw.
		<<elseif $vorestage is 5>>
			<<set $vorestage -= 1>>
			You hit the inside of the $vorecreature's mouth with your right arm. It gags, letting you slide your head back out.
		<<elseif $vorestage is 6>>
			<<set $vorestage -= 1>>
			You hit the walls of the $vorecreature's gullet with your right arm. It convulses, violently pushing you up into its mouth.
		<<elseif $vorestage is 7>>
			<<set $vorestage -= 1>>
			You pound the walls of the $vorecreature's stomach with your right arm. It convulses, violently pushing you up into its gullet.
		<</if>>
	<<else>>
		<<if $vorestage is 1>>
			You hit the $vorecreature's maw with your right arm, but it doesn't react.
		<<elseif $vorestage is 2>>
			You hit the $vorecreature's mouth with your right arm, but it doesn't react.
		<<elseif $vorestage is 3>>
			You hit the $vorecreature's mouth with your right arm, but it doesn't react.
		<<elseif $vorestage is 4>>
			You hit the inside of the $vorecreature's mouth with your right arm, but it doesn't react.
		<<elseif $vorestage is 5>>
			You hit the inside of the $vorecreature's mouth with your right arm, but it doesn't react.
		<<elseif $vorestage is 6>>
			You hit the walls of the $vorecreature's gullet with your right arm, but it doesn't react.
		<<elseif $vorestage is 7>>
			You pound the walls of the $vorecreature's stomach with your right arm, but it doesn't react.
		<</if>>
	<</if>>
<</if>>
<<if $leftaction is "lefthold" and $rightaction is "righthold">>
	<<set $leftaction to 0>><<set $rightaction to 0>><<set $leftactiondefault to "lefthold">><<set $rightactiondefault to "righthold">><<set $vorestruggle to 2>>
	<<if $vorestage is 1>>
		You grab hold of the $vorecreature's maw with both arms.
	<<elseif $vorestage is 2>>
		You grab hold of the $vorecreature's maw with both arms.
	<<elseif $vorestage is 3>>
		You grab hold of the $vorecreature's maw with both arms.
	<<elseif $vorestage is 4>>
		You cling to the side of the $vorecreature's mouth with both arms.
	<<elseif $vorestage is 5>>
		You cling to the side of the $vorecreature's mouth with both arms.
	<<elseif $vorestage is 6>>
		You cling to the side of the $vorecreature's gullet with both arms.
	<</if>>
<<elseif $leftaction is "lefthold">>
	<<set $leftaction to 0>><<set $leftactiondefault to "lefthold">><<set $vorestruggle to 1>>
	<<if $vorestage is 1>>
		You grab hold of the $vorecreature's maw with your left arm.
	<<elseif $vorestage is 2>>
		You grab hold of the $vorecreature's maw with your left arm.
	<<elseif $vorestage is 3>>
		You grab hold of the $vorecreature's maw with your left arm.
	<<elseif $vorestage is 4>>
		You cling to the side of the $vorecreature's mouth with your left arm.
	<<elseif $vorestage is 5>>
		You cling to the side of the $vorecreature's mouth with your left arm.
	<<elseif $vorestage is 6>>
		You cling to the side of the $vorecreature's gullet with your left arm.
	<</if>>
<<elseif $rightaction is "righthold">>
	<<set $rightaction to 0>><<set $rightactiondefault to "righthold">><<set $vorestruggle to 1>>
	<<if $vorestage is 1>>
		You grab hold of the $vorecreature's maw with your right arm.
	<<elseif $vorestage is 2>>
		You grab hold of the $vorecreature's maw with your right arm.
	<<elseif $vorestage is 3>>
		You grab hold of the $vorecreature's maw with your right arm.
	<<elseif $vorestage is 4>>
		You cling to the side of the $vorecreature's mouth with your right arm.
	<<elseif $vorestage is 5>>
		You cling to the side of the $vorecreature's mouth with your right arm.
	<<elseif $vorestage is 6>>
		You cling to the side of the $vorecreature's gullet with your right arm.
	<</if>>
<</if>>
<<if $leftaction is "leftvorefree">>
	<<set $leftaction to 0>>
	<<set $rightarm to 0>>
	Using all your strength, you manage to free your right arm from the side of the gullet.
<</if>>
<<if $rightaction is "rightvorefree">>
	<<set $rightaction to 0>>
	<<set $leftarm to 0>>
	Using all your strength, you manage to free your left arm from the side of the gullet.
<</if>>
<<if $leftaction is "vorerest">>
	<<set $leftaction to 0>><<set $leftactiondefault to "vorerest">>
<</if>>
<<if $rightaction is "vorerest">>
	<<set $rightaction to 0>><<set $rightactiondefault to "vorerest">>
<</if>>

<</widget>>
:: Widgets Vore Img [widget]
<<widget "voreimg">>

<<if $vorestage is 1>>

<<elseif $vorestage is 2>>

<<elseif $vorestage is 3>>

<<elseif $vorestage is 4>>

<<elseif $vorestage is 5>>

<<elseif $vorestage is 6>>

<<elseif $vorestage is 7>>

<</if>>

<</widget>>


code:
:: Widgets Combat [widget]

<<widget "takeVirginity">>
<<if $args[1]>>
	<<if $player.virginity[$args[1]] is true>>
		<<if $wraith and $wraith.mimic is $args[0]>>
			<<set $args[0] to "Ivory Wraith">>
		<<elseif $args[1] is "vaginal" or $args[1] is "penile">>
			<<switch $args[0]>>
				<<case "Robin">><<earnFeat "Robin the Lover">>
				<<case "Kylar">><<earnFeat "Kylar the Obsessed">>
				<<case "Eden">><<earnFeat "Eden the Lonely">>
				<<case "Whitney">><<earnFeat "Whitney the Tsundere">>
				<<case "Avery">><<earnFeat "Avery the Moneybags">>
				<<case "Leighton">><<earnFeat "Leighton the Shady">>
				<<case "Alex">><<earnFeat "Alex the Robust">>
				<<case "Great Hawk">><<earnFeat "Great Hawk the Terror">>
				<<case "Wren">><<earnFeat "Wren the Sly">>
				<<case "Black Wolf">><<earnFeat "Great Wolf the Alpha">>
				<<case "Harper">><<earnFeat "Harper the Hypnotist">>
				<<case "Morgan">><<earnFeat "Morgan the Lost">>
			<</switch>>
		<</if>>
		<<if $args[0] isnot undefined and $args[0] isnot 0>>
			<<set $player.virginity[$args[1]] to $args[0]>>
		<<else>>
			<<set $player.virginity[$args[1]] to false>>
		<</if>>
	<</if>>

	<<if $player.virginity.temple is true and ($args[1] is "vaginal" or $args[1] is "penile") and $templePromised isnot $args[0]>>
		<<set $player.virginity.temple to false>>
	<</if>>
<</if>>
<</widget>>

<<widget "takeHandholdingVirginity">>
<<if $player.virginity.handholding is true>>
	<<switch $args[1]>>
		<<case "romantic">>
			You aren't used to this kind of romantic handholding.<<arousal 2000>><<ggarousal>>
		<<case "rape">>
			You feel horrible, being forced to hold hands like this.<<stress 40>><<ggstress>>
		<<case "consensual">>
			Having your hand held feels nice.<<lltrauma>><<trauma -18>>
		<<default>>
			You feel nervous holding the hands of someone you're not close to.<<stress 20>><<gstress>>
	<</switch>>
	<<takeVirginity $args[0] "handholding">>
<</if>>
<<takeNPCVirginity $args[0] "handholding">>
<</widget>>

<<widget "takeKissVirginity">>
<<if $player.virginity.kiss is true>>
	<<switch $args[1]>>
		<<case "loveInterest">>
			You're happy your first kiss went to a love interest.<<arousal 3000>><<stress -12>><<trauma -12>><<ggarousal>><<llstress>>
			<<if (!$wraith or $wraith and $wraith.mimic isnot $args[0])>><<earnFeat "First Kiss">><</if>>
		<<case "romantic">>
			You're happy your first kiss was taken in such a romantic way.<<arousal 1500>><<stress -6>><<trauma -6>><<garousal>><<lstress>>
		<<case "rape">>
			They stole your first kiss. You feel horrible.<<stress 40>><<gggstress>>
		<<case "tentacle">>
			You wonder what others would say about giving a tentacle your first kiss, if they would even believe you.<<arousal 3000>>
		<<case "addiction">>
			You're so relieved, the thought of giving away your first kiss like this hardly registers to you.<<arousal 1000>>
		<<default>>
			You feel conflicted about giving them your first kiss.<<stress 20>><<ggstress>>
	<</switch>>
	<<takeVirginity $args[0] "kiss">>
<</if>>
<<takeNPCVirginity $args[0] "kiss">>
<</widget>>

<<widget "takeKissVirginityNamed">>
<<switch $args[0]>>
	<<case "Robin">>
		<<if $robinromance is 1>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Whitney">>
		<<if $whitneyromance is 1>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Kylar">>
		<<if $kylarenglish gte 1>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Sydney">>
		<<if $sydneyromance is 1>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Eden">>
		<<if $syndromeeden is 1>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Avery">>
		<<if $dateCount.Avery gte 3>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Black Wolf">>
		<<if $syndromewolves is 1 and $deviancy gte 35>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Great Hawk">>
		<<if $syndromebird is 1>>
			<<set _loveInterest to true>>
		<</if>>
	<<case "Alex">>
		<<if $farm_stage gte 7 and $alex_countdown is undefined>>
			<<set _loveInterest to true>>
		<</if>>
	<<default>>
		<<set _loveInterest to false>>
<</switch>>
<<if _loveInterest is true and ($consensual is 1 or $args[2])>>
	<<takeKissVirginity $args[0] "loveInterest">>
<<elseif ($consensual is 1 or $args[2])>>
	<<takeKissVirginity $args[0] "consensual">>
<<else>>
	<<takeKissVirginity $args[0] "rape">>
<</if>>
<</widget>>

/* Does not currently support named NPCs having their virginity taken by something other than the player.
 * Argument 0 is the npc, argument 1 is their virginity.
*/
<<widget "takeNPCVirginity">>
<<if $NPCNameList.indexOf($args[0]) >= 0 and $NPCName[$NPCNameList.indexOf($args[0])].virginity[$args[1]] is true and (!$wraith or $wraith and $wraith.mimic isnot $args[0])>>
    <<set $NPCName[$NPCNameList.indexOf($args[0])].virginity[$args[1]] to "player">>
	<<run $virginTaken[$args[1]].pushUnique($args[0])>>
	<<if $args[0] is "Sydney" and ($args[1] is "vaginal" or $args[1] is "penile")>>
		<<earnFeat "Sydney the Pure Hearted">>
	<</if>>
	<<if $enemytype isnot "beast" and $enemytype isnot "tentacle">>
		<<switch $args[1]>>
			<<case "vaginal">>
				<<set $speechNPCVaginaVirgin to 1>>
				You feel <<his>> hymen tear, forever robbing <<him>> of <<his>> purity. <<if $demon gte 6>>You feel a surge of pleasure unlike any other as you defile <<him>> and spread your impurity. <<stress -50>><<trauma -50>><<lllstress>><<llltrauma>><<else>><<arousal 2000>><<ggarousal>><</if>>

			<<case "penile">>
				<<set $speechNPCPenisVirgin to 1>>
				You feel <<his>> foreskin separate from <<his>> glans, forever robbing <<him>> of <<his>> purity. <<if $demon gte 6>>You feel a surge of pleasure unlike any other as you defile <<him>> and spread your impurity. <<stress -50>><<trauma -50>><<lllstress>><<llltrauma>><<else>><<arousal 2000>><<ggarousal>><</if>>

			<<case "anal">>
				<<set $speechNPCAnusVirgin to 1>>
				It's a tight fit. This is probably <<his>> first time doing this. <<arousal 2000>><<ggarousal>>

			<<case "oral">>
				<<set $speechNPCOralVirgin to 1>>
				<<He>> looks surprised, as if <<he>> wasn't expecting the taste. This is probably <<his>> first time. <<arousal 1500>><<ggarousal>>

			<<case "kiss">>
				<<set $speechNPCKissVirgin to 1>>
				<<set _npcKissVirginTemp to 1>>
			<<case "handholding">>
				<<set $speechNPCHandholdingVirgin to 1>>
				<<His>> hand clenches, and <<he>> looks slightly nervous.
			<<default>>
		<</switch>>
	<</if>>
<</if>>
<<if $NPCNameList.indexOf($args[0]) >= 0 and ($args[1] is "vaginal" or $args[1] is "penile") and $NPCName[$NPCNameList.indexOf($args[0])].virginity.temple is true and $templePromised isnot $args[0]>>
    <<set $NPCName[$NPCNameList.indexOf($args[0])].virginity.temple to false>>
<</if>>
<</widget>>

<<widget "setupMidOrgasm">>
<<if $setupMidOrgasm isnot undefined and $enemyarousal gte $enemyarousalmax>>
	<<set _midOrgasm to false>>
	<<for _n to 0; _n lt $NPCList.length;_n++>>
		<<if $NPCList[_n].maxOrgasms gt 1>>
			<<set $NPCList[_n].orgasms++>>
		<</if>>
		<<if $NPCList[_n].orgasms lt $NPCList[_n].maxOrgasms>>
			<<set _midOrgasm to true>>
		<</if>>
	<</for>>
	<<if _midOrgasm is true>>
		<<set $enemyarousal to $enemyarousalmax / 2>>
		<<set $finish to 0>>
		<<set $ejaculatingMid to true>>
	<</if>>
<</if>>
<</widget>>

<<widget "combatTrainAdvance">>/*For use after a beast/monster in a train is finished with their turn. Loads next in line into $NPCList[0]. Loads them all back into $NPCList if at the end of the train.*/
<<clearnpc>>
<<if $combatTrain.length gt 0>>
	<<set $combatTrain.length-->>
	<<set $combatTrain.active += 1>>
	<<loadNPC 0 `"beast_" + $combatTrain.active`>>
	<<if $NPCList[0].monster is "monster">>
		<<set $monster to 1>>
	<<else>>
		<<set $monster to 0>>
	<</if>>
<<else>>
	<<for _e_n to 0; _e_n lt $combatTrain.total_length + 1; _e_n++>>
		<<loadNPC _e_n `"beast_" + _e_n`>>
		<<clearNPC `"beast_" + _e_n`>>
	<</for>>
<</if>>
<<set $active_enemy to 0>>
<</widget>>

<<widget "beastTrainGenerate">>/*Saves all beasts/monsters in $NPCList, then loads the first into slot 0.*/
<<set _enemyno to $enemyno - 1>>
<<set $combatTrain to {
	length: _enemyno,
	total_length: _enemyno,
	active: 0,
	pronouns: [],
	monsters: [],
	beastTypes: []
}>>
<<for _e_n to 0; _e_n lt $enemyno; _e_n++>>
	<<saveNPC _e_n `"beast_" + _e_n`>>
	<<set $combatTrain.beastTypes.push($NPCList[_e_n].type)>>
	<<set $combatTrain.pronouns.push($NPCList[_e_n].pronoun)>>
	<<set $combatTrain.monsters.push($NPCList[_e_n].monster)>>
<</for>>
<<clearnpc>>
<<loadNPC 0 beast_0>>
<</widget>>

<<widget "leg_position">>
	<<set $_parts to [$anususe, $vaginause, $chestuse, $mouthuse]>>
	<<if $machine and $machine.tattoo and ["left_thigh", "right_thigh"].contains($machine.tattoo.use)>>
		<<set _leg_position to "up">>
	<<elseif $_parts.contains("penis") or $_parts.contains(1)>>
		<<set _leg_position to "up">>
	<<else>>
		<<set _leg_position to "down">>
	<</if>>
<</widget>>

/* Should ideally only be used if you're sure one npc is in this position */
/* Selects the NPC that has the given body part (chest, mouth, vagina) set to the given value */
/* Useful when you know one of them is in a given position by looking at the PC, but aren't sure which */
<<widget "selectNpcWithPartInPosition">>
	<<if $args[0] and $args[1]>>
		<<unset _npc>>
		<<for _j = 0; _j lt $enemynomax; _j++>>
			<<if $NPCList[_j][$args[0]] is $args[1]>>
				<<personselect _j>>
				<<set _npc to $NPCList[_j]>>
				<<break>>
			<</if>>
		<</for>>
	<</if>>
<</widget>>

<<widget "selectNpcWithPartInPositionAnus">>
	<<if $args[0]>>
		<<unset _npc>>
		<<for _j = 0; _j lt $enemynomax; _j++>>
			<<if $NPCList[_j].penis is $args[0] or $NPCList[_j].vagina is $args[0]>>
				<<personselect _j>>
				<<set _npc to $NPCList[_j]>>
				<<break>>
			<</if>>
		<</for>>
	<</if>>
<</widget>>
<<widget "cover_end">>
<<if $leftarm is "vagina">>
	<<set $vaginause to 0>>
<<elseif $leftarm is "coverpenis">>
	<<set $penisuse to 0>>
<<elseif $leftarm is "anus">>
	<<set $anususe to 0>>
<<elseif $leftarm is "face">>
	<<set $face to 0>>
<</if>>
<<if $rightarm is "vagina">>
	<<set $vaginause to 0>>
<<elseif $rightarm is "coverpenis">>
	<<set $penisuse to 0>>
<<elseif $rightarm is "anus">>
	<<set $anususe to 0>>
<<elseif $rightarm is "face">>
	<<set $face to 0>>
<</if>>
<</widget>>

/* args[0] - 1-6 for npc, args[1] for type */
<<widget "equipCondom">>
<<if $args[0] isnot undefined>>
	<<switch $args[1]>>
		<<case "damaged">><<set $NPCList[$args[1]].condom to {damaged:true,cum:false}>>
		<<default>>
			<<if $npcCondoms is "damagedCondoms" and random(0,100) gte 50>>
				<<set $NPCList[$args[0]].condom to {damaged:true,cum:false}>>
			<<else>>
				<<set $NPCList[$args[0]].condom to {damaged:false,cum:false}>>
			<</if>>
	<</switch>>
<<else>>
	<<switch $args[0]>>
		<<case "damaged">><<set $player.condom to {damaged:true,cum:false}>>
		<<default>><<set $player.condom to {damaged:false,cum:false}>>
	<</switch>>
<</if>>
<</widget>>

/* args[0] - 1-6 for npc */
<<widget "removeCondom">>
<<if $args[0]>>
	<<set $NPCList[$args[0]].condom to false>>
<<else>>
	<<set $player.condom to false>>
<</if>>
<</widget>>

repo_name: Area/degrees

license: mit


code:
:: Clothes Testing

Character Viewer

<<if $images is 1>>
	<<if $debugClothesEquipped is undefined>>
		<<set $debugClothesEquipped to {
			head:0,
			face:0,
			neck:0,
			hands:0,
			upper:0,
			lower:0,
			under_upper:0,
			under_lower:0,
			legs:0,
			feet:0,
		}>>
		<<set $debugBodyState to {
			charactersToShow: 1,
			hairStage: "none",
			hairType: "default",
			fringeType: "default",
			fringeStage: "short",
			breastSize: 0,
			penisSize: -2,
			penisVirgin: true,
			vaginaCum:"none",
			anusCum:"none",
			mouthCum:"none",
			angelHalo:"hidden",
			angelWings:"hidden",
			angelWingsLeftType:"leftwing",
			angelWingsRightType:"rightwing",
			fallenAngelHalo:"hidden",
			fallenAngelWings:"hidden",
			fallenAngelWingsLeftType:"leftwing",
			fallenAngelWingsRightType:"rightwing",
			demonHorns:"hidden",
			demonTail:"hidden",
			demonTailType:"tail",
			demonWings:"hidden",
			demonWingsType:"wings",
			wolfEars:"hidden",
			wolfTail:"hidden",
			wolfPits:"hidden",
			wolfPubes:"hidden",
			catEars:"hidden",
			catTail:"hidden",
			cowHorns:"hidden",
			cowEars:"hidden",
			cowTail:"hidden",
			birdEyes:"hidden",
			birdMalar:"hidden",
			birdPlumage:"hidden",
			birdPubes:"hidden",
			birdWings:"hidden",
			birdWingsLeftType:"leftwing",
			birdWingsRightType:"rightwing",
			birdTail:"hidden",
		}>>
		<<set $debugSelectedColors to {
			hair: "red",
			eyes: "none",
			head:["Range", "Range"],
			face:["Range", "Range"],
			neck:["Range", "Range"],
			hands:["Range", "Range"],
			upper:["Range", "Range"],
			lower:["Range", "Range"],
			under_upper:["Range", "Range"],
			under_lower:["Range", "Range"],
			legs:["Range", "Range"],
			feet:["Range", "Range"],
		}>>
		<<set $debugSkinColor to {
			style:"",
			type: "light",
			range: 0,
		}>>
	<</if>>
	<<clothesTestingGenerateClothes>>
	<<set _clothesColorOptions to ["Range", "Inversed Range", "black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow"]>>

		<<clothesTestingImageGenerateAll>>

		Refresh

		<<link Body>>
			<<replace #controls>><<clothesTestingBodyControls>><</replace>>
		<</link>> |
		<<link Transformations>>
			<<replace #controls>><<clothesTestingTransformationsControls>><</replace>>
		<</link>> |
		<<link Clothes>>
			<<replace #controls>><<clothesTestingClothesControls>><</replace>>
		<</link>>

		<<clothesTestingBodyControls>>

	<<link [["Temp Save"|$passage]]>><</link>>

	<<link "Expand">>
		<<addclass "#passages" "debugPassages">>
	<</link>>

	<<link [["Reset"|$passage]]>>
		<<unset $debugClothesEquipped>>
		<<unset $debugBodyState>>
		<<unset $debugSelectedColors>>
		<<unset $debugSkinColor>>
	<</link>>
<<else>>
	images disabled
<</if>>

<<link [[Return|$lastPassage]]>>
	<<unset $lastPassage>>
	<<removeclass "#passages" "debugPassages">>
	<<set $skinColor.tanImgEnabled to clone($gameTanImgSetting)>>
	<<unset $gameTanImgSetting>>
	<<tanned 0 "ignoreCoverage">>
<</link>>

:: clothesTestingImageGenerate [widget]
<<widget "clothesTestingImageUpdate">>
<<set $debugSkinColor.style to {
	body:skinColor($skinColor.tanImgEnabled, $debugSkinColor.range,setup.skinColor[$debugSkinColor.type]),
	mouth:skinColor($skinColor.tanImgEnabled, $debugSkinColor.range,setup.skinColor[$debugSkinColor.type])
}>>
<<replace #images>>
	<<clothesTestingImageGenerateAll>>
<</replace>>
<</widget>>

<<widget "clothesTestingImageGenerateAll">>
<<set _colors to ["black", "blue", "brown", "green", "pink", "purple", "red", "tangerine", "teal", "white", "yellow"]>>
<<set _eyeColors to ["purple", "dark blue", "light blue", "amber", "hazel", "green", "red", "pink", "grey", "purple", "purple"]>>
<<set _test to []>>
<<for _i to 0; _i lt $debugBodyState.charactersToShow; _i++>>
<<capture _i>>
	<<set $debugSelectedColorsAdjusted to clone($debugSelectedColors)>>
	<<if $debugSelectedColors.eyes is "range">>
		<<set $debugSelectedColorsAdjusted.eyes to _eyeColors[_i]>>
	<</if>>
	<<set _keys to Object.keys($debugSelectedColorsAdjusted)>>
	<<for _j to 0; _j lt _keys.length; _j++>>
		<<if _keys[_j] isnot "hair" and _keys[_j] isnot "eyes">>
			<<if $debugSelectedColorsAdjusted[_keys[_j]][0] is "Range">>
				<<set $debugSelectedColorsAdjusted[_keys[_j]][0] to _colors[_i]>>
			<</if>>
			<<if $debugSelectedColorsAdjusted[_keys[_j]][0] is "Inversed Range">>
				<<set $debugSelectedColorsAdjusted[_keys[_j]][0] to _colors[_colors.length - _i - 1]>>
			<</if>>
			<<if $debugSelectedColorsAdjusted[_keys[_j]][1] is "Range">>
				<<set $debugSelectedColorsAdjusted[_keys[_j]][1] to _colors[_i]>>
			<</if>>
			<<if $debugSelectedColorsAdjusted[_keys[_j]][1] is "Inversed Range">>
				<<set $debugSelectedColorsAdjusted[_keys[_j]][1] to _colors[_colors.length - _i - 1]>>
			<</if>>
		<</if>>
	<</for>>
	<<run _test.push($debugSelectedColorsAdjusted)>>

		<<clothesTestingImageGenerate $debugSelectedColorsAdjusted>>

<</capture>>
<</for>>

<</widget>>

<<widget "clothesTestingImageGenerate">>
<<set _img to setup.tanImg.sidebar[$skinColor.tanImgEnabled]>>
<<set _filters to $debugSkinColor.style>>
<div @class="`debug-images hideImageOverflow ` + debugColourContainerClasses($args[0])">

	<<if $debugBodyState.hairStage isnot "none">>
		<<if $debugBodyState.hairStage is "thighs" and $debugBodyState.hairType is "default">>

		<<elseif $debugBodyState.hairStage is "feet" and $debugBodyState.hairType is "default">>

		<</if>>

	<</if>>
	<<if $args[0].eyes isnot "none">>

	<</if>>
	<<if $debugClothesEquipped.upper is 0>>
		<<if $debugClothesEquipped.under_upper isnot 0>>
			<<if $debugBodyState.breastSize gte 12>>

			<<elseif $debugBodyState.breastSize gte 8>>

			<<elseif $debugBodyState.breastSize gte 6>>

			<<elseif $debugBodyState.breastSize gte 4>>

			<<elseif $debugBodyState.breastSize gte 3>>

			<<elseif $debugBodyState.breastSize gte 1>>

			<</if>>
		<<else>>
			<<if $debugBodyState.breastSize gte 12>>

			<<elseif $debugBodyState.breastSize gte 8>>

			<<elseif $debugBodyState.breastSize gte 6>>

			<<elseif $debugBodyState.breastSize gte 4>>

			<<elseif $debugBodyState.breastSize gte 3>>

			<<elseif $debugBodyState.breastSize gte 1>>

			<</if>>
		<</if>>
	<</if>>
	<<if $debugBodyState.penisSize isnot -2>>
		<<if $debugBodyState.penisVirgin is true>>
			<<if $debugBodyState.penisSize gte 4>>

			<<elseif $debugBodyState.penisSize is 3>>

			<<elseif $debugBodyState.penisSize is 2>>

			<<elseif $debugBodyState.penisSize is 1>>

			<<else>>

			<</if>>
		<<else>>
			<<if $debugBodyState.penisSize gte 4>>

			<<elseif $debugBodyState.penisSize is 3>>

			<<elseif $debugBodyState.penisSize is 2>>

			<<elseif $debugBodyState.penisSize is 1>>

			<<else>>

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

	<<if $debugBodyState.vaginaCum isnot "none">>

	<</if>>
	<<if $debugBodyState.anusCum isnot "none">>

	<</if>>
	<<if $debugBodyState.mouthCum isnot "none">>

	<</if>>

	<<if $debugBodyState.fallenAngelWings isnot "hidden">>

	<</if>>
	<<if $debugBodyState.fallenAngelHalo isnot "hidden">>

	<</if>>
	<<if $debugBodyState.angelHalo isnot "hidden">>

	<</if>>
	<<if $debugBodyState.angelWings isnot "hidden">>

	<</if>>

	<<if $debugBodyState.demonHorns isnot "hidden">>

	<</if>>

	<<if $debugBodyState.demonTail isnot "hidden">>

	<</if>>

	<<if $debugBodyState.demonWings isnot "hidden">>

	<</if>>

	<<if $debugBodyState.wolfEars isnot "hidden">>

	<</if>>
	<<if $debugBodyState.wolfPits isnot "hidden">>

	<</if>>
	<<if $debugBodyState.wolfPubes isnot "hidden">>

	<</if>>
	<<if $debugBodyState.wolfTail isnot "hidden">>

	<</if>>

	<<if $debugBodyState.catEars isnot "hidden">>

	<</if>>
	<<if $debugBodyState.catTail isnot "hidden">>

	<</if>>

	<<if $debugBodyState.cowHorns isnot "hidden">>

	<</if>>
	<<if $debugBodyState.cowEars isnot "hidden">>

	<</if>>
	<<if $debugBodyState.cowTail isnot "hidden">>

	<</if>>

	<<if $debugBodyState.birdEyes isnot "hidden">>

	<</if>>

	<<if $debugBodyState.birdMalar isnot "hidden">>

	<</if>>

	<<if $debugBodyState.birdPlumage isnot "hidden">>

	<</if>>

	<<if $debugBodyState.birdPubes isnot "hidden">>

	<</if>>

	<<if $debugBodyState.birdTail isnot "hidden">>

	<</if>>

	<<if $debugBodyState.birdWings isnot "hidden">>

	<</if>>

	<<set _equip to ["upper", "lower", "under_upper", "under_lower","head", "face", "neck", "hands", "legs", "feet"]>>
	<<for _i to 0; _i lt _equip.length; _i++>>
		<<if $debugClothesEquipped[_equip[_i]] isnot 0>>
			<<set _item to setup.clothes[_equip[_i]][$debugClothesEquipped[_equip[_i]]]>>
			<img @class="'layer-'+_equip[_i]+(_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + 'full.png'">
			<<if _equip[_i] is "upper" or _equip[_i] is "under_upper">>
				<<if _item.sleeve_img is 1>>
					<img @class="'layer-rightarmclothes'+(_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + 'right.png'">
					<img @class="'layer-leftarmclothes'+(_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + 'left.png'">
				<</if>>
				<<if _item.breast_img is 1>>
					<<if $debugBodyState.breastSize gte 12>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '5.png'">
					<<elseif $debugBodyState.breastSize gte 8>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '4.png'">
					<<elseif $debugBodyState.breastSize gte 6>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '3.png'">
					<<elseif $debugBodyState.breastSize gte 4>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '2.png'">
					<<elseif $debugBodyState.breastSize gte 2>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '1.png'">
					<<else>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '0.png'">
					<</if>>
				<</if>>
				<<if _item.breast_acc_img is 1>>
					<<if $debugBodyState.breastSize gte 12>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '5_acc.png'">
					<<elseif $debugBodyState.breastSize gte 8>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '4_acc.png'">
					<<elseif $debugBodyState.breastSize gte 6>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '3_acc.png'">
					<<elseif $debugBodyState.breastSize gte 4>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '2_acc.png'">
					<<elseif $debugBodyState.breastSize gte 2>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '1_acc.png'">
					<<else>>
						<img @class="'layer-'+_equip[_i]+ (_item.colour_options.length isnot 0 ?` colour-`+_equip[_i]:``)+' anim-idle-2f'" @src="'img/clothes/'+_equip[_i]+'/' + _item.variable + '/' + '0_acc.png'">
					<</if>>
				<</if>>
			<</if>>
			<<if _equip[_i] is "under_lower">>
				<<if $worn.under_lower.penis_img is 1 and $player.penisExist>>

				<</if>>
			<</if>>
			<<if _item.leftImage is 1>>

			<</if>>
			<<if _item.rightImage is 1>>

			<</if>>
			<<if _item.accessory is 1>>

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

<</widget>>

<<widget "clothesTestingGenerateClothes">>
<<set _clothes to {}>>
<<set _equip to ["upper", "lower", "under_upper", "under_lower","head", "face", "neck", "hands", "legs", "feet"]>>
<<for _i to 0; _i lt _equip.length; _i++>>
	<<set _clothes[_equip[_i]] to {}>>
	<<set _keys to Object.keys(setup.clothes[_equip[_i]])>>
	<<for _j to 0; _j lt _keys.length; _j++>>
		<<set _clothes[_equip[_i]][setup.clothes[_equip[_i]][_j].name] to _j>>
	<</for>>
<</for>>
<</widget>>

<<widget "clothesTestingBodyControls">>

Body

Character Setup
<<listbox "$debugBodyState.charactersToShow" autoselect>>
	<<option "Single" 1>>
	<<option "Wiki" 11>>
<</listbox>>

Skin Colour
Enable <<print '<<radiobutton "$skinColor.tanImgEnabled" "t" ' + ($skinColor.tanImgEnabled is "t" ? "checked" : "") + '>>'>> |
Disable <<print '<<radiobutton "$skinColor.tanImgEnabled" "f" ' + ($skinColor.tanImgEnabled is "f" ? "checked" : "") + '>>'>> |

Skin colour:

Reddish:
Light <<print '<<radiobutton "$debugSkinColor.type" "light" ' + ($debugSkinColor.type is "light" ? "checked" : "") + '>>'>> |
Medium <<print '<<radiobutton "$debugSkinColor.type" "medium" ' + ($debugSkinColor.type is "medium" ? "checked" : "") + '>>'>> |
Dark <<print '<<radiobutton "$debugSkinColor.type" "dark" ' + ($debugSkinColor.type is "dark" ? "checked" : "") + '>>'>> |
Gyaru <<print '<<radiobutton "$debugSkinColor.type" "gyaru" ' + ($debugSkinColor.type is "gyaru" ? "checked" : "") + '>>'>> (Pale with no tan, very dark with full tan)

Yellowish:
Light <<print '<<radiobutton "$debugSkinColor.type" "ylight" ' + ($debugSkinColor.type is "ylight" ? "checked" : "") + '>>'>> |
Medium <<print '<<radiobutton "$debugSkinColor.type" "ymedium" ' + ($debugSkinColor.type is "ymedium" ? "checked" : "") + '>>'>> |
Dark <<print '<<radiobutton "$debugSkinColor.type" "ydark" ' + ($debugSkinColor.type is "ydark" ? "checked" : "") + '>>'>>
Gyaru <<print '<<radiobutton "$debugSkinColor.type" "ygyaru" ' + ($debugSkinColor.type is "ygyaru" ? "checked" : "") + '>>'>>

Initial Tan: <<print '<<numberslider "$debugSkinColor.range" '+($debugSkinColor.range isnot undefined? $debugSkinColor.range:0)+' 0 100 1>>'>>

Penis Size

<<set _penisSize to {"None":"-2", "Mini":"-1", "Tiny":"0", "Small":"1", "Normal":"2", "Large":"3", "Enormous":"4"}>>
<<set _keys to Object.keys(_penisSize)>>
<<for _i to 0; _i lt _keys.length; _i++>>

		<<print _keys[_i]>>
		<<print '<<radiobutton "$debugBodyState.penisSize" "'+_penisSize[_keys[_i]]+'" ' + ($debugBodyState.penisSize is _penisSize[_keys[_i]] ? "checked" : "") + '>>'>>
	 |
<</for>>

Penis Virginity

Virgin <<print '<<radiobutton "$debugBodyState.penisVirgin" "true" ' + ($debugBodyState.penisVirgin is "true" ? "checked" : "") + '>>'>> |
Non-Virgin <<print '<<radiobutton "$debugBodyState.penisVirgin" "false" ' + ($debugBodyState.penisVirgin is "false" ? "checked" : "") + '>>'>> |

Breasts
<<set _name to ["Flat", "Budding", "Tiny", "Small", "Pert", "Modest", "Full", "Large", "Ample", "Massive", "Huge", "Gigantic", "Enormous"]>>
<<for _i to 0; _i lt _name.length; _i++>>
	<<print _name[_i]>> <<print '<<radiobutton "$debugBodyState.breastSize" _i ' + ($debugBodyState.breastSize is _i ? "checked" : "") + '>>'>> |
<</for>>

Eye Colour

None <<print '<<radiobutton "$debugSelectedColors.eyes" "none" ' + ($debugSelectedColors.eyes is "none" ? "checked" : "") + '>>'>> |
Purple <<print '<<radiobutton "$debugSelectedColors.eyes" "purple" ' + ($debugSelectedColors.eyes is "purple" ? "checked" : "") + '>>'>> |
Dark Blue <<print '<<radiobutton "$debugSelectedColors.eyes" "dark blue" ' + ($debugSelectedColors.eyes is "dark blue" ? "checked" : "") + '>>'>> |
Light Blue <<print '<<radiobutton "$debugSelectedColors.eyes" "light blue" ' + ($debugSelectedColors.eyes is "light blue" ? "checked" : "") + '>>'>> |
Amber <<print '<<radiobutton "$debugSelectedColors.eyes" "amber" ' + ($debugSelectedColors.eyes is "amber" ? "checked" : "") + '>>'>> |
Hazel <<print '<<radiobutton "$debugSelectedColors.eyes" "hazel" ' + ($debugSelectedColors.eyes is "hazel" ? "checked" : "") + '>>'>> |
Green <<print '<<radiobutton "$debugSelectedColors.eyes" "green" ' + ($debugSelectedColors.eyes is "green" ? "checked" : "") + '>>'>> |
Red <<print '<<radiobutton "$debugSelectedColors.eyes" "red" ' + ($debugSelectedColors.eyes is "red" ? "checked" : "") + '>>'>> |
Pink <<print '<<radiobutton "$debugSelectedColors.eyes" "pink" ' + ($debugSelectedColors.eyes is "pink" ? "checked" : "") + '>>'>> |
Grey <<print '<<radiobutton "$debugSelectedColors.eyes" "grey" ' + ($debugSelectedColors.eyes is "grey" ? "checked" : "") + '>>'>>
Range <<print '<<radiobutton "$debugSelectedColors.eyes" "range" ' + ($debugSelectedColors.eyes is "range" ? "checked" : "") + '>>'>>

Hair Colour

<<set _hairColorByName to {"Red":"red", "Jet Black":"jetblack", "Black":"black", "Brown":"brown", "Soft Brown":"softbrown", "Light Brown":"lightbrown", "Blond":"blond",
"Platinum Blond":"platinumblond", "Strawberry Blond":"strawberryblond", "Soft Blond":"softblond", "Ashy blond":"ashyblond", "Burnt Orange":"burntorange", "Ginger":"ginger", "Blue":"blue", "Green":"green", "Teal":"teal",
"Pink":"pink", "Hotpink":"hotpink", "Softpink":"softpink", "Crimson":"crimson", "Purple":"purple","Medium Purple":"mediumpurple", "Bright Purple":"brightpurple", "White":"white", "Snow White":"snowwhite", "Deep Blue":"deepblue","Dark Lime":"darklime", "Toxic Green":"toxicgreen",}>>
<<set _keys to Object.keys(_hairColorByName)>>
<<for _i to 0; _i lt _keys.length; _i++>>

		<<print _keys[_i]>>
		<<print '<<radiobutton "$debugSelectedColors.hair" "'+_hairColorByName[_keys[_i]]+'" ' + ($debugSelectedColors.hair is _hairColorByName[_keys[_i]] ? "checked" : "") + '>>'>>
	 |
<</for>>

Hair Length

None <<print '<<radiobutton "$debugBodyState.hairStage" "none" ' + ($debugBodyState.hairStage is "none" ? "checked" : "") + '>>'>> |
Short <<print '<<radiobutton "$debugBodyState.hairStage" "short" ' + ($debugBodyState.hairStage is "short" ? "checked" : "") + '>>'>> |
Shoulder <<print '<<radiobutton "$debugBodyState.hairStage" "shoulder" ' + ($debugBodyState.hairStage is "shoulder" ? "checked" : "") + '>>'>> |
Chest <<print '<<radiobutton "$debugBodyState.hairStage" "chest" ' + ($debugBodyState.hairStage is "chest" ? "checked" : "") + '>>'>> |
Navel <<print '<<radiobutton "$debugBodyState.hairStage" "navel" ' + ($debugBodyState.hairStage is "navel" ? "checked" : "") + '>>'>> |
Thighs <<print '<<radiobutton "$debugBodyState.hairStage" "thighs" ' + ($debugBodyState.hairStage is "thighs" ? "checked" : "") + '>>'>> |
Feet <<print '<<radiobutton "$debugBodyState.hairStage" "feet" ' + ($debugBodyState.hairStage is "feet" ? "checked" : "") + '>>'>> |

Hair Type

<<set _hairTypeByName to {"Default": "default", "Braid left": "braid left", "Braid right": "braid right", "Flat ponytail": "flat ponytail",
"Loose": "loose", "Messy": "messy", "Pigtails": "pigtails", "Ponytail": "ponytail", "Short": "short", "Side tail left": "side tail left",
"Side tail right": "side tail right", "Straight": "straight", "Swept left": "swept left", "Twin braids": "twin braids", "Twintails": "twintails", "Curl": "curl", "Neat": "neat"}>>
<<set _keys to Object.keys(_hairTypeByName)>>
<<for _i to 0; _i lt _keys.length; _i++>>

		<<print _keys[_i]>>
		<<print '<<radiobutton "$debugBodyState.hairType" "'+_hairTypeByName[_keys[_i]]+'" ' + ($debugBodyState.hairType is _hairTypeByName[_keys[_i]] ? "checked" : "") + '>>'>>
	 |
<</for>>

Fringe Type

<<set _fringeTypeByName to {"Default": "default", "Thin flaps": "thin flaps", "Wide flaps": "wide flaps", "Hime": "hime", "Loose": "loose", "Messy": "messy", "Overgrown": "overgrown",
"Ringlets": "ringlets", "Split": "split", "Straight": "straight", "Swept left": "swept left", "Back": "back", "Parted": "parted", "Flat": "flat", "Quiff": "quiff", "Straight curl": "straight curl", "Ringlet curl": "ringlet curl", "Curtain": "curtain"}>>
<<set _keys to Object.keys(_fringeTypeByName)>>
<<for _i to 0; _i lt _keys.length; _i++>>

		<<print _keys[_i]>>
		<<print '<<radiobutton "$debugBodyState.fringeType" "'+_fringeTypeByName[_keys[_i]]+'" ' + ($debugBodyState.fringeType is _fringeTypeByName[_keys[_i]] ? "checked" : "") + '>>'>>
	 |
<</for>>

Fringe Length

<<set _fringeLengthByName to {"Short":"short", "Shoulder":"shoulder", "Chest":"chest", "Navel":"navel", "Thighs":"thighs", "Feet":"feet", }>>
<<set _keys to Object.keys(_fringeLengthByName)>>
<<for _i to 0; _i lt _keys.length; _i++>>

		<<print _keys[_i]>>
		<<print '<<radiobutton "$debugBodyState.fringeStage" "'+_fringeLengthByName[_keys[_i]]+'" ' + ($debugBodyState.fringeStage is _fringeLengthByName[_keys[_i]] ? "checked" : "") + '>>'>>
	 |
<</for>>

Vagina Cum

<<listbox "$debugBodyState.vaginaCum" autoselect>>
	<<option "None" "none">>
	<<option "Start" "VaginalCumDripStart">>
	<<option "Very Slow" "VaginalCumDripVerySlow">>
	<<option "Slow" "VaginalCumDripSlow">>
	<<option "Fast" "VaginalCumDripFast">>
	<<option "Very Fast" "VaginalCumDripVeryFast">>
<</listbox>>

Anus Cum

<<listbox "$debugBodyState.anusCum" autoselect>>
	<<option "None" "none">>
	<<option "Start" "AnalCumDripStart">>
	<<option "Very Slow" "AnalCumDripVerySlow">>
	<<option "Slow" "AnalCumDripSlow">>
	<<option "Fast" "AnalCumDripFast">>
	<<option "Very Fast" "AnalCumDripVeryFast">>
<</listbox>>

Mouth Cum

<<listbox "$debugBodyState.mouthCum" autoselect>>
	<<option "None" "none">>
	<<option "Start" "MouthCumDripStart">>
	<<option "Very Slow" "MouthCumDripVerySlow">>
	<<option "Slow" "MouthCumDripSlow">>
	<<option "Fast" "MouthCumDripFast">>
	<<option "Very Fast" "MouthCumDripVeryFast">>
<</listbox>>

<</widget>>

<<widget "clothesTestingTransformationsControls">>

Transformations

Angel:

Wings:
<<listbox "$debugBodyState.angelWings" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Halo:
<<listbox "$debugBodyState.angelHalo" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Left Wing Type:
<<listbox "$debugBodyState.angelWingsLeftType" autoselect>>
	<<option "Normal" "leftwing">>
	<<option "Cover" "leftcover">>
<</listbox>>
||
Right Wing Type:
<<listbox "$debugBodyState.angelWingsRightType" autoselect>>
	<<option "Normal" "rightwing">>
	<<option "Cover" "rightcover">>
<</listbox>>

Fallen Angel:

Wings:
<<listbox "$debugBodyState.fallenAngelWings" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Halo:
<<listbox "$debugBodyState.fallenAngelHalo" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Left Wing Type:
<<listbox "$debugBodyState.fallenAngelWingsLeftType" autoselect>>
	<<option "Normal" "leftwing">>
	<<option "Cover" "leftcover">>
<</listbox>>
||
Right Wing Type:
<<listbox "$debugBodyState.fallenAngelWingsRightType" autoselect>>
	<<option "Normal" "rightwing">>
	<<option "Cover" "rightcover">>
<</listbox>>

Demon:

Horns:
<<listbox "$debugBodyState.demonHorns" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
	<<option "Classic" "classic">>
<</listbox>>
||
Tail:
<<listbox "$debugBodyState.demonTail" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
	<<option "Classic" "classic">>
<</listbox>>
||
Demon Wings:
<<listbox "$debugBodyState.demonWings" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Demon Wings Type:
<<listbox "$debugBodyState.demonWingsType" autoselect>>
	<<option "Normal" "wings">>
	<<option "Cover" "leftcover">>
	<<option "Flaunt" "flauntWings">>
<</listbox>>

Demon Tail Type:
<<listbox "$debugBodyState.demonTailType" autoselect>>
	<<option "Normal" "tail">>
	<<option "Cover" "rightcover">>
	<<option "Flaunt" "flauntTail">>
<</listbox>>

Wolf:

Ears:
<<listbox "$debugBodyState.wolfEars" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Tail:
<<listbox "$debugBodyState.wolfTail" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Cat:

Ears:
<<listbox "$debugBodyState.catEars" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Tail:
<<listbox "$debugBodyState.catTail" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Cow:

Horns:
<<listbox "$debugBodyState.cowHorns" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Ears:
<<listbox "$debugBodyState.cowEars" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Tail:
<<listbox "$debugBodyState.cowTail" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Bird:

Eyes:
<<listbox "$debugBodyState.birdEyes" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Malar:
<<listbox "$debugBodyState.birdMalar" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Plumage:
<<listbox "$debugBodyState.birdPlumage" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Pubes:
<<listbox "$debugBodyState.birdPubes" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Tail:
<<listbox "$debugBodyState.birdTail" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>

Wings:
<<listbox "$debugBodyState.birdWings" autoselect>>
	<<option "Hide" "hidden">>
	<<option "Default" "default">>
<</listbox>>
||
Left Wing Type:
<<listbox "$debugBodyState.birdWingsLeftType" autoselect>>
	<<option "Normal" "leftwing">>
	<<option "Cover" "leftcover">>
<</listbox>>
||
Right Wing Type:
<<listbox "$debugBodyState.birdWingsRightType" autoselect>>
	<<option "Normal" "rightwing">>
	<<option "Cover" "rightcover">>
<</listbox>>

<</widget>>

<<widget "clothesTestingClothesControls">>

Clothes

Head:
<<listbox "$debugClothesEquipped.head" autoselect>>
	<<optionsfrom _clothes.head>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.head[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.head[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Face:
<<listbox "$debugClothesEquipped.face" autoselect>>
	<<optionsfrom _clothes.face>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.face[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.face[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Neck:
<<listbox "$debugClothesEquipped.neck" autoselect>>
	<<optionsfrom _clothes.neck>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.neck[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.neck[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Hands:
<<listbox "$debugClothesEquipped.hands" autoselect>>
	<<optionsfrom _clothes.hands>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.hands[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.hands[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Upper:
<<listbox "$debugClothesEquipped.upper" autoselect>>
	<<optionsfrom _clothes.upper>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.upper[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.upper[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Lower:
<<listbox "$debugClothesEquipped.lower" autoselect>>
	<<optionsfrom _clothes.lower>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.lower[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.lower[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Under Upper:
<<listbox "$debugClothesEquipped.under_upper" autoselect>>
	<<optionsfrom _clothes.under_upper>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.under_upper[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.under_upper[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Under Lower:
<<listbox "$debugClothesEquipped.under_lower" autoselect>>
	<<optionsfrom _clothes.under_lower>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.under_lower[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.under_lower[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Legs:
<<listbox "$debugClothesEquipped.legs" autoselect>>
	<<optionsfrom _clothes.legs>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.legs[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.legs[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>

Feet:
<<listbox "$debugClothesEquipped.feet" autoselect>>
	<<optionsfrom _clothes.feet>>
<</listbox>>

Primary:
<<listbox "$debugSelectedColors.feet[0]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
| Secondary:
<<listbox "$debugSelectedColors.feet[1]" autoselect>>
	<<optionsfrom _clothesColorOptions>>
<</listbox>>
<</widget>>


code:
:: Widgets Debug Event [widget]

<<widget "checkEventNPC">>
	<<if (EventSystem.IsSlotTaken($args[0]) and !EventSystem.Disable) or $enemynomax gte 6 or $enemyno gte 6>>
		<<set $endeventerror to $lastgenerated>>
		<<clearsinglenpc $args[0]>>

	<</if>>
	<<set $lastgenerated to $passage>>
<</widget>>

<<widget "eventExtraInfo">>

<<set $_passages = (V.event is undefined
	? []
	: V.event.buffer.reduce((prev, cur) => {
		prev.pushUnique(cur.area[0]);
		return prev;
	}, [])
)>>

<<if _eventalertmajorarea is true>>
	You are in a major area, which means an NPC escaped!
	<<if $cheatdisable is "f">>
		Ignore this message if you've just used a cheat. Otherwise, please report this!
	<<else>>
		Please report this!
	<</if>>
	<<set _eventreason to true>>
<<elseif _eventalertmajorarea is false>>
	This NPC was defined in this passage<<set _eventreason to true>>
<<else>>
	<<if $passage.includes("Street Stalk")>>
		You are being stalked. Usually this means everything is in order.
		<<set _eventreason to true>>
	<</if>>
	<<if $event isnot undefined>>
		<<if $_passages.includes($passage)>>
			You are in a passage where NPCs were generated.
			<<set _eventreason to true>>
		<<elseif $passage.includes($_passages)>>
			You are in a subpassage from where NPCs were generated. Usually this means they are still in use.
			<<set _eventreason to true>>
		<</if>>
	<<else>>
		You are not in an event.
	<</if>>
<</if>>
<<if _eventreason isnot true>>
	NPCs were generated at some point and may not be cleared. They could still be in use. If you feel like they shouldn't be active, please report this. If you're unsure whether or not to report this, go to a major area (i.e a street/alleyway/outside) and check this again.
<</if>>

NPC information

$enemyno NPC<<if $enemyno gt 1>>s are<<else>> is<</if>> currently active. Max: $enemynomax. Them being:

<<for $_i to 0; $_i lt $NPCList.length; $_i++>>
	<<set $_npc to $NPCList[$_i]>>
	<<set $_eventNPC to EventSystem.Get($_i)>>
	<<if $_npc.type isnot undefined and $_eventNPC isnot undefined>>

			ID: $_i | $_npc.fullDescription

			Sex: $_npc.gender | Gender: $_npc.pronouns.man

			Description: $_npc.description<<if $_npc.role>> | Role: $_npc.role<</if>>

			Source: <<print $_eventNPC.area[0]>>, at: <<ampm `Math.floor($_eventNPC.time / 60)` `$_eventNPC.time % 60`>>.

	<<else>>

			NPC #: $_i

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

<<if $event isnot undefined>>

Extra debugging:

	<<for $_i to 0; $_i lt $event.buffer.length; $_i++>>
		<<set $_eventNPC to $event.buffer[$_i]>>
		<<print ensure($NPCList[$_eventNPC.slot]?.fullDescription, "No description.")>>

		Defined in passage <<print $_eventNPC.area[0]>>, at <<ampm `Math.floor($_eventNPC.time / 60)` `$_eventNPC.time % 60`>>.

		<<if $_eventNPC.area.length gt 1>>
			Widget Stack:
			<<set $_widgetStack to $_eventNPC.area.slice(1)>>
			<<for $_iStack = 0; $_iStack lt $_widgetStack.length; $_iStack++>>
				<<print "<<$_widgetStack[$_iStack]>>">><<if $_iStack isnot $_widgetStack.length - 1>>, <</if>>
			<</for>>

		<</if>>

		<<for $_j to 0; $_j lt $event.buffer.length; $_j++>>
			<<set $_eventNPC2 to $event.buffer[$_j]>>
			<<if $_i isnot $_j and $_eventNPC.area[0] is $_eventNPC2.area[0]>>
				<<if _eventnumberinpassage is undefined>>
					<<set _eventnumberinpassage to 0>>
				<</if>>
				<<set _eventnumberinpassage += 1>>
			<</if>>
		<</for>>

		<<if _eventnumberinpassage isnot undefined>>
			<<print _eventnumberinpassage>> other NPC<<if _eventnumberinpassage isnot 1>>s<</if>> have also been defined in passage <<print $_eventNPC.area[0]>>.

			<<unset _eventnumberinpassage>>
		<</if>>
		Set in slot <<print $_eventNPC.slot>> of $$NPCList.

		<<for $_j to 0; $_j lt $event.buffer.length; $_j++>>
			<<if $_i isnot $_j and $_eventNPC.slot is $_eventNPC.slot[$_j]>>
				This NPC has been overwritten or overwrote another one in slot <<print $event.slot[$_eventNPC.slot]>>!

				<<break>>
			<</if>>
		<</for>>

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