code:
:: Widgets End Combat [widget]

<<widget "endcombat">>

<<if $enemyhealth lte 0>>
	<<if $enemytype is "man">>
		<<famescrap $enemynomax>>
	<</if>>
	<<if $audiencepresent is 1>>
		<<famescrap 10>>
	<</if>>
<</if>>

<<if $demonabsorb gte 1>>
	<<if $enemytype is "tentacles" or $enemytype is "struggle">>
		<<set $pain -= (20 * $demonabsorb)>>
		<<set $stress -= (300 * $demonabsorb)>>
	<<else>>
		<<set $trauma -= (150 * $demonabsorb)>>
	<</if>>
	You absorb the sexual essence. You feel soothed.
	<<set $demonabsorb to 0>>

<</if>>

<<if $assertive gte 1>>
	You were
	<<if $assertive lte 5>>
		slightly
	<<elseif $assertive lte 10>>
		a little
	<<elseif $assertive lte 30>>
		somewhat
	<<elseif $assertive lte 40>>
		quite
	<<elseif $assertive lte 50>>
		pretty
	<<elseif $assertive lte 60>>
		very
	<<else>>
		extremely
	<</if>>
	assertive.

	<<if $assertiveaction isnot 0 and $assertiveaction isnot undefined>>
		<<if $assertiveaction is "trauma">>
			<<set $trauma -= $assertive>>
			I'm so naughty.
			<<ltrauma>>

		<<elseif $assertiveaction is "stress">>
			<<set $stress -= ($assertive * 10)>>
			That was fun.
			<<lstress>>

		<<elseif $assertiveaction is "submissive">>
			<<set $submissive += ($assertive / 10)>>
			<<if $enemytype is "beast">>
				<<if $NPCList[0].type is "wolf">>
					<<set _plural_beast_type to "wolves">>
				<<elseif $NPCList[0].type is "fox">>
					<<set _plural_beast_type to "foxes">>
				<<else>>
					<<set _plural_beast_type to $NPCList[0].type + "s">>
				<</if>>
				It's nice to make _plural_beast_type feel good.
			<<elseif $enemytype is "tentacles">>
				It's nice to make tentacles feel good.
			<<elseif $enemytype is "struggle">>
				It's nice to make creatures feel good.
			<<else>>
				It's nice to make people feel good.
			<</if>>

		<<elseif $assertiveaction is "defiant">>
			<<set $submissive -= ($assertive / 10)>>
			It's nice to be in control.

		<</if>>
	<<set $assertive to 0>>
	<</if>>

<</if>>

<<endevent>>
<<struggle_end>>

<<set $combat to 0>>
<<set $rapeavoid to 1>>
<<set $sexavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $breastbitten to 0>>
<<set $apologised to 0>>
<<unset $deepthroating>>
<<unset $bodywriting_special>>
<<unset $machine_tattoo_success>>
<<unset $dodging>>
<<unset $feet_planted>>
<<unset $speechspraycycleplant>>
<<unset $newlyWritten>>
<<unset $pollenImminent>>
<<unset $combatBegun>>

<<switch $player.gender>>
<<case "f">>
	/*state*/
	<<set $vaginastate to 0>>
	<<set $penisstate to "none">>
	/*use*/
	<<set $vaginause to 0>>
	<<set $penisuse to "none">>
<<case "m">>
	/*state*/
	<<set $vaginastate to "none">>
	<<set $penisstate to 0>>
	/*use*/
	<<set $penisuse to 0>>
	<<set $vaginause to "none">>
<<case "h">>
	/*state*/
	<<set $vaginastate to 0>>
	<<set $penisstate to 0>>
	/*use*/
	<<set $vaginause to 0>>
	<<set $penisuse to 0>>
<</switch>>

<<set $anusstate to 0>>
<<set $mouthstate to 0>>
<<set $finish to 0>>
<<unset $stalk_end>>
<<unset $stalk_event>>
<<unset $stalk_clothes>>
<<unset $stalk>>
<<unset $stalk_assess>>
<<unset $audience_active>>
<<unset $combat_end_text>>
<<set $gloryhole to 0>>
<<set $mouthuse to 0>>
<<set $anususe to 0>>
<<set $thighuse to 0>>
<<set $bottomuse to 0>>
<<if $feetuse isnot "bound">>
	<<set $feetuse to 0>>
<</if>>
<<if $leftarm isnot "bound">>
	<<set $leftarm to 0>>
<</if>>
<<if $rightarm isnot "bound">>
	<<set $rightarm to 0>>
<</if>>
<<set $chestuse to 0>>
<<set $cheststate to 0>>
<<if $head isnot "bound">>
	<<set $head to 0>>
<</if>>
<<if $position is "wall">>
	<<set $leftarm to 0>>
	<<set $rightarm to 0>>
	<<set $head to 0>>
<</if>>
<<unset $neckuse>>
<<set $position to 0>>

<<set $walltype to 0>>

<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $overlowerstruggle to 0>>
<<set $overupperstruggle to 0>>
<<set $enemytrust to 0>>
<<set $alarm to 0>>
<<set $rescue to 0>>
<<set $phase to 0>>
<<set $phase2 to 0>>
<<set $noise to 0>>
<<set $timer to 0>>
<<set $beastname to "none">>
<<set $panicparalysis to 0>>
<<set $panicviolence to 0>>
<<set $pullaway to 0>>
<<set $novaginal to 0>>
<<set $noanal to 0>>
<<set $nopenile to 0>>
<<set $nochoke to 0>>
<<unset $npcCondoms>>
<<unset $condomUse>>
<<unset $condomAsk>>
<<set $player.condom to false>>
<<unset $condomVaginalImg>>
<<unset $condomAnalImg>>
<<unset $condomPlayerPenisImg>>
<<unset $noupper>>
<<unset $noupperasked>>
<<set $askedtochoke to 0>>
<<set $speechwheeze to 0>>
<<set $speechorgasmweakcumcount to 0>>
<<set $speechorgasmnocumcount to 0>>
<<set $speechorgasmcount to 0>>
<<set $speechorgasmrepeat to 0>>
<<set $underwatertime to 0>>
<<if $underwater isnot 1>>
	<<oxygenrefresh>>
	<<set $suffocating to 0>>
<</if>>
<<set $walltype to "wall">>
<<set $angelforgive to 0>>
<<unset $banishDisable>>
<<unset $penisfucked>>
<<unset $vaginafucked>>
<<unset $anusfucked>>
<<set $speechdisable to 0>>
<<unset $stealstateleft>>
<<unset $stealstateright>>
<<unset $position_lock>>

<<set $leftactiondefault to $leftaction>>
<<set $rightactiondefault to $rightaction>>
<<set $feetactiondefault to $feetaction>>
<<set $mouthactiondefault to $mouthaction>>
<<set $vaginaactiondefault to $vaginaaction>>
<<set $penisactiondefault to $penisaction>>
<<set $anusactiondefault to $anusaction>>
<<set $thighactiondefault to $thighaction>>
<<set $cheekactiondefault to $cheekaction>>
<<set $chestactiondefault to $chestaction>>

<<actioncarry>>

<<set $penisaction to 0>>
<<set $vaginaaction to 0>>
<<set $anusaction to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $mouthaction to 0>>
<<set $thighaction to 0>>
<<set $cheekaction to 0>>
<<set $feetaction to 0>>
<<set $chestaction to 0>>
<<set $mockaction to "none">>
<<set $bodyaction to 0>>
<<set $stealdifficulty to 1>>

<<set $lefttarget to 0>>
<<set $righttarget to 0>>
<<set $feettarget to 0>>
<<set $mouthtarget to 0>>
<<if $player.penisExist>>
<<set $penistarget to 0>>
<</if>>
<<if $player.vaginaExist>>
<<set $vaginatarget to 0>>
<<unset $vaginadoubletarget>>
<</if>>
<<set $anustarget to 0>>
<<unset $anusdoubletarget>>
<<set $chesttarget to 0>>
<<set $thightarget to 0>>
<<set $stealtarget to "">>

<<set $carryblock to 0>>

<<set $enemywounded to 0>>
<<set $enemyejaculated to 0>>
<<set $semenpuddle to 0>>
<<set $seconds to 0>>
<<set $masturbationorgasm to 0>>

<<set $swarm to {
	"type":0,
	"name":0,
	"move":0,
	"spill":0,
	"steady":0,
	"amount":{},
	"data":{}
}>>

<<unset $nowiggle>>
<<unset $cumbucket>>

<<set $tentacles.max to 0>>
<<set $tentacles.active to 0>>
<<set _tentacles to $tentacles>>
<<for _i to 0; _i lt 20; _i++>>
	<<set _tentacles[_i] to null>>
<</for>>
<<set $abomination to 0>>
<<unset $tentacleColour>>
<<set $tentacleMouth to 0>>
<<set $tentacleAnus to 0>>
<<set $tentacleAnusBaby to 0>>
<<set $tentacleVagina to 0>>
<<set $tentaclePenis to 0>>

<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $back to 0>>
<<set $front to 0>>
<<set $chest to 0>>

<<set $claws to 1>>
<<set $water to 0>>

<<set $vorestrength to 0>>
<<set $vorestruggle to 0>>
<<set $voretentacles to 0>>
<<set $vorestage to 0>>
<<set $vorecreature to 0>>
<<set $vorestomach to 0>>
<<set $swallowed to 0>>

<<set $leftleg to 0>>
<<set $rightleg to 0>>
<<set $leftnipple to 0>>
<<set $rightnipple to 0>>
<<set $leftarmstate to 0>>
<<set $rightarmstate to 0>>
<<set $feetstate to 0>>

<<set $audienceselector to 0>>
<<set $audiencecamera to 0>>
<<set $audiencecamera1 to 0>>
<<set $audiencecamera2 to 0>>
<<set $audiencecamera3 to 0>>
<<set $audiencecamera4 to 0>>
<<set $audiencecamera5 to 0>>
<<set $audiencecamera6 to 0>>

<<set $audiencemember to 0>>
<<set $audienceforceboy to 0>>
<<set $audienceforcegirl to 0>>
<<set $audienceforceteen to 0>>
<<set $audiencepresent to 0>>

<<set $speechcrossdressangry to 0>>
<<set $speechcrossdressaroused to 0>>
<<set $speechcrossdressshock to 0>>
<<set $speechcrossdressdisappointed to 0>>

<<set $speechhermangry to 0>>
<<set $speechhermaroused to 0>>
<<set $speechhermshock to 0>>
<<set $speechhermdisappointed to 0>>

<<set $prop to []>>

<<set $arousalmasochism to 0>>
<<unset $willpowerpain>>

<<set $active_enemy to 0>>

<<set $combatTrain to {
	length: 0,
	generateInit: 1,
	beastTypes: [],
	numberPerTrain: [],
}>>

<<if $seductionskillup gte 1>>
	<<set $seductionskillup to 0>>
	<<if $seductionskill lt 1000>>
		You feel more confident in your seduction skills.

	<</if>>
<</if>>
<<if $oralskillup gte 1>>
	<<set $oralskillup to 0>>
	<<if $oralskill lt 1000>>
		You feel more confident in your ability to give pleasure with your mouth.

	<</if>>
<</if>>
<<if $vaginalskillup gte 1>>
	<<set $vaginalskillup to 0>>
	<<if $vaginalskill lt 1000>>
		You feel more confident in your ability to give pleasure with your vagina.

	<</if>>
<</if>>
<<if $analskillup gte 1>>
	<<set $analskillup to 0>>
	<<if $analskill lt 1000>>
		You feel more confident in your ability to give pleasure with your anus.

	<</if>>
<</if>>
<<if $handskillup gte 1>>
	<<set $handskillup to 0>>
	<<if $handskill lt 1000>>
		You feel more confident in your ability to give pleasure with your hands.

	<</if>>
<</if>>
<<if $feetskillup gte 1>>
	<<set $feetskillup to 0>>
	<<if $feetskill lt 1000>>
		You feel more confident in your ability to give pleasure with your feet.

	<</if>>
<</if>>
<<if $bottomskillup gte 1>>
	<<set $bottomskillup to 0>>
	<<if $bottomskill lt 1000>>
		You feel more confident in your ability to give pleasure with your buttocks.

	<</if>>
<</if>>
<<if $thighskillup gte 1>>
	<<set $thighskillup to 0>>
	<<if $thighskill lt 1000>>
		You feel more confident in your ability to give pleasure with your thighs.

	<</if>>
<</if>>
<<if $chestskillup gte 1>>
	<<set $chestskillup to 0>>
	<<if $chestskill lt 1000>>
		You feel more confident in your ability to use your <<breasts>> to pleasure others.

	<</if>>
<</if>>
<<if $penileskillup gte 1>>
	<<set $penileskillup to 0>>
	<<if $penileskill lt 1000>>
		You feel more confident in your ability to pleasure others with your penis.

	<</if>>
<</if>>
<<set $enemyArousalLossReduction to 1>>

<<manend>>
<<turnend>>
<<getCombatDefaultsTypeClear>>

<</widget>>

:: Widgets Clear NPC [widget]

<<widget "clearnpc">>

<<for _i = 0; _i < $NPCList.length; _i++>>
	<<set $NPCList[_i] to clone(setup.baseNPC)>>
<</for>>

<<set $pronoun to 0>>

<<set $beastgenderoverride to 0>>

<<set $enemyno to 0>>
<<set $enemynomax to 0>>

<<set $combattype to 0>>

<<set $npc.splice(0)>>
<<set $npcnum.splice(0)>>
<<set $npcrow.splice(0)>>
<<if $endeventerror is undefined>>
	<<run EventSystem.Clear()>>
<</if>>
<</widget>>

:: Widgets Clear Single NPC [widget]

<<widget "clearsinglenpc">>

<<if typeof $args[0] isnot "number">>
	Widget "clearsinglenpc" used incorrectly! Please report this!
<</if>>

<<set _i to $args[0]>>
<<set $NPCList[_i] to clone(setup.baseNPC)>>
<<if $enemyno gt 0>>
	<<set $enemyno -= 1>>
<</if>>
<<if $endeventerror is undefined>>
	<<run EventSystem.Pop(_i)>>
<</if>>
<<if $enemyno is 0>>
	<<set $pronoun to 0>>
	<<if $endeventerror is undefined>>
		<<run EventSystem.Clear()>>
	<</if>>
<</if>>
<</widget>>

:: Widgets End Event [widget]

<<widget "endevent">>

<<if $dancing is 1>>
	<<famedance>>
<</if>>

<<set $molestavoid to 1>>

<<if $args[0] isnot "phaseless">>
	<<set $phaselast to $phase>>
	<<set $phase to 0>>
	<<set $phase2 to 0>>
<</if>>
<<endnpc>>
/*<<clearnpc>> is already called in endnpc */
<<set $dancelocation to 0>>
<<set $forceddance to 0>>

<<set $consensual to 0>>
<<set $danceaction to 0>>
<<set $danceactiondefault to 0>>
<<set $attention to 0>>
<<set $audience to 0>>
<<set $audienceexcitement to 0>>
<<set $audiencearousal to 0>>
<<set $audiencemod to 1>>
<<set $venuemod to 1>>
<<set $danceevent to 0>>
<<set $dancing to 0>>
<<set $privatedanceoffered to 0>>
<<set $trance to 0>>
<<set $robinhugging to 0>>
<<set $robinroomentered to 0>>
<<set $crossdressing to 0>>
<<unset $tip_add>>
<<unset $monster>>
<<set $enemyno to 0>>
<<set $enemynomax to 0>>
<<unset $noFinish>>
<<unset $promiscuityIgnore>>
<<unset $npcSub>>
<<unset $purityEvent>>
<<unset $corruptionEvent>>
<<unset $speechNPCKissVirgin>>
<<unset $speechNPCHandholdingVirgin>>
<<unset $sydneyComments>>
<<unset $sydneyUniqueComments>>
<<unset $noBodyWriting>>
<<unset $breakIgnore>>
<<unset $eventforced>>

<<unset $internalejac>>

<<set $orgasmcurrent to 0>>

<<set $beastname to "none">>

<<set $action_unclad_over_outfit to 0>>
<<set $action_unclad_over_upper to 0>>
<<set $action_unclad_over_lower to 0>>
<<set $action_unclad_outfit to 0>>
<<set $action_unclad_upper to 0>>
<<set $action_unclad_lower to 0>>
<<set $action_unclad_under_lower to 0>>
<<set $clothingselector to 0>>
<<unset $stealtextskip>>
<<set $trueconsensual to 0>>

<<set $speechcum to 0>>
<<set $speechorgasmcount to 0>>

<<set $npc_named to 0>>
<<unset $setupMidOrgasm>>

<<unset $childSelected>>
<<unset $childrenPassage>>

<<set $index to 0>>

<</widget>>

:: Widgets End Speech [widget]
<<widget "manend">>
<<unset $speechpenispenetrated>>
<<unset $speechvaginapenetrated>>
<<unset $speechanuspenetrated>>
<<unset $speechmouthpenetrated>>
<<unset $speechotheranuspenetrated>>
<<unset $speechvaginaimminent>>
<<unset $speechpenisimminent>>
<<unset $speechanusimminent>>
<<unset $speechmouthimminent>>
<<unset $speechotheranusimminent>>
<<unset $speechvaginaentrance>>
<<unset $speechanusentrance>>
<<unset $speechmouthentrance>>
<<unset $speechpenisentrance>>
<<unset $speechotheranusentrance>>
<<unset $speechvaginawithhold>>
<<unset $speechanuswithhold>>
<<unset $speechpeniswithhold>>
<<unset $speechotheranuswithhold>>
<<unset $speechvagina>>
<<unset $speechpenis>>
<<unset $speechanus>>
<<unset $speechvaginamouth>>
<<unset $speechvaginavagina>>
<<unset $speechbeat>>
<<unset $speechhit>>
<<unset $speechtribentrance>>
<<unset $speechfacesit>>
<<unset $speechmouthotheranus>>
<<unset $speechanallick>>
<<unset $speechanalkiss>>

<<unset $speechfencingentrance>>
<<unset $speechpenispenis>>

<<unset $speechheadbreasts>>
<<unset $speechheadchest>>
<<unset $speechheadnipple>>
<<unset $speechheadsuckle>>
<<unset $speechheadnippleclosed>>
<<unset $speechheadsuckleclosed>>

<<unset $speechfeet>>
<<unset $speechthigh>>
<<unset $speechcheeks>>
<<unset $speechhandjobpenis>>
<<unset $speechhandjobvagina>>

<<unset $speechthroat>>
<<unset $speechvaginafoot>>
<<unset $speechpenisfoot>>
<<unset $speechchastity>>
<<unset $speechNPCChastity>>
<<unset $speechstruggle>>
<<unset $speechstripstruggle>>
<<unset $speechspank>>
<<unset $speecharms>>
<<unset $speechclit>>
<<unset $speechglans>>
<<unset $speechfutapenis>>
<<unset $speechbottom>>
<<unset $speechhair>>
<<unset $speechchestrub>>
<<unset $speechbreastrub>>
<<unset $speechvaginaflaunt>>
<<unset $speechpenisbig>>
<<unset $speechpenisescape>>
<<unset $speechvaginaescape>>
<<unset $speechanusescape>>
<<unset $speechsteal>>
<<unset $speechnamedrop>>
<<unset $speechadmired>>

<<unset $speechNPCPenisVirgin>>
<<unset $speechNPCVaginaVirgin>>
<<unset $speechNPCAnusVirgin>>
<<unset $speechNPCOralVirgin>>
<<unset $speechNPCKissVirgin>>
<<unset $speechNPCHandholdingVirgin>>

<<set $npcspeechcycle += 1>>
<<if $npcspeechcycle gte 7>>
	<<set $npcspeechcycle to 0>>
<</if>>

<</widget>>

<<widget "turnend">>

<<set $speechcum to 0>>
<<set $speechorgasmrepeat to 0>>

<<unset $speechgenitals>>
<<unset $speechbreasts>>
<<unset $speechscream>>
<<unset $speechapologise>>
<<unset $speechplead>>
<<unset $speechmoan>>
<<unset $speechdemand>>
<<unset $speechcoverface>>
<<unset $speechcoverpenis>>
<<unset $speechcovervagina>>
<<unset $speechapologiseno>>
<<unset $speechforgive>>
<<unset $speechspray>>
<<unset $speechvaginavirgin>>
<<unset $speechanusvirgin>>
<<unset $speechmouthvirgin>>
<<unset $speechpenisvirgin>>
<<unset $speechkissvirgin>>

<<if $speechcrossdressangry is 2>>
	<<set $speechcrossdressangry to 1>>
<<elseif $speechcrossdressangry is 1>>
	<<unset $speechcrossdressangry>>
<</if>>

<<if $speechcrossdressaroused is 2>>
	<<set $speechcrossdressaroused to 1>>
<<elseif $speechcrossdressaroused is 1>>
	<<unset $speechcrossdressaroused>>
<</if>>

<<if $speechcrossdressshock is 2>>
	<<set $speechcrossdressshock to 1>>
<<elseif $speechcrossdressshock is 1>>
	<<unset $speechcrossdressshock>>
<</if>>

<<if $speechcrossdressdisappointed is 2>>
	<<set $speechcrossdressdisappointed to 1>>
<<elseif $speechcrossdressdisappointed is 1>>
	<<unset $speechcrossdressdisappointed>>
<</if>>

<<if $speechhermangry is 2>>
	<<set $speechhermangry to 1>>
<<elseif $speechhermangry is 1>>
	<<unset $speechhermangry>>
<</if>>

<<if $speechhermaroused is 2>>
	<<set $speechhermaroused to 1>>
<<elseif $speechhermaroused is 1>>
	<<unset $speechhermaroused>>
<</if>>

<<if $speechhermshock is 2>>
	<<set $speechhermshock to 1>>
<<elseif $speechhermshock is 1>>
	<<unset $speechhermshock>>
<</if>>

<<if $speechhermdisappointed is 2>>
	<<set $speechhermdisappointed to 1>>
<<elseif $speechhermdisappointed is 1>>
	<<unset $speechhermdisappointed>>
<</if>>

<<if $enemyarousal lt 0>>
	<<set $enemyarousal to 0>>
<</if>>

<</widget>>

<<widget "manspeech">>
<<set _n to $args[0]>>
<<if $NPCList[_n].speechpenisescape is 1>>
<<set $speechpenisescape to 1>>
<</if>>
<<if $NPCList[_n].speechvaginaescape is 1>>
<<set $speechvaginaescape to 1>>
<</if>>
<<if $NPCList[_n].speechanusescape is 1>>
<<set $speechanusescape to 1>>
<</if>>
<</widget>>


code:
:: Widgets Combat Img [widget]

<<widget "combatimg">>
	<<if $enemyarousal gte ($enemyarousalmax / 5) * 4>>
		<<set _animspeed to 'vfast'>>
	<<elseif $enemyarousal gte ($enemyarousalmax / 5) * 3>>
		<<set _animspeed to 'fast'>>
	<<elseif $enemyarousal gte ($enemyarousalmax / 5) * 1>>
		<<set _animspeed to 'mid'>>
	<<else>>
		<<set _animspeed to 'slow'>>
	<</if>>
	<<if window.document.body.clientWidth lt 650>>

			<<if $position is "missionary">>
				<<missionaryimg>>
			<<else>>
				<<doggyimg>>
			<</if>>

		<<if $ejaculating>>
			<<ejacimg>>
		<<else>>
			<<xrayimg>>
		<</if>>
	<<else>>

			<<if $position is "missionary">>
				<<missionaryimg>>
			<<else>>
				<<doggyimg>>
			<</if>>
			<<if $ejaculating is 1>>
				<<ejacimg>>
			<<else>>
				<<xrayimg>>
			<</if>>

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

<<widget "doggyimg">>
<<voreimg>>
<<closeimg>>
<<set _filters to $skinColor.current>>
<<set _img to setup.tanImg.doggy[$skinColor.tanImgEnabled]>>
<<set _disabled to ["disabled","hidden"]>>
<<set _xx to $enemynomax-1>>
<<if _xx is -1>>
	<<set _stanceCheck to 0>>
<<else>>
	<<set _stanceCheck to $NPCList[_xx].stance>>
<</if>>

<<switch _swarmcreature>>
<<case "fish">>
	<<if _swarmactive lte 0>>
	<<elseif _swarmactive lte 1>>

	<<elseif _swarmactive lte 2>>

	<<elseif _swarmactive lte 3>>

	<<elseif _swarmactive lte 4>>

	<<elseif _swarmactive lte 9>>

	<<elseif _swarmactive gte 10>>

	<</if>>
<<case "eels">>
	<<if _swarmactive lte 0>>
	<<elseif _swarmactive lte 1>>

	<<elseif _swarmactive lte 2>>

	<<elseif _swarmactive lte 3>>

	<<elseif _swarmactive lte 4>>

	<<elseif _swarmactive lte 9>>

	<<elseif _swarmactive gte 10>>

	<</if>>
<<case "spiders">>
	<<if _swarmactive lte 0>>
	<<elseif _swarmactive lte 1>>

	<<elseif _swarmactive lte 2>>

	<<elseif _swarmactive lte 3>>

	<<elseif _swarmactive lte 4>>

	<<elseif _swarmactive lte 9>>

	<<elseif _swarmactive gte 10>>

	<</if>>
<<case "worms">>
	<<if _swarmactive lte 0>>
	<<elseif _swarmactive lte 1>>

	<<elseif _swarmactive lte 2>>

	<<elseif _swarmactive lte 3>>

	<<elseif _swarmactive lte 4>>

	<<elseif _swarmactive lte 9>>

	<<elseif _swarmactive gte 10>>

	<</if>>
<<case "maggots">>
	<<if _swarmactive lte 0>>
	<<elseif _swarmactive lte 1>>

	<<elseif _swarmactive lte 2>>

	<<elseif _swarmactive lte 3>>

	<<elseif _swarmactive lte 4>>

	<<elseif _swarmactive lte 9>>

	<<elseif _swarmactive gte 10>>

	<</if>>
<<default>>
	<<if _swarmactive lte 0>>
	<<elseif _swarmactive lte 1>>

	<<elseif _swarmactive lte 2>>

	<<elseif _swarmactive lte 3>>

	<<elseif _swarmactive lte 4>>

	<<elseif _swarmactive lte 9>>

	<<elseif _swarmactive gte 10>>

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

<<swarm_img>>

<<if $thighuse is "othermouth">>

<</if>>

<<if $penisstate is "othermouthimminent">>

<</if>>

<<if $penisstate is "othermouthimminent">>

<</if>>

<<if $mouthstate is "kissimminent">>

<</if>>

<<if $mouthstate is "kissentrance">>

<</if>>

<<if $vaginastate is "othermouthimminent">>

<</if>>

<<if $vaginastate is "othermouthentrance">>

<</if>>

<<if $vaginastate is "imminent" or $vaginastate is "doubleimminent">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype isnot "beast">>

		<<if $silhouettedisable is "f" and $anususe isnot "penis">>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $bottomuse is "mouth">>

<</if>>

<<if $anusstate is "othermouthimminent">>

<</if>>

<<if $anusstate is "othermouthentrance">>

<</if>>

<<if $anusstate is "imminent" or $anusstate is "doubleimminent">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype isnot "beast">>

		<<if $silhouettedisable is "f">>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $anusstate is "entrance" or $anusstate is "doubleentrance">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype isnot "beast">>

		<<if $silhouettedisable is "f" and $debug is 1>>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $vaginastate is "entrance" or $vaginastate is "doubleentrance">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype isnot "beast">>

		<<if $silhouettedisable is "f" and $anususe isnot "penis" and $debug is 1>>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $mouthstate is "imminent">>
	<<if $enemytype isnot "beast">>

		<<if $silhouettedisable is "f">>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $mouthstate is "entrance">>
	<<if $enemytype isnot "beast">>

		<<if $silhouettedisable is "f">>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $enemytype is "machine">>
	<<if $machine.tattoo>>
		<<if $machine.tattoo.use isnot "inert" and $machine.tattoo.use isnot "destroyed">>
			<<print ''>>
		<</if>>
	<</if>>
<</if>>

<<if $prop.includes("haybale")>>

<</if>>
<<if $prop.includes("table")>>

<</if>>
<<if $prop.includes("bench")>>

<</if>>
<<if $prop.includes("milk")>>
	<<if _milk_img is "milk_7">>

	<<else>>

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

	<</if>>
<</if>>
<<if $prop.includes("semen")>>
	<<if _semen_img is "semen_7">>

	<<else>>

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

	<</if>>
<</if>>
<<if $prop.includes("rails")>>

<</if>>

<<if $vaginastate isnot "penetrated"
and $anusstate isnot "penetrated"
and $mouthstate isnot "penetrated"
and $penisstate isnot "penetrated"
and $penisstate isnot "otheranus"
and $rightarm isnot "penis"
and $leftarm isnot "penis"
and $anusstate isnot "cheeks"
and $thighuse isnot "penis"
and $feetuse isnot "penis"
and $vaginastate isnot "othermouth"
and $anusstate isnot "othermouth"
and $mouthstate isnot "kiss" and $penisstate isnot "othermouth"
and $chestuse isnot "penis"
and $vaginastate isnot "tentacleentrance"
and $vaginastate isnot "tentacleimminent"
and $vaginastate isnot "tentacle"
and $vaginastate isnot "tentacledeep"
and $vaginause isnot "tentaclerub"
and $penisstate isnot "tentacleentrance"
and $penisstate isnot "tentacleimminent"
and $penisstate isnot "tentacle"
and $penisstate isnot "tentacledeep"
and $penisuse isnot "tentaclerub"
and $anusstate isnot "tentacleentrance"
and $anusstate isnot "tentacleimminent"
and $anusstate isnot "tentacle"
and $anusstate isnot "tentacledeep"
and $anususe isnot "tentaclerub"
and $mouthstate isnot "tentacleentrance"
and $mouthstate isnot "tentacleimminent"
and $mouthstate isnot "tentacle"
and $mouthstate isnot "tentacledeep"
and $feetstate isnot "tentacle"
and $leftarmstate isnot "tentacle"
and $rightarmstate isnot "tentacle"
and _stanceCheck isnot "top">>

<<clothesidle>>
<<beastimgidle>>

	<<if $leftarm isnot "bound" and $leftarm isnot "grappled" and $leftarm isnot "behind">>

	<<elseif $worn.upper.set is $worn.lower.set and setup.clothes.lower[clothesIndex('lower', $worn.lower)].skirt is 1>>

	<<else>>

	<</if>>
	<<if $rightarm isnot "bound" and $rightarm isnot "grappled" and $rightarm isnot "behind">>

	<<else>>
	<</if>>

	<<if $position is "wall">>
		<<if $walltype is "cleanpillory">>

		<<elseif $walltype is "horse_pillory">>

		<<elseif $walltype is "pillory">>
			<<if $pilloryaudience gte 5>>

			<<elseif $pilloryaudience gte 4>>

			<<elseif $pilloryaudience gte 3>>

			<<elseif $pilloryaudience gte 2>>

			<</if>>

		<<else>>

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

<<if $arousal gte ($arousalmax / 5) * 4>>

<<elseif $arousal gte ($arousalmax / 5) * 3>>

<<elseif $arousal gte ($arousalmax / 5) * 2>>

<<elseif $exposed gte 2 or $arousal gte $arousalmax / 5>>

<<elseif $exposed gte 1 or $arousal gte 100>>

<</if>>

<<if $pain gte 100>>

<<elseif $pain gte 80>>

<<elseif $pain gte 60>>

<<elseif $pain gte 40>>

<<elseif $pain gte 20>>

<</if>>

<<if $makeup.lipstick>>

<</if>>

<<if $makeup.eyeshadow>>

<</if>>

<<if $makeup.mascara>>
	<<if $pain gte 20>>

	<<else>>

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

<<if $player.freckles and $makeup.concealer isnot 1>>

<</if>>

<<if $pain gte 100 and $willpowerpain is 0>>

<</if>>

<<if $trauma gte ($traumamax * 0.9) or $possessed>>

<<else>>

<</if>>

<<if $player.penisExist>>
	<<if $worn.genitals.name is "chastity belt" or $worn.genitals.name is "gold chastity belt">>

	<<elseif $worn.lower.exposed gte 2 and $worn.under_lower.exposed gte 1>>
		<<if $worn.genitals.name is "chastity cage">>

		<<elseif $player.virginity.penile is true>>

		<<else>>

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

<<if $fringetype is "hime">>
	<<if $hairlength gte 900>>

	<<elseif $hairlength gte 700>>

	<<elseif $hairlength gte 600>>

	<<elseif $hairlength gte 400>>

	<<elseif $hairlength gte 200>>

	<<else>>

	<</if>>
<<else>>
	<<if $hairlength gte 900>>

	<<elseif $hairlength gte 700>>

	<<elseif $hairlength gte 600>>

	<<elseif $hairlength gte 400>>

	<<elseif $hairlength gte 200>>

	<<else>>

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

/*<<if $hairlength gte 200>>*/
	/**/
/*<<else>>*/
	/**/
/*<</if>>*/

<<if $worn.neck.collared is 1>>

<</if>>

<<breastsidle>>
<<img_tf_doggy_idle>>

<<if $worn.genitals.name is "chastity belt">>

<<elseif $worn.genitals.name is "gold chastity belt">>

<</if>>

<<if $bodywritingImages is true>>
	<<if $skin.left_cheek.writing>>
		<<if $skin.left_cheek.type is "text">>

		<<elseif $skin.left_cheek.type is "object">>

		<</if>>
	<</if>>
	<<if $skin.left_shoulder.writing>>
		<<if $skin.left_shoulder.type is "text">>

		<<elseif $skin.left_shoulder.type is "object">>
			<<if $leftarm is "bound" or $leftarm is "grappled" or $leftarm is "behind">>

			<<else>>

			<</if>>
		<</if>>
	<</if>>
	<<if $skin.breasts.writing>>
		<<if $skin.breasts.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.back.writing>>
		<<if $skin.back.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.pubic.writing>>
		<<if $skin.pubic.type is "object">>

		<<elseif $skin.pubic.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.left_bottom.writing>>
		<<if $skin.left_bottom.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.left_thigh.writing>>
		<<if $skin.left_thigh.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.right_thigh.writing>>
		<<if $skin.right_thigh.type is "text">>
			<<if $skin.right_thigh.arrow is 1>>

			<<else>>

			<</if>>
		<<elseif $skin.right_thigh.type is "object">>

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

/**/

<<if $machine>>
	<<if $machine.arm_chains>>
		<<if $leftarm is "bound" or $leftarm is "grappled" or $leftarm is "behind" or $rightarm is "bound" or $rightarm is "grappled" or $rightarm is "behind">>

		<<else>>

		<</if>>
	<</if>>
	<<if $machine.leg_chains>>
		<<if $feetuse is "penis" or $feetstate is "tentacle">>

		<<else>>

		<</if>>
	<</if>>
<</if>>
<<if $prop.includes("neck_shackle")>>

<</if>>
<<if $prop.includes("arm_shackle")>>
	<<if $leftarm is "bound" or $leftarm is "grappled" or $leftarm is "behind" or $rightarm is "bound" or $rightarm is "grappled" or $rightarm is "behind">>

	<<else>>

	<</if>>
<</if>>
<<if $prop.includes("leg_shackle")>>
	<<if $feetuse is "penis" or $feetstate is "tentacle">>

	<<else>>

	<</if>>
<</if>>
<<if $prop.includes("breast_pump")>>
	<<if $breastsize gte 8>>

	<<elseif $breastsize gte 5>>

	<<elseif $breastsize gte 3>>

	<<else>>

	<</if>>
<</if>>
<<if $prop.includes("penis_pump")>>

<</if>>

<<else>>

<<beastimgdoggy>>
<<img_tf_doggy_active>>
<<clothesactive>>

<<if $position is "wall">>
	<<if $walltype is "cleanpillory">>

	<<elseif $walltype is "horse_pillory">>

	<<elseif $walltype is "pillory">>
		<<if $pilloryaudience gte 5>>

		<<elseif $pilloryaudience gte 4>>

		<<elseif $pilloryaudience gte 3>>

		<<elseif $pilloryaudience gte 2>>

		<</if>>

	<<else>>

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

<<if $feetuse is "penis">>
	<<if $enemytype isnot "beast">>

	<<else>>

	<</if>>

	<<if $enemyarousal gte $enemyarousalmax>>

	<</if>>
<<elseif $feetstate is "tentacle">>
<<else>>

<</if>>

<<if $leftarm is "penis">>
	<<if $enemytype isnot "beast">>

	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

	<</if>>
<<elseif $leftarm is "bound">>

<<elseif $leftarm is "grappled" or $leftarm is "behind">>

<<elseif $leftarmstate is "tentacle">>
<<else>>

<</if>>

<<if $rightarm is "penis">>
	<<if $enemytype isnot "beast">>

	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

	<</if>>
<<elseif $rightarm is "bound">>
<<elseif $rightarm is "grappled" or $rightarm is "behind">>
<<elseif $rightarmstate is "tentacle">>
<<else>>

<</if>>

<<if $anusstate is "cheeks">>
	<<if $enemytype isnot "beast">>

	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $chestuse is "penis">>

<</if>>

<<tentacleimg>>

<<if $thighuse is "penis">>
	<<if $enemytype isnot "beast">>

	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $arousal gte ($arousalmax / 5) * 4>>

<<elseif $arousal gte ($arousalmax / 5) * 3>>

<<elseif $arousal gte ($arousalmax / 5) * 2>>

<<elseif $exposed gte 2 or $arousal gte $arousalmax / 5>>

<<elseif $exposed gte 1 or $arousal gte 100>>

<</if>>

<<if $pain gte 100>>

<<elseif $pain gte 80>>

<<elseif $pain gte 60>>

<<elseif $pain gte 40>>

<<elseif $pain gte 20>>

<</if>>

<<if $makeup.lipstick>>

<</if>>

<<if $makeup.eyeshadow>>

<</if>>

<<if $makeup.mascara>>
	<<if $pain gte 20>>

	<<else>>

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

<<if $player.freckles and $makeup.concealer isnot 1>>

<</if>>

<<if $pain gte 100 and $willpowerpain is 0>>

<</if>>

<<if $trauma gte $traumamax>>

<<else>>

<</if>>

<<if $mouthstate is "kiss">>

<</if>>

<<if $mouthstate is "penetrated">>
	<<if $enemytype isnot "beast">>

		<<if $silhouettedisable is "f">>

		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>

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

<<if $vaginastate is "othermouth">>

<</if>>

<<if $vaginastate is "penetrated">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype isnot "beast">>
		<<if $anusstate is "penetrated" or $anusstate is "doublepenetrated">>

			<<if $silhouettedisable is "f">>
				<<if $rightarm is "bound" or $rightarm is "grappled" or $rightarm is "behind">>

				<<else>>

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

			<<if $silhouettedisable is "f">>

			<</if>>
		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>
		<<if $condomVaginalImg>>
		<<else>>

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

<<if $anusstate is "othermouth">>

<</if>>

<<if $anusstate is "penetrated">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype isnot "beast">>
		<<if $vaginastate is "doublepenetrated">>

		<<else>>

		<</if>>
		<<if $silhouettedisable is "f">>
			<<if $vaginastate is "doublepenetrated">>

			<<else>>

			<</if>>
		<</if>>
	<</if>>
	<<if $enemyarousal gte $enemyarousalmax>>
		<<if $condomAnalImg>>
		<<else>>

		<</if>>
	<</if>>
<</if>>
/* DADV doggy */
<<if $anusstate is "doublepenetrated">>
	<<if $NPCList[$anustarget].penis is "anusdouble" and $NPCList[$anusdoubletarget].penis is "anusdouble">>

		<<if $silhouettedisable is "f">>

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

<<if $vaginastate is "doublepenetrated">>
	<<if $NPCList[$vaginatarget].penis is "vaginadouble" and $NPCList[$vaginadoubletarget].penis is "vaginadouble">>

		<<if $silhouettedisable is "f">>

			<<if $rightarm is "bound" or $rightarm is "grappled" or $rightarm is "behind">>

			<<else>>

			<</if>>

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

<<if $penisstate is "othermouth">>

<</if>>

<<if $penisstate is "otherpenis">>

<</if>>

<<if $penisstate is "penetrated" or $penisstate is "otheranus">>
	<<if $orgasmdown gte 1 and $orgasmcount lte 24 and $femaleclimax isnot 1 and $condomPlayerPenisImg isnot true>>

	<<else>>

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

<<if $player.penisExist>>
	<<if $worn.lower.exposed gte 2 and $worn.under_lower.exposed gte 1>>
		<<if $worn.genitals.type.includes("chastity")>>
			<<if $worn.genitals.name is "chastity belt" or $worn.genitals.name is "gold chastity belt">>

			<<elseif $worn.genitals.name is "chastity cage">>

			<</if>>
		<<elseif $player.virginity.penile is true>>

		<<else>>

		<</if>>
		<<if $orgasmdown gte 1 and $penisstate isnot "penetrated" and $orgasmcount lte 24 and $femaleclimax isnot 1 and !$worn.genitals.type.includes("chastity")>>

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

<<if $fringetype is "hime">>
	<<if $hairlength gte 900>>

	<<elseif $hairlength gte 700>>

	<<elseif $hairlength gte 600>>

	<<elseif $hairlength gte 400>>

	<<elseif $hairlength gte 200>>

	<<else>>

	<</if>>
<<else>>
	<<if $hairlength gte 900>>

		/**/
	<<elseif $hairlength gte 700>>

		/**/
	<<elseif $hairlength gte 600>>

		/**/
	<<elseif $hairlength gte 400>>

		/**/
	<<elseif $hairlength gte 200>>

		/**/
	<<else>>

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

/**/

<<if $worn.neck.collared is 1>>

<</if>>

<<breastsactive>>

<<if $worn.genitals.name is "chastity belt">>

<<elseif $worn.genitals.name is "gold chastity belt">>

<</if>>

<<if $bodywritingImages is true>>
	<<if $skin.left_cheek.writing>>
		<<if $skin.left_cheek.type is "text">>

		<<elseif $skin.left_cheek.type is "object">>

		<</if>>
	<</if>>
	<<if $skin.left_shoulder.writing>>
		<<if $skin.left_shoulder.type is "text">>

		<<elseif $skin.left_shoulder.type is "object">>
			<<if $leftarm is "bound" or $leftarm is "grappled" or $leftarm is "behind">>

			<<else>>

			<</if>>
		<</if>>
	<</if>>
	<<if $skin.breasts.writing>>
		<<if $skin.breasts.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.back.writing>>
		<<if $skin.back.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.pubic.writing>>
		<<if $skin.pubic.type is "object">>

		<<elseif $skin.pubic.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.left_bottom.writing>>
		<<if $skin.left_bottom.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.left_thigh.writing>>
		<<if $skin.left_thigh.type is "text">>

		<</if>>
	<</if>>
	<<if $skin.right_thigh.writing>>
		<<if $skin.right_thigh.type is "text">>
			<<if $skin.right_thigh.arrow is 1>>

			<<else>>

			<</if>>
		<<elseif $skin.right_thigh.type is "object">>

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

/**/

<<if $machine>>
	<<if $machine.arm_chains>>
		<<if $leftarm is "bound" or $leftarm is "grappled" or $leftarm is "behind" or $rightarm is "bound" or $rightarm is "grappled" or $rightarm is "behind">>

		<<else>>

		<</if>>
	<</if>>
	<<if $machine.leg_chains>>
		<<if $feetuse is "penis" or $feetstate is "tentacle">>

		<<else>>

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

<<if $prop.includes("neck_shackle")>>

<</if>>
<<if $prop.includes("arm_shackle")>>
	<<if $leftarm is "bound" or $leftarm is "grappled" or $leftarm is "behind" or $rightarm is "bound" or $rightarm is "grappled" or $rightarm is "behind">>

	<<else>>

	<</if>>
<</if>>
<<if $prop.includes("leg_shackle")>>
	<<if $feetuse is "penis" or $feetstate is "tentacle">>

	<<else>>

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

<</if>>

<<if $vaginastate isnot "penetrated"
and $anusstate isnot "penetrated"
and $anusstate isnot "cheeks"
and $thighuse isnot "penis"
and $vaginastate isnot "tentacle"
and $vaginastate isnot "tentacledeep"
and $vaginastate isnot "tentacleentrance"
and $vaginastate isnot "tentacleimminent"
and $anusstate isnot "tentacle"
and $anusstate isnot "tentacledeep"
and $anusstate isnot "tentacleentrance"
and $anusstate isnot "tentacleimminent"
and _stanceCheck isnot "top">>

<<else>>

<</if>>

<</widget>>

<<widget "xrayimg">>
<<if ["penetrated","tentacle","tentacledeep"].includes($vaginastate) and ["penetrated","tentacle","tentacledeep","otheranus"].includes($penisstate)>>
	<<set _futaSplit to true>>
<<else>>
	<<set _futaSplit to false>>
<</if>>
<<set _wide to (window.document.body.clientWidth gte 650)>>

<<set _vagClass to "i256" + (_futaSplit and _wide ? "":" height64")>>
<<set _vagID to _wide ? "xrayvaginal" : "xrayandroidvaginal">>
<<if $vaginastate is "penetrated">>

		<<xraycum>>
		<<if $enemytype is "machine">>

		<<elseif $enemytype is "beast">>
			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>

			<<else>>

			<</if>>
		<<elseif $vaginatarget isnot undefined and $NPCList[$vaginatarget].skincolour is "black">>

		<<else>>

		<</if>>

<<elseif $vaginastate is "tentacle">>

		<<xraycum>>

<<elseif $vaginastate is "tentacledeep">>

		<<xraycum>>

<<elseif $vaginastate is "doublepenetrated">>

		<<if $NPCList[$vaginatarget].penis is "vaginadouble" and $NPCList[$vaginadoubletarget].penis is "vaginadouble">>
			<<xraycumdouble>>
			<<if $NPCList[$vaginatarget].skincolour is "black">>

			<<else>>

			<</if>>
		<<else>>
			<<xraycumdouble>>
			<<if $vaginatarget isnot undefined and $NPCList[$vaginatarget].skincolour is "black">>

			<<else>>

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

<</if>>

<<set _anusClass to "i256" + (_wide ? " height64" : "")>>
<<set _anusID to _wide ? "xrayanal" : "xrayandroidanal">>
<<if $anusstate is "penetrated">>
	<<if $enemytype is "machine">>

	<<elseif $enemytype is "beast">>

			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>

			<<else>>

			<</if>>

	<<elseif $anustarget isnot undefined and $NPCList[$anustarget].skincolour is "black">>

	<<else>>

	<</if>>
<<elseif $anusstate is "doublepenetrated">>
	<<if $NPCList[$anustarget].penis is "anusdouble" and $NPCList[$anusdoubletarget].penis is "anusdouble">>
		<<if $NPCList[$anustarget].skincolour is "black">>

		<<else>>

		<</if>>
	<<else>>

	<</if>>
<<elseif $anusstate is "tentacle">>

<<elseif $anusstate is "tentacledeep">>

<</if>>

<<set _penisClass to "i256" + (!_wide ? "" : (_futaSplit ? " height128":" height64"))>>
<<set _penisID to _wide ? "xraypenile" : "xrayandroidpenile">>
<<if $penisstate is "penetrated">>
	<<if $orgasmdown gte 1 and $devstate is 1 and $orgasmcount lte 24>>

	<<else>>

	<</if>>
<<elseif $penisstate is "tentacle">>
	<<if $orgasmdown gte 1 and $devstate is 1 and $orgasmcount lte 24 and $femaleclimax isnot 1 and $condomPlayerPenisImg isnot true>>

	<<else>>

	<</if>>
<<elseif $penisstate is "tentacledeep">>
	<<if $orgasmdown gte 1 and $devstate is 1 and $orgasmcount lte 24 and $femaleclimax isnot 1 and $condomPlayerPenisImg isnot true>>

	<<else>>

	<</if>>
<<elseif $penisstate is "otheranus">>
	<<if $orgasmdown gte 1 and $devstate is 1 and $orgasmcount lte 24 and $femaleclimax isnot 1 and $condomPlayerPenisImg isnot true>>

	<<else>>

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

<</widget>>

<<widget "ejacimg">>

<<set _vagID to window.document.body.clientWidth gte 650 ? "xrayvaginal" : "xrayandroidvaginal">>
<<set _anusID to window.document.body.clientWidth gte 650 ? "xrayanal" : "xrayandroidanal">>
<<if $enemytype is "beast">>
	<<if $vaginastate is "penetrated">>

			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>

			<<else>>

			<</if>>

	<</if>>
	<<if $anusstate is "penetrated">>

			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>

			<<else>>

			<</if>>

	<</if>>
<<elseif $NPCList[0].skincolour is "black">>
	<<if $condomVaginalImg and $vaginastate is "penetrated">>

	<<elseif $vaginastate is "penetrated">>

	<</if>>
	<<if $condomVaginalImg and $vaginastate is "doublepenetrated">>

	<<elseif $vaginastate is "doublepenetrated">>

	<</if>>
	<<if $condomAnalImg and $anusstate is "penetrated">>

	<<elseif $anusstate is "penetrated">>

	<</if>>
	<<if $anusstate is "doublepenetrated">>
		<<if $NPCList[$anustarget].penis is "anusdouble" and $NPCList[$anusdoubletarget].penis is "anusdouble">>
			<<set _tempspeed to _animspeed>>
			<<set _animspeed to 'mid'>>

			<<set _animspeed to _tempspeed>>
		<<else>>

		<</if>>
	<</if>>
<<else>>
	<<if $condomVaginalImg and $vaginastate is "penetrated">>

	<<elseif $vaginastate is "penetrated">>

	<</if>>
	<<if $condomVaginalImg and $vaginastate is "doublepenetrated">>

	<<elseif $vaginastate is "doublepenetrated">>

	<</if>>
	<<if $condomAnalImg and $anusstate is "penetrated">>

	<<elseif $anusstate is "penetrated">>

	<</if>>
	<<if $anusstate is "doublepenetrated">>
		<<if $NPCList[$anustarget].penis is "anusdouble" and $NPCList[$anusdoubletarget].penis is "anusdouble">>
			<<set _tempspeed to _animspeed>>
			<<set _animspeed to 'mid'>>

			<<set _animspeed to _tempspeed>>
		<<else>>

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

<</widget>>

<<widget "xraycum">>

<<if setup.bodyliquid.combined("vagina") gte 1>>
	<<set _src to "img/sex/xraycum" + Math.clamp(setup.bodyliquid.combined("vagina"),1,5) + ".png">>

<</if>>

<</widget>>

<<widget "xraycumdouble">>

<<if setup.bodyliquid.combined("vagina") gte 1>>
	<<set _src to "img/sex/xraydoublecum" + Math.clamp(setup.bodyliquid.combined("vagina"),1,5) + ".png">>

<</if>>

<</widget>>

:: Widgets Close Img [widget]
<<widget "closeimg">>
<<set _filters to $skinColor.current>>
<<set _na to $active_enemy>>
<<imgOpacity>>

<<if $position is "wall">>
	<<set _img to setup.tanImg.close["doggy"][$skinColor.tanImgEnabled]>>
	<<set _position to "doggy">>
<<else>>
	<<set _img to setup.tanImg.close[$position][$skinColor.tanImgEnabled]>>
	<<set _position to $position>>
<</if>>

<<if $worn.genitals.type.includes("hidden")>>
	<<if $worn.genitals.name is "gold chastity belt">>
		<<set _beltName to "Gold">>
	<<else>>
		<<set _beltName to "">>
	<</if>>
<</if>>

<<set _pbColour = ($makeup.pbcolour != 0 ? $makeup.pbcolour : $naturalhaircolour).replace(/ /g, '-')>>

<<if $player.vaginaExist and $worn.under_lower.vagina_exposed is 1 and $worn.lower.vagina_exposed is 1>>

	<<set _vagina = _img.vagina>>
	<<set _aroused = $vaginaWetness gte 75>>
	<<set _penetrate = "">>
	<<set _cum = "entrance">>
	<<set _frames = "anim-close-6f-" + _animspeed>>
	<<set _penis_frames = _frames>>
	<<set _penetrator_frames = _frames>>
	<<set _idle = false>>

	<<if $worn.genitals.type.includes("hidden")>>
		<<switch $vaginastate>>
			<<case "tentacle" "tentacleentrance" "tentacleimminent" "entrance" "imminent" "othermouthentrance" "othermouthimminent">>
				<<set _aniFrame to 'anim-close-6f-'+_animspeed>>
			<<default>>
				<<set _aniFrame to "anim-idle-6f-slow">>
		<</switch>>

		<<if $pbdisable is "f">>
			<<if $pbstrip gte 1>>

			<</if>>
			<<if $pblevel gte 2>>

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

		<<if $worn.under_lower.state is "totheside">>

		<</if>>
		<<switch $vaginastate>>
			<<case "tentacleentrance" "tentacleimminent">>

			<<case "entrance" "imminent">>
				<<if $enemytype is "beast">>

				<<else>>

				<</if>>
			<<case "othermouthentrance" "othermouthimminent">>
				<<if $enemytype is "beast">>

				<</if>>
		<</switch>>
	<<else>>
		<<if $vaginastate is "tentacle" or $vaginastate is "tentacledeep">>
			<<set _vagina = _img.vaginapenetrate>>
			<<set _penetrate = "penetrate">>
			<<set _cum = "penetrate">>
			<<set _penetrator = "close/" + _position + "/vaginatentaclepenetrated.png">>

		<<elseif $vaginastate is "tentacleentrance" or $vaginastate is "tentacleimminent">>
			<<set _penetrator = "close/" + _position + "/vaginatentacleentrance.png">>

		<<elseif $vaginastate is "penetrated" or $vaginastate is "doublepenetrated">>
			<<if ($enemytype is "beast" and $NPCList[_na].penissize gte 5) or ($vaginastate is "doublepenetrated" and $NPCList[$vaginatarget].penis is "vaginadouble" and $NPCList[$vaginadoubletarget].penis is "vaginadouble")>>
				<<set _vagina = _img.vaginapenetratebig>>
			<<else>>
				<<set _vagina = _img.vaginapenetrate>>
			<</if>>

			<<set _penetrate = "penetrate">>
			<<set _cum = "penetrate">>

			<<if $enemytype is "machine">>
				<<set _penetrator = "machine/vaginal/" + _position + "/penetrated_close.png">>
			<<elseif $enemytype is "beast">>
				<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>
					<<set _penetrator = "close/beast/vaginapenetratedhorse.png">>
				<<else>>
					<<set _penetrator = "close/" + _position + "/vaginapenetratedbeast.png">>
				<</if>>
			<<elseif $vaginastate is "doublepenetrated" and $NPCList[$vaginatarget].penis is "vaginadouble" and $NPCList[$vaginadoubletarget].penis is "vaginadouble">>
				<<if $NPCList[$vaginatarget].skincolour is "black">>
					<<set _penetrator = "black/vaginapenetratedouble.png">>
				<<else>>
					<<set _penetrator = "close/" + _position + "/vaginapenetratedouble.png">>
				<</if>>
			<<else>>
				<<if $NPCList[$vaginatarget].skincolour is "black">>
					<<set _penetrator = "black/vaginapenetrated.png">>
				<<else>>
					<<set _penetrator = "close/" + _position + "/vaginapenetrated.png">>
				<</if>>
			<</if>>

		<<elseif $vaginastate is "entrance">>
			<<if $enemytype is "machine">>
				<<set _penetrator = "machine/vaginal/" + _position + "/entrance_close.png">>
			<<elseif $enemytype is "beast">>
				<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>
					<<set _penetrator = "close/beast/vaginaentrancehorse.png">>
				<<else>>
					<<set _penetrator = "close/" + _position + "/vaginaentrancebeast.png">>
				<</if>>
			<<else>>
				<<set _penetrator = "close/" + _position + "/vaginaentrance.png">>
			<</if>>

		<<elseif $vaginastate is "imminent">>
			<<set _frames = "anim-close-3f-" + _animspeed>>
			<<set _penis_frames = "anim-close-6f-" + _animspeed>>
			<<set _penetrator_frames = "anim-close-3f-" + _animspeed>>

			<<if $enemytype is "machine">>
				<<set _penetrator_frames = "anim-close-6f-" + _animspeed>>
				<<set _penetrator = "machine/vaginal/" + _position + "/entrance_close.png">>
			<<elseif $enemytype is "beast">>
				<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>
					<<set _penetrator_frames = "anim-close-6f-" + _animspeed>>
					<<set _penetrator = "close/beast/vaginaentrancehorse.png">>
				<<else>>
					<<set _penetrator = "close/" + _position + "/vaginaentrancebeast.png">>
				<</if>>
			<<else>>
				<<if $NPCList[$vaginatarget].skincolour is "black">>
					<<set _penetrator = "black/vaginaentrance.png">>
				<<else>>
					<<set _penetrator = "close/" + _position + "/vaginaentrance.png">>
				<</if>>
			<</if>>

		<<elseif $enemytype is "beast" and ($vaginastate is "othermouthentrance" or $vaginastate is "othermouthimminent") and $monster isnot 1>>
			<<set _penetrator = "close/" + _position + "/beast/vaginaentrance.png">>

		<<elseif $enemytype is "beast" and $vaginastate is "othermouth" and $monster isnot 1>>
			<<set _penetrator = "close/" + _position + "/beast/vagina.png">>

		<<elseif $vaginause is "othervagina">>
			<<set _penetrator = "close/" + _position + "/trib.png">>

		<<else>>
			<<set _idle = true>>
			<<set _frames = "anim-idle-1f-slow">>
			<<set _penis_frames = _frames>>
			<<set _penetrator_frames = _frames>>

		<</if>>

		<<if _aroused and _penetrate is "">>

		<</if>>

		<<if $pbdisable is "f">>
			<<if $pbstrip gte 1>>

			<</if>>
			<<if $pblevel gte 2>>

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

		<<if !["hidden", "disabled"].includes($transformationParts.wolf.pubes)>>

		<</if>>

		<<if !["hidden", "disabled"].includes($transformationParts.bird.pubes)>>

		<</if>>

		<<if $player.penisExist>>
			<<if $player.ballsExist is false>>

			<<else>>

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

		<<if setup.bodyliquid.combined("vagina") gte 1>>
			<<if _idle is false>>

			<<else>>

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

		<<if $worn.under_lower.state is "totheside">>

		<</if>>

		<<if _idle is false>>

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

<</if>>

<<if $worn.under_lower.anus_exposed is 1 and $worn.lower.anus_exposed is 1>>

	<<set _idle = false>>
	<<set _penetrated = false>>
	<<if $anusstate is "tentacle">>
		<<set _image = 'close/' + _position + '/anustentaclepenetrated.png'>>
	<<elseif $anusstate is "tentacledeep">>
		<<set _penetrated = true>>
		<<set _image = 'close/' + _position + '/anustentaclepenetrated.png'>>
	<<elseif $anusstate is "tentacleentrance">>
		<<set _image = 'close/' + _position + '/anustentacleentrance.png'>>
	<<elseif $anusstate is "tentacleimminent">>
		<<set _image = 'close/' + _position + '/anustentacleentrance.png'>>
	<<elseif $anusstate is "penetrated" or $anusstate is "doublepenetrated">>
		<<set _penetrated = true>>
		<<if $enemytype is "machine">>
			<<set _image = 'machine/anal/' + _position + '/penetrated_close.png'>>
		<<elseif $enemytype is "beast">>
			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>
				<<set _image = 'close/beast/anuspenetratedhorse.png'>>
			<<else>>
				<<set _image = 'close/' + _position + '/anuspenetratedbeast.png'>>
			<</if>>
		<<elseif $anusstate is "doublepenetrated" and $NPCList[$anustarget].penis is "anusdouble" and $NPCList[$anusdoubletarget].penis is "anusdouble">>
			<<if $NPCList[$anustarget].skincolour is "black">>
				<<set _image = "black/anuspenetratedoubleblack.png">>
			<<else>>
				<<set _image = 'close/' + _position + '/anuspenetratedoubleclose.png'>>
			<</if>>
		<<else>>
			<<if $NPCList[$anustarget].skincolour is "black">>
				<<set _image = "black/anuspenetrated.png">>
			<<else>>
				<<set _image = 'close/' + _position + '/anuspenetrated.png'>>
			<</if>>
		<</if>>
	<<elseif $anusstate is "entrance">>
		<<if $enemytype is "machine">>
			<<set _image = 'machine/anal/' + _position + '/entrance_close.png'>>
		<<elseif $enemytype is "beast">>
			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>
				<<set _image = 'close/beast/anusentrancehorse.png'>>
			<<else>>
				<<set _image = 'close/' + _position + '/anusentrancebeast.png'>>
			<</if>>
		<<else>>
			<<if $NPCList[$anustarget].skincolour is "black">>
				<<set _image = "black/anusentrance.png">>
			<<else>>
				<<set _image = 'close/' + _position + '/anusentrance.png'>>
			<</if>>
		<</if>>
	<<elseif $anusstate is "imminent">>
		<<if $enemytype is "machine">>
			<<set _image = 'machine/anal/' + _position + '/entrance_close.png'>>
		<<elseif $enemytype is "beast">>
			<<if $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur">>
				<<set _image = 'close/beast/anusentrancehorse.png'>>
			<<else>>
				<<set _image = 'close/' + _position + '/anusentrancebeast.png'>>
			<</if>>
		<<else>>
			<<set _image = 'close/' + _position + '/anusentrance.png'>>
		<</if>>
	<<elseif $enemytype is "beast" and $anusstate is "othermouthentrance" and $monster isnot 1>>
		<<set _image = 'close/' + _position + '/beast/anusentrance.png'>>
	<<elseif $enemytype is "beast" and $anusstate is "othermouthimminent" and $monster isnot 1>>
		<<set _image = 'close/' + _position + '/beast/anusentrance.png'>>
	<<elseif $enemytype is "beast" and $anusstate is "othermouth" and $monster isnot 1>>
		<<set _image = 'close/' + _position + '/beast/anus.png'>>
	<<else>>
		<<set _idle = true>>
	<</if>>

	<<if _idle == true>>

		<<if $worn.under_lower.state is "totheside">>

		<</if>>
	<<else>>

		<<if $worn.under_lower.state is "totheside">>

		<</if>>

	<</if>>

<</if>>

<<if $chestuse is "penis" or $chestuse is "tentacle">>
	<<if $breastsize gte 8>>

	<<else>>

		<<if $chestuse is "penis" and $enemytype is "beast">>

		<<elseif $chestuse is "penis">>

		<<else>>

		<</if>>
	<</if>>
<<elseif ($worn.upper.exposed gte 2 or $upperwetstage gte 3) and ($worn.under_upper.exposed gte 1 or $underupperwetstage gte 3)>>

<</if>>

<<if $player.penisExist and $worn.under_lower.vagina_exposed is 1 and $worn.lower.vagina_exposed is 1>>

	<<if $player.vaginaExist>>

	<<else>>

	<</if>>
	<<if $worn.under_lower.state is "totheside">>

	<</if>>
	<<if $worn.genitals.type.includes("hidden")>>

		<<switch $penisstate>>
			<<case "tentacleentrance" "tentacleimminent">>

			<<case "entrance" "imminent">>

			<<case "othermouthentrance" "othermouthimminent">>
				<<if $enemytype is "beast">>

				<</if>>
		<</switch>>
	<<elseif $worn.genitals.name is "chastity cage">>

	<<elseif $penisstate is "tentacle">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<elseif $penisstate is "tentacledeep">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<elseif $penisstate is "tentacleentrance">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<elseif $penisstate is "tentacleimminent">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<elseif $penisstate is "penetrated">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>
		<<if $enemytype is "beast" and ($monster isnot 1 or $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur")>>

		<<else>>

		<</if>>
	<<elseif $penisstate is "otheranus">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>
		<<if $enemytype is "beast" and ($monster isnot 1 or $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur")>>

		<<else>>

		<</if>>
	<<elseif $penisstate is "imminent">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>
		<<if $enemytype is "beast" and ($monster isnot 1 or $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur")>>

		<<else>>

		<</if>>
	<<elseif $penisstate is "entrance">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>
		<<if $enemytype is "beast" and ($monster isnot 1 or $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur")>>

		<<else>>

		<</if>>
	<<elseif $penisstate is "otheranusimminent">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>
		<<if $enemytype is "beast" and ($monster isnot 1 or $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur")>>

		<<else>>

		<</if>>
	<<elseif $penisstate is "otheranusentrance">>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>
		<<if $enemytype is "beast" and ($monster isnot 1 or $NPCList[_na].type is "horse" or $NPCList[_na].type is "centaur")>>

		<<else>>

		<</if>>
	<<elseif $enemytype is "beast" and $penisstate is "othermouthentrance" and $monster isnot 1>>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<elseif $enemytype is "beast" and $penisstate is "othermouthimminent" and $monster isnot 1>>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<elseif $enemytype is "beast" and $penisstate is "othermouth" and $monster isnot 1>>
		<<if $player.ballsExist is false>>

		<<else>>

		<</if>>

	<<else>>
		<<if $player.ballsExist is false>>

		<<else>>

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

<</if>>

<</widget>>

repo_name: Area/degrees

license: mit


code:
:: Widgets NPCs [widget]

<<widget "maninit">>

<<set $enemyarousal to $allure / 50 + $audiencearousal>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemytrust to 0>>
<<set $enemyhealth to 0>>
<<for _i to 0; _i lt $enemyno; _i++>>
	<<if $NPCList[_i].health isnot undefined>>
		<<set $enemyhealth += $NPCList[_i].health>>
	<</if>>
<</for>>
<<if $enemyhealth is 0>><<set $enemyhealth to 199>><</if>>
<<set $enemyarousalmax to 500 * $enemyno>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to $enemyhealth>>
<<if $enemyhealthmax is 0>><<set $enemyhealthmax to 199>><</if>>
<<for _i = 0; _i < $NPCList.length; _i++>>
	<<set $NPCList[_i].bold to $allure / 10>>
<</for>>
<<if $dissociation gte 1>>
	<<set $enemytrust -= 40>>
<</if>>
<<if $args[0]>>
	<<set $enemytype to $args[0]>>
<<else>>
	<<set $enemytype to "man">>
<</if>>
<<if $args[0] is "plant">>
	<<set $enemyno to 1>>
<</if>>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<set $combattype to "gang">>

<<if $NPCList[0].monster is "monster">>
	<<set $monster to 1>>
<<else>>
	<<set $monster to 0>>
<</if>>
<<if random(0,99) lt $condomchance>>
	<<set $npcCondoms to "normal">>
<<else>>
	/*<<set $npcCondoms to "damaged">>*/
<</if>>

/*ToDo: Pregnancy, remove to properly enable*/
<<if $pregnancyTesting is undefined>>
	<<set $condomUse to false>>
<</if>>

<<combatinit>>
<</widget>>

<<widget "beastNNPCinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
	<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "beast">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<if $combatTrain.generateInit is 1>>
	<<set $penisbitten to 0>>
	<<set $apologised to 0>>
<</if>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

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

<<set $combatTrain.generateInit to 0>>

<<combatinit>>
<</widget>>

<<widget "beastCombatInit">>
<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<if $combatTrain.generateInit is 1>>
	<<set $penisbitten to 0>>
	<<set $apologised to 0>>
<</if>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
	<<set $enemytrust -= 40>>
<</if>>

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

<<set $combatTrain.generateInit to 0>>

<<set $enemyarousal1 to $enemyarousal>>
<<set $enemyanger1 to $enemyanger>>
<<set $enemyhealth1 to $enemyhealthmax>>
<<set $enemytrust1 to $enemytrust>>

<<set $enemyarousal2 to $enemyarousal>>
<<set $enemyanger2 to $enemyanger>>
<<set $enemyhealth2 to $enemyhealthmax>>
<<set $enemytrust2 to $enemytrust>>

<<set $enemyarousal3 to $enemyarousal>>
<<set $enemyanger3 to $enemyanger>>
<<set $enemyhealth3 to $enemyhealthmax>>
<<set $enemytrust3 to $enemytrust>>

<<set $enemyarousal4 to $enemyarousal>>
<<set $enemyanger4 to $enemyanger>>
<<set $enemyhealth4 to $enemyhealthmax>>
<<set $enemytrust4 to $enemytrust>>

<<set $enemyarousal5 to $enemyarousal>>
<<set $enemyanger5 to $enemyanger>>
<<set $enemyhealth5 to $enemyhealthmax>>
<<set $enemytrust5 to $enemytrust>>

<<set $enemyarousal6 to $enemyarousal>>
<<set $enemyanger6 to $enemyanger>>
<<set $enemyhealth6 to $enemyhealthmax>>
<<set $enemytrust6 to $enemytrust>>

<<combatinit>>
<</widget>>

<<widget "beastNEWinit">>

<<set _nn to $args[0]>>
<<set _tpe to $args[1]>>
<<set _gnn to $args[2]>>
<<set _beast_genitals to $args[3]>>
<<set _beast_monster to $args[4]>>
<<set $active_enemy to 0>>

<<if !$BeastList.includes(_tpe)>>
	ERROR: beastNEWinit unknown type
<</if>>

<<for _xx = 1; _xx < _nn+1; _xx++>>
	<<generateBEAST _xx _tpe _gnn _beast_genitals _beast_monster>>
<</for>>

<<set $enemyno to _nn>>
<<set $enemytype to "beast">>

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

<<widget "beastNOGENinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
	<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "beast">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<if $combatTrain.generateInit is 1>>
	<<set $penisbitten to 0>>
	<<set $apologised to 0>>
<</if>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

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

<<set $combatTrain.generateInit to 0>>

<<set $enemyarousal2 to $enemyarousal>>
<<set $enemyanger2 to $enemyanger>>
<<set $enemyhealth2 to $enemyhealthmax>>
<<set $enemytrust2 to $enemytrust>>

<<set $enemyarousal3 to $enemyarousal>>
<<set $enemyanger3 to $enemyanger>>
<<set $enemyhealth3 to $enemyhealthmax>>
<<set $enemytrust3 to $enemytrust>>

<<set $enemyarousal4 to $enemyarousal>>
<<set $enemyanger4 to $enemyanger>>
<<set $enemyhealth4 to $enemyhealthmax>>
<<set $enemytrust4 to $enemytrust>>

<<set $enemyarousal5 to $enemyarousal>>
<<set $enemyanger5 to $enemyanger>>
<<set $enemyhealth5 to $enemyhealthmax>>
<<set $enemytrust5 to $enemytrust>>

<<set $enemyarousal6 to $enemyarousal>>
<<set $enemyanger6 to $enemyanger>>
<<set $enemyhealth6 to $enemyhealthmax>>
<<set $enemytrust6 to $enemytrust>>

<<combatinit>>
<</widget>>

<<widget "strangeman1init">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $NPCList[0].lefthand to "mouth">>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<combatinit>>
<</widget>>

<<widget "strangeman2init">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<combatinit>>
<</widget>>

<<widget "strangewoman1init">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<combatinit>>
<</widget>>

<<widget "tailorinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<set $leftarm to "bound">>
<<set $rightarm to "bound">>

<<combatinit>>

<</widget>>

<<widget "molestbusinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<if $daystate isnot "night">><<enable_rescue>><</if>>

<<hand_gag 0 left>>

<<combatinit>>

<</widget>>

<<widget "busmoveinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 200>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<if $daystate isnot "night">><<enable_rescue>><</if>>

<<combatinit>>
<</widget>>

<<widget "lefthandinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $NPCList[0].lefthand to 0>>
<<set $NPCList[0].righthand to "none">>
<<set $NPCList[0].penis to "none">>
<<set $NPCList[0].vagina to "none">>
<<set $combat to 1>>
<<set $enemyarousalmax to 100>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<if $daystate isnot "night">><<enable_rescue>><</if>>

<<combatinit>>
<</widget>>

<<widget "nurseinit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 400>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<drugs 120>>

<<combatinit>>
<</widget>>

<<widget "pharmnurseinit">>

<<set $enemyhealth to $NPCList[0].health>>
<<set $enemyarousal to $allure / 100>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 1000>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to $NPCList[0].healthmax>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<if $worn.over_lower.name != "naked">>
	<<set $NPCList[0].lefthand to "overlowerclothes">>
	<<set $NPCList[0].righthand to "overlowerclothes">>
<<elseif $worn.lower.name != "naked">>
	<<set $NPCList[0].lefthand to "lowerclothes">>
	<<set $NPCList[0].righthand to "lowerclothes">>
<<elseif $worn.under_lower.name != "naked">>
	<<set $NPCList[0].lefthand to "underclothes">>
	<<set $NPCList[0].righthand to "underclothes">>
<</if>>
<<set $NPCList[0].mouth to "penisentrance">>
<<set $NPCList[0].location.head = "genitals">>
<<set $NPCList[0].location.genitals = "idle">>

<<set $condomAsk to true>>

<<combatinit>>
<</widget>>

<<widget "spankmaninit">>

<<set $enemyhealth to 200>>
<<set $enemyarousal to 0>>
<<set $enemyanger to 300>>
<<set $enemystrength to 20000>>
<<set $NPCList[0].lefthand to "arms">>
<<set $NPCList[0].righthand to "spank">>
<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 300>>
<<set $enemyhealthmax to 200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>
<<set $enemyno to 1>>

<<set $leftarm to "grappled">>
<<set $rightarm to "grappled">>

<<combatinit>>
<</widget>>

<<widget "bound2init">>

<<set $enemyhealth to 400>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $combat to 1>>
<<set $enemyarousalmax to 1000>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 400>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<combatinit>>
<</widget>>

<<widget "ganginit">>

<<set $enemyhealth to 1200>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>

<<set $combat to 1>>
<<set $enemyarousalmax to 3000>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 1200>>
<<set $enemytrust to 0>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>
<<set $enemytype to "man">>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>

<<combatinit>>
<</widget>>

<<widget "abominationold">>

<<set $enemyhealth to 5555>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $NPCList[0].lefthand to 0>>
<<set $NPCList[1].lefthand to "none">>
<<set $NPCList[2].lefthand to "none">>
<<set $NPCList[3].lefthand to "none">>
<<set $NPCList[4].lefthand to "none">>
<<set $NPCList[5].lefthand to "none">>
<<set $NPCList[0].righthand to 0>>
<<set $NPCList[1].righthand to "none">>
<<set $NPCList[2].righthand to "none">>
<<set $NPCList[3].righthand to "none">>
<<set $NPCList[4].righthand to "none">>
<<set $NPCList[5].righthand to "none">>
<<set $NPCList[0].penis to 0>>
<<set $NPCList[1].penis to 0>>
<<set $NPCList[2].penis to 0>>
<<set $NPCList[3].penis to 0>>
<<set $NPCList[4].penis to "clothed">>
<<set $NPCList[5].penis to "clothed">>
<<set $NPCList[0].vagina to 0>>
<<set $NPCList[1].vagina to "none">>
<<set $NPCList[2].vagina to "none">>
<<set $NPCList[3].vagina to "none">>
<<set $NPCList[4].vagina to "none">>
<<set $NPCList[5].vagina to "none">>
<<set $NPCList[0].mouth to 0>>
<<set $NPCList[1].mouth to "none">>
<<set $NPCList[2].mouth to "none">>
<<set $NPCList[3].mouth to "none">>
<<set $NPCList[4].mouth to "none">>
<<set $NPCList[5].mouth to "none">>

<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 5555>>
<<set $enemytrust to 4444>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>
<<set $enemyno to 1>>

<<set $NPCList[0].pronoun to "n">>
<<combatinit>>
<</widget>>

<<widget "abominationold2">>

<<set $enemyhealth to 5555>>
<<set $enemyarousal to $allure / 50>>
<<set $enemyanger to 0>>
<<set $enemystrength to 20000>>
<<set $NPCList[0].lefthand to 0>>
<<set $NPCList[1].lefthand to 0>>
<<set $NPCList[0].righthand to 0>>
<<set $NPCList[1].righthand to 0>>
<<set $NPCList[0].penis to 0>>
<<set $NPCList[1].penis to 0>>
<<set $NPCList[0].vagina to 0>>
<<set $NPCList[1].vagina to 0>>
<<set $NPCList[0].mouth to 0>>
<<set $NPCList[1].mouth to 0>>

<<set $combat to 1>>
<<set $enemyarousalmax to 500>>
<<set $enemyangermax to 200>>
<<set $enemyhealthmax to 5555>>
<<set $enemytrust to 4444>>
<<if $dissociation gte 1>>
<<set $enemytrust -= 40>>
<</if>>

<<set $rapeavoid to 1>>
<<set $orgasmdown to 0>>
<<set $penisbitten to 0>>
<<set $apologised to 0>>
<<set $understruggle to 0>>
<<set $lowerstruggle to 0>>
<<set $upperstruggle to 0>>
<<set $leftaction to 0>>
<<set $rightaction to 0>>
<<set $traumasaved to $trauma>>
<<set $stresssaved to $stress>>
<<set $traumagain to 0>>
<<set $stressgain to 0>>
<<set $enemyno to 1>>

<<set $NPCList[0].pronoun to "n">>
<<combatinit>>
<</widget>>

<<widget "crossdressing_check">>
<<if $player.gender is "h">>
	<<set $crossdressing to 2>>
<<elseif $player.gender isnot $player.gender_appearance>>
	<<set $crossdressing to 1>>
<<else>>
	<<set $crossdressing to 0>>
<</if>>
<</widget>>

<<widget "danceinit">>
<<crossdressing_check>>
<</widget>>

<<widget "combatinit">>
<<if $consensual is 1>>
	<<set $controlstart to $control>>
<</if>>
<<set $arousalmasochism to 0>>

<<set $combatgoal to 0>>

<<set _genderexposed to $exposed gte 2 and !($worn.genitals.type.includesAll("chastity", "hidden"))>>
<<if $npc.length gt 0>>
  <<for _iii to 0; _iii lt $npc.length; _iii++>>
    <<if $genderknown.includes($npc[_iii])>>
      <<set _genderknownbeforehand to true>>
    <<elseif _genderexposed>>
      <<run $genderknown.pushUnique($npc[_iii])>>
    <</if>>
  <</for>>
<</if>>

<<set $newlyWritten to []>>

<<if _genderknownbeforehand or _genderexposed>>
  <<set $crossdressing to 0>>
<<else>>
  <<crossdressing_check>>
<</if>>

<<set $enemynomax to $enemyno>>

<<if $enemytype is "beast">>
	<<if $NPCList[0].penis is "none" and $player.penisExist>>
	<<set $position to "missionary">>
	<<else>>
		<<if random(1, 100) gte 20>>
		<<set $position to "doggy">>
		<<else>>
		<<set $position to "missionary">>
		<</if>>
	<</if>>
<<else>>
	<<if $NPCList[0].penis is "none">>
		<<if random(1, 100) gte 80>>
		<<set $position to "doggy">>
		<<else>>
		<<set $position to "missionary">>
		<</if>>
	<<else>>
		<<if random(1, 100) gte 50>>
		<<set $position to "doggy">>
		<<else>>
		<<set $position to "missionary">>
		<</if>>
	<</if>>
<</if>>

<<for _i to 0; _i lt $enemynomax; _i++>>
	<<if $NPCList[_i].stance isnot "defeated">>
		<<set $NPCList[_i].active to "active">>
	<</if>>
<</for>>

<<if $slimeEvent is "have sex with someone" or $slimeEvent is "have sex with someone or something">>
	<<unset $slimeEvent>>
<</if>>

<<if $worn.face.type.includes("gag")>>
	<<set $mouthuse to "gagged">>
<</if>>
<<if $worn.feet.type.includes("shackle")>>
	<<set $leftleg to "bound">>
	<<set $rightleg to "bound">>
	<<set $feetuse to "bound">>
<</if>>
<<resetLastOptions>>
<<getCombatDefaultsType>>
<<wetnessCalculate>>
<</widget>>

<<widget "inactiveNPC">>
/* How to use:
* Call this widget as <<inactiveNPC _n>> where _n is any number between 0 and 5, and is an active NPC.
* This will prevent said NPC from entering combat, , reduce the overall max health by said NPC's max health, and reduce $enemyno by 1.
* Reducing $enemyno is important because of the single-damage formula.
* Can be expanded into arousal as well.
* Why use this?
* When an active NPC is not supposed to be present in combat but still active. E.g. the NPC is in the audience.
*/
<<if $args[0]>>
	<<set $NPCList[$args[0]].active to "inactive">>
	<<set $enemyhealthmax -= $NPCList[$args[0]].healthmax>>
	<<set $enemyarousalmax -= $enemyarousalmax/$enemyno>>
	<<set $enemyno-->>
<<else>>
	inactiveNPC ERROR: No index specified.
<</if>>
<</widget>>

<<widget "man">>

<<if $finish isnot 1>>
<<if $setupMidOrgasm is true>>
	<<if $ejaculatingMid is true>>
		<<set $ejaculating to 1>>
		<<set $ejaculatingMid to false>>
	<<elseif $ejaculatingMid is false>>
		<<unset $ejaculatingMid>>
	<</if>>
<</if>>

	<<for _mancombatcontrol = 0; _mancombatcontrol lt $enemynomax; _mancombatcontrol++>>
		<<if $NPCList[_mancombatcontrol].active is "active" and $NPCList[_mancombatcontrol].stance isnot "defeated">>
			<<man-combat _mancombatcontrol>>
			<<if $position isnot "stalk" and !$breakIgnore>>

			<</if>>
		<<elseif $debug is 1 and $NPCList[_mancombatcontrol].active isnot "active">>

Debug Message:
NPC _mancombatcontrol, $NPCList[_mancombatcontrol].fullDescription is not active.

		<<elseif $debug is 1 and $NPCList[_mancombatcontrol].stance is "defeated">>

Debug Message:
NPC _mancombatcontrol, $NPCList[_mancombatcontrol].fullDescription is defeated.

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

<</if>>
<<if $enemyarousal lt $enemyarousalmax>>
	<<unset $condomVaginalImg>>
	<<unset $condomAnalImg>>
	<<unset $condomPlayerPenisImg>>
<</if>>
<<for $_j = $enemynomax-1; $_j gte _end; $_j-->>
	<<if ["vaginaentrance","vaginaimminent","vagina"].includes($NPCList[$_j].penis) and $NPCList[$_j].condom isnot false>>
		<<if $NPCList[$_j].condom.damaged is false>>
			<<set $condomVaginalImg to true>>
		<</if>>
	<</if>>
	<<if ["anusentrance","anusimminent","anus"].includes($NPCList[$_j].penis) and $NPCList[$_j].condom isnot false>>
		<<if $NPCList[$_j].condom.damaged is false>>
			<<set $condomAnalImg to true>>
		<</if>>
	<</if>>
<</for>>
<<if $player.condom>>
	<<if $player.condom.damaged is false>>
		<<set $condomPlayerPenisImg to true>>
	<</if>>
<</if>>

<<set $rng to random(1, 100)>>

<<if $worn.under_lower.vagina_exposed gte 1 and $worn.lower.vagina_exposed gte 1 and $npc.length isnot 0 and $worn.genitals.type.includesAll("chastity", "hidden")>>
<<elseif $worn.under_lower.vagina_exposed gte 1 and $worn.lower.vagina_exposed gte 1 and $npc.length isnot 0>>
	<<for _iii to 0; _iii lt $npc.length; _iii++>>
		<<set $genderknown.pushUnique($npc[_iii])>>
	<</for>>
<</if>>

<<if $worn.genitals.type.includesAll("chastity", "hidden") or $NPCList[0].state is "stalk" or $NPCList[0].state is "pursuit">>
<<elseif $crossdressing is 2 and $worn.under_lower.vagina_exposed gte 1 and $worn.lower.vagina_exposed gte 1 and $worn.over_lower.vagina_exposed gte 1>>
	/*Comment for seeing herm character genitals for the first time*/
	<<set $crossdressing to 0>>
	<<exposedcheck true>>
	<<if $NPCList[0].teen is 1 and $location is "school" and !($npc.length is 1 and ($npc[0] is "Kylar" or $npc[0] is "Sydney"))>>
		<<schoolrep herm 1>>
	<</if>>
	<<if $enemyno gte 2>>
		<<if $rng gte 96>>
			They recoil in horror and disgust at the sight of your <<genitals>>!
			<<set $enemyanger += 200>><<set $enemytrust -= 100>><<set $speechhermangry to 2>>
		<<elseif $rng gte 85>>
			Their hands shake and their breath quickens at the sight of your <<genitals>>.
			<<set $enemyarousal += (50 * $enemyno)>><<set $speechhermaroused to 2>>
		<<elseif $rng gte 50>>
			They recoil in shock at the sight of your <<genitals>>.
			<<set $enemyanger -= 50>><<set $enemytrust -= 50>><<set $speechhermshock to 2>>
		<<elseif $rng gte 30>>
			They're taken aback by your <<genitals>>. They don't seem angry, at least.
			<<set $enemyarousal -= 100>><<set $enemytrust -= 50>><<set $speechhermdisappointed to 2>>
		<<else>>
			They take both your <<genitals>> in stride, seeming unbothered.
		<</if>>

	<<else>>
		<<if $npc.includes("Sydney") and !$sydneySeen.includes("herm")>>
			<<set $sydneySeen.pushUnique("herm")>>
			<<NPCStatusCheck "Sydney">>
			<<if _sydneyStatus.includes("corrupt")>>
				<<He>> stares with wonder at your <<genitals>>. "Woah! <<sydneyMum>> never told me that was possible."
			<<else>>
				<<He>> eyes your <<genitals>> with great curiosity. "B...both? I didn't know that was possible!"
			<</if>><<npcincr Sydney purity -2>><<lspurity>>
		<<elseif $rng gte 96 and !$npc.includes("Kylar") and $NPCList[0].type isnot "plant">>
			<<He>> recoils in horror and disgust at the sight of your <<genitals>>!
			<<set $enemyanger += 200>><<set $enemytrust -= 100>><<set $speechhermangry to 2>>
		<<elseif $rng gte 85 and $NPCList[0].type isnot "plant" or $npc.includes("Kylar")>>
			<<His>> hands shake and <<his>> breath quickens at the sight of your <<genitals>>.
			<<set $enemyarousal += (50 * $enemyno)>><<set $speechhermaroused to 2>>
		<<elseif $rng gte 50 and $NPCList[0].type isnot "plant">>
			<<He>> recoils in shock at the sight of your <<genitals>>.
			<<set $enemyanger -= 50>><<set $enemytrust -= 50>><<set $speechhermshock to 2>>
		<<elseif $rng gte 30 and $NPCList[0].type isnot "plant">>
			<<Hes>> taken aback by your <<genitals>>. <<He>> doesn't seem angry, at least.
			<<set $enemyarousal -= 100>><<set $enemytrust -= 50>><<set $speechhermdisappointed to 2>>
		<<else>>
			<<He>> takes both your <<genitals>> in stride, seeming unbothered.
		<</if>>

	<</if>>
<<elseif $crossdressing is 1 and $worn.under_lower.vagina_exposed gte 1 and $worn.lower.vagina_exposed gte 1 and $worn.over_lower.vagina_exposed gte 1>>
	<<set $crossdressing to 0>>
	<<exposedcheck true>>
	<<if !$backgroundTraits.includes("crossdresser")>>
		<<if $crossdressingTrait is undefined>>
			<<set $crossdressingTrait to 1>>
		<<else>>
			<<set $crossdressingTrait += 1>>
		<</if>>
		<<if $crossdressingTrait gte 100>>
			<<run $backgroundTraits.pushUnique("crossdresser")>>
			<<set _newTrait to true>>
		<</if>>
	<</if>>
	<<if $NPCList[0].teen is 1 and $location is "school" and !($npc.length is 1 and ($npc[0] is "Kylar" or $npc[0] is "Sydney"))>>
		<<schoolrep crossdress 1>>
	<</if>>
	<<if $enemyno gte 2>>
		<<if $rng gte 96>>
			They recoil in horror upon seeing your <<genitals>>. The deception has driven them mad with rage!
			<<set $enemyanger += 200>><<set $enemytrust -= 100>><<set $speechcrossdressangry to 2>>
		<<elseif $rng gte 85>>
			Your <<genitals>> was clearly not what they were expecting, but they don't seem to mind. In fact, if their shaking hands are anything to go by they're quite pleased.
			<<set $enemyarousal += (50 * $enemyno)>><<set $speechcrossdressaroused to 2>>
		<<elseif $rng gte 50>>
			Their eyes widen in shock when they see your <<genitals>>. They seem unsure what to do.
			<<set $enemyanger -= 50>><<set $enemytrust -= 50>><<set $speechcrossdressshock to 2>>
		<<elseif $rng gte 30>>
			They look disappointed by your <<genitals>>. It wasn't what they were expecting.
			<<set $enemyarousal -= 100>><<set $enemytrust -= 50>><<set $speechcrossdressdisappointed to 2>>
		<<else>>
			Your <<genitals>> was clearly not what they were expecting, but they don't seem to mind.
		<</if>>

	<<else>>
		<<if $npc.includes("Sydney") and !$sydneySeen.includes("crossdress")>>
			<<set $sydneySeen.pushUnique("crossdress")>>
			<<NPCStatusCheck "Sydney">>
			<<if _sydneyStatus.includes("corrupt")>>
				<<He>> looks taken aback by your <<genitals>>. "All this time, you were a <<gender>>? Well, that doesn't change how I feel about you."
			<<else>>
				<<He>> stares at your <<genitals>> with confusion. "You're... a <<gender>>? Th-that's okay! I don't think of you any differently!"
			<</if>><<npcincr Sydney purity -2>><<lspurity>>
		<<elseif $rng gte 96 and !$npc.includes("Kylar") and $NPCList[0].type isnot "plant">>
			<<He>> recoils in horror upon seeing your <<genitals>>. The deception has driven <<him>> mad with rage!
			<<set $enemyanger += 200>><<set $enemytrust -= 100>><<set $speechcrossdressangry to 2>>
		<<elseif $rng gte 86 and $NPCList[0].type isnot "plant" or ($npc.includes("Kylar") and $NPCList[0].gender isnot $player.gender)>>
			Your <<genitals 1>> was clearly not what <<he>> was expecting, but <<he>> doesn't seem to mind. In fact, if <<his>> shaking hands are anything to go by <<he>> is quite pleased.
			<<set $enemyarousal += 50>><<set $speechcrossdressaroused to 2>>
		<<elseif $rng gte 50 and !$npc.includes("Kylar") and $NPCList[0].type isnot "plant">>
			<<His>> eyes widen in shock when <<he>> sees your <<genitals>>. <<He>> seems unsure what to do.
			<<set $enemyanger -= 50>><<set $enemytrust -= 50>><<set $speechcrossdressshock to 2>>
		<<elseif $rng gte 30 and $NPCList[0].type isnot "plant" or ($npc.includes("Kylar") and $NPCList[0].gender is $player.gender)>>
			<<He>> looks disappointed by your <<genitals>>. It wasn't what <<he>> was expecting.
			<<set $enemyarousal -= 100>><<set $enemytrust -= 50>><<set $speechcrossdressdisappointed to 2>>
		<<else>>
			Your <<genitals 1>> was clearly not what <<he>> was expecting, but <<he>> doesn't seem to mind.
		<</if>>

	<</if>>
	<<if _newTrait is true>>
		<<unset _newTrait>>
		Being seen crossdressing makes you feel happy inside
	<</if>>
<</if>>
<<turnend>>
<</widget>>