code:
:: Widgets Debug [widget]
<<widget "debug">>
<<button DEBUG>>
<>
<</button>>

<<if $debugMenu is undefined>>
	<<set $debugMenu to [false, 'debugMain']>>
<</if>>

<<if $debugMenu[0] is true>>

		<<debugContents>>

<<else>>

		<<debugContents>>

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

<<widget "debugContents">>

<input type="button" class="close" value="Close" onclick="overlayShowHide('debugOverlay')"/>

<input type="button" value="Main" onclick="overlayMenu('debugMain', 'debug')"/>

<input type="button" value="Character" onclick="overlayMenu('debugCharacter', 'debug')"/>

<input type="button" value="Events" onclick="overlayMenu('debugEvents', 'debug')"/>

<<if $debugMenu[1] is "debugMain">>

Main

		<<debugMain>>

<<else>>

Main

		<<debugMain>>

<</if>>

<<if $debugMenu[1] is "debugCharacter">>

Character

		<<debugCharacter>>

<<else>>

Character

		<<debugCharacter>>

<</if>>

<<if $debugMenu[1] is "debugEvents">>

Events

		<<debugEvents>>

<<else>>

Events

		<<debugEvents>>

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

<<widget "debugMain">>

Allure: <<print $allure>>

Rng: <<print $rng>>

Danger: <<print $danger>>

Passage: <<print $passage>>

<input type="button" id="backwords" value="Back" onclick="SugarCube.State.backward()"/>

<<link [[test|Test]]>><<set $molestationstart to 0>><</link>>

[[CanvasModel Example]]

[[Home|Bedroom]]

[[Wardrobe|Wardrobe]]

<<link [[Strip|$passage]]>><<undressclothes "wardrobe">><</link>>

<<link [[Strip to undies|$passage]]>><<generalUndress wardrobe over_upper>><<generalUndress wardrobe over_lower>><<generalUndress wardrobe upper>><<generalUndress wardrobe lower>><</link>>

<<link [[Strip all|$passage]]>><<undress "wardrobe">><</link>>

<<link [[Pass 1 minute|$passage]]>><<pass 1>><</link>>

<<link [[Pass 15 minutes|$passage]]>><<pass 15>><</link>>

<<link [[Pass 20 minutes|$passage]]>><<pass 20>><</link>>

<<link [[Pass 1 hour|$passage]]>><<pass 60>><</link>>

<<link [[Pass 3 hours|$passage]]>><<pass 3 hours>><</link>>

<<link [[Pass 6 hours|$passage]]>><<pass 6 hours>><</link>>

<<link [[Pass 12 hours|$passage]]>><<pass 12 hours>><</link>>

<<link [[Pass 18 hours|$passage]]>><<pass 18 hours>><</link>>

<<link [[Pass 23 hours|$passage]]>><<pass 23 hours>><</link>>

<<link [[Pass 24 hours|$passage]]>><<pass 24 hours>><</link>>

<<link [[Trust me|$passage]]>><<set $enemytrust += 2000>><<set $enemyanger -= 1000>><</link>>

<<link [[Hate me|$passage]]>><<set $enemytrust -= 2000>><<set $enemyanger += 1000>><</link>>

<<link [[Super Punch|$passage]]>><<set $enemyhealth to 0>><</link>>

<<link [[Super Stroke|$passage]]>><<set $enemyarousal to $enemyarousalmax>><</link>>

<<link [[Scream|$passage]]>><<set $alarm to 1>><</link>>

<<link [[Finish|$passage]]>><<set $finish to 1>><</link>>

<<link [[Make Rape|$passage]]>><<set $consensual to 0>><</link>>

<<link [[Make consensual|$passage]]>><<set $consensual to 1>><</link>>

<<link [[Frigify|$passage]]>><<set $enemyarousal to 0>><</link>>

<<if $position is "missionary">>
	<<link [[Roll over|$passage]]>><<set $position to "doggy">><</link>>

<<elseif $position is "doggy">>
	<<link [[Roll over|$passage]]>><<set $position to "missionary">><</link>>

<</if>>

<<link [[RNG 1|$passage]]>><<set $rng to 1>><</link>>

<<link [[RNG 11|$passage]]>><<set $rng to 11>><</link>>

<<link [[RNG 21|$passage]]>><<set $rng to 21>><</link>>

<<link [[RNG 31|$passage]]>><<set $rng to 31>><</link>>

<<link [[RNG 41|$passage]]>><<set $rng to 41>><</link>>

<<link [[RNG 51|$passage]]>><<set $rng to 51>><</link>>

<<link [[RNG 61|$passage]]>><<set $rng to 61>><</link>>

<<link [[RNG 71|$passage]]>><<set $rng to 71>><</link>>

<<link [[RNG 81|$passage]]>><<set $rng to 81>><</link>>

<<link [[RNG 91|$passage]]>><<set $rng to 91>><</link>>

<<link [[RNG 100|$passage]]>><<set $rng to 100>><</link>>

<<link [[Wear sundress|$passage]]>><<upperwear 1>><</link>>

<<link [[Wear swimsuit|$passage]]>><<underlowerwear 6>><</link>>

<<link [[Testing Room]]>><<upperstrip>><<lowerstrip>><<underlowerstrip>><</link>>

<<link [[End Event|$passage]]>><<endevent>><</link>>

<<link [[Escape Vore|$passage]]>><<set $vorestage to 0>><</link>>

<<link [[Make all beasts monster boys|$passage]]>><<set $monsterchance to 100>><<set $monsterhallucinations to "f">><<set $beastmalechance to 100>><<set $cbchance to 0>><</link>>

<<link [[Make all beasts monster girls|$passage]]>><<set $monsterchance to 100>><<set $monsterhallucinations to "f">><<set $beastmalechance to 0>><<set $dgchance to 0>><</link>>

<<link [[Make all beasts monster cuntboys|$passage]]>><<set $monsterchance to 100>><<set $monsterhallucinations to "f">><<set $beastmalechance to 100>><<set $cbchance to 100>><</link>>

<<link [[Make all beasts monster dickgirls|$passage]]>><<set $monsterchance to 100>><<set $monsterhallucinations to "f">><<set $beastmalechance to 0>><<set $dgchance to 100>><</link>>

<<link [[Make all beasts male animals|$passage]]>><<set $monsterchance to 0>><<set $beastmalechance to 100>><</link>>

<<link [[Make all beasts female animals|$passage]]>><<set $monsterchance to 0>><<set $beastmalechance to 0>><</link>>

<<link [[Spring|$passage]]>><<set $season to "spring">><</link>>

<<link [[Summer|$passage]]>><<set $season to "summer">><</link>>

<<link [[Autumn|$passage]]>><<set $season to "autumn">><</link>>

<<link [[Winter|$passage]]>><<set $season to "winter">><</link>>

<<link [[Enable basic Pregnancy features|$passage]]>><<set $sexStats.anus.pregnancy.seenDoctor to 2>><<set $sexStats.anus.pregnancy.maxCount to 2>><</link>>

<<link [[Get Initial Mother Trait|$passage]]>><<set $sexStats.anus.pregnancy.motherStatus to 1>><</link>>

<<link [[Fertilise New Eggs|$passage]]>><<fertilise>><</link>>

<<link [[Pregnancy Progress Day|$passage]]>><<pregProgressDay>><</link>>

<<link [[Pregnancy Progress Week|$passage]]>>
	<<pregProgressDay>>
	<<pregProgressDay>>
	<<pregProgressDay>>
	<<pregProgressDay>>
	<<pregProgressDay>>
	<<pregProgressDay>>
	<<pregProgressDay>>
<</link>>

<<link [[Set all pregnancy events to next $pass|$passage]]>>
	<<set _pregnancy to $sexStats.anus.pregnancy>>
	<<if _pregnancy[0] isnot null>><<set _pregnancy[0].timeLeft to 1>><</if>>
	<<if _pregnancy[1] isnot null>><<set _pregnancy[1].timeLeft to 1>><</if>>
	<<if _pregnancy[2] isnot null>><<set _pregnancy[2].timeLeft to 1>><</if>>
	<<if _pregnancy[3] isnot null>><<set _pregnancy[3].timeLeft to 1>><</if>>
<</link>>

These still require Fertilise

<<link [[Get Pregnant with an eel|$passage]]>><<impregnate "eels" 1000>><</link>>

<<link [[Get Pregnant with a slime|$passage]]>><<impregnate "slimes" 1000>><</link>>

<<link [[Get Pregnant with a worm|$passage]]>><<impregnate "worms" 1000>><</link>>

<<link [[Get Pregnant with a tentacle|$passage]]>><<impregnate "tentacle" 1000>><</link>>

<<link [[Repair Pregnancy Objects|$passage]]>><<prenancyObjectRepair>><</link>>

<<link [[Reset Pregnancy Objects|$passage]]>><<unset $container>><<unset $sexStats.anus>><<physicalAdjustmentsInit>><<containersInit>><</link>>

/*ToDo: Pregnancy, remove check to properly enable*/
<<if $pregnancyTesting>>
	Vaginal Pregnancy

	(New Pregnancy will only occur if not pregnant)

	<<link [[Get Pregnant with humans|$passage]]>>
		<<if $sexStats.vagina.menstruation.currentState is "normal">>
			<<set $sexStats.vagina.sperm["Debug Man"] = {"type":"human", "count":[[4,1000]]}>>
			<<set $sexStats.vagina.menstruation.currentDay to $sexStats.vagina.menstruation.stages[2]>>
			<<menstruationCycle>>
		<</if>>
	<</link>>

	<<link [[Get Pregnant with wolves|$passage]]>>
		<<if $sexStats.vagina.menstruation.currentState is "normal">>
			<<set $sexStats.vagina.sperm["Debug Wolf"] = {"type":"wolf", "count":[[4,1000]]}>>
			<<set $sexStats.vagina.menstruation.currentDay to $sexStats.vagina.menstruation.stages[2]>>
			<<menstruationCycle>>
		<</if>>
	<</link>>

	<<link [[Get Robin Pregnant with PCs children|$passage]]>>
		<<set _sperm to ["pc"]>>
		<<humanPregnancy "Robin" "pc" true>>
	<</link>>

	<<link [[Get Bailey Pregnant with Black wolf|$passage]]>>
		<<set _sperm to ["Black Wolf"]>>
		<<wolfPregnancy "Bailey" "Black Wolf" true>>
	<</link>>

<</if>>

<<link [["Enable Debug Lines"|$passage]]>><<set $debugLines to true>><</link>>

<<link [["Disable Debug Lines"|$passage]]>><<set $debugLines to false>><</link>>

<</widget>>

<<widget "debugCharacter">>

<<if $alluretest gte 1>>
	<<link [[Default allure|$passage]]>><<set $alluretest to 0>><</link>>

<<else>>
	<<link [[Become Alluring|$passage]]>><<set $alluretest to 1>><</link>>

	<<link [[Become Unalluring|$passage]]>><<set $alluretest to 2>><</link>>

<</if>>
<<if $dontHide is true>>
	<<link [[Hide|$passage]]>><<dontHideRevert>><</link>>
<<else>>
	<<link [[Don't hide|$passage]]>><<dontHideForNow>><</link>>
<</if>>

<<link [[All Fame|$passage]]>><<set $fame += 4000>><<famescrap 1000>><<famebusiness 1000>><<famegood 1000>><<famepimp 1000>><<set $fameexhibitionism += 1000>><<set $famesex += 1000>><<set $famerape += 1000>><<set $famebestiality += 1000>><<set $fameprostitution += 1000>><</link>>

<<link [[Fame Sex|$passage]]>><<set $fame += 4000>><<set $famesex += 4000>><</link>>

<<link [[Timer|$passage]]>><<set $timer -= 60>><</link>>

<<link [[Size Up|$passage]]>><<set $devlevel += 1>><</link>>

<<link [[Full Lewd Characteristics|$passage]]>><<set $promiscuity += 100>><<set $exhibitionism += 100>><<set $deviancy += 100>><</link>>

<<link [[Exhibitionism|$passage]]>><<set $exhibitionism += 20>><</link>>

<<link [[Promiscuity|$passage]]>><<set $promiscuity += 20>><</link>>

<<link [[Deviancy|$passage]]>><<set $deviancy += 20>><</link>>

<<link [[Beauty|$passage]]>><<set $beauty += 10000>><</link>>

<<link [[Physique|$passage]]>><<set $physique += 2000>><</link>>

<<link [[Awareness up|$passage]]>><<set $awareness += 200>><</link>>

<<link [[Awareness down|$passage]]>><<set $awareness -= 200>><</link>>

<<link [[Purity Up|$passage]]>><<set $purity += 500>><</link>>

<<link [[Purity Down|$passage]]>><<set $purity -= 500>><</link>>

<<link [[Pain Up|$passage]]>><<set $pain += 50>><</link>>

<<link [[Pain Down|$passage]]>><<set $pain -= 200>><</link>>

<<link [[Stress|$passage]]>><<set $stress += 5000>><</link>>

<<link [[Destress|$passage]]>><<set $stress -= 5000>><</link>>

<<link [[Traumatise me|$passage]]>><<set $trauma += 2000>><</link>>

<<link [[DeTraumatise me|$passage]]>><<set $trauma -= 2000>><</link>>

<<link [[Arousal max|$passage]]>><<arousal $arousalmax>><</link>>

<<link [[Arousal zero|$passage]]>><<arousal 0>><</link>>

<<link [[Booze|$passage]]>><<alcohol 60>><</link>>

<<link [[Drugged|$passage]]>><<set $drugged += 600>><</link>>

<<link [[Hallucinogen|$passage]]>><<set $hallucinogen += 600>><</link>>

<<link [[Sunlight|$passage]]>><<set $weather to "clear">><</link>>

<<link [[Wash|$passage]]>><<wash>><</link>>

<<link [[Seduction|$passage]]>><<set $seductionskill += 200>><</link>>

<<link [[Skulduggery|$passage]]>><<set $skulduggery += 200>><</link>>

<<link [[Swimming Skill|$passage]]>><<set $swimmingskill += 100>><</link>>

<<link [[Crime Up|$passage]]>><<set $crime += 500>><</link>>

<<link [[Crime Down|$passage]]>><<set $crime -= 500>><</link>>

<<link [[Reset NPC[0]'s Hands|$passage]]>><<set $NPCList[0].lefthand to 0>><<set $NPCList[0].righthand to 0>><</link>>

<<link [[Chastity Belt|$passage]]>><<genitalswear 1>><</link>>

<<link [[Chastity Cage|$passage]]>><<genitalswear 2>><</link>>

<<link [[Collar|$passage]]>><<leash 21>><</link>>

<<link [[Bind|$passage]]>><<set $leftarm to "bound">><<set $rightarm to "bound">><</link>>

<<link [[UnBind|$passage]]>><<unbind>><</link>>

<<link [[Breasts up|$passage]]>><<set $breastsize += 1>><</link>>

<<link [[Breasts down|$passage]]>><<set $breastsize -= 1>><</link>>

<<link [[Butt up|$passage]]>><<set $bottomsize += 1>><</link>>

<<link [[Butt down|$passage]]>><<set $bottomsize -= 1>><</link>>

<<link [[Penis up|$passage]]>><<set $penissize += 1>><</link>>

<<link [[Penis down|$passage]]>><<set $penissize -= 1>><</link>>

<<link [[Balls up|$passage]]>><<set $ballssize += 1>><</link>>

<<link [[Balls down|$passage]]>><<set $ballssize -= 1>><</link>>

<<link [[Money|$passage]]>><<set $money += 500000>><</link>>

<<link [[Grow hair|$passage]]>><<set $hairlength += 100>><</link>>

<<link [[Grow fringe|$passage]]>><<set $fringelength += 100>><</link>>

<<link [[Chest Parasite|$passage]]>><<parasite nipples urchin>><</link>> |
<<link [[Penis Parasite|$passage]]>><<parasite penis urchin>><</link>>

<<link [[Chastity Parasite|$passage]]>><<set $analchastityparasite to "worms">><</link>>

<<link [[Month|$passage]]>><<set $monthday += 31>><<day>><</link>>

<<link [[Delinquency|$passage]]>><<set $delinquency += 1000>><</link>>

<<link [[Detention|$passage]]>><<set $detention += 10>><</link>>

<<link [[School Skills|$passage]]>><<set $school += 8000>><<set $science += 800>><<set $maths += 800>><<set $english += 800>><<set $history += 800>><<set $sciencetrait to 4>><<set $mathstrait to 4>><<set $englishtrait to 4>><<set $historytrait to 4>><</link>>

<<link [[School Exam Skill|$passage]]>><<set $science_exam += 1000>><<set $maths_exam += 1000>><<set $english_exam += 1000>><<set $history_exam += 1000>><</link>>

<<link [[All Skills|$passage]]>><<set $school += 448>><<set $science += 112>><<set $maths += 112>><<set $english += 112>><<set $history += 112>><<set $skulduggery += 112>><<set $danceskill += 112>><<set $swimmingskill += 112>><<set $bottomskill += 112>><<set $seductionskill += 112>><<set $handskill += 112>><<set $feetskill += 112>><<set $chestskill += 112>><<set $thighskill += 112>><<set $oralskill += 112>><<set $analskill += 112>><<set $vaginalskill += 112>><<set $penileskill += 112>><</link>>

<<link [[All Skills Super|$passage]]>><<set $school += 4000>><<set $science += 1000>><<set $maths += 1000>><<set $english += 1000>><<set $history += 1000>><<set $sciencetrait to 4>><<set $mathstrait to 4>><<set $englishtrait to 4>><<set $historytrait to 4>><<set $skulduggery += 1000>><<set $danceskill += 1000>><<set $swimmingskill += 1000>><<set $bottomskill += 1000>><<set $seductionskill += 1000>><<set $handskill += 1000>><<set $feetskill += 1000>><<set $chestskill += 1000>><<set $thighskill += 1000>><<set $oralskill += 1000>><<set $analskill += 1000>><<set $vaginalskill += 1000>><<set $penileskill += 1000>><</link>>

<<link [[Status|$passage]]>><<set $cool += 400>><</link>>

<<link [[Status Down|$passage]]>><<set $cool -= 400>><</link>>

<<link [[Destroy Swimming Outfits|$passage]]>><<set $upperschoolswimsuitno to 0>><<set $lowerschoolswimsuitno to 0>><<set $schoolswimshortsno to 0>><</link>>

<<link [[Towels|$passage]]>><<clothesontowel>><</link>>

<<link [[Towels Please|$passage]]>><<towelup>><</link>>

<<link [[Submission|$passage]]>><<set $submissive += 250>><</link>>

<<link [[Defiance|$passage]]>><<set $submissive -= 250>><</link>>

<<link [[Robin Love|$passage]]>><<npcincr Robin love 100>><<npcincr Robin lust 100>><</link>>

<<link [[Robin Note|$passage]]>><<set $robinnote to 1>><</link>>

<<link [[Robin Romance|$passage]]>><<set $robinromance to 1>><</link>>

<<link [[Sex Statistics Up|$passage]]>>
<<set $orgasmstat += 2000>>
<<set $ejacstat += 2000>>
<<set $moleststat += 2000>>
<<set $rapestat += 1000>>
<<set $beastrapestat += 500>>
<<set $tentaclerapestat += 200>>
<<set $swallowedstat += 100>>
<<set $prostitutionstat += 10>>
<</link>>

<<link [[Almost Destroy Lowerclothes|$passage]]>><<set $worn.lower.integrity to 1>><</link>>

<<link [[Almost Destroy Upperclothes|$passage]]>><<set $worn.upper.integrity to 1>><</link>>

<<link [[Almost Destroy Underclothes|$passage]]>><<set $worn.under_lower.integrity to 1>><</link>>

<<link [[Almost Destroy Underupperclothes|$passage]]>><<set $worn.under_upper.integrity to 1>><</link>>

<<link [[Damage Lowerclothes|$passage]]>><<set $worn.lower.integrity -= 200>><</link>>

<<link [[Damage Upperclothes|$passage]]>><<set $worn.upper.integrity -= 200>><</link>>

<<link [[Damage Underupperclothes|$passage]]>><<set $worn.under_upper.integrity -= 200>><</link>>

<<link [[Damage Underclothes|$passage]]>><<set $worn.under_lower.integrity -= 200>><</link>>

<<link [[Damage Chastity|$passage]]>><<set $worn.genitals.integrity -= 5000>><</link>>

<<if $wolfgirl is 6>>
	<<link [[Wolf off|$passage]]>><<set $wolfgirl to 0>><</link>>
<<else>>
	<<link [[Wolf up|$passage]]>><<set $wolfgirl += 1>><</link>>
<</if>>

<<link [[Wolf build up|$passage]]>><<set $wolfbuild += 40>><</link>>

<<link [[Wolf build down|$passage]]>><<set $wolfbuild -= 40>><</link>>

<<link [[Angel build up|$passage]]>><<set $angelbuild += 40>><</link>>

<<link [[Angel build down|$passage]]>><<set $angelbuild -= 40>><</link>>

<<link [[Demon build up|$passage]]>><<set $demonbuild += 40>><</link>>

<<link [[Demon build down|$passage]]>><<set $demonbuild -= 40>><</link>>

<<link [[Undertemp off|$passage]]>><<set $undertemp to 0>><</link>>

<<link [[Goo Me|$passage]]>><<drench both 5>><</link>>

<<link [[Goo Me Small|$passage]]>><<drench both 1>><</link>>

<<link [[Drench me|$passage]]>><<set $upperwet to 200>><<set $lowerwet to 200>><<set $underupperwet to 200>><<set $underlowerwet to 200>><</link>>

<<link [[Drench over-outfit only|$passage]]>><<set $overupperwet to 200>><<set $overlowerwet to 200>><</link>>

<<link [[Drench middle-outfit only|$passage]]>><<set $upperwet to 200>><<set $lowerwet to 200>><</link>>

<<link [[Drench under-outfit only|$passage]]>><<set $underupperwet to 200>><<set $underlowerwet to 200>><</link>>

<<link [[Bully Timer|$passage]]>><<set $bullytimer to 100>><<set $bullytimeroutside to 100>><</link>>

<<link [[Whitney Lower Dominance|$passage]]>><<npcincr Whitney dom -20>><</link>>

<<link [[Whitney Raise Dominance|$passage]]>><<npcincr Whitney dom 20>><</link>>

<<link [[Whitney Love|$passage]]>><<npcincr Whitney love 20>><<npcincr Whitney lust 20>><</link>>

<<link [[Whitney Romance|$passage]]>><<set $whitneyromance to 1>><</link>>

<<link [[Pub Whore|$passage]]>><<set $pubwhore += 10>><</link>>

<<link [[Make Creature|$passage]]>><<beasttype bear>><</link>>

<<link [[Full Spray|$passage]]>><<set $spraymax to 5>><<spray 5>><</link>>

<</widget>>

<<widget "debugEvents">>

<<link [[Imprison Me|Underground Intro2]]>><<generate1>><<person1>><</link>>

<<link [[Start Robin Event|$passage]]>><<set $robindebt to 9>><</link>>

<<link [[School Start|Oxford Street]]>><<pass 1 day>><</link>>

<<link [[Rape Me->Molestation]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Double Rape Me->Forest Molestation]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Gang Rape Me w/ Audience->The Pod]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [["Sex Me [M]"|Beach Day Encounter Sex]]>><<endcombat>><<generateNPC 1 a m m>><<person1>><<set $sexstart to 1>><</link>>

<<link [["Sex Me [F]"|Beach Day Encounter Sex]]>><<endcombat>><<generateNPC 1 a f f>><<person1>><<set $sexstart to 1>><</link>>

<<link [[Gang Sex Me w/ Audience->Maths Lesson Gang Bang]]>><<endcombat>><<set $sexstart to 1>><</link>>

<<link [[DP Test]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Choke Suffocate Test|Beach Day Encounter Sex]]>><<endcombat>><<generate1>><<person1>><<set $sexstart to 1>><<set $oxygen to 0>><<set $suffocating to 3>><<set $NPCList[0].righthand to "throat">><<set $neckuse to "hand">><<set $askedtochoke to 1>><</link>>

<<link [[Named NPC gangbang Test|Named NPC Gangbang Select]]>><<endcombat>><</link>>

<<link [[NPC role select|NPC Role Select]]>><<endcombat>><</link>>

<<link [[Plantperson test|Plantperson Test]]>><<endcombat>><</link>>

<<link [[Swarm|Sea Eels]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Machine|Machine]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Struggle|Struggle]]>><<endcombat>><<set $struggle_start to 1>><</link>>

<<link [[Bus Rape->Bus move]]>><<endcombat>><<generate1>><<person1>><<set $molestationstart to 1>><</link>>

<<link [[Monster Rape Me->Monster Test]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Beast Rape Me|Street Dogs]]>><<endcombat>><<set $molestationstart to 1>><<beastNEWinit 3 dog>><<set $outside to 1>><<set $location to "town">><<set $bus to "domus">><</link>>

<<link [[Beast Gang Test|The Farm]]>><<endcombat>><<set $molestationstart to 1>><<set $outside to 1>><<location "forest">><<set $bus to "forest">><</link>>

<<link [[Dolphin Sex Me|Sea Dolphins Sex]]>><<endcombat>><<set $sexstart to 1>><<set $outside to 1>><<location to "sea">><<set $bus to "sea">><</link>>

<<link [[Tentacle Rape Me|Sea Tentacles]]>><<endcombat>><<set $molestationstart to 1>><</link>>

<<link [[Bailey Test->Bus move]]>><<endcombat>><<set $molestationstart to 1>><<npc Bailey>><<person1>><</link>>

<<link [[Leighton Office Spank->School Detention]]>><<endcombat>><<set $detention to 55>><</link>>

<<link [[Enslave Me->Underground Intro]]>><<endcombat>><<generate1>><<generate2>><<person1>><</link>>

<<link [[Work as a dancer|Brothel Dance]]>><<endcombat>><<danceinit>><<set $dancing to 1>><<set $venuemod to 3>><<stress -4>><<tiredness 4>><<set $dancelocation to "brothel">><</link>>

<<link [[Eden Start|Eden Cabin]]>><<endcombat>><<set $syndromeeden to 1>><<set $NPCName[$NPCNameList.indexOf("Eden")].lust to 0>><<set $edenshrooms to 0>><<set $edengarden to 0>><<set $edenspring to 0>><<set $wardrobes.edensCabin.unlocked to true>><</link>>

<<link [[Kylar Basement Rape|Kylar Basement Rape]]>><<endcombat>><<set $molestationstart to 1>><<npc Kylar>><<person1>><</link>>

<<link [[Kylar Sex|Street Kylar Sex]]>><<endcombat>><<set $sexstart to 1>><<set $location to "town">><<npc Kylar>><<person1>><</link>>

<<link [[Robin Sex Start|Bed Robin Sex]]>><<endcombat>><<set $sexstart to 1>><<npc Robin>><<person1>><</link>>

<<link [[Briar Pay Refuse|Brothel Pay Refuse]]>><<endcombat>><<set $molestationstart to 1>><<npc Briar>><<generate2>><<generate3>><<person1>><</link>>

<<link [[Leighton Sex|Head's Office Photoshoot Sex]]>><<endcombat>><<set $sexstart to 1>><<set $phase to 1>><<npc Leighton>><<person1>><</link>>

<<link [[Leighton Forced|Head's Office Blackmail Rape]]>><<endcombat>><<set $molestationstart to 1>><<npc Leighton>><<person1>><</link>>

<<link [[Avery Date|Domus Street]]>><<set $averydate to 1>><<set $time to 1200>><</link>>

<<link [[Black Wolf Forced|Forest Wolf Molestation]]>>/*<<beastNNPCinit>>*/<<endcombat>><<npc "Black Wolf">><<set $molestationstart to 1>><</link>>

<<link [[Police Pillory Start|Police Pillory Start]]>><<set $crime to 5000>><<generate1>><<person1>><</link>>

<<link [[Hole in wall|Temple Arcade 2]]>><</link>>

<<link [[Brothel Punishment]]>><</link>>

<<link [[Brothel Gloryhole]]>><</link>>

<<link [[Clothing Shop|Clothing Shop]]>><</link>>

<<link [[Forest Shop|Forest Shop]]>><</link>>

<<link [[Sea]]>><<set $sea to 0>><</link>>

<<link [[Hospital|Hospital Foyer]]>><</link>>

<<link [[Wolf Pack|Forest Wolf Cave]]>><<set $wolfpacktrust to 12>><</link>>

<<link [[Halloween|$passage]]>><<set $days to 47>><<set $monthday to 21>><<set $yeardays to 47>><<set $month to "october">><</link>>

<<link [[Full winter|$passage]]>><<set $days to 92>><<set $yeardays to 92>><<set $monthday to 1>><<set $month to "december">><</link>>

<<link [[Christmas|$passage]]>><<set $days to 110>><<set $yeardays to 110>><<set $monthday to 18>><<set $month to "december">><</link>>

<<link [[Blood moon|$passage]]>><<set $monthday to 31>><<set $daystate to "night">><<set $hour to 21>><<set $time to 1260>><<set $moonstate to "evening">><</link>>

<<link [[Test|$passage]]>><<set $month to "october">><</link>>

<<link [[Wake up|Ambulance rescue]]>><<pass 1 hour>><</link>>

<<link [[Appointment|Hospital Foyer]]>><<set $weekday to 6>><<set $time to 960>><</link>>

<<link [[Deep forest|Forest]]>><<set $forest to 80>><</link>>

<<link [[Street Police Extreme|Street Police Extreme]]>><<pass 1 week>><<pass 1 week>><<npc Leighton>><<person1>><</link>>

<<link [[Brothel Show Swarm|Brothel Show Swarm]]>><<leash 1>><<set $leftarm to "bound">><<set $rightarm to "bound">><<set $feetuse to "bound">><<set $sexstart to 1>><<set $rng to random(1,100)>><<npc Briar>><<person1>><</link>>

<<link [[Pussy Inspection|Pussy Inspection]]>><<pass 1 week>><<pass 1 week>><<npc Leighton>><<person1>><</link>>

<<link [[Penis Inspection|Penis Inspection]]>><<pass 1 week>><<pass 1 week>><<npc Leighton>><<person1>><</link>>

<<link [[Breast Inspection|Breast Inspection]]>><<pass 1 week>><<pass 1 week>><<npc Leighton>><<person1>><</link>>

<<link [[Science Class Exposure|Science Event3]]>><<set $scienceprogression to 3>><<set $delinquency to 600>><</link>>

<<link [[History Class Pillory|History Lesson Pillory]]>><</link>>

<<link [[Alley Dog]]>><</link>>

<<link [[NNPC Parade]]>><</link>>

<<link [[Beast Parade]]>><</link>>

<<link [[Beast Train]]>><</link>>

<<link [[Demon Encounter|Demon Start]]>><</link>>

<<link [[Temple Initiate|Temple]]>><<inittemple>><</link>>

<<link [[Strip Club|Strip Club]]>><<set $id to 1>><<set $wardrobes.stripClub.unlocked to true>><</link>>

<<link [[Asylum|Hospital Bed]]>><<set $trauma to 4900>><</link>>

<<link [[Prison|Police Prison Intro Bailey]]>><<npc Bailey>><<generate2>><<generate3>><<generate4>><<person2>><<neckwear 1>><<crimeup 5000>><</link>>

<<link [[Remy's Farm|Livestock Intro]]>><</link>>

<<link [[Farmlands|Farmland]]>><</link>>

<<link [[Museum|Museum]]>><</link>>

<<link [[Beach Cave|Beach Cave]]>><<set $cave to 0>><<beach_cave_init>><</link>>

<<link [[Stall Rent|Stall Rent]]>><<set $time to 360>><<set $daystate to "dawn">><</link>>

<<link [[Estate|Estate]]>><<estate_end>><<estate_init secret>><</link>>

<<link [[Stalk me|Street Stalk]]>><<endcombat>><<generate1>><<person1>><<set $molestationstart to 1>><</link>>

<<link [[Summon the Wraith|Wraith Test Start]]>><<endcombat>><<set $monthday to 31>><<set $daystate to "night">><<set $hour to 21>><<set $time to 1260>><<set $moonstate to "evening">><</link>>

<<link [[Possessed Fight|Possessed Fight Test]]>><<set $control to 0>><<set $possessed to true>><<if !$wraith.will>><<set $wraith.will to random(1300, 1700)>><</if>><</link>>

Turn beast into: <<link [[Creature|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "creature">><</link>>

<<link [[Dog|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "dog">><</link>>

<<link [[Wolf|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "wolf">><</link>>

<<link [[Dolphin|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "dolphin">><</link>>

<<link [[Bear|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "bear">><</link>>

<<link [[Boar|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "boar">><</link>>

<<link [[Pig|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "pig">><</link>>

<<link [[Lizard|$passage]]>><<set _xy to $enemyno-1>><<set $NPCList[_xy].type to "lizard">><</link>>

Swarm Encounters:

<<link [[Ruin Fish|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "fish" "container" "shaking" "shatter" "steady" 4 6>>
	<<set $water to 1>>
<</link>>

<<link [[Lake Fish|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "fish" "swarm" "moving towards you" "encircle you" "fend off" 1 7>>
	<<set $water to 1>>
<</link>>

<<link [[Forest Snakes|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "snakes" "swarm" "slithering" "slither" "keep back" 10 0>>
<</link>>

<<link [[Danube Spiders|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "spiders" "sac" "slipping" "break" "steady" 1 9>>
<</link>>

<<link [[Bath Slimes|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "slimes" "slime mass" "moving towards you" "encircle you" "fend off" 8 0>>
<</link>>

<<link [[Trash Maggots|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "maggots" "swarm" "crawling" "crawl" "keep back" 2 8>>
<</link>>

<<link [[Science Worms|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "worms" "jar" "held above the terrarium" "fall into the terrarium" "block" 0 10>>
<</link>>

<<link [[Sea Eels|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "eels" "swarm" "moving towards you" "encircle you" "fend off" 1 9>>
	<<set $water to 1>>
<</link>>

<<link [[Crate Worms|Swarm Test]]>><<set $molestationstart to 1>>
	<<swarminit "worms" "container" "shaking" "shatter" "steady" 1 9>>
<</link>>

Event Debugging:

<<link [[Test NPC Insertion|NPCInsertionAssert]]>><</link>>
<</widget>>

:: NPCInsertionAssert
Generating two NPCs both at slot 0.
<<generate1>><<generate1>>


code:
:: ScopedVarTest

We've extended normal widgets to include a call scoped namespace.
This means that other widgets can use the same name without fear of
overriding that value.

This namespace uses $$_ as a prefix. Note that using it outside of
a widget always results in an undefined value.

Below is a set of tests to confirm the behaviour of $$, _ and $_ values
<<widget 'G'>>$<</widget>>
<<widget 'L'>>_<</widget>>
<<widget 'GL'>><<G>><<L>><</widget>>
<<widget "testScopedVar">>

Inside of first widget:
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
> <<GL>>val2 = $_val2<<set $val = 1>><<set _val = 10>><<set $_val = 100>><<set $_val2 = 1000>>
Setting values for each value type in first widget:
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
> <<GL>>val2 = $_val2<<testScopedVar2>>
After second widget:
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
> <<GL>>val = $_val2<</widget>><<widget "testScopedVar2">>

Inside of second widget:
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
> <<GL>>val3 = $_val3<<set $val = 2>><<set _val = 20>><<set $_val = 200>><<set $_val3 = 2000>>
After setting values for each value type in second widget:
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
> <<GL>>val3 = $_val3<</widget>>

Before widget is invoked:
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
After widget is invoked:<<testScopedVar>>
> <<G>>val = $val
> <<L>>val = _val
> <<GL>>val = $_val
> <<GL>>val2 = $_val2
> <<GL>>val3 = $_val3
<<widget "rangeScopedTest">>
  <<set _obj = { foo: {one: 1, two: 2}, bar: {fee: 'fee', fie: 'fie'}, biz: {foe: 'foe', thum: 'thum'} }>>
  <<for $_key, $_val range _obj>>
	Parent before: <<GL>>key = $_key , <<GL>>val = <<-JSON.stringify($_val)>>

	<<rangeScopedTestInner $_key $_val>>

	Parent after: <<GL>>key = $_key , <<GL>>val = <<-JSON.stringify($_val)>>

  <</for>>
<</widget>>
<<widget "rangeScopedTestInner">>
> Before loop: <<GL>>key = $_key, <<GL>>val = $_val
<<for $_key, $_val range $args[1]>>
> $args[0] = $_key : $_val<</for>>
> After loop: <<GL>>key = $_key, <<GL>>val = $_val<</widget>>
<<rangeScopedTest>>

repo_name: Area/degrees

license: mit


code:
:: Demon Start
<<set $outside to 0>><<set $location to "school">><<schooleffects>><<effects>>

<<generateNPC 1 a f h 20>><<person1>>
You investigate the noise coming from the school's hallway.

Suddenly, with a HERMMMMM-POP a portal swirls open in front out you. From the portal a <<person>> strides out, <<his>> red eyes never leaving contact with yours.

The <<person>> opens <<his>> mouth and roars hotly. Your clothes are shredded to nothing in a blast of heat and wind as you wince from the impact, your skin glowing hotly.
<<tanned 2400>><<gggtanned>>

<<set $worn.lower.integrity to 0>><<set $worn.upper.integrity to 0>><<set $worn.under_lower.integrity to 0>><<set $worn.under_upper.integrity to 0>>
<<headruined>><<legsruined>><<feetruined>>
<<integritycheck>>

You look up, feeling a combination of awe and terror. The <<persons>> $NPCList[0].breastsdesc are standing straight out in defiance of gravity, <<his>> $NPCList[0].penisdesc dangling semi-engorged over <<his>> vagina... while the <<person>> is standing in front of you, everything shifts about lazily, as if you were looking at painting being swirled.

The <<person>> speaks in a commanding voice breaking your reverie, "Serve me well mortal and you shall be rewarded."

You consider your options...

<<link [[Run away screaming|Oxford Street]]>><</link>>

<<link [[Stay and see what happens...|Demon Sex]]>><<set $sexstart to 1>><</link>>

:: Demon Sex
<<effects>><<person1>>
<<if $sexstart is 1>>
	Prepare yourself, mortal.
	<<set $sexstart to 0>>
	<<consensual>>
	<<set $consensual to 1>>
	<<violence 1>>
	<<neutral 1>>
	<<maninit>>
	<<set $enemytrust += 500>>
	<<set $enemyarousalmax to 10000>>
	<<set $ostart to $orgasmcount>><<set $oindex to 0>><<set $o to 0>>
<</if>>
/% DEBUG: $NPCList[0].penis $NPCList[0].vagina
 %/
/% DEBUG: ocount $orgasmcount $o $oindex $ostart
 %/
<<set $o to ($orgasmcount - $ostart)>>
<<if $o gt $oindex>>
	You have cum $o times. The <<person>> grows in power as <<he>> drains you.
	<<awareness -10>><<llawareness>>

	<<set $oindex to $o>>
<</if>>

<<set $enemyanger to 0>>
<<effects>>
<<effectsman>><<man>>
<<stateman>>

<<actionsman>>
<<if $enemyhealth lte 0>>
	<<link [[Next|Demon Sex Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Demon Sex Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Demon Sex]]>><</link>><<nexttext>>
<</if>>

:: Demon Sex Finish
<<schooleffects>><<effects>>
<<unset $o>><<unset $ostart>><<unset $oindex>>
<<person1>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation-demon>>
	You wake on a grassy field, refreshed but drenched in semen and goo... the <<person>> is gone, leaving you with a deep sense of longing you can't shake or understand.

	<<set $tiredness to 1>>
	<<set $pain to 0>>
	<<drench both 5>>
	<<clotheson>>
	<<endcombat>>
	<<link [[Next|Park]]>><</link>>
<<else>>
	<<He>> recoils and vanishes. You are left with a deep sense of longing you can't shake or understand.

	<<clotheson>>
	<<endcombat>>
	<<link [[Next|Hallways]]>><</link>>
<</if>>

:: Ejaculation Demon [widget]
<<widget "ejaculation-demon">>

<<famesex 1>>

<<if $exposed is 1>>
	<<fameexhibitionism 1>>
<<elseif $exposed gte 2>>
	<<fameexhibitionism 2>>
<</if>>

You pass out from exertion, completely spent, while the <<person>> roars and continues to work away on your limp body.

<<if $images is 1>>
<<combatimg>>

<</if>>

<</widget>>

path: game/base-debug/test demon.twee


code:
:: The Pod

<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<generate1>><<generate2>><<generate3>><<generate4>><<generate5>><<generate6>><<person1>>
	You feel the room shake, then shift sideways. You find yourself in a featureless black room with a gang of $enemyno and an audience behind ropes. There is a sign on the wall that says DEBUG in bright orange letters, along with other statistics you don't understand.

	The gang advances...

	<<controlloss>>

	<<violence 1>>
	<<neutral 1>>
	<<maninit>>
<</if>>

DEBUG GROUP: TRST: $enemytrust HLTH: <<print Math.trunc($enemyhealth)>> : $enemyhealthmax AROSL: <<print Math.trunc($enemyarousal)>> : $enemyarousalmax ANGR: $enemyanger : $enemyangermax

DEBUG BROTHEL EVENT: Enemy current of $enemynomax (1 - 6): $enemyno

DEBUG: Enemy #: Health Descr Gen Pro PP Vag Mouth LH RH

<<for _ii = 0; _ii < $enemynomax; _ii++>>
	DEBUG: _ii: <<print Math.trunc($NPCList[_ii].health)>> $NPCList[_ii].description $NPCList[_ii].gender $NPCList[_ii].pronoun $NPCList[_ii].penis $NPCList[_ii].vagina $NPCList[_ii].mouth $NPCList[_ii].lefthand $NPCList[_ii].righthand

<</for>>
DEBUG PC (P/V/A/M/LARM): $penisstate $vaginastate $anusstate $mouthstate $leftarm

<<effects>>
<<effectsman>><<man>>

<<audience>>

<<stateman>>

<<actionsman>>

<<if $alarm is 1>>
	<<if $rescue is 1>>
	<<else>>
		No one comes to your aid.
		<<set $alarm to 0>>
		<<if $drugged gte 1>>The drugs inhibit you, you couldn't cry very convincingly.<</if>>

		<<if $enemyarousal gte $enemyarousalmax>>
			<<link [[Next->The Pod Finish]]>><</link>><<nexttext>>
		<<elseif $enemyhealth lte 0>>
			<<link [[Next->The Pod Finish]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next->The Pod]]>><</link>><<nexttext>>
		<</if>>
	<</if>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next->The Pod Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next->The Pod Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next->The Pod]]>><</link>><<nexttext>>
<</if>>

:: The Pod Finish
<<effects>>

<<if $enemyhealth lte 0>>
	<<He>> recoils in pain, giving you the chance you need. <<tearful>> you escape the gang, leaving them defeated on the floor.

	You feel the room shift again, and find yourself in your bedroom.

	<<clotheson>>
	<<endcombat>>
	[[Next|Bedroom]]
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	<<if $audience is 1>>
		A cheer erupts from the crowd as the <<person1>><<person>> climaxes. <<tearful>> you manage to stagger away before anyone else gets ideas.
	<<elseif $audience lte 6>>
		The <<person1>><<person>> and <<person2>><<person>> high-five each other. <<tearful>> you manage to stagger away while the audience congratulates each other.
	<<else>>
		A cheer erupts from the crowd, seems they enjoyed the show. <<tearful>> you manage to stagger away before anyone else gets any ideas.
	<</if>>

	<<stealclothes>>
	<<clotheson>>
	<<endcombat>>
	You feel the room shift again, and find yourself in your bedroom.

	[[Next|Bedroom]]
<</if>>

:: The Farm
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<beastTrainGenerate 5 `["pig","cat","dog","pig","creature"]`>>
	<<beastNEWinit 1 dog>>
		You stumble from the woods onto the verge of a steep cliff. Losing your balance you tip over the edge, tumbling to the bottom.

		When you recover, you find yourself in the main yard of a small farm. You are stunned to see several animals dancing around you... singing...

		Old McDonalds rape-y farm

		E-I-E-I-O

		And on this farm we found a whore

		E-I-E-I-O

		They stop singing and advance on you

	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<beastCombatInit>>
<</if>>
<<effects>>
<<effectsman>>

<<beast $enemyno>>

DEBUG BEAST EVENT: Enemy current of $enemynomax (1 - 6): $enemyno

DEBUG: Enemy #: Gen Pro Type Monster Stance PP Vag

<<for _ii = 0; _ii < $enemynomax; _ii++>>
	DEBUG: _ii: $NPCList[_ii].gender $NPCList[_ii].pronoun $NPCList[_ii].type $NPCList[_ii].monster $NPCList[_ii].stance $NPCList[_ii].penis $NPCList[_ii].vagina

<</for>>

<<stateman>>

<<actionsman>>

<<if $finish is 1>>
	<<link [[Next|The Farm Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|The Farm Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next|The Farm Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|The Farm]]>><</link>><<nexttext>>
<</if>>

:: The Farm Finish

<<effects>>
<<if $enemyhealth lte 0>>
	<<beastwound>>
		<<if $combatTrain.length gt 0>>
		The $NPCList[0].type recoils in pain and fear, but another beast is eager for a go.
		<<beastNEWinit $combatTrain.numberPerTrain[0] $combatTrain.beastTypes[0]>>
		<<combatTrainAdvance>>

		[[Next|The Farm]]
	<<else>>
		The $NPCList[_na].type recoils in pain and fear.

		<<link [[Next|The Farm Finish]]>><<set $finish to 1>><</link>>
	<</if>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<beastejaculation>>
	<<if $combatTrain.length gt 0>>
		Satisfied, the $NPCList[0].type moves and another beast takes its turn.
		<<beastNEWinit $combatTrain.numberPerTrain[0] $combatTrain.beastTypes[0]>>
		<<combatTrainAdvance>>

		[[Next|The Farm]]
	<<else>>
		Satisfied, the $NPCList[0].type moves away from you.

		<<link [[Next|The Farm Finish]]>><<set $finish to 1>><</link>>
	<</if>>
<<elseif $finish is 1>>
	<<if $enemywounded is 1 and $enemyejaculated is 0>>
		The $NPCList[_na].type whimpers and flees into a barn.
	<<elseif $enemywounded is 0 and $enemyejaculated is 1>>
		The $NPCList[_na].type leaves you laying on the grass.
	<<elseif $enemywounded gte 2 and $enemyejaculated is 0>>
		Feeling that you're more trouble than you're worth, the animals flee to a nearby barn.
	<<elseif $enemywounded is 0 and $enemyejaculated gte 2>>
		The animals leave you spent and shivering on the grass.
	<<elseif $enemywounded gte 1 and $enemyejaculated gte 1>>
		The animals leave you spent and shivering on the grass.
	<</if>>

	<<tearful>> you gather yourself.

	<<clotheson>>
	<<endcombat>>
	<<destinationeventend>>
	Out of nowhere a goat runs from the shed. Rearing back, it kicks you all the way to Domus Street and through your bedroom window.

	<<link [[Next|Bedroom]]>><</link>>
<</if>>

:: Beast Parade

TOTAL BEAST TYPES: $BeastList.length

<<for _i = 0; _i lt $BeastList.length; _i++>>
	/% <<generateBEAST 1 $BeastList[_i]>> %/
	<<beastNEWinit 1 $BeastList[_i]>>

	Introducing Beast <<print _i>>: $NPCList[0].description $NPCList[0].type

	PRONOUN: $NPCList[0].pronoun GENDER: $NPCList[0].gender

	PPSize,Desc: $NPCList[0].penissize, $NPCList[0].penisdesc BREASTSize,Desc: $NPCList[0].breastsize, $NPCList[0].breastsdesc

	PenActiv: $NPCList[0].penis VagActiv: $NPCList[0].vagina

	/% DOM: $NPCList[0].dom LUST $NPCList[0].lust RAGE: $NPCList[0].rage TRAUMA $NPCList[0].trauma
 %/
	/% STATE: $NPCList[0].state
 %/
<</for>>

[[Next|Bedroom]]

:: Beast Train

<<beastNEWinit 6 dolphin>>
BEAST TRAIN: $enemyno members

<<for _x = $enemyno-1; _x gte 0; _x-->>
Introducing Beast <<print _x+1>>: $NPCList[_x].description $NPCList[_x].type

PRONOUN: $NPCList[_x].pronoun GENDER: $NPCList[_x].gender

PPSize,Desc: $NPCList[_x].penissize, $NPCList[_x].penisdesc BREASTSize,Desc: $NPCList[_x].breastsize, $NPCList[_x].breastsdesc

PenActiv: $NPCList[_x].penis VagActiv: $NPCList[_x].vagina

<</for>>

[[Next|Bedroom]]

:: NNPC Parade

TOTAL NAMED NPCS: $NPCName.length

/% <<npc Robin>> %/
/% In walks $npc[0], and takes a bow. <<He>> has more Trauma now. And out <<he>> goes.
 %/
/% <<npcset $npc[0] trauma 80>> %/
/% <<npcincr $npc[0] trauma 100>> %/
/% <<endnpc>> %/

<<for _i = 0; _i lt $NPCName.length; _i++>>
	<<npc $NPCName[_i].nam>>

	Introducing NPC Number <<print _i>>: $NPCName[_i].nam the $NPCName[_i].title

	PRONOUN: $NPCName[_i].pronoun GENDER: $NPCName[_i].gender

	PPSize,Desc: $NPCName[_i].penissize, $NPCName[_i].penisdesc BREASTSize,Desc: $NPCName[_i].breastsize, $NPCName[_i].breastsdesc

	TYPE: <<if $NPCName[_i].adult>>Adult<<elseif $NPCName[_i].teen>>Teen<<else>>???<</if>> INSECURITY: $NPCName[_i].insecurity

	TRUST: $NPCName[_i].trust LOVE: $NPCName[_i].love DOM: $NPCName[_i].dom LUST $NPCName[_i].lust RAGE: $NPCName[_i].rage TRAUMA $NPCName[_i].trauma

	STATE: $NPCName[_i].state

	You have <<if $NPCName[_i].init is 1>>been introduced to <<him>>.<<else>>not been introduced to <<him>>.<</if>>

	<<endnpc $NPCName[_i].nam>>
<</for>>

[[Next|Bedroom]]

:: Alley Dog

<<residentialex2>>
[[Next|Domus Street]]

:: Abomination Old

<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<abomination>>
	You awaken to find yourself being assaulted by a strange beast!
<</if>>
<<effects>>
<<effectsman>><<man>>
<<stateman>>

<<actionsman>>
<<if $alarm is 1>>
	<<if $rescue is 1>>
		<<link [[Next->Abomination Old]]>><</link>><<nexttext>>
	<<else>>
		No one comes to your aid.
		<<set $alarm to 0>>
		<<if $drugged gte 1>>The drugs inhibit you, you couldn't cry very convincingly.<</if>>

		<<if $enemyarousal gte $enemyarousalmax>>
			<<link [[Next->Abomination Old]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next->Abomination Old]]>><</link>><<nexttext>>
		<</if>>
	<</if>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next->Abomination Old]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next->Abomination Old]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next->Abomination Old]]>><</link>><<nexttext>>
<</if>>

:: Swarm Test
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<molested>>
	<<controlloss>>
	<<set $combat to 1>>
<</if>>

<<underwater>><<effects>><<swarmeffects>>
<<swarm>>
<<swarmactions>>

<<if $stress gte $stressmax>>
	<<link [[Next|Swarm Test]]>><</link>><<nexttext>>
<<elseif $swimdistance lte 0>>
	<<link [[Next|Swarm Test]]>><</link>><<nexttext>>
<<else>>
	<<link "Next">><><</link>><<nexttext>>
<</if>>

:: Monster Test

<<location "sea">><<effects>>

<<if $molestationstart is 1>><<set $molestationstart to 0>>
	<<set $combat to 1>>
	<<molested>>
	<<controlloss>>

	<<set $enemytype to "tentacles">>
	<<tentaclestart 6 15>>

	<<set $vorestage to 1>>
	<<set $vorecreature to "whale">>
	<<set $vorestrength to 1>><<set $position to "doggy">>
	<<if $hallucinations gte 1>>
		<<set $voretentacles to 1>>
	<<else>>
		<<set $voretentacles to 0>>
	<</if>>

	<<swarminit "fish" "swarm" "moving towards you" "encircle you" "fend off" 1 9>>

	<<set $swimdistance to 20>>
	<<set $water to 1>>
	<<resetLastOptions>>
	<<getCombatDefaultsType>>
<</if>>

<<voreeffects>><<swarmeffects>><<effectstentacles>>
<<vore>><<swarm>><<tentacles>>
<<statetentacles>>
<<actionsOmni>>

<<if $stress gte $stressmax>>
	<<link [[Next|Monster Test]]>><</link>><<nexttext>>
<<elseif $vorestage lte 0>>
	<<link [[Next|Monster Test]]>><</link>><<nexttext>>
<<else>>
	<<link "Next">><><</link>><<nexttext>>
<</if>>

:: DP Test

<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<generate1>><<generate2>><<maninit>>
	<<set $NPCList[0].penis to "vagina">><<set $vaginause to "penis">><<set $vaginastate to "penetrated">><<set $vaginatarget to 0>>
	<<set $NPCList[1].penis to "anus">><<set $anususe to "penis">><<set $anusstate to "penetrated">><<set $anustarget to 1>>
<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $alarm is 1>>
	<<if $rescue is 1>>
		<<link [[Next->DP Test]]>><</link>><<nexttext>>
	<<else>>
		No one comes to your aid.
		<<set $alarm to 0>>
		<<if $drugged gte 1>>The drugs inhibit you, you couldn't cry very convincingly.<</if>>

		<<if $enemyarousal gte $enemyarousalmax>>
			<<link [[Next->Molestation Ejaculation]]>><</link>><<nexttext>>
		<<elseif $enemyhealth lte 0>>
			<<link [[Next->Molestation Escape]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next->DP Test]]>><</link>><<nexttext>>
		<</if>>
	<</if>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next->Molestation Ejaculation]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next->Molestation Escape]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next->DP Test]]>><</link>><<nexttext>>
<</if>>

:: Wolf Pack
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<beastNEWinit 1 dog>>
	<<beastCombatInit>>

	<<beastTrainGenerate>>

	You awaken to find yourself surrounded by a pack of stray dogs!
<</if>>

<<effects>>
<<effectsman>>

<<beast $enemyno>>

<<stateman>>

<<actionsman>>

	<<if $alarm is 1>>

		No one comes to your aid.
		<<set $alarm to 0>>
		<<if $drugged gte 1>>The drugs inhibit you, you couldn't cry very convincingly.<</if>>

		<<if $enemyarousal gte $enemyarousalmax>>
			<<link [[Next|Wolf Pack Ejaculation]]>><</link>><<nexttext>>
		<<elseif $enemyhealth lte 0>>
			<<link [[Next->Wolf Pack Escape]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next|Wolf Pack]]>><</link>><<nexttext>>
		<</if>>

	<<elseif $enemyarousal gte $enemyarousalmax>>
		<<link [[Next->Wolf Pack Ejaculation]]>><</link>><<nexttext>>
	<<elseif $enemyhealth lte 0>>
		<<link [[Next->Wolf Pack Escape]]>><</link>><<nexttext>>
	<<else>>
		<<link [[Next->Wolf Pack]]>><</link>><<nexttext>>
	<</if>>

:: Wolf Pack Escape
<<effects>>
<<beastwound>>
<<if $combatTrain.length gt 0>>
	The beast recoils in pain and fear, but another takes its place.
	<<beastNEWinit $combatTrain.numberPerTrain[0] $combatTrain.beastTypes[0]>>
	<<combatTrainAdvance>>

	[[Next|Wolf Pack]]
<<else>>
	The beast recoils in pain and fear.

	[[Next|Wolf Pack End]]
<</if>>

:: Wolf Pack Ejaculation
<<effects>>
<<beastejaculation>>
<<if $combatTrain.length gt 0>>
	Satisfied, the beast leaves you be. Another takes its place.
	<<beastNEWinit $combatTrain.numberPerTrain[0] $combatTrain.beastTypes[0]>>
	<<combatTrainAdvance>>

	[[Next|Wolf Pack]]
<<else>>
	Satisfied, the beast leaves you be.

	[[Next|Wolf Pack End]]
<</if>>

:: Wolf Pack End
<<effects>>

<<if $enemywounded is 1 and $enemyejaculated is 0>>
	The wolf whimpers and flees into the forest.
<<elseif $enemywounded is 0 and $enemyejaculated is 1>>
	The wolf leaves you lying on the grass.
<<elseif $enemywounded gte 2 and $enemyejaculated is 0>>
	Feeling that you're more trouble than you're worth, the wolves flee into the forest.
<<elseif $enemywounded is 0 and $enemyejaculated gte 2>>
	The wolves leave you spent and shivering on the grass.
<<elseif $enemywounded gte 1 and $enemyejaculated gte 1>>
	The wolves leave you spent and shivering on the grass. One seems to be limping.
<</if>>

<<clotheson>>
<<endcombat>>

:: Named NPC Gangbang Select

Add the NPCs you want.

<<if $enemyno lt 6>>
	<<if !($npc.includes("Alex"))>>
		<<link [[Add Alex|$passage]]>><<npc Alex -1>><</link>>

	<</if>>
	<<if !($npc.includes("Avery"))>>
		<<link [[Add Avery|$passage]]>><<npc Avery -1>><</link>>

	<</if>>
	<<if !($npc.includes("Bailey"))>>
		<<link [[Add Bailey|$passage]]>><<npc Bailey -1>><</link>>

	<</if>>
	<<if !($npc.includes("Briar"))>>
		<<link [[Add Briar|$passage]]>><<npc Briar -1>><</link>>

	<</if>>
	<<if !($npc.includes("Charlie"))>>
		<<link [[Add Charlie|$passage]]>><<npc Charlie -1>><</link>>

	<</if>>
	<<if !($npc.includes("Darryl"))>>
		<<link [[Add Darryl|$passage]]>><<npc Darryl -1>><</link>>

	<</if>>
	<<if !($npc.includes("Doren"))>>
		<<link [[Add Doren|$passage]]>><<npc Doren -1>><</link>>

	<</if>>
	<<if !($npc.includes("Eden"))>>
		<<link [[Add Eden|$passage]]>><<npc Eden -1>><</link>>

	<</if>>
	<<if !($npc.includes("Gwylan"))>>
		<<link [[Add Gwylan|$passage]]>><<npc Gwylan -1>><</link>>

	<</if>>
	<<if !($npc.includes("Harper"))>>
		<<link [[Add Harper|$passage]]>><<npc Harper -1>><</link>>

	<</if>>
	<<if !($npc.includes("Jordan"))>>
		<<link [[Add Jordan|$passage]]>><<npc Jordan -1>><</link>>

	<</if>>
	<<if !($npc.includes("Kylar"))>>
		<<link [[Add Kylar|$passage]]>><<npc Kylar -1>><</link>>

	<</if>>
	<<if !($npc.includes("Landry"))>>
		<<link [[Add Landry|$passage]]>><<npc Landry -1>><</link>>

	<</if>>
	<<if !($npc.includes("Leighton"))>>
		<<link [[Add Leighton|$passage]]>><<npc Leighton -1>><</link>>

	<</if>>
	<<if !($npc.includes("Mason"))>>
		<<link [[Add Mason|$passage]]>><<npc Mason -1>><</link>>

	<</if>>
	<<if !($npc.includes("Morgan"))>>
		<<link [[Add Morgan|$passage]]>><<npc Morgan -1>><</link>>

	<</if>>
	<<if !($npc.includes("Niki"))>>
		<<link [[Add Niki|$passage]]>><<npc Niki -1>><</link>>

	<</if>>
	<<if !($npc.includes("Quinn"))>>
		<<link [[Add Quinn|$passage]]>><<npc Quinn -1>><</link>>

	<</if>>
	<<if !($npc.includes("Remy"))>>
		<<link [[Add Remy|$passage]]>><<npc Remy -1>><</link>>

	<</if>>
	<<if !($npc.includes("River"))>>
		<<link [[Add River|$passage]]>><<npc River -1>><</link>>

	<</if>>
	<<if !($npc.includes("Robin"))>>
		<<link [[Add Robin|$passage]]>><<npc Robin -1>><</link>>

	<</if>>
	<<if !($npc.includes("Sam"))>>
		<<link [[Add Sam|$passage]]>><<npc Sam -1>><</link>>

	<</if>>
	<<if !($npc.includes("Sirris"))>>
		<<link [[Add Sirris|$passage]]>><<npc Sirris -1>><</link>>

	<</if>>
	<<if !($npc.includes("Sydney"))>>
		<<link [[Add Sydney|$passage]]>><<npc Sydney -1>><</link>>

	<</if>>
	<<if !($npc.includes("Whitney"))>>
		<<link [[Add Whitney|$passage]]>><<npc Whitney -1>><</link>>

	<</if>>
	<<if !($npc.includes("Winter"))>>
		<<link [[Add Winter|$passage]]>><<npc Winter -1>><</link>>

	<</if>>
	<<if !($npc.includes("Wren"))>>
		<<link [[Add Wren|$passage]]>><<npc Wren -1>><</link>>

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

<<if $enemyno gte 1>>
	<<for _lll to 0; _lll lt $enemyno; _lll++>>
		$npc[_lll] is active.

	<</for>>

	<<link "Remove $npc[0]"$passage>><<endnpc `$npc[0]`>><</link>>

	<<if $enemyno gte 2>>
		<<link "Remove $npc[1]"$passage>><<endnpc `$npc[1]`>><</link>>

	<</if>>
	<<if $enemyno gte 3>>
		<<link "Remove $npc[2]"$passage>><<endnpc `$npc[2]`>><</link>>

	<</if>>
	<<if $enemyno gte 4>>
		<<link "Remove $npc[3]"$passage>><<endnpc `$npc[3]`>><</link>>

	<</if>>
	<<if $enemyno gte 5>>
		<<link "Remove $npc[4]"$passage>><<endnpc `$npc[4]`>><</link>>

	<</if>>
	<<if $enemyno is 6>>
		<<link "Remove $npc[5]"$passage>><<endnpc `$npc[5]`>><</link>>

	<</if>>
	<<if $enemyno gte 2>>
		<<link [[Remove all NPCs|$passage]]>><<endnpc>><</link>>

	<</if>>

	<<link [[Named NPC Gangbang]]>><<set $sexstart to 1>><</link>>
<</if>>

:: Named NPC Gangbang
<<if $sexstart is 1>>
	<<set $sexstart to 0>>
	<<consensual>>
	<<set $consensual to 1>>
	<<neutral 1>>

	<<maninit>>
	<<if $possessed is true>>
		<<set $enemyanger to 200>><<npcidlegenitals>>
	<</if>>
<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $finish is 1>>
	<<link [[Next|Named NPC Gangbang Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next|Named NPC Gangbang Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[Next|Named NPC Gangbang Finish]]>><</link>><<nexttext>>
<<elseif _controlRegain is 1>>
	<<link [[Next|Named NPC Gangbang Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Named NPC Gangbang]]>><</link>><<nexttext>>
<</if>>

:: Named NPC Gangbang Finish
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>

<<elseif $enemyhealth lte 0>>
	You've beaten their ass.
<<elseif $finish is 1>>
	You ended it prematurely.
<<elseif $possessed is true and $control gte $controlmax>>
	You maxed out your control.
	<<set $possessed to 0>><<set _possess to 1>>
<</if>>

<<clotheson>>
<<if _possess>>
	<<link [[Go again|Possessed Fight Test]]>><<endcombat>><<set $possessed to true>><<set $control to 0>><</link>><<lllcontrol>> | + Wraith

<<else>>
	<<link [[Select NPCs|Named NPC Gangbang Select]]>><<endcombat>><</link>>

<</if>>
<<link [[Back Home|Bedroom]]>><<endcombat>><</link>>

:: Wraith Test Start
<<set $outside to 0>><<set $location to "home">><<effects>>

<<generateWraith 1 true>><<person1>><<rainWraith>>
You find yourself standing before your mirror. You trace a holy symbol on it, and a baleful red glow begins to emanate from it. A beautiful pale figure stares back. It presses a hand against the mirror.

"I can feel your heartbeat. I am already inside you. Won't you give in?"

How do you respond?

<<link [[As One.|Wraith Test]]>><<set $wraith.select to "man">><</link>>

<<link [[The Writhing Ensues.|Wraith Test]]>><<set $wraith.select to "tentacles">><</link>>

<<link [[Enveloped by Nothing.|Wraith Test]]>><<set $wraith.select to "slimetentacles">><</link>>

<<link [[Dissolve.|Wraith Test]]>><<set $wraith.select to "slime">><</link>>

<<link [[Immaculate Vanity.|Wraith Test]]>><<set $wraith.select to "arms">><</link>>

<<link [[The Power of Lust.|Wraith Test]]>><<set $wraith.select to "abomination">><</link>>

<<link [[Surprise Me.|Wraith Test]]>><<set $wraith.select to "random">><</link>>

<<link [[I'm going to jump out my window now, bye.|Domus Street]]>><<endWraith>><<set $eventskip to 1>><</link>>

:: Wraith Test
<<effects>>
<<if $wraith.select is "random">>
	<<switch random(1, 6)>>
		<<case 1>>
			<<set $wraith.select to "man">>
		<<case 2>>
			<<set $wraith.select to "tentacles">>
		<<case 3>>
			<<set $wraith.select to "slimetentacles">>
		<<case 4>>
			<<set $wraith.select to "slime">>
		<<case 5>>
			<<set $wraith.select to "arms">>
		<<case 6>>
			<<set $wraith.select to "abomination">>
	<</switch>>
<</if>>
<<if ($wraith.select.includes("slime") and $slimedisable is "t") or (($wraith.select.includes("tentacle") or $wraith.select is "abomination") and $tentacledisable is "t")>>
	The image in the mirror freezes, and the figure's face becomes blank. A message appears on the surface:

	ERROR: You have chosen or randomly rolled an option disabled by your current settings. Please enable both slimes and tentacles. If both are already enabled, please tell PurityGuy that he's an idiot.

	The figure unfreezes, and shakes its head. It then looks at you. "Get fucked." Your mirror shatters, and signals for replacement. When you blink, it's been fixed.

	<<link [[Next...?|Bedroom]]>><<endWraith>><</link>>

<<else>>
	<<initWraith $wraith.select>>
	<<switch $wraith.gen>>
		<<case "man">>
			A pale arm reaches out from the mirror and lifts your chin. "Forever, As One." It steps from the mirror.
		<<case "tentacles">>
			The space behind the figure begins to distort. A mass of pale tentacles shoot out from the mirror, violently pinning you to the wall and destroying your clothes.
			<<clothesruined>><<legsruined>><<feetruined>>

			"The writhing ensues." The figure steps out of the mirror.
		<<case "slimetentacles">>
			The space behind the figure begins to distort. A mass of pale tentacles shoot out from the mirror, violently pinning you to the wall and destroying your clothes.

			It raises its hand, and a swirling portal appears above you. Slimes begin to pour out and cover you.

			"Be enveloped by nothing."
			<<clothesruined>><<legsruined>><<feetruined>>
		<<case "slime">>
			The figure raises a hand as it steps from the mirror. From behind it, a group of pale slimes leap at you! "Dissolve the shell to have your way with the flesh."
		<<case "arms">>
			The figure steps out from the mirror. As it emerges before you, several extra pairs of arms spring out from its back. "Kneel before my immaculate form."
		<<case "abomination">>
			The space behind the figure begins to distort. A mass of pale tentacles shoot out from the mirror as it steps out. "Embrace the power of lust."
	<</switch>>

	<<link [[Next|Wraith Test Sex]]>><</link>>
<</if>>

:: Wraith Test Sex
<<effects>>
<<if $struggle_start is 1>>
	<<set $combat to 1>>
	<<controlloss>>
	<<violence 1>>
	<<molested>>
	<<if $player.penisExist>>
		<<set $struggle.penis.creature to "pale slime">><<set $penisuse to "struggle">><<set $penisstate to "struggle">><<set $struggle.enemy[0].location to "penis">>
	<<else>>
		<<set $struggle.vagina.creature to "pale slime">><<set $vaginause to "struggle">><<set $vaginastate to "struggle">><<set $struggle.enemy[0].location to "vagina">>
	<</if>>
	<<unset $struggle_start>>
<<elseif $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<controlloss>>
	<<violence 1>>
	<<neutral 1>>
	<<molested>>
	<<set $enemytype to $wraith.type>>
<</if>>
<<set $rescue to 0>>

<<effectsWraith>>

<<switch $wraith.type>>
	<<case "man">>
		<<if $enemyarousal gte $enemyarousalmax>>
			<<link [[Next|Wraith Test Sex Finish]]>><</link>><<nexttext>>
		<<elseif $enemyhealth lte 0>>
			<<link [[Next|Wraith Test Sex Finish]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next|Wraith Test Sex]]>><</link>><<nexttext>>
		<</if>>
	<<case "tentacles">>
		<<if $tentacles.active lte ($tentacles.max / 2)>>
			<<link [[Next|Wraith Test Sex Finish]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next|Wraith Test Sex]]>><</link>><<nexttext>>
		<</if>>
	<<case "slime">>
		<<if $struggle.done gte $struggle.number>>
			<<link [[Next|Wraith Test Sex Finish]]>><</link>><<nexttext>>
		<<else>>
			<<link [[Next|Wraith Test Sex]]>><</link>><<nexttext>>
		<</if>>
<</switch>>

<<link [[Back to the bedroom|Bedroom]]>><<endcombat>><<endWraith>><<clotheson>><</link>>

:: Wraith Test Sex Finish
<<effects>>

<<switch $wraith.type>>
	<<case "man">>
		<<if $enemyhealth lte 0>>
			The figure looks down at you in shock as it staggers backwards.
			<<if $wraith.gen is "abomination">>
				The tentacles drop lifelessly to the ground, and sublimate into a pink mist.
			<<elseif $wraith.gen is "arms">>
				Its extra arms fold back in.
			<</if>>
			Its head snaps back, and it dissipates into nothingness with a brief shriek that echoes in your mind. Your ears ring, and you think you hear laughter. "Worry not, we'll meet again soon."

			<<tearful>> you sit against you bed, wondering if what just happened was real.
			<<set $wraith.defeated ++>>
		<<else>>
			<<ejaculation>>
			With a bright flash, it vanishes. You feel lewd energy linger in the air, and its laughs echo between your ears. "Worry not, we'll meet again soon."

			<<tearful>> you sit against you bed, wondering if what just happened was real.
		<</if>>
	<<case "tentacles">>
		The tentacles retreat from you, back to the pale figure's side.<<if $wraith.gen is "slimetentacles">> The slimes quickly follow.<</if>> It gives you a regal bow, before stepping back into your mirror, which promptly shatters behind it.

		You blink, and your mirror looks normal again. <<tearful>> you sit against you bed, wondering if what just happened was real.
	<<case "slime">>
		The slimes disengage, retreating back to the figure. It picks one up, and begins to pet it as it walks back though your mirror.

		<<tearful>> you sit against you bed, wondering if what just happened was real.
<</switch>>

<<clotheson>>
<<endcombat>>
<<endWraith>>

<<link [[Next|Bedroom]]>><<set $eventskip to 1>><</link>>

:: Plantperson Test

<<if $plantdisable is "f">>
	<<link [[Consensual sex in the forest|Plantperson Test Sex]]>><<set $sexstart to 1>><<set $location to "forest">><</link>>

	<<link [[Nonconsensual sex in the forest|Plantperson Test Sex]]>><<set $molestationstart to 1>><<set $location to "forest">><</link>>

	<<link [[Consensual sex in the moor|Plantperson Test Sex]]>><<set $sexstart to 1>><<set $location to "moor">><</link>>

	<<link [[Nonconsensual sex in the moor|Plantperson Test Sex]]>><<set $molestationstart to 1>><<set $location to "moor">><</link>>
<<else>>
	Plantpeople are disabled or otherwise unavailable. I don't know what you're trying to do here.

	<<link [[Enable plantpeople|Plantperson Test]]>><<set $hallucinogen += 10>><<set $plantdisable to "f">><<set $tentacledisable to "f">><</link>><<ghallucinogens>>
<</if>>

<<link [[Back home|Bedroom]]>><<endevent>><</link>>

:: Plantperson Test Sex
<<if $sexstart is 1 or $molestationstart is 1>>
	<<if $sexstart is 1>>
		<<set $sexstart to 0>>
		<<consensual>><<set $consensual to 1>>
		<<neutral 1>>
	<<elseif $molestationstart is 1>>
		<<set $molestationstart to 0>>
		<<controlloss>>
		<<violence 1>>
		<<neutral 1>>
		<<molested>>
	<</if>>
	<<generatePlant1>><<person1>>
	<<maninit "plant">><<npcexpose>>
	<<if $location is "forest">>
		<<enable_rescue>>
	<</if>>
	<<set $enemyarousalmax to 800>>
	<<set _randomtentacles to random(6, 10)>>
	<<makeAbomination _randomtentacles 10 "vine" "vine" true>>
	"Hi there!" A <<person>> pops up in front of you, <<plant_details>> strewn through <<his>> hair because you're in the $location and it's $season. "You're cute! I'm gonna fuck you with my vines!"

	A bunch of vines pop out of the ground.
<</if>>
<<effects>>
<<effectsabomination>><<abomination>>
<<stateabomination>>

<<actionsabomination>>

<<if $enemyhealth lte 0>>
	<<link [[HEALTH|Plantperson Test Sex Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[ORGASM|Plantperson Test Sex Finish]]>><</link>><<nexttext>>
<<elseif $alarm is 1 and $rescue is 1>>
	<<link [[RESCUE|Plantperson Test Sex Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Plantperson Test Sex]]>><</link>><<nexttext>>
<</if>>

<<link [[Emergency exit|Plantperson Test Sex Finish]]>><<set $finish to 1>><</link>>

:: Plantperson Test Sex Finish
<<effects>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	<<if _orgasm>>
		"That was great!" the <<person>> cheers. "And thanks for cumming in me! Later!"
	<<else>>
		"That was fun!" the <<person>> chirps. "Later!"
	<</if>>
	<<He>> digs back into the ground, and <<his>> vines follow. One of the vines waves at you.
<<elseif $enemyhealth lte 0>>
	"Ow!" the <<person>> whines. "You're no fun!" <<He>> digs back into the ground, and <<his>> vines follow. One of the vines flips you off, somehow.
<<elseif $alarm is 1 and $rescue is 1>>
	You hear a gun fire close by, and a bullet lands at the <<persons>> feet. "Fuck," <<he>> hisses. "It's the <<nnpc_title "Eden">>. Fuck. Fuck shit fuck. Um." <<He>> grabs your face and gives you a syrupy kiss on each cheek, before pulling away from you. "See ya! I'm out!"
	<<set $player.bodyliquid.face.goo += 1>>

	The <<person>> retracts <<his>> vines and retreats into the forest right as Eden emerges. <<nnpc_He "Eden">> helps you collect yourself. "Damn hikers," <<nnpc_he "Eden">> mutters. "Are you okay?"
<<else>>
	"Emergency exit? Bummer," the <<person>> says. <<He>> shrugs. "Oh well. Fuck your holes until you're a gibbering mess hopelessly addicted to my nectar later!" <<He>> digs back into the ground, and <<his>> vines follow. One of the vines checks <<his>> notifications on <<his>> phone.
<</if>>
<<endcombat>>
<<clotheson>>
<<link [[Do it again|Plantperson Test]]>><</link>>

<<link [[Back home|Bedroom]]>><</link>>

:: Possessed Fight Test

You feel a tap on your shoulder. You turn around. Nothing is there. You turn back.

"Boo."

You open your mouth to scream, but it is already inside you.

<<link [[Fight a stranger|Possessed Fight]]>><<set $opponent to 1>><<set $fightstart to 1>><</link>>

<<link [[Fight Sydney|Possessed Fight]]>><<set $opponent to 2>><<set $fightstart to 1>><</link>>

<<link [[Select your named NPCs|Named NPC Gangbang Select]]>><</link>>

:: Possessed Fight
<<if $fightstart is 1>>
	<<set $fightstart to 0>>
	<<if $opponent is 1>>
		<<generate1>><<person1>>
		<<catcall>> A <<person>> reaches for you.

		Your body is made to laugh. "Those who interrupt ghosts shall join them."
	<<elseif $opponent is 2>>
		<<npc Sydney>><<person1>>
		Sydney freezes in front of you. "Oh, no. Beloved, something's wrong, I can feel it."

		Your body is made to laugh. "False. Everything is right in the world."
	<</if>>
	<<neutral 1>>
	<<maninit>>
	<<set $enemytrust -= 100>>
	<<set $enemyanger += 200>>
	<<npcidlegenitals>>

<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $enemyhealth lte 0>>
	<<link [[HEALTH|Possessed Fight Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[ORGASM|Possessed Fight Finish]]>><</link>><<nexttext>>
<<elseif _controlRegain is 1>>
	<<link [[CONTROL|Possessed Fight Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|Possessed Fight]]>><</link>><<nexttext>>
<</if>>

:: Possessed Fight Finish
<<effects>>
<<if $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>

	<<tearful>> you recover. "Shall we dance again?" your mouth is forced to ask.

	<<clotheson>>
	<<endcombat>>
	<<link [[Fight again|Possessed Fight]]>><<endevent phaseless>><<set $fightstart to 1>><</link>>

	<<link [[Freshen up, then fight again|Possessed Fight]]>><<endevent phaseless>><<set $fightstart to 1>><<set $pain to 0>><<set $arousal to 0>><</link>><<lpain>><<larousal>>

<<elseif $enemyhealth lte 0>>
	<<if $opponent is 1>>
		The <<person>> falls back, and scrambles away.
	<<elseif $opponent is 2>>
		Sydney moans, slaps a hand over <<his>> mouth, and runs away.
	<</if>>

	<<tearful>> you recover. "Shall we dance again?" your mouth is forced to ask.

	<<clotheson>>
	<<endcombat>>
	<<link [[Fight again|Possessed Fight]]>><<set $fightstart to 1>><<endevent phaseless>><</link>>

	<<link [[Freshen up, then fight again|Possessed Fight]]>><<set $fightstart to 1>><<endevent phaseless>><<set $pain to 0>><<set $arousal to 0>><</link>><<lpain>><<larousal>>

<<else>>
	<<set $possessed to 0>>
	You regain control in your body, and rip the pale figure out of your chest like you're pulling a rabbit out of a hat.
	<<if $opponent is 1>>The <<person>>, justifiably terrified by this development, scrambles away.<</if>>

	"Congratulations. You won." It pats you on the head, then vanishes in a torrent of water.
	<<if $opponent is 2>>Sydney is nowhere to be seen.<</if>>

	<<tearful>> you try to decide if you want to go again or not.

	<<clotheson>>
	<<endcombat>>
	<<link [[Fight again|Possessed Fight]]>><<set $possessed to true>><<set $control to 0>><<set $fightstart to 1>><<endevent phaseless>><</link>><<lllcontrol>> | + Wraith

	<<link [[Freshen up, then fight again|Possessed Fight]]>><<set $possessed to true>><<set $control to 0>><<set $fightstart to 1>><<endevent phaseless>><<set $pain to 0>><<set $arousal to 0>><</link>><<lpain>><<larousal>><<lllcontrol>> | + Wraith

	<<link [[Decision room|Possessed Fight Test]]>><<set $possessed to true>><<set $control to 0>><</link>><<lllcontrol>> | Also + Wraith
<</if>>

<<link [[Back home|Bedroom]]>><<set $possessed to 0>><<endevent>><<unset $opponent>><</link>>

:: NPC Role Select

The lights flash on. You find yourself in a strange chamber, completely smooth and featureless. There is a sign on the wall that says DEBUG in bright orange letters. A large, opaque tube reaches to the ceiling, The words CUSTOM CONSTRUCT are labelled on the front.

A terminal is attached to the tube. You look at the prompts.

Please select the construct's descriptor. Leave blank for default generation.

<<if $npcselectdesc is undefined>><<set $npcselectdesc to "custom">><</if>>
<<textbox "$npcselectdesc" $npcselectdesc>>

Please select the construct's role. Leave blank for default generation.

<<if $npcselectrole is undefined>><<set $npcselectrole to "construct">><</if>>
<<textbox "$npcselectrole" $npcselectrole>>

<<link [[Sex|NPC Role Fight]]>><<set $sexstart to 1>>
	<<if $npcselectdesc is undefined>><<set $npcselectdesc to "custom">><</if>>
	<<if $npcselectrole is undefined>><<set $npcselectrole to "construct">><</if>>
	<<set $npcselectdesc to $npcselectdesc.replace(/[^a-zA-Z 0-9,.!()£/]+/g,"")>>
	<<set $npcselectrole to $npcselectrole.replace(/[^a-zA-Z 0-9,.!()£/]+/g,"")>>
	<<generateRole 0 $npcselectdesc $npcselectrole>><<person1>>
	<<unset $npcselectdesc>><<unset $npcselectrole>>
<</link>>

<<link [[Fight|NPC Role Fight]]>><<set $fightstart to 1>>
	<<if $npcselectdesc is undefined>><<set $npcselectdesc to "custom">><</if>>
	<<if $npcselectrole is undefined>><<set $npcselectrole to "construct">><</if>>
	<<set $npcselectdesc to $npcselectdesc.replace(/[^a-zA-Z 0-9,.!()£/]+/g,"")>>
	<<set $npcselectrole to $npcselectrole.replace(/[^a-zA-Z 0-9,.!()£/]+/g,"")>>
	<<generateRole 0 $npcselectdesc $npcselectrole>><<person1>>
	<<unset $npcselectdesc>><<unset $npcselectrole>>
<</link>>

<<link [[Back home|Bedroom]]>><<unset $npcselectdesc>><<unset $npcselectrole>><</link>>

:: NPC Role Fight
<<if $sexstart is 1>>
	<<set $sexstart to 0>>
	<<consensual>>
	<<set $consensual to 1>>
	<<neutral 1>>

	<<maninit>>
	With a hiss of steam, the tube retracts to the ceiling. A figure walks out, a <<if $pronoun is "m">>man<<else>>woman<</if>>. You recognize <<him>> as the <<person>> you selected.

	"Beginning sex encounter," the <<person>> says in a flat tone, before <<his>> face morphs into a lavicious smile. <<catcall>>
<<elseif $fightstart is 1>>
	<<set $fightstart to 0>>
	<<neutral 1>>

	<<maninit>>
	<<set $enemytrust -= 100>>
	<<set $enemyanger += 200>>
	<<npcidlegenitals>>
	With a hiss of steam, the tube retracts to the ceiling. A figure walks out, a <<if $pronoun is "m">>man<<else>>woman<</if>>. You recognize <<him>> as the <<person>> you selected.

	"Beginning combat encounter," the <<person>> says in a flat tone, before <<his>> face morphs into an angry scowl. "Oh, you're in for it now!"
<</if>>

<<effects>>
<<effectsman>><<man>>

<<stateman>>

<<actionsman>>

<<if $finish is 1>>
	<<link [[FINISH|NPC Role Fight Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[HEALTH|NPC Role Fight Finish]]>><</link>><<nexttext>>
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<link [[ORGASM|NPC Role Fight Finish]]>><</link>><<nexttext>>
<<elseif $pain gte 100 and $willpowerpain is 0>>
	<<link [[PAIN|NPC Role Fight Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next|NPC Role Fight]]>><</link>><<nexttext>>
<</if>>

<<link [[Emergency exit|NPC Role Fight Finish]]>><<set $finish to 1>><</link>>

:: NPC Role Fight Finish
<<if $finish is 1>>
	"Test concluded," the <<person>> says in a flat tone, abruptly stepping back. "Restoring state to default."
<<elseif $enemyhealth lte 0>>
	"Test concluded," the <<person>> says in a flat tone, stepping away from you as if <<he>> weren't hurt at all. "Restoring state to default."
<<elseif $pain gte 100 and $willpowerpain is 0>>
	"Test concluded," the <<person>> says in a flat tone, stepping away from you. "Restoring state to default."
<<elseif $enemyarousal gte $enemyarousalmax>>
	<<ejaculation>>
	"Test concluded," the <<person>> says in a flat tone, stepping away from you. "Restoring state to default."
<</if>>

<<He>> walks back to the terminal and flicks a switch. <<He>> steps past it, and the tube descends from the ceiling over <<him>> again. Once the tube touches the floor, the lights switch off.

<<tearful>> you wonder what to do next.

<<endcombat>><<clotheson>>

<<link [[Create another construct|NPC Role Select]]>><</link>>

<<link [[Back home|Bedroom]]>><</link>>

path: game/base-debug/test encounters.twee


code:
:: UITest1
<<if $molestationstart is 1>>
	<<set $molestationstart to 0>>
	<<generate1>><<generate2>><<generate3>><<person1>>

		The gang advances...

	<<controlloss>>

	<<violence 1>>
	<<neutral 1>>
	<<maninit>>
<</if>>

<<effects>>

<<effectsman>>

<<man>>

<<audience>>

<<stateman>>

<<debugactionsman>>

<<if $enemyarousal gte $enemyarousalmax>>
	<<link [[Next->UITest1 Finish]]>><</link>><<nexttext>>
<<elseif $enemyhealth lte 0>>
	<<link [[Next->UITest1 Finish]]>><</link>><<nexttext>>
<<else>>
	<<link [[Next->UITest1]]>><</link>><<nexttext>>
<</if>>

:: UITest1 Finish

Demo Over

:: UITest Widgets [widget]
<<widget "debugactionsman">>

<</widget>>


code:
:: Renderer Test Page

<<link [[Return|$lastPassage]]>>
	<<unset $lastPassage>>
<</link>>

Report errors on this page, unsupported features, or if generated and reference images look different.

User-Agent (browser & OS versions): <<print navigator.userAgent>>.
<<link "Hide">><<remove '#useragent'>><</link>>

1. globalCompositeOperation:

<<twinescript>>
let c2d = Renderer.createCanvas(16, 16);
_gcoSupported = 'globalCompositeOperation' in c2d && typeof c2d.globalCompositeOperation is 'string';
_gaSupported = 'globalAlpha' in c2d && typeof c2d.globalAlpha is 'number';
<</twinescript>>

<<if _gcoSupported>>
	supported.
<<else>>
	not supported. Most of the renderer features will not work.
<</if>>

<<dynamicblock delay "id=ontestimageloaded">>

2. getImageData:

<<twinescript>>
_gidSupported = false;
let c2d = Renderer.createCanvas(_width, _height);
c2d.drawImage(_testimg, 0, 0);
try {
	c2d.getImageData(0, 0, _width, _height);
	_gidSupported = true;
} catch (e){
	console.debug(e);
}
<</twinescript>>

<<if _gidSupported>>
	supported. That's surprising.
<<else>>
	not supported. That's the expected result.
<</if>>

3. Composition modes

<<if _gcoSupported>>

	<<twinescript>>

	let c2d = Renderer.createCanvas(_width*7, _height);

	function testOneMode(index, mode, fill) {
		c2d.globalCompositeOperation = 'source-over';
		c2d.fillStyle = fill;
		c2d.fillRect(_width*index, 0, _width, _height);
		c2d.globalCompositeOperation = mode;
		c2d.drawImage(_testimg, _width*index, 0);
	}
	testOneMode(0, 'destination-in', '#00ff80');
	testOneMode(1, 'saturation', '#ff0000');
	testOneMode(2, 'multiply', '#808080');
	testOneMode(3, 'screen', '#404040');
	testOneMode(4, 'hard-light', '#00ff80');
	testOneMode(5, 'color-dodge', '#404040');
	testOneMode(6, 'color-burn', '#808080');

	output.append(c2d.canvas);

	<</twinescript>>

- generated image

- reference image

Composition modes, left-to-right: destination-in, saturation, multiply, screen, hard-light, color-dodge, color-burn

<<else>>
	not supported

<</if>>

4. globalAlpha

<<if _gaSupported>>

<<twinescript>>

let c2d = Renderer.createCanvas(_width, _height);

c2d.fillStyle = '#00ff80';
c2d.fillRect(0, 0, _width, _height);
c2d.globalAlpha = 0.5;
c2d.drawImage(_testimg, 0, 0);

output.append(c2d.canvas);

<</twinescript>>
- generated image

- reference image

<<else>>
	<span class="red" not supported

<</if>>

<</dynamicblock>>

<<twinescript>>
let image = new Image();
image.onload = ()=>{
	_testimg = image;
	_width = Number(image.width);
	_height = Number(image.height);
	Dynamic.render("ontestimageloaded");
}
image.src = "img/test0.png";
<</twinescript>>

5. Model test run

		Generated image:

			<<selectmodel "main">>
			<<set _modeloptions.mouth to 'neutral'>>
			<<set _modeloptions.skin_tone to 1>>
			<<set _modeloptions.worn_head to 2>>
			<<set _modeloptions.worn_head_colour to 'custom'>>
			<<set _modeloptions.filters.worn_head_custom to {blend:{gradient:'linear',values:[110,60,130,30],colors:['#000000','#FF0000']},blendMode:'hard-light'}>>
			<<set _modeloptions.worn_upper to 1>>
			<<set _modeloptions.worn_upper_alpha to 0.7>>
			<<set _modeloptions.worn_upper_colour to "custom">>
			<<set _modeloptions.filters.worn_upper_custom to getCustomClothesColourCanvasFilter(90,1,4,2)>>
			<<set _modeloptions.worn_under_lower to 1>>
			<<set _modeloptions.worn_under_lower_colour to 'red'>>
			<<set _modeloptions.worn_lower to 1>>
			<<set _modeloptions.worn_lower_alpha to 0.7>>
			<<set _modeloptions.worn_lower_colour to _modeloptions.worn_upper_colour>>
			<<set _modeloptions.filters.worn_lower_custom to _modeloptions.filters.worn_upper_custom>>
			<<rendermodel>>

		Reference image:

<<link [[Return|$lastPassage]]>>
	<<unset $lastPassage>>
<</link>>


code:
:: Testing Room
<<silently>><<effects>><</silently>>
/*<<Avatar>>*/
<<link "<<">><<set $pain -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $pain -= 5>><<goto "Testing Room">><</link>>
Pain (<<= $pain>>)
<<link ">">><<set $pain += 5>><<goto "Testing Room">><</link>>
<<link ">>">><<set $pain += 10>><<goto "Testing Room">><</link>>

<<link "<<">><<arousal -1000>><<goto "Testing Room">><</link>>
<<link "<">><<arousal -100>><<goto "Testing Room">><</link>>
Arousal (<<= $arousal>>)
<<link ">">><<arousal 100>><<goto "Testing Room">><</link>>
<<link ">>">><<arousal 1000>><<goto "Testing Room">><</link>>

<<link "<<">><<set $stress -= 1000>><<goto "Testing Room">><</link>>
<<link "<">><<set $stress -= 100>><<goto "Testing Room">><</link>>
Stress (<<= $stress>>)
<<link ">">><<set $stress += 100>><<goto "Testing Room">><</link>>
<<link ">>">><<set $stress += 1000>><<goto "Testing Room">><</link>>

<<link "<<">><<set $trauma -= 1000>><<goto "Testing Room">><</link>>
<<link "<">><<set $trauma -= 100>><<goto "Testing Room">><</link>>
Trauma (<<= $trauma>>)
<<link ">">><<set $trauma += 100>><<goto "Testing Room">><</link>>
<<link ">>">><<set $trauma += 1000>><<goto "Testing Room">><</link>>

<<link "<<">><<set $promiscuity -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $promiscuity -= 2>><<goto "Testing Room">><</link>>
Promiscuity (<<= $promiscuity>>)
<<link ">">><<set $promiscuity += 2>><<goto "Testing Room">><</link>>
<<link ">>">><<set $promiscuity += 10>><<goto "Testing Room">><</link>>

<<link "<<">><<set $exhibitionism -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $exhibitionism -= 2>><<goto "Testing Room">><</link>>
Exhibitionism (<<= $exhibitionism>>)
<<link ">">><<set $exhibitionism += 2>><<goto "Testing Room">><</link>>
<<link ">>">><<set $exhibitionism += 10>><<goto "Testing Room">><</link>>

Toggle:
<<link "Gender">>
    /* note: add ability to switch to herm gender in the future; maybe a set of (three) buttons to pick which gender instead of a toggle? */
    <<set $player.gender to ($player.gender is "m" ? "f" : "m")>>
    <<set $player.penisExist to ($player.gender is "m")>>
    <<set $player.ballsExist to ($player.gender is "m")>>
    <<set $player.vaginaExist to ($player.gender is "f")>>
    <<goto "Testing Room">>
<</link>> |
<<link "Sex">>
    <<set $player.sex to ($player.sex is "m" ? "f" : "m")>>
    <<set $player.penisExist to ($player.gender is "m")>>
    <<set $player.ballsExist to ($player.gender is "m")>>
    <<set $player.vaginaExist to ($player.gender is "f")>>
    <<goto "Testing Room">>
<</link>> |
<<link "Virginity">>
    <<if $player.virginity.penile isnot true or $player.virginity.vaginal isnot true>>
        <<set $player.virginity.vaginal to true>><<set $player.virginity.penile to true>><<set $player.virginity.anal to true>><<set $player.virginity.oral to true>>
    <<else>>
        <<set $player.virginity.vaginal to false>><<set $player.virginity.penile to false>><<set $player.virginity.anal to false>><<set $player.virginity.oral to false>><<set $player.virginity.temple to false>>
    <</if>>
    <<goto "Testing Room">>
<</link>> |
<<link "Hirsute">>
    <<set $hirsutedisable to ($hirsutedisable is "t"? "f" : "t")>>
    <<goto "Testing Room">>
<</link>> |
<<link "Bound Left Arm">>
    <<if $leftarm is "bound">>
        <<set $leftarm to 0>><<set $leftboundcarry to 0>>
    <<else>>
        <<set $leftarm to "bound">>
    <</if>>
    <<goto "Testing Room">>
<</link>> |
<<link "Bound Right Arm">>
    <<if $rightarm is "bound">>
        <<set $rightarm to 0>><<set $rightboundcarry to 0>>
    <<else>>
        <<set $rightarm to "bound">>
    <</if>>
    <<goto "Testing Room">>
<</link>>

Breast Size - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

Hair Colour (<<= $haircolour>>):
<<link "Black">><<set $haircolour to "black">><<goto "Testing Room">><</link>> |
<<link "Brown">><<set $haircolour to "brown">><<goto "Testing Room">><</link>> |
<<link "Red">><<set $haircolour to "red">><<goto "Testing Room">><</link>> |
<<link "Ginger">><<set $haircolour to "ginger">><<goto "Testing Room">><</link>> |
<<link "Blond">><<set $haircolour to "blond">><<goto "Testing Room">><</link>> |
<<link "Green">><<set $haircolour to "green">><<goto "Testing Room">><</link>> |
<<link "Blue">><<set $haircolour to "blue">><<goto "Testing Room">><</link>> |
<<link "Purple">><<set $haircolour to "purple">><<goto "Testing Room">><</link>>

<<link "<<">><<set $hairlength -= 100>><<goto "Testing Room">><</link>>
<<link "<">><<set $hairlength -= 10>><<goto "Testing Room">><</link>>
Hair Length (<<= $hairlength>>)
<<link ">">><<set $hairlength += 10>><<goto "Testing Room">><</link>>
<<link ">>">><<set $hairlength += 100>><<goto "Testing Room">><</link>>

Eye Colour (<<= $eyecolour>>):
<<link "Hazel">><<set $eyecolour to "hazel">><<goto "Testing Room">><</link>> |
<<link "Amber">><<set $eyecolour to "amber">><<goto "Testing Room">><</link>> |
<<link "Green">><<set $eyecolour to "green">><<goto "Testing Room">><</link>> |
<<link "Dark Blue">><<set $eyecolour to "dark blue">><<goto "Testing Room">><</link>> |
<<link "Light Blue">><<set $eyecolour to "light blue">><<goto "Testing Room">><</link>> |
<<link "Purple">><<set $eyecolour to "purple">><<goto "Testing Room">><</link>>

<<link "<">><<set $wolfgirl -= 1>><<goto "Testing Room">><</link>>
Wolf (<<= $wolfgirl>>)
<<link ">">><<set $wolfgirl += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $angel -= 1>><<goto "Testing Room">><</link>>
Angel (<<= $angel>>)
<<link ">">><<set $angel += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $demon -= 1>><<goto "Testing Room">><</link>>
Demon (<<= $demon>>)
<<link ">">><<set $demon += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $fallenangel -= 1>><<goto "Testing Room">><</link>>
Fallen Angel (<<= $fallenangel>>)
<<link ">">><<set $fallenangel += 1>><<goto "Testing Room">><</link>>

Semen:
<<link "<">><<set $player.bodyliquid.vagina.semen -= 1>><<goto "Testing Room">><</link>>
Vagina (<<= $player.bodyliquid.vagina.semen >>)
<<link ">">><<set $player.bodyliquid.vagina.semen += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $player.bodyliquid.anus.semen -= 1>><<goto "Testing Room">><</link>>
Anus (<<= $player.bodyliquid.anus.semen >>)
<<link ">">><<set $player.bodyliquid.anus.semen += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $player.bodyliquid.mouth.semen -= 1>><<goto "Testing Room">><</link>>
Mouth (<<= $player.bodyliquid.mouth.semen >>)
<<link ">">><<set $player.bodyliquid.mouth.semen += 1>><<goto "Testing Room">><</link>>

Goo:
<<link "<">><<set $player.bodyliquid.vagina.goo -= 1>><<goto "Testing Room">><</link>>
Vagina (<<= $player.bodyliquid.vagina.goo>>)
<<link ">">><<set $player.bodyliquid.vagina.goo += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $player.bodyliquid.anus.goo -= 1>><<goto "Testing Room">><</link>>
Anus (<<= $player.bodyliquid.anus.goo>>)
<<link ">">><<set $player.bodyliquid.anus.goo += 1>><<goto "Testing Room">><</link>> |

<<link "<">><<set $player.bodyliquid.mouth.goo -= 1>><<goto "Testing Room">><</link>>
Mouth (<<= $player.bodyliquid.mouth.goo>>)
<<link ">">><<set $player.bodyliquid.mouth.goo += 1>><<goto "Testing Room">><</link>>

Parasite:
<<link "Chest">>
    <<if $parasite.nipples.name is undefined>>
        <<parasite nipples urchin>>
    <<else>>
        <<removeparasite nipples>>
    <</if>>
    <<goto "Testing Room">>
<</link>> |

<<link "Penis">>
    <<if $parasite.penis.name is undefined>>
        <<parasite penis urchin>>
    <<else>>
        <<removeparasite penis>>
    <</if>>
    <<goto "Testing Room">>
<</link>> |

<<link "Clit">>
    <<if $parasite.clit.name is undefined>>
        <<parasite clit urchin>>
    <<else>>
        <<removeparasite clit>>
    <</if>>
    <<goto "Testing Room">>
<</link>>

Upper Clothes:
<<link "<<">><<set $worn.upper.integrity -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $worn.upper.integrity -= 1>><<goto "Testing Room">><</link>>
Integrity (<<= $worn.upper.integrity>>)
<<link ">">><<set $worn.upper.integrity += 1>><<goto "Testing Room">><</link>>
<<link ">>">><<set $worn.upper.integrity += 10>><<goto "Testing Room">><</link>> |

<<link "<">><<set $upperwet -= 100>><<goto "Testing Room">><</link>>
Wet (<<= $upperwet>>)
<<link ">">><<set $upperwet += 1>><<goto "Testing Room">><</link>>

Lower Clothes:
<<link "<<">><<set $worn.lower.integrity -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $worn.lower.integrity -= 1>><<goto "Testing Room">><</link>>
Integrity (<<= $worn.lower.integrity>>)
<<link ">">><<set $worn.lower.integrity += 1>><<goto "Testing Room">><</link>>
<<link ">>">><<set $worn.lower.integrity += 10>><<goto "Testing Room">><</link>> |

<<link "<">><<set $lowerwet -= 100>><<goto "Testing Room">><</link>>
Wet (<<= $lowerwet>>)
<<link ">">><<set $lowerwet += 1>><<goto "Testing Room">><</link>>

Under Bottoms:
<<link "<<">><<set $worn.under_lower.integrity -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $worn.under_lower.integrity -= 1>><<goto "Testing Room">><</link>>
Integrity (<<= $worn.under_lower.integrity>>)
<<link ">">><<set $worn.under_lower.integrity += 1>><<goto "Testing Room">><</link>>
<<link ">>">><<set $worn.under_lower.integrity += 10>><<goto "Testing Room">><</link>> |

<<link "<">><<set $underlowerwet -= 100>><<goto "Testing Room">><</link>>
Wet (<<= $underlowerwet>>)
<<link ">">><<set $underlowerwet += 1>><<goto "Testing Room">><</link>>

Under Top:
<<link "<<">><<set $worn.under_upper.integrity -= 10>><<goto "Testing Room">><</link>>
<<link "<">><<set $worn.under_upper.integrity -= 1>><<goto "Testing Room">><</link>>
Integrity (<<= $worn.under_upper.integrity>>)
<<link ">">><<set $worn.under_upper.integrity += 1>><<goto "Testing Room">><</link>>
<<link ">>">><<set $worn.under_upper.integrity += 10>><<goto "Testing Room">><</link>> |

<<link "<">><<set $underupperwet -= 100>><<goto "Testing Room">><</link>>
Wet (<<= $underupperwet>>)
<<link ">">><<set $underupperwet += 1>><<goto "Testing Room">><</link>>

/*ToDo: Add handling for toggling clothing.*/
/*ToDo: Wardrobe and Shop*/

<<link [[Bedroom]]>><</link>>


code:
:: testing-skinColor

Skin Colour Testing Area

<<testing-skinColorWidget>>

Skin Range:
<<numberslider "$skinColor.range" $skinColor.range 0 100 1>>
<<link "test">>
	<<set $skinColor.current.test to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #skinColorDiv>><<testing-skinColorWidget>><</replace>>
<</link>> |
<<link "All">>
	<<set $skinColor.current.body to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.mouth to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.breasts to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.penis to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.swimshorts to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.swimsuitTop to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.swimsuitBottom to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.bikiniTop to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.bikiniBottom to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.tshirt to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "body">>
	<<set $skinColor.current.body to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<set $skinColor.current.mouth to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "breasts">>
	<<set $skinColor.current.breasts to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "penis">>
	<<set $skinColor.current.penis to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "swimshorts">>
	<<set $skinColor.current.swimshorts to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "swimsuitTop">>
	<<set $skinColor.current.swimsuitTop to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "swimsuitBottom">>
	<<set $skinColor.current.swimsuitBottom to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "bikiniTop">>
	<<set $skinColor.current.bikiniTop to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "bikiniBottom">>
	<<set $skinColor.current.bikiniBottom to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "tshirt">>
	<<set $skinColor.current.tshirt to skinColor($skinColor.tanImgEnabled, $skinColor.range,$skinColor.overwrite)>>
	<<replace #imageHolder>><><</replace>>
<</link>>

Skin Range Overwrite:

<<print '<<checkbox "$skinColor.overwriteEnable" false true ' + ($skinColor.overwriteEnable is true ? "checked" : "") + '>>'>> Enable Overwrite

Hue-rotate Start <<numberslider "$skinColor.overwriteValues.hStart" $skinColor.overwriteValues.hStart 0 360 1>>

Hue-rotate End <<numberslider "$skinColor.overwriteValues.hEnd" $skinColor.overwriteValues.hEnd 0 360 1>>

Saturation Start <<numberslider "$skinColor.overwriteValues.sStart" $skinColor.overwriteValues.sStart 0 5 0.1>>

Saturation End <<numberslider "$skinColor.overwriteValues.sEnd" $skinColor.overwriteValues.sEnd 0 5 0.1>>

Brightness Start <<numberslider "$skinColor.overwriteValues.bStart" $skinColor.overwriteValues.bStart 0 5 0.1>>

Brightness End <<numberslider "$skinColor.overwriteValues.bEnd" $skinColor.overwriteValues.bEnd 0 5 0.1>>

<<link "Update Overwrite">>
	<<setSkinColorBase>>
<</link>> |
<<link "Reset Overwrite" $passage>>
	<<set $skinColor.overwriteValues to {
		"hStart": 45, "hEnd": 45,
		"sStart": 0.2, "sEnd": 0.4,
		"bStart": 4.5, "bEnd": 0.7
	}>>
<</link>>

Manual Skin Filter:

<<textarea "$filterSet1" $filterSet1>>

<<link "test">>
	<<set $skinColor.current.test to $filterSet1>>
	<<replace #skinColorDiv>><<testing-skinColorWidget>><</replace>>
<</link>> |
<<link "All">>
	<<set $skinColor.current.body to $filterSet1>>
	<<set $skinColor.current.mouth to $filterSet1>>
	<<set $skinColor.current.breasts to $filterSet1>>
	<<set $skinColor.current.penis to $filterSet1>>
	<<set $skinColor.current.swimshorts to $filterSet1>>
	<<set $skinColor.current.swimsuitTop to $filterSet1>>
	<<set $skinColor.current.swimsuitBottom to $filterSet1>>
	<<set $skinColor.current.bikiniTop to $filterSet1>>
	<<set $skinColor.current.bikiniBottom to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "body">>
	<<set $skinColor.current.body to $filterSet1>>
	<<set $skinColor.current.mouth to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "breasts">>
	<<set $skinColor.current.breasts to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "penis">>
	<<set $skinColor.current.penis to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "swimshorts">>
	<<set $skinColor.current.swimshorts to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "swimsuitTop">>
	<<set $skinColor.current.swimsuitTop to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "swimsuitBottom">>
	<<set $skinColor.current.swimsuitBottom to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "bikiniTop">>
	<<set $skinColor.current.bikiniTop to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>> |
<<link "bikiniBottom">>
	<<set $skinColor.current.bikiniBottom to $filterSet1>>
	<<replace #imageHolder>><><</replace>>
<</link>>

Suggested Filters:

hue-rotate(45deg) saturate(0.2) brightness(4.5)

hue-rotate(45deg) saturate(0.3) brightness(1.5)

hue-rotate(45deg) saturate(0.4) brightness(0.5)

<<link "Don't Hide">><<set $dontHide to true>>
	<<replace #imageHolder>><><</replace>><</link>> |
<<link Hide>><<set $dontHide to false>>
	<<replace #imageHolder>><><</replace>><</link>>

[[Refresh|$passage]]

<<link [[Reset|$passage]]>><<set $objectVersion.skinColor to 0>><</link>>

<<link [[Bedroom|Bedroom]]>><</link>>

:: Widgets testing-skinColorWidget [widget]
<<widget "testing-skinColorWidget">>
<<if $filterSet1 is undefined>>
	<<set $filterSet1 to "hue-rotate(45deg) saturate(0.2) brightness(4.5)">>
<</if>>
<<if $objectVersion.skinColor is 0>>
	<<skinColorInit>>
	<<set $objectVersion.skinColor to 1>>
<</if>>

<<print ''>>

<</widget>>