code:
:: AssayJS [script]

window.slimCount = function(slaves) {
	var slim = 0;
	var ArcologyZero = State.variables.arcologies[0];

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if ((slave.boobs < 500) && (slave.butt < 3)) {
			if ((slave.muscles <= 30) && (ArcologyZero.FSPhysicalIdealist == "unset") && (slave.weight <= 10) && (ArcologyZero.FSHedonisticDecadence == "unset")) {
				slim += 1;
			} else if (ArcologyZero.FSPhysicalIdealist != "unset") {
				if ((ArcologyZero.FSPhysicalIdealistStrongFat == 1) && (slave.weight <= 30)) {
					slim += 1;
				}
			} else if ((ArcologyZero.FSHedonisticDecadence != "unset") && (slave.weight <= 30)) {
				if (ArcologyZero.FSHedonisticDecadenceStrongFat == 1) {
					slim += 1;
				} else if (slave.muscles <= 30) {
					slim += 1;
				}
			}
		}
	}

	return slim;
}

window.stackedCount = function(slaves) {
	var stacked = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if ((slave.butt > 4) && (slave.boobs > 800)) {
			stacked += 1;
		}
	}

	return stacked;
}

window.moddedCount = function(slaves) {
	var modded = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		var modScore = ModScore(slave);
		var tatScore = TatScore(slave);
		var piercingScore = PiercingScore(slave);
		if ((modScore > 15) || (piercingScore > 8) && (tatScore > 5)) {
			modded += 1;
		}
	}
	return modded;
}

window.unmoddedCount = function(slaves) {
	var unmodded = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		var modScore = ModScore(slave);
		var tatScore = TatScore(slave);
		var piercingScore = PiercingScore(slave);
		if ((modScore > 15) || (piercingScore > 8) && (tatScore > 5))
		; else {
			unmodded += 1;
		}
	}

	return unmodded;
}

window.XYCount = function(slaves) {
	var XY = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if (slave.vagina == -1) {
			XY += 1;
		}
	}
	return XY;
}

window.XXCount = function(slaves) {
	var XX = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if (slave.vagina != -1) {
			State.variables.XX += 1;
		}
	}
	return XX;
}

window.youngCount = function(slaves) {
	var young = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if (slave.visualAge < 30) {
			State.variables.young += 1;
		}
	}
	return young;
}

window.oldCount = function(slaves) {
	var old = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if (slave.visualAge >= 30) {
			State.variables.old += 1;
		}
	}
	return old;
}

window.pregYesCount = function(slaves) {
	var pregYes = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if ((slave.bellyPreg >= 5000) || (slave.bellyImplant >= 5000)) {
			pregYes += 1;
		}
	}
	return pregYes;
}

window.pregNoCount = function(slaves) {
	var pregNo = 0;

	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if ((slave.bellyPreg >= 5000) || (slave.bellyImplant >= 5000))
		; else if ((slave.belly < 100) && (slave.weight < 30) && (!setup.fakeBellies.includes(slave.bellyAccessory))) {
			pregNo += 1;
		}
	}
	return pregNo;
}

window.implantedCount = function(slaves) {
	var implanted = 0;
	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if ((slave.boobsImplant == 0) && (slave.buttImplant == 0) && (slave.waist >= -95) && (slave.lipsImplant == 0) && (slave.faceImplant < 30) && (slave.bellyImplant == -1) && (Math.abs(slave.shouldersImplant) < 2) && (Math.abs(slave.hipsImplant) < 2))
		; else {
			implanted += 1;
		}
	}
	return implanted;
}

window.pureCount = function(slaves) {
	var pure = 0;
	for (var i = 0; i < slaves.length; i++) {
		var slave = slaves[i];
		if ((slave.boobsImplant == 0) && (slave.buttImplant == 0) && (slave.waist >= -95) && (slave.lipsImplant == 0) && (slave.faceImplant < 30) && (slave.bellyImplant == -1) && (Math.abs(slave.shouldersImplant) < 2) && (Math.abs(slave.hipsImplant) < 2)) {
			pure += 1;
		}
	}
	return pure;
}

repo_name: Drosil/fc

license: mit


code:
Passages that require a go over for adding clothing and accessories.

Hair:

	Definite:
		descriptionWidgetsStyle.tw
		salon.tw
		cosmeticRulesAssistant.tw

	Possible:
		generateXXSlave.tw
		generateXYSlave.tw
		artWidgets.tw
		saLiveWithHG.tw

		(mostly shaved/bald hairstyle checks, probably not worth checking)
		fPat.tw
		remoteSurgery.tw
		suregeryDegradation.tw
		saLongTermEffects.tw
		saAgent.tw
		rulesAutosurgery.tw
		autoSurgerySettings.tw
		ptWorkaround.tw
		newSlaveIntro.tw
		newChildIntro.tw
		RESS.tw

Clothes:

	Definite:
		descriptionWidgetsStyle.tw
		descriptionWidgetsFlesh.tw
		descriptionWidgetsPiercing.tw
		fAbuse.tw
		walkPast.tw
		slaveInteract.tw
		wardrobeUse.tw
		slaveSummaryWidgets.tw
		rulesAssistant.tw
		toyChest.tw
		useGuard.tw
		birthWidgets.tw
		peConcubineInterview.tw
		PESS.tw
		RESS.tw

	Possible:
		artWidgets.tw
		clothingSelectionJS.tw
		eventSelectionJS.tw
		saLiveWithHG.tw
		setupVars.tw
		longSlaveDescription.tw

Shoes:

	Definite:
		descriptionWidgetsStyle.tw
		descriptionWidgetsFlesh.tw
		slaveInteract.tw
		walkPast.tw
		wardrobeUse.tw
		slaveSummaryWidgets.tw
		rulesAssistant.tw

	Possible:
		saLongTermEffects.tw
		saChoosesOwnClothes.tw
		clothingSelectionJS.tw
		eventSelectionJS.tw
		RESS.tw
		REFI.tw
		saServeThePublic.tw
		saWhore.tw
		saLiveWithHG.tw
		artWidgets.tw
		reStandardPunishment.tw
		setupVars.tw
		fAnus.tw
		seBirthWidgets.tw
		raWidgets.tw

Collars:

	Definite:
		descriptionWidgetsStyle.tw
		fLips.tw
		walkPast.tw
		slaveInteract.tw
		fKiss.tw
		wardrobeUse.tw
		rulesAssistant.tw
		RESS.tw

	Possible:
		saLongTermEffects.tw
		saDevotion.tw
		raWidgets.tw
		artWidgets.tw
		reStandardPunishment.tw
		clothingSelectionJS.tw
		eventSelectionJS.tw
		assayWidgets.tw

path: devNotes/clothing hair and accessory passages.txt


code:
:: art widgets [nobr widget]

/%
Call as <<AssistantArt>>
Displays assistant images. Currently passage-based.
$args[0]: Image size/center.
	3: Large, right. Example: description.
	2: Medium, right. Example: random events.
%/
<<widget "AssistantArt">>

<<if $imageChoice == 0>> /* RENDERED IMAGES BY SHOKUSHU */

<<switch $assistantAppearance>>
<<case "monstergirl">>
	<<set _fileName = "'resources/renders/assistant monstergirl.png' ">>
<<case "shemale">>
	<<set _fileName = "'resources/renders/assistant shemale.png' ">>
<<case "amazon">>
	<<set _fileName = "'resources/renders/assistant amazon.png' ">>
<<case "businesswoman">>
	<<set _fileName = "'resources/renders/assistant businesswoman.png' ">>
<<case "goddess">>
	<<set _fileName = "'resources/renders/assistant goddess.png' ">>
<<case "schoolgirl">>
	<<set _fileName = "'resources/renders/assistant schoolgirl.png' ">>
<<default>>
	<<set _fileName = "'resources/renders/assistant default.png' ">>
<</switch>>
<<if $args[1] == 3>>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

<</if>> /* CLOSES IMAGE CHOICE */

<</widget>>

/%
Call as <<SlaveArt>>
Displays slave images. Currently passage-based.
$args[0]: Slave.
$args[1]: Image size/center.
	3: Large, right. Example: long slave description.
	2: Medium, right. Example: random events.
	1: Small, left. Example: lists.
	0: Tiny, left. Example: facilities
$args[2]: icon UI Display for vector art, 1 for on.
%/
<<widget "SlaveArt">>
/* This is a nasty workaround for Chrome not rendering overlaid SVG images properly */
<<run jQuery(function() { jQuery('.imageRef').imagesLoaded().always(function() { jQuery('.imageRef').fadeTo(1, 0.999); }); })>>
<<if ndef $args[0].customImage>><<set $args[0].customImage = 0>><</if>>
<<if $args[0].customImage != 0>>

<<set _fileFormat = ($args[0].customImageFormat || "png"),
	_fileName = "'resources/" + $args[0].customImage + "." + _fileFormat + "' ",
	_fileTypeStart = (_fileFormat === "webm" ? "video loop autoplay" : "img"),
	_fileTypeEnd = (_fileFormat === "webm" ? "</video>" : "")>>

<<if $args[1] == 3>>
	<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:right; border:3px hidden'>" + _fileTypeEnd>>
<<elseif $args[1] == 2>>
	<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:right; border:3px hidden' width='300' height='300'>" + _fileTypeEnd>>
<<elseif $args[1] == 1>>
	<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:left; border:3px hidden' width='150' height='150'>" + _fileTypeEnd>>
<<else>>
	<<print "<" + _fileTypeStart + " src=" + _fileName + "style='float:left; border:3px hidden' width='120' height='120'>" + _fileTypeEnd>>
<</if>>

<<elseif $imageChoice == 1>> /* VECTOR ART BY NOX */
<<SVGFilters>>

/* 000-250-006 */
/*
 */
/* 000-250-006 */

<<set _folderLoc = "'resources/vector">>

<<if $args[2] == 1>>
	<<print "">>
<</if>>

/% Set skin colour %/
<<set _skinFilter = "filter: url(#skin-" + _.kebabCase($args[0].skin) + ");">>
/% Set hair colour %/
<<set _hairFilter = "filter: url(#hair-" + _.kebabCase($args[0].hColor) + ");">>
<<set _pubesFilter = "filter: url(#hair-" + _.kebabCase($args[0].pubicHColor) + ");">>
<<set _axillaryFilter = "filter: url(#hair-" + _.kebabCase($args[0].underArmHColor) + ");">>
<<if $args[0].customHairVector>>
	<<set _hairStyle = $args[0].customHairVector>>
<<else>>
	<<set _hairStyle = ["neat", "ponytail", "messy"].includes($args[0].hStyle) ? $args[0].hStyle : "neat">>
<</if>>

<<set _imgSkinLoc = _folderLoc + "/body/white">>

/% Shoulder width and arm or no arm %/
<<if $args[0].amp != 1>>
<<if $args[0].devotion > 50>>
	<<set _leftArmType = "high">>
	<<set _rightArmType = "high">>
<<elseif $args[0].trust >= -20>>
	<<if $args[0].devotion < -20>>
		<<set _leftArmType = "rebel">>
		<<set _rightArmType = "low">>
	<<elseif $args[0].devotion <= 20>>
		<<set _leftArmType = "low">>
		<<set _rightArmType = "low">>
	<<else>>
		<<set _leftArmType = "mid">>
		<<set _rightArmType = "high">>
	<</if>>
<<else>>
	<<set _leftArmType = "mid">>
	<<set _rightArmType = "mid">>
<</if>>
<<if $args[0].fuckdoll == 0 && $args[0].clothes != "restrictive latex" && $args[0].clothes != "a latex catsuit">>
	<<print "">>
	<<print "">>
<<else>>
	<<if $args[0].fuckdoll != 0>>
		<<set _leftArmType = "mid">>
		<<set _rightArmType = "mid">>
	<</if>>
	<<print "">>
	<<print "">>
<</if>>
<</if>>

/% Hair Aft %/
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0>>
	<<= "">>
<</if>>

/% Butt %/
<<if $args[0].amp != 1>>
<<if $args[0].butt > 6>>
	<<set _buttSize = 3>>
<<elseif $args[0].butt > 4>>
	<<set _buttSize = 2>>
<<elseif $args[0].butt > 2>>
	<<set _buttSize = 1>>
<<else>>
	<<set _buttSize = 0>>
<</if>>
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<set _buttSize = _buttSize + " latex">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>
<</if>>

/% Leg + 1 size up when chubby or fat%/
<<if $args[0].hips < 0>>
	<<if $args[0].weight <= 95>>/%Chubby%/
		<<set _legSize = "normal">>
	<<else>>
		<<set _legSize = "narrow">>
	<</if>>
<<elseif $args[0].hips == 0>>
	<<if $args[0].weight <= 95>>/%Chubby%/
		<<set _legSize = "wide">>
	<<else>>
		<<set _legSize = "normal">>
	<</if>>
<<elseif $args[0].hips > 0>>
	<<set _legSize = "wide">>
<</if>>
<<if $args[0].amp == 1>>
	<<set _legSize = "stump " + _legSize>>
<</if>>
<<if ($args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit") && $args[0].amp != 1>>
	<<set _legSize = _legSize + " latex">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

/% Feet %/
<<if $args[0].amp != 1>>
<<if $args[0].shoes == "heels">>
	<<set _shoesType = "heel">>
<<elseif $args[0].shoes == "extreme heels">>
	<<if $args[0].weight <= 95>>/%Chubby%/
		<<set _shoesType = "extreme heel wide">>
	<<else>>
		<<set _shoesType = "extreme heel">>
	<</if>>
<<elseif $args[0].shoes == "boots">>
	<<if $args[0].weight <= 95>>/%Chubby%/
		<<set _shoesType = "boot wide">>
	<<else>>
		<<set _shoesType = "boot">>
	<</if>>
<<elseif $args[0].shoes == "flats">>
	<<set _shoesType = "flat">>
<<else>>
	<<print "">>
<</if>>
<<if $args[0].shoes == "extreme heels" or $args[0].shoes == "boots">>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<set _shoesType = _shoesType + " latex">>
	<</if>>
	<<print "">>
<</if>>
<<if $args[0].shoes == "heels" or $args[0].shoes == "flats">>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<set _shoesType = _shoesType + " latex">>
		<<print "">>
	<<else>>
		<<print "">>
	<</if>>
<</if>>
<</if>>

/% Torso %/
<<if $args[0].waist < -40>>/*Unnatural*/
	<<if $args[0].weight <= 30>>/%Chubby%/
		<<set _torsoSize = "hourglass">>
	<<else>>
		<<set _torsoSize = "unnatural">>
	<</if>>
<<elseif $args[0].waist <= 10>>/%Hour glass%/
	<<if $args[0].weight <= 30>>/%Chubby%/
		<<set _torsoSize = "normal">>
	<<else>>
		<<set _torsoSize = "hourglass">>
	<</if>>
<<else>>/*Normal*/
	<<set _torsoSize = "normal">>
<</if>>
<<print "">>
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<set _torsoOutfit = " latex">>
<<elseif $args[0].clothes == "uncomfortable straps">>
	<<set _torsoOutfit = " straps">>
<</if>>
<<if _torsoOutfit>>
	<<print "">>
<</if>>

/*Navel Piercing*/
<<if $args[0].navelPiercing >= 1>>
	<<print "">>
<</if>>
<<if $args[0].navelPiercing == 2>>
	<<print "">>
<</if>>

/% Vagina %/
<<if $args[0].vagina >= 0>>
	<<print "">>
	<<if $args[0].clitPiercing == 1>>
		<<print "">>
	<<elseif $args[0].clitPiercing == 2>>
		<<print "">>
	<<elseif $args[0].clitPiercing == 3>>
		<<print "">>
	<</if>>
	<<if $args[0].vaginaPiercing == 1>>
		<<print "">>
	<<elseif $args[0].vaginaPiercing == 2>>
		<<print "">>
	<</if>>
<</if>>

/% Collar %/
<<switch $args[0].collar>>
<<case "bowtie">>
<<case "ancient Egyptian">>
<<case "nice retirement counter" "cruel retirement counter" "leather with cowbell" "pretty jewelry" "heavy gold" "satin choker" "stylish leather" "neck corset" "shock punishment" "tight steel" "uncomfortable leather" "dildo gag">>
	<<print "">>
<</switch>>

/% Head base image %/
<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

/% Glasses %/
<<if $args[0].eyewear == "corrective glasses" or $args[0].eyewear == "glasses" or $args[0].eyewear == "blurring glasses">>
	<<print "">>
<</if>>

/% Chastity belt or Pubic hair %/
<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "anal chastity" || $args[0].dickAccessory == "combined chastity" || $args[0].vaginalAccessory == "chastity belt" || $args[0].vaginalAccessory == "anal chastity" || $args[0].vaginalAccessory == "combined chastity">>
	<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
		<<print "">>
	<</if>>
	<<if $args[0].vaginalAccessory == "chastity belt" || $args[0].vaginalAccessory == "combined chastity">>
		<<print "">>
	<</if>>
	<<print "">>
<<else>>
	<<if $args[0].pubicHStyle != "waxed">>
		<<set _pubicHStyle = ($args[0].pubicHStyle == "in a strip" ? "strip" : $args[0].pubicHStyle)>>
		<<= "">>
	<</if>>
<</if>>

/%if pregnant%/
<<if $args[0].preg > 0>>
	<<print "">>
	<<if $args[0].navelPiercing >= 1>>/*Navel Piercing*/
		<<print "">>
	<</if>>
	<<if $args[0].navelPiercing == 2>>
		<<print "">>
	<</if>>
<</if>>

/% Boob %/
<<if $args[0].boobs < 250>>
	<<set _boobSize = 0>>
<<elseif $args[0].boobs < 500>>
	<<set _boobSize = 1>>
<<elseif $args[0].boobs < 800>>
	<<set _boobSize = 2>>
<<elseif $args[0].boobs < 1600>>
	<<set _boobSize = 3>>
<<elseif $args[0].boobs < 3200>>
	<<set _boobSize = 4>>
<<elseif $args[0].boobs < 6400>>
	<<set _boobSize = 5>>
<<elseif $args[0].boobs < 12000>>
	<<set _boobSize = 6>>
<<else>>
	<<set _boobSize = 7>>
<</if>>

/% Scrotum %/
<<if $args[0].scrotum > 0>>
	<<if $args[0].scrotum >= 6>>
		<<set _ballSize = 4>>
	<<elseif $args[0].scrotum >= 4>>
		<<set _ballSize = 3>>
	<<elseif $args[0].scrotum >= 3>>
		<<set _ballSize = 2>>
	<<elseif $args[0].scrotum >= 2>>
		<<set _ballSize = 1>>
	<<else>>
		<<set _ballSize = 0>>
	<</if>>
<</if>>

/% Penis %/
<<if $args[0].dick > 0>>
	<<if $args[0].dick >= 8>>
		<<set _penisSize = 6>>
	<<elseif $args[0].dick >= 7>>
		<<set _penisSize = 5>>
	<<elseif $args[0].dick >= 6>>
		<<set _penisSize = 4>>
	<<elseif $args[0].dick >= 5>>
		<<set _penisSize = 3>>
	<<elseif $args[0].dick >= 4>>
		<<set _penisSize = 2>>
	<<elseif $args[0].dick >= 2>>
		<<set _penisSize = 1>>
	<<else>>
		<<set _penisSize = 0>>
	<</if>>
<</if>>

/% Boob %/
<<set _needBoobs = 1>>
<<if $args[0].dick > 0>>
<<if canAchieveErection($args[0])>>
<<if _boobSize < 6>>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		/* normal case: outfit hides boobs */
		<<set _boobOutfit = " latex" >>
	<</if>>
	<<if _boobOutfit >>
		<<print "">>
		<<if $args[0].lactation > 0>>
			<<print "">>
		<</if>>
	<<else>>
		<<print "">>
		<<print "">>
	<</if>>
	/* special case: straps are actually dawn over the boobs */
	<<if $args[0].clothes == "uncomfortable straps">>
		<<set _boobOutfit = " straps" >>
		<<print "">>
	<</if>>
	<<set _needBoobs = 0>>
<</if>>
<</if>>
<</if>>
<<if $args[0].vagina > 0>>
	<<if $args[0].dick > 0>>

		<<if $args[0].scrotum > 0>>
			<<print "">>
		<</if>>
		<<if canAchieveErection($args[0])>>
			<<print "">>
		<<else>>
			<<print "">>
			<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
				<<print "">>
			<</if>>
		<</if>>

	<</if>>
<<else>>
	<<if $args[0].dick > 0>>

		<<if $args[0].scrotum > 0>>
			<<print "">>
		<</if>>
		<<if canAchieveErection($args[0])>>
			<<print "">>
		<<else>>
			<<print "">>
			<<if $args[0].dickAccessory == "chastity" || $args[0].dickAccessory == "combined chastity">>
				<<print "">>
			<</if>>
		<</if>>

	<</if>>
<</if>>
<<if _needBoobs>>
	<<if $args[0].fuckdoll != 0 || $args[0].clothes == "restrictive latex" || $args[0].clothes == "a latex catsuit">>
		<<print "">>
		<<if $args[0].lactation > 0>><<print "">><</if>>
	<<else>>
		<<print "">>
		<<print "">>
	<</if>>
	/* special case: straps are actually dawn over the boobs */
	<<if $args[0].clothes == "uncomfortable straps">>
		<<set _boobOutfit = " straps" >>
		<<print "">>
	<</if>>
<</if>>

/% piercings %/
<<if $args[0].nipplesPiercing == 1>>
	<<print "">>
<<elseif $args[0].nipplesPiercing == 2>>
	<<print "">>
<</if>>
<<if $args[0].areolaePiercing == 1>>
	<<print "">>
<</if>>

/% clavicle %/
<<print "">>

/% Hair Foreground %/
<<if $args[0].hStyle != "shaved" && $args[0].fuckdoll == 0>>
	<<= "">>
<</if>>

<<else>> /* RENDERED IMAGES BY SHOKUSHU */

<<if $args[0].vagina > -1>>
	<<if $args[0].dick > 0>>
		<<if $args[0].balls > 0>>
			<<set _fileName = "futanari">>
		<<else>>
			<<set _fileName = "herm">>
		<</if>>
	<<else>>
		<<set _fileName = "female">>
	<</if>>
<<else>>
	<<if $args[0].balls > 0>>
		<<set _fileName = "shemale">>
	<<else>>
		<<set _fileName = "gelding">>
	<</if>>
<</if>>
<<if $args[0].preg > 10>>
	<<set _fileName = "preg " + _fileName>>
<</if>>
<<if $args[0].boobs < 400>>
	<<set _fileName = _fileName + " small">>
<<elseif $args[0].boobs < 800>>
	<<set _fileName = _fileName + " big">>
<<elseif $args[0].boobs < 6000>>
	<<set _fileName = _fileName + " huge">>
<<else>>
	<<set _fileName = _fileName + " hyper">>
<</if>>
<<if $args[0].muscles > 30>>
	<<set _fileName = _fileName + " muscle">>
<<else>>
	<<set _fileName = _fileName + " soft">>
<</if>>
<<if $args[0].fuckdoll > 0>>
	<<set _fileName = _fileName + " rebellious">>
<<elseif $args[0].devotion <= 20>>
	<<if $args[0].trust < -20>>
		<<set _fileName = _fileName + " reluctant">>
	<<else>>
		<<set _fileName = _fileName + " rebellious">>
	<</if>>
<<elseif $args[0].fetish == "mindbroken">>
	<<set _fileName = _fileName + " reluctant">>
<<elseif $args[0].devotion <= 50 || $args[0].fetishKnown != 1 || ($seeMainFetishes == 0 && $args[1] < 2)>>
	<<set _fileName = _fileName + " obedient">>
<<else>>
	<<if $args[0].fetish == "none">>
		<<set _fileName = _fileName + " obedient">>
	<<else>>
		<<set _fileName = _fileName + " " + $args[0].fetish>>
	<</if>>
<</if>>

<<set _fileName = "'resources/renders/" + _fileName + ".png' ">>
<<if $args[1] == 3>>
	<<print "">>
<<elseif $args[1] == 2>>
	<<print "">>
<<elseif $args[1] == 1>>
	<<print "">>
<<else>>
	<<print "">>
<</if>>

<</if>> /* CLOSES IMAGE CHOICE */

<</widget>>

path: devNotes/legacy files/artWidgets-legacy


code:
<<if $activeSlave.preg > 30>>
	<<if $activeSlave.pregType == 100>>
		The only thing keeping $possessive from bursting are $possessive belly restraints,
	<<elseif $activeSlave.pregType >= 20>>
		$pronounCap is close to bursting,
 	<<elseif $activeSlave.pregType >= 10>>
		$pronounCap is dangerously pregnant,
	<<else>>
		$pronounCap is enormously pregnant,
	<</if>>
	<<if $activeSlave.pregType == 100>>
		<<if $activeSlave.amp == 1>>
		  with no arms and legs $pronoun is effectively a giant womb.
		<<else>>
		  and $possessive thinning arms and legs rest helpless atop $possessive supermassive belly.
		<</if>>
	<<elseif $activeSlave.physicalAge <= 3>>
		<<if $activeSlave.pregType >= 20>>
			and $pronoun is nearly spherical. $possessiveCap toddlerish form is utterly dwarfed by $possessive pregnancy, all $pronoun can do is lay on top of it. Despite being taut, $possessive belly visibly bulges and squirms from all the babies writhing within $object. $possessiveCap womb is so full you can see the babies forced up against $possessive uterus, even the slightest provocation could cause $possessive to burst.<<if $saleDescription == 0>> $pronounCap requires multiple slaves to move $possessive bulk when $pronoun must go somewhere.<</if>>
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive belly pins $possessive to the ground.  $possessiveCap toddlerish form is dwarfed by $possessive pregnancy, and try as $pronoun might $pronoun can not even drag the massive thing. $pronounCap is so pregnant you can barely see the babies within $possessive bulging $possessive stomach.<<if $activeSlave.amp == 0>> $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<else>>
			and $possessive toddlerish body is absolutely filled by $possessive womb. $pronounCap can barely move herself and resembles an over inflated blow-up doll.
		<</if>>
	<<elseif $activeSlave.physicalAge <= 12>>
		<<if $activeSlave.pregType >= 20>>
			and $pronoun is more belly than girl. $possessiveCap absolutely gigantic, overfilled womb keeps $possessive pinned to the ground. $possessiveCap belly visibly bulges and squirms from all the babies within $possessive. $pronounCap is so full you can see the babies forced up against the walls of $possessive uterus. $possessiveCap skin is so taut that even the slightest provocation could cause $possessive to burst.<<if $activeSlave.amp == 0>> $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<elseif $activeSlave.pregType >= 10>>
			and $pronoun can barely function with $possessive enormous belly. $pronounCap is so full you can barely see the babies bulging out of $possessive stomach.
		<<else>>
			and $possessive massive, drum-taut belly dominates $possessive poor little frame.
		<</if>>
	<<elseif $activeSlave.weight > 190>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive massively fat belly is stretched considerably, so much so $possessive folds are pulled flat. $possessiveCap pregnancy is covered in a thick layer of fat, save for the grotesquely bulging upper portion where $possessive fat is thinnest. $possessiveCap womb is so full that every motion within it translates to $possessive soft body.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive massively fat belly is stretched considerably; $possessive folds are nearly pulled flat from the strain. $possessiveCap pregnancy is covered in a thick layer of fat, save for the bulging upper portion where $possessive fat is thinnest.
		<<else>>
			but $pronoun's so massively fat that it's not obvious. Only the firmness at its top gives away $possessive pregnancy.
		<</if>>
	<<elseif $activeSlave.height >= 185>>
		<<if $activeSlave.pregType >= 20>>
			but $possessive tall frame barely keeps $possessive grotesque, splitting belly off the ground. Despite being taut, $possessive belly visibly bulges and squirms from all the babies writhing within $object. $possessiveCap womb is so full you can see the babies forced up against $possessive uterus, even the slightest provocation could cause $object to burst.
		<<elseif $activeSlave.pregType >= 10>>
			but $possessive tall frame barely bears $possessive obscene, drum-taut belly. $pronounCap is so pregnant you can barely see the babies within $possessive bulging stomach.
		<<else>>
			but $possessive tall frame bears $possessive massive, drum-taut belly well.
		<</if>>
	<<elseif $activeSlave.height < 150>>
		<<if $activeSlave.pregType >= 20>>
			and $pronoun is more belly than girl. $possessiveCap absolutely gigantic, overfilled womb keeps $object pinned to the ground. $possessiveCap belly visibly bulges and squirms from all the babies within $object. $pronounCap is so full you can see the babies forced up against the walls of $possessive uterus. $possessiveCap skin is so taut that even the slightest provocation could cause $object to burst.<<if $activeSlave.amp == 0>> $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<elseif $activeSlave.pregType >= 10>>
			and $pronoun can barely function with $possessive enormous belly. $pronounCap is so full you can barely see the babies bulging out of $possessive stomach.
		<<else>>
			and $possessive massive, drum-taut belly dominates $possessive poor little frame.
		<</if>>
	<<elseif $activeSlave.muscles > 30>>
		<<if $activeSlave.pregType >= 20>>
			and $pronoun can barely hold $possessive overfilled belly upright. $possessiveCap enormous brood greatly protrudes $possessive belly covering it in writhing bulges where they are forced up against $possessive uterus. While $possessive strong body spares $object from the fear of bursting, it does nothing to stop everyone from seeing how many children $pronoun's having.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive fit body allows $object to carry $possessive obscene belly without too much trouble. $possessiveCap large brood gently bulges $possessive belly.
		<<else>>
			and $possessive fit body bears $possessive massive, drum-taut belly well.
		<</if>>
	<<else>>
		<<if $activeSlave.pregType >= 20>>
			and $pronoun is more belly than girl. $possessiveCap gigantic, overfilled womb keeps $object pinned to the ground. $possessiveCap belly visibly bulges and squirms from all the babies within $object.  $pronounCap is so full you can see the babies forced up against the walls of $possessive womb through $possessive taut skin. $possessiveCap bulgy belly is at risk of rupturing.<<if $activeSlave.amp == 0>>  $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<elseif $activeSlave.pregType >= 10>>
			and $pronoun can barely function with $possessive enormous belly. $possessiveCap womb is so full you can see the babies gently bulging the walls of $possessive uterus.
		<<else>>
			and $possessive massive, drum-taut belly dominates $possessive frame.
		<</if>>
	<</if>>
<<elseif $activeSlave.preg > 20>>
	<<if $activeSlave.pregType >= 20>>
		$pronounCap is dangerously pregnant,
 	<<elseif $activeSlave.pregType >= 10>>
		$pronounCap is obscenely pregnant,
	<<else>>
		$pronounCap is heavily pregnant,
	<</if>>
	<<if $activeSlave.physicalAge <= 3>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive hugely distended belly is bigger than $pronoun is.<<if $activeSlave.amp == 0>> $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive bulging belly is as big as $pronoun is.<<if $activeSlave.amp == 0>> $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<else>>
			and $possessive swollen belly is nearly as big as $possessive toddlerish body.
		<</if>>
	<<elseif $activeSlave.physicalAge <= 12>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive hugely distended belly is nearly as big as $pronoun is.<<if $activeSlave.amp == 0>> $pronounCap requires assistance to get to $possessive feet<<if $saleDescription == 0>>, and uses a wheeled stand to support $possessive pregnancy when $pronoun must walk anywhere<</if>>.<</if>>
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive bulging belly looks absolutely huge on $possessive poor little frame.
		<<else>>
			and $possessive swollen belly dominates $possessive poor little frame.
		<</if>>
	<<elseif $activeSlave.weight > 130>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive big fat belly is absolutely enormous when coupled with $possessive filled womb.
		<<elseif $activeSlave.pregType >= 10>>
			but $pronoun's so fat that $pronoun appears to merely be carrying a giant gut. Only the firmness at its top gives away $possessive pregnancy.
		<<else>>
			but $pronoun's so fat that it's not obvious. Only the firmness at its top gives away $possessive pregnancy.
		<</if>>
	<<elseif $activeSlave.height >= 185>>
		<<if $activeSlave.pregType >= 20>>
			but $possessive tall frame keeps $possessive huge belly off the ground.
		<<elseif $activeSlave.pregType >= 10>>
			but $possessive tall frame lets $possessive keep $possessive posture despite $possessive large belly.
		<<else>>
			but $possessive tall frame bears $possessive swollen belly well.
		<</if>>
	<<elseif $activeSlave.height < 150>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive hugely distended belly is nearly as big as $pronoun is.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive bulging belly looks absolutely huge on $possessive poor little frame.
		<<else>>
			and $possessive swollen belly dominates $possessive poor little frame.
		<</if>>
	<<elseif $activeSlave.muscles > 30>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive fit body allows $object to carry $possessive huge belly with only the occasional accident.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive fit body carries $possessive bulging belly without much trouble.
		<<else>>
			and $possessive fit body bears $possessive swollen belly well.
		<</if>>
	<<else>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive hugely distended belly juts far out from $possessive front and widely from $possessive sides.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive large bulging belly draws all attention away from the rest of $possessive.
		<<else>>
			and $possessive swollen belly dominates $possessive frame.
		<</if>>
	<</if>>
<<elseif $activeSlave.preg > 9>>
	$pronounCap is visibly pregnant,
	<<if $activeSlave.physicalAge <= 3>>
		<<if $activeSlave.pregType >= 20>>
			$possessiveCap huge belly resembles an over-inflated beach ball compared to $possessive toddlerish frame. It bulges out from $possessive sides considerably.
		<<elseif $activeSlave.pregType >= 10>>
			and it looks like $pronoun is ready to birth triplets due to $possessive toddlerish body.
		<<else>>
			and $possessive swelling belly looks obscene on $possessive toddlerish body.
		<</if>>
	<<elseif $activeSlave.physicalAge <= 10>>
		<<if $activeSlave.pregType >= 20>>
			$possessiveCap huge belly resembles an over-inflated beach ball compared to $possessive tiny frame.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive swelling belly appears full term on $possessive tiny frame.
		<<else>>
			and $possessive swelling belly already looks huge on $possessive tiny frame.
		<</if>>
	<<elseif $activeSlave.weight > 95>>
		<<if $activeSlave.pregType >= 20>>
			$possessive fat belly considerably juts out with $possessive rapid growth.
		<<elseif $activeSlave.pregType >= 10>>
			but $pronoun's sufficiently overweight that $pronoun appears to merely be carrying a large gut.
		<<else>>
			but $pronoun's sufficiently overweight that it's not obvious.
		<</if>>
	<<elseif $activeSlave.height < 150>>
		<<if $activeSlave.pregType >= 20>>
			$possessiveCap huge belly resembles an over-inflated beach ball compared to $possessive tiny frame.
		<<elseif $activeSlave.pregType >= 10>>
			and $possessive swelling belly appears full term on $possessive tiny frame.
		<<else>>
			and $possessive swelling belly already looks huge on $possessive tiny frame.
		<</if>>
	<<elseif $activeSlave.weight < -10>>
		<<if $activeSlave.pregType >= 20>>
			$possessive enormous stomach juts far forward and lewdly extends far past $possessive sides.
		<<elseif $activeSlave.pregType >= 10>>
			$possessive bulging stomach fills $possessive thin frame obscenely.
		<<else>>
			$possessive thin form making $possessive swelling belly very obvious.
		<</if>>
	<<else>>
		<<if $activeSlave.pregType >= 20>>
			and $possessive obvious pregnancy appears full-term.
		<<elseif $activeSlave.pregType >= 10>>
			$possessive distended stomach makes $possessive look to be in $possessive last trimester.
		<<else>>
			the life growing within $possessive beginning to swell $possessive belly.
			<<if $activeSlave.bellySag > 0>>
				$possessiveCap new pregnancy reduces the amount of sag to $possessive overstretched middle.
			<</if>>
		<</if>>
	<</if>>

<<if ($activeSlave.preg == -2) && ($activeSlave.vagina < 0) && ($activeSlave.mpreg == 0)>>
<<elseif ($activeSlave.preg <= -2) && ($activeSlave.ovaries == 1 || $activeSlave.mpreg == 1)>>
	$pronounCap is sterile.
<<elseif $activeSlave.preg == 0 && $activeSlave.vagina > -1>>
	<<if $activeSlave.pregType > 30>>
		$possessiveCap lower belly is noticeably bloated, $possessive breasts bigger and more sensitive, and $possessive pussy swollen and leaking fluids. $pronoun desperately needs a dick in $object and reminds you of a bitch in heat.
	<<elseif $activeSlave.pregType > 20>>
		$possessiveCap lower belly is noticeably bloated and $possessive pussy swollen and leaking fluids. $pronounCap is very ready to be seeded.
	<<elseif $activeSlave.pregType > 2>>
		$possessiveCap lower belly is slightly bloated and $possessive pussy swollen and leaking fluids. $pronounCap is ready to be seeded.
	<</if>>
<<elseif $activeSlave.preg > 30>>
  <<if $activeSlave.pregType >= 20>>
	$pronounCap is @@.red;on the brink of bursting!@@ $possessiveCap belly is painfully stretched, the slightest provocation could cause $object to rupture.
  <<elseif $activeSlave.pregType >= 10>>
  	$pronounCap is @@.pink;dangerously pregnant,@@ $possessive overburdened womb is filled with $activeSlave.pregType babies.
  <<elseif $activeSlave.pregType > 4>>
	$pronounCap is @@.pink;obscenely pregnant:@@ $pronoun's carrying quintuplets.
  <<elseif $activeSlave.pregType > 2>>
	$pronounCap is @@.pink;massively pregnant:@@ $pronoun's carrying
	<<if $activeSlave.pregType == 4>>
	  quadruplets.
	<<else>>
	  triplets.
	<</if>>
  <<else>>
	$pronounCap is @@.pink;hugely pregnant:@@
	<<if $activeSlave.pregType == 2>>
		$pronoun's carrying twins.
	<<else>>
	  $pronoun's almost ready to give birth.
	<</if>>
  <</if>>
<<elseif $activeSlave.preg > 20>>
  <<if $activeSlave.pregType >= 20>>
	$pronounCap is @@.pink;dangerously pregnant,@@ despite how early in $possessive pregnancy $pronoun is: $pronoun's carrying far too many children.
  <<elseif $activeSlave.pregType >= 10>>
  	$pronounCap is @@.pink;obscenely pregnant,@@ despite how early in $possessive pregnancy $pronoun is: $pronoun's carrying $activeSlave.pregType children.
  <<elseif $activeSlave.pregType > 4>>
	$pronounCap is @@.pink;massively pregnant,@@ despite how early in $possessive pregnancy $pronoun is: $pronoun's carrying quintuplets.
  <<elseif $activeSlave.pregType > 2>>
	$pronounCap is @@.pink;hugely pregnant,@@ despite how early in $possessive pregnancy $pronoun is: $pronoun's carrying
	<<if $activeSlave.pregType == 4>>
	  quadruplets.
	<<else>>
	  triplets.
	<</if>>
  <<else>>
	$pronounCap is @@.pink;very pregnant:@@
	<<if $activeSlave.pregType == 2>>
	  $pronoun's carrying twins.
	<<else>>
	  the baby inside $object is growing rapidly.
	<</if>>
  <</if>>

<<if $activeSlave.waist > 95>>
	a badly @@.red;masculine waist@@ that ruins her figure<<if $activeSlave.weight > 30>> and greatly exaggerates how fat $pronoun is<<elseif $activeSlave.weight < -30>> despite how thin $pronoun is<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive thick waist.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly barely distends her $possessive thick waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly is hidden by $possessive thick waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is hidden by $possessive thick waist.
	<</if>>
<<elseif $activeSlave.waist > 40>>
	a broad, @@.red;ugly waist@@ that makes her look mannish<<if $activeSlave.weight > 30>> and exaggerates how fat $pronoun is<<elseif $activeSlave.weight < -30>> despite how thin $pronoun is<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive chunky waist.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly barely distends her $possessive chunky waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly is barely hidden by $possessive chunky waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is hidden by $possessive chunky waist.
	<</if>>
<<elseif $activeSlave.waist > 10>>
	an @@.red;unattractive waist@@ that conceals $possessive <<if $activeSlave.visualAge > 25>>girlish<<else>>womanly<</if>> figure<<if $activeSlave.weight > 30>> and accentuates how fat $pronoun is<<elseif $activeSlave.weight < -30>> despite how thin $pronoun is<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive waist.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly barely distends her $possessive waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly is barely visible to either side of $possessive waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is barely hidden by $possessive waist.
	<</if>>
<<elseif $activeSlave.waist >= -10>>
	an average waist for a <<if $activeSlave.visualAge > 25>>girl<<else>>woman<</if>><<if $activeSlave.weight > 30>>, though it looks broader since $pronoun's fat<<elseif $activeSlave.weight < -30>>, though it looks narrower since $pronoun's thin<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive waist.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly barely distends her $possessive waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly is barely visible to either side of $possessive waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is barely hidden by $possessive waist.
	<</if>>
<<elseif $activeSlave.waist >= -40>>
	a nice @@.pink;feminine waist@@ that gives $object a <<if $activeSlave.visualAge > 25>>girlish<<else>>womanly<</if>> figure<<if $activeSlave.weight > 30>> despite $possessive extra weight<<elseif $activeSlave.weight < -30>> and accentuates how thin $pronoun is<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive feminine waist.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly lewdly distends her $possessive feminine waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly juts out slightly to either side of $possessive feminine waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is barely visible around $possessive feminine waist.
	<</if>>
<<elseif $activeSlave.waist >= -95>>
	a hot @@.pink;wasp waist@@ that gives $possessive an hourglass figure<<if $activeSlave.weight > 30>> despite $possessive extra weight<<elseif $activeSlave.weight < -30>> further accentuated by how thin $pronoun is<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive narrow waist and continues nearly half a meter farther to either side.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly lewdly distends massively to either side of $possessive narrow waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly bulges to either side of $possessive narrow waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is visible around $possessive narrow waist.
	<</if>>
<<else>>
	an @@.pink;absurdly narrow waist@@ that gives $possessive a cartoonishly hourglass figure<<if $activeSlave.weight > 30>> made even more ludicrous by $possessive extra weight<<elseif $activeSlave.weight < -30>> made even more ludicrous by how thin $pronoun is<</if>>.
	<<if hyperBellyTwo($activeSlave)>>
		$possessiveCap titanic belly lewdly bulges out the sides of $possessive very narrow waist and continues nearly half a meter farther to either side.<<if $activeSlave.preg > 3>> The sides of $possessive waist are filled by $possessive overfilled womb in its desperate search for more room.<</if>>
	<<elseif hyperBellyOne($activeSlave)>>
		$possessiveCap gigantic belly lewdly distends massively to either side of $possessive very narrow waist.
	<<elseif hugeBelly($activeSlave)>>
		$possessiveCap huge belly bulges lewdly to either side of $possessive very narrow waist.
	<<elseif bigBelly($activeSlave)>>
		$possessiveCap belly is visible to either side of $possessive very narrow waist.
	<</if>>
<</if>>

path: devNotes/legacy files/oldPregDesc


code:
:: SA hormone effects [nobr]

<<set $hormones = $slaves[$i].hormones>>
<<if ($hormones > -2)>>
<<if ($slaves[$i].balls != 0)>>
<<if ($hormones != 0) || ($hormoneUpgradePower < 2)>>
	<<set $hormones -= 1>>
<</if>>
<</if>>
<</if>>
<<if ($hormones < 2)>>
<<if ($slaves[$i].ovaries != 0)>>
<<if ($hormones != 0) || ($hormoneUpgradePower < 2)>>
	<<set $hormones += 1>>
<</if>>
<</if>>
<</if>>

<<if ($hormones > 1)>>
  $possessiveCap hormonal balance is heavily feminine.
<<elseif ($hormones < -1)>>
  $possessiveCap hormonal balance is heavily masculine.
<<elseif ($hormones > 0)>>
  $possessiveCap hormonal balance is feminine.
<<elseif ($hormones < 0)>>
  $possessiveCap hormonal balance is masculine.
<<else>>
  $pronounCap has a neutral hormonal balance.
<</if>>

<<if $hormoneUpgradeMood == 0>>
<<if $slaves[$i].hormones > 0>>
<<if $slaves[$i].balls != 0>>
	$possessiveCap <<if $hormoneUpgradeMood == 0>>feminine treatments have to fight<<else>>advanced treatments brutally overpower<</if>> $possessive natural hormones,
	<<if $slaves[$i].devotion > 50>>
		but $pronoun's a good enough slave to suppress the occasional moodiness.
	<<else>>
		causing @@.mediumorchid;occasional moodiness.@@
		<<set $slaves[$i].devotion -= 1>>
	<</if>>
<</if>>
<</if>>
<<if $slaves[$i].hormones < 0>>
<<if $slaves[$i].ovaries != 0>>
	$possessiveCap <<if $hormoneUpgradeMood == 0>>masculine treatments have to fight<<else>>advanced treatments brutally overpower<</if>> $possessive natural hormones,
	<<if $slaves[$i].devotion > 50>>
		but $pronoun's a good enough slave to suppress the occasional moodiness.
	<<else>>
		causing @@.mediumorchid;occasional moodiness.@@
		<<set $slaves[$i].devotion -= 1>>
	<</if>>
<</if>>
<</if>>
<</if>>

<<set _Effects = []>>

<<if ($hormones >= 2)>>
	<<if ($hormoneUpgradeShrinkage == 0)>>
		<<if ($slaves[$i].dick > 1)>>
			<<set _Effects.push("DickShrink")>>
		<</if>>
		<<if ($slaves[$i].balls > 1)>>
			<<set _Effects.push("BallsShrink")>>
		<</if>>
		<<if ($slaves[$i].clit > 0)>>
			<<set _Effects.push("ClitSmaller")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].voice < 3) && ($slaves[$i].voice > 0)>>
		<<set _Effects.push("VoiceHigher")>>
	<</if>>
	<<if ($slaves[$i].vagina > -1) && ($slaves[$i].ovaries != 0) && ($slaves[$i].vaginaLube < 2)>>
		<<set _Effects.push("VaginaWetter")>>
	<</if>>
	<<if (($slaves[$i].butt-$slaves[$i].buttImplant) < 2)>>
		<<set _Effects.push("ButtBigger")>>
	<</if>>
	<<if (($slaves[$i].boobs-$slaves[$i].boobsImplant) < 500)>>
		<<set _Effects.push("BoobsBigger")>>
	<</if>>
	<<if ($slaves[$i].face-$slaves[$i].faceImplant < 0) && ($slaves[$i].face <= 95)>>
		<<set _Effects.push("FaceSofter")>>
	<</if>>
	<<if ($slaves[$i].faceShape == "masculine")>>
		<<set _Effects.push("FaceSofterAndrogynous")>>
	<<elseif ($slaves[$i].faceShape == "androgynous")>>
		<<set _Effects.push("FaceNormal")>>
	<</if>>
	<<if ($slaves[$i].physicalAge < 25)>>
		<<if ($slaves[$i].shoulders > -1)>>
			<<set _Effects.push("ShouldersNarrower")>>
		<</if>>
		<<if (($slaves[$i].hips-$slaves[$i].hipsImplant) < 1)>>
			<<set _Effects.push("HipsBroader")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].muscles > 30) && ($slaves[$i].diet != "muscle building")>>
		<<set _Effects.push("MusclesSofter")>>
	<</if>>
	<<if ($slaves[$i].nipples == "tiny")>>
		<<set _Effects.push("NipplesBigger")>>
	<</if>>
	<<if ($slaves[$i].height > 180)>>
		<<set _Effects.push("Shorter")>>
	<</if>>
	<<if ($slaves[$i].devotion <= 20)>>
		<<set _Effects.push("Devoted")>>
	<</if>>
	<<if ($slaves[$i].trust <= 20)>>
		<<set _Effects.push("Trusting")>>
	<</if>>
	<<if ($slaves[$i].attrXY < 95)>>
		<<set _Effects.push("MaleAttracted")>>
	<</if>>
	<<if ($slaves[$i].waist > 10)>>
		<<set _Effects.push("WaistNarrower")>>
	<</if>>

<<elseif ($hormones > 0) && ($slaves[$i].ovaries == 0)>>
	<<if ($hormoneUpgradeShrinkage == 0)>>
		<<if ($slaves[$i].dick > 2)>>
			<<set _Effects.push("DickShrink")>>
		<</if>>
		<<if ($slaves[$i].balls > 2)>>
			<<set _Effects.push("BallsShrink")>>
		<</if>>
		<<if ($slaves[$i].clit > 1)>>
			<<set _Effects.push("ClitSmaller")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].voice < 2) && ($slaves[$i].voice > 0)>>
		<<set _Effects.push("VoiceHigher")>>
	<</if>>
	<<if ($slaves[$i].vagina > -1) && ($slaves[$i].ovaries != 0) && ($slaves[$i].vaginaLube < 1)>>
		<<set _Effects.push("VaginaWetter")>>
	<</if>>
	<<if (($slaves[$i].butt-$slaves[$i].buttImplant) < 2)>>
		<<set _Effects.push("ButtBigger")>>
	<</if>>
	<<if (($slaves[$i].boobs-$slaves[$i].boobsImplant) < 300)>>
		<<set _Effects.push("BoobsBigger")>>
	<</if>>
	<<if ($slaves[$i].face-$slaves[$i].faceImplant < 0) && ($slaves[$i].face < 40)>>
		<<set _Effects.push("FaceSofter")>>
	<</if>>
	<<if ($slaves[$i].faceShape == "masculine")>>
		<<set _Effects.push("FaceSofterAndrogynous")>>
	<</if>>
	<<if ($slaves[$i].physicalAge < 22)>>
		<<if ($slaves[$i].shoulders > 0)>>
			<<set _Effects.push("ShouldersNarrower")>>
		<</if>>
		<<if (($slaves[$i].hips - $slaves[$i].hipsImplant) < 0)>>
			<<set _Effects.push("HipsBroader")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].muscles > 30) && ($slaves[$i].diet != "muscle building")>>
		<<set _Effects.push("MusclesSofter")>>
	<</if>>
	<<if ($slaves[$i].attrXY < 80)>>
		<<set _Effects.push("MaleAttracted")>>
	<</if>>
	<<if ($slaves[$i].waist > 40)>>
		<<set _Effects.push("WaistNarrower")>>
	<</if>>

<<elseif ($hormones <= -2)>>
	<<if ($slaves[$i].dick > 0) && ($slaves[$i].dick < 4)>>
		<<set _Effects.push("DickGrow")>>
	<</if>>
	<<if ($slaves[$i].balls > 0) && ($slaves[$i].balls < 4)>>
		<<set _Effects.push("BallsGrow")>>
	<</if>>
	<<if ($slaves[$i].clit < 2) && ($slaves[$i].dick == 0)>>
		<<set _Effects.push("ClitBigger")>>
	<</if>>
	<<if ($slaves[$i].voice > 1)>>
		<<set _Effects.push("VoiceLower")>>
	<</if>>
	<<if ($slaves[$i].vagina > -1) && ($slaves[$i].vaginaLube > 0)>>
		<<set _Effects.push("VaginaDrier")>>
	<</if>>
	<<if ($hormoneUpgradeShrinkage == 0)>>
		<<if (($slaves[$i].butt-$slaves[$i].buttImplant) > 2)>>
			<<set _Effects.push("ButtSmaller")>>
		<</if>>
		<<if (($slaves[$i].boobs-$slaves[$i].boobsImplant) > 500)>>
			<<set _Effects.push("BoobsSmaller")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].face-$slaves[$i].faceImplant < 0) && ($slaves[$i].face > 10)>>
		<<set _Effects.push("FaceHarder")>>
	<</if>>
	<<if ($slaves[$i].faceShape == "androgynous")>>
		<<set _Effects.push("FaceMasculine")>>
	<<elseif ($slaves[$i].faceShape != "masculine")>>
		<<set _Effects.push("FaceHarderAndrogynous")>>
	<</if>>
	<<if ($slaves[$i].physicalAge < 25)>>
		<<if ($slaves[$i].shoulders < 1)>>
			<<set _Effects.push("ShouldersBroader")>>
		<</if>>
		<<if ($slaves[$i].hips > -1)>>
			<<set _Effects.push("HipsNarrower")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].muscles <= 95) && ($slaves[$i].diet != "slimming")>>
		<<set _Effects.push("MusclesHarder")>>
	<</if>>
	<<if ($slaves[$i].nipples == "huge")>>
		<<set _Effects.push("NipplesSmaller")>>
	<</if>>
	<<if ($slaves[$i].height < 155)>>
		<<set _Effects.push("Taller")>>
	<</if>>
	<<if ($slaves[$i].devotion > 20)>>
		<<set _Effects.push("Rebellious")>>
	<</if>>
	<<if ($slaves[$i].attrXY < 95)>>
		<<set _Effects.push("FemaleAttracted")>>
	<</if>>
	<<if ($slaves[$i].waist <= 40)>>
		<<set _Effects.push("WaistBroader")>>
	<</if>>

<<elseif ($hormones < 0) && ($slaves[$i].balls == 0)>>
	<<if ($slaves[$i].dick > 0) && ($slaves[$i].dick < 2)>>
		<<set _Effects.push("DickGrow")>>
	<</if>>
	<<if ($slaves[$i].balls > 0) && ($slaves[$i].balls < 2)>>
		<<set _Effects.push("BallsGrow")>>
	<</if>>
	<<if ($slaves[$i].clit < 1) && ($slaves[$i].dick == 0)>>
		<<set _Effects.push("ClitBigger")>>
	<</if>>
	<<if ($slaves[$i].voice > 2)>>
		<<set _Effects.push("VoiceLower")>>
	<</if>>
	<<if ($slaves[$i].vagina > -1) && ($slaves[$i].vaginaLube > 1)>>
		<<set _Effects.push("VaginaDrier")>>
	<</if>>
	<<if ($hormoneUpgradeShrinkage == 0)>>
		<<if (($slaves[$i].butt-$slaves[$i].buttImplant) > 2)>>
			<<set _Effects.push("ButtSmaller")>>
		<</if>>
		<<if (($slaves[$i].boobs-$slaves[$i].boobsImplant) > 800)>>
			<<set _Effects.push("BoobsSmaller")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].face-$slaves[$i].faceImplant < 0) && ($slaves[$i].face > 40)>>
		<<set _Effects.push("FaceHarder")>>
	<</if>>
	<<if ($slaves[$i].faceShape == "androgynous")>>
		<<set _Effects.push("FaceMasculine")>>
	<</if>>
	<<if ($slaves[$i].physicalAge < 22)>>
		<<if ($slaves[$i].shoulders < 0)>>
			<<set _Effects.push("ShouldersBroader")>>
		<</if>>
		<<if ($slaves[$i].hips > 0)>>
			<<set _Effects.push("HipsNarrower")>>
		<</if>>
	<</if>>
	<<if ($slaves[$i].muscles <= 5) && ($slaves[$i].diet != "slimming")>>
		<<set _Effects.push("MusclesHarder")>>
	<</if>>
	<<if ($slaves[$i].height < 155)>>
		<<set _Effects.push("Taller")>>
	<</if>>
	<<if ($slaves[$i].attrXY < 80)>>
		<<set _Effects.push("FemaleAttracted")>>
	<</if>>
	<<if ($slaves[$i].waist <= 10)>>
		<<set _Effects.push("WaistBroader")>>
	<</if>>

<</if>>

<<if _Effects.length < 1>>
	$possessiveCap body has fully adapted to its hormones.
	<<if $slaves[$i].drugs == "hormone enhancers">>
		<<set $slaves[$i].drugs = "none">>
	<</if>>
<<elseif (_Effects.length < random(-10,10)) && ($hormoneUpgradePower == 0)>>
	$pronounCap does not experience significant hormone effects this week.
<<else>>

<<set _Effects = _Effects.random()>>
<<switch _Effects>>
<<case "DickShrink">>
	Hormonal effects cause @@.orange;$possessive dick to atrophy.@@
	<<set $slaves[$i].dick -= 1>>
<<case "DickGrow">>
	Hormonal effects cause @@.lime;$possessive micropenis to return to a more normal size.@@
	<<set $slaves[$i].dick += 1>>
<<case "BallsShrink">>
	Hormonal effects cause @@.orange;$possessive testicles to atrophy.@@
	<<set $slaves[$i].balls -= 1>>
<<case "BallsGrow">>
	Hormonal effects cause @@.lime;$possessive balls to drop.@@
	<<set $slaves[$i].balls += 1>>
<<case "VoiceHigher">>
	Hormonal effects cause @@.lime;$possessive voice to become higher and more feminine.@@
	<<set $slaves[$i].voice += 1>>
<<case "VoiceLower">>
	Hormonal effects cause @@.orange;$possessive voice to become deeper and less feminine.@@
	<<set $slaves[$i].voice -= 1>>
<<case "VaginaWetter">>
	Hormonal effects cause @@.lime;$possessive vagina to produce more copious natural lubricant.@@
	<<set $slaves[$i].vaginaLube += 1>>
<<case "VaginaDrier">>
	Hormonal effects cause @@.orange;$possessive vagina to produce less natural lubricant.@@
	<<set $slaves[$i].vaginaLube -= 1>>
<<case "ButtBigger">>
	Hormonal effects cause @@.lime;the natural size of $possessive butt to increase.@@
	<<set $slaves[$i].butt += 1>>
	<<if $slaves[$i].weight >= -80>>
		<<set $slaves[$i].weight -= 10>>
	<</if>>
<<case "ButtSmaller">>
	Hormonal effects cause @@.orange;the natural size of $possessive butt to decrease.@@
	<<set $slaves[$i].butt -= 1>>
	<<if $slaves[$i].weight < 190>>
		<<set $slaves[$i].weight += 10>>
	<</if>>
<<case "BoobsBigger">>
	Hormonal effects cause @@.lime;the natural size of $possessive tits to increase.@@
	<<set $slaves[$i].boobs += 100>>
	<<if $slaves[$i].weight >= -90>>
		<<set $slaves[$i].weight -= 1>>
	<</if>>
<<case "BoobsSmaller">>
	Hormonal effects cause @@.orange;the natural size of $possessive tits to shrink.@@
	<<set $slaves[$i].boobs -= 100>>
	<<if $slaves[$i].weight < 200>>
		<<set $slaves[$i].weight += 1>>
	<</if>>
<<case "FaceSofter">>
	Hormonal effects cause @@.lime;$possessive facial structure to soften and become less unattractive.@@
	<<FaceIncrease $slaves[$i] 20>>
<<case "FaceHarder">>
	Hormonal effects cause @@.orange;$possessive facial structure to harden and become less attractive.@@
	<<set $slaves[$i].face = Math.trunc($slaves[$i].face-20,-100,100)>>
<<case "FaceSofterAndrogynous">>
	Hormonal effects cause @@.lime;$possessive face to soften into androgyny.@@
	<<set $slaves[$i].faceShape = "androgynous">>
<<case "FaceHarderAndrogynous">>
	Hormonal effects cause @@.orange;$possessive face to harden into androgyny.@@
	<<set $slaves[$i].faceShape = "androgynous">>
<<case "FaceNormal">>
	Hormonal effects cause @@.lime;$possessive face to soften into femininity.@@
	<<set $slaves[$i].faceShape = "normal">>
<<case "FaceMasculine">>
	Hormonal effects cause @@.orange;$possessive face to harden into masculinity.@@
	<<set $slaves[$i].faceShape = "masculine">>
<<case "ClitSmaller">>
	Hormonal effects cause @@.orange;$possessive clit to shrink significantly.@@
	<<set $slaves[$i].clit -= 1>>
<<case "ClitBigger">>
	Hormonal effects cause @@.lime;$possessive clit to grow significantly.@@
	<<set $slaves[$i].clit += 1>>
<<case "ShouldersNarrower">>
	$possessiveCap body has not yet found its final bone structure, which typically happens in the mid-twenties. Hormonal effects cause @@.lime;$possessive shoulders to develop into a more feminine narrowness@@ than they would have done naturally.
	<<set $slaves[$i].shoulders -= 1>>
<<case "ShouldersBroader">>
	$possessiveCap body has not yet found its final bone structure, which typically happens in the mid-twenties. Hormonal effects cause @@.orange;$possessive shoulders to develop more broadly@@ than they would have done naturally.
	<<set $slaves[$i].shoulders += 1>>
<<case "HipsBroader">>
	$possessiveCap body has not yet found its final bone structure, which typically happens in the mid-twenties. Hormonal effects cause @@.lime;$possessive hips to develop more broadly@@ than they would have done naturally.
	<<set $slaves[$i].hips += 1>>
<<case "HipsNarrower">>
	$possessiveCap body has not yet found its final bone structure, which typically happens in the mid-twenties. Hormonal effects cause @@.orange;$possessive hips to develop more narrowly@@ than they would have done naturally.
	<<set $slaves[$i].hips -= 1>>
<<case "MusclesSofter">>
	Hormonal effects @@.orange;reduce $possessive musculature.@@
	<<set $slaves[$i].muscles -= 2>>
<<case "MusclesHarder">>
	Hormonal effects @@.lime;build up $possessive musculature.@@
	<<set $slaves[$i].muscles += 2>>
<<case "NipplesBigger">>
	Hormonal effects cause $possessive tiny @@.lime;nipples to grow to a more normal size.@@
	<<set $slaves[$i].nipples = "cute">>
<<case "NipplesSmaller">>
	Hormonal effects cause $possessive huge @@.orange;nipples to shrink to a more reasonable size.@@
	<<set $slaves[$i].nipples = "cute">>
<<case "Shorter">>
	$pronounCap has not yet reached the age at which height becomes fixed. Hormonal effects cause @@.orange;$object to lose a bit of height@@ that $pronoun would  naturally have maintained.
	<<set $slaves[$i].height -= 1>>
<<case "Taller">>
	$pronounCap has not yet reached the age at which height becomes fixed. Hormonal effects cause @@.lime;$object to gain a slight height advantage@@ that $pronoun would not naturally have reached.
	<<set $slaves[$i].height += 1>>
<<case "Devoted">>
	Hormonal effects make $object a bit more @@.hotpink;docile.@@
	<<set $slaves[$i].devotion += 1>>
<<case "Rebellious">>
	Hormonal effects @@.mediumorchid;make $object a bit less docile.@@
	<<set $slaves[$i].devotion -= 1>>
<<case "Trusting">>
	Hormonal effects make $object a bit more @@.mediumaquamarine;trusting.@@
	<<set $slaves[$i].trust += 1>>
<<case "MaleAttracted">>
	Hormonal effects cause $object to become @@.green;more attracted to men.@@
	<<set $slaves[$i].attrXY += 2+$hormoneUpgradePower>>
<<case "FemaleAttracted">>
	Hormonal effects cause $object to become @@.green;more attracted to women.@@
	<<set $slaves[$i].attrXX += 2+$hormoneUpgradePower>>
<<case "WaistNarrower">>
	Hormonal effects cause $possessive @@.green;waist to narrow.@@
	<<set $slaves[$i].waist -= 2+$hormoneUpgradePower>>
<<case "WaistBroader">>
	Hormonal effects cause $possessive @@.orange;waist to broaden.@@
	<<set $slaves[$i].waist += 2+$hormoneUpgradePower>>
<<default>>
	ERROR: bad hormone effect: _Effects
<</switch>>

<</if>>

<<if ($hormones < 0)>>
<<if ($slaves[$i].dick > 0)>>
<<if ($slaves[$i].devotion > 0)>>
<<if ($slaves[$i].career == "a Futanari Sister")>>
	$pronounCap wishes $pronoun were more feminine, but isn't unhappy to be off hormones, since $pronoun likes being a stiff dicked futa.
<<elseif ($slaves[$i].fetish == "buttslut") && ($slaves[$i].fetishStrength > 60) && ($slaves[$i].fetishKnown == 1)>>
	$pronounCap wishes $pronoun were more feminine, but $pronoun loves getting fucked in the butt so much that it doesn't much bother $object.
<<elseif ($slaves[$i].fetish == "sadist") && ($slaves[$i].fetishStrength > 60) && ($slaves[$i].fetishKnown == 1)>>
	Life is easier for effeminate slaves, but $pronoun loves abusing other slaves so much that $pronoun likes being able to get hard.
<<elseif ($slaves[$i].fetish == "dom") && ($slaves[$i].fetishStrength > 60) && ($slaves[$i].fetishKnown == 1)>>
	Life is easier for effeminate slaves, but $pronoun loves dominating other girls so much that $pronoun likes being able to get hard.
<<elseif ($slaves[$i].energy > 95)>>
	$pronounCap wishes $pronoun were more feminine, but $pronoun loves getting fucked like a good little sex slave so much that $pronoun doesn't think about it much.
<<elseif ($slaves[$i].devotion <= 20)>>
	Life is easier for effeminate slaves, so @@.mediumorchid;$pronoun's a little unhappy@@ that $pronoun isn't getting hormones to make $object more feminine.
	<<set $slaves[$i].devotion -= 2>>
<<elseif ($slaves[$i].devotion <= 50)>>
	$pronounCap wants to be a good slave girl, so @@.mediumorchid;$pronoun's a little unhappy@@ that $pronoun isn't getting hormones to make $object look more feminine.
	<<set $slaves[$i].devotion -= 2>>
<<else>>
	$pronounCap wishes $pronoun were more feminine, but $pronoun accepts your judgment in not giving $object hormones to make that happen.
<</if>>
<</if>>
<</if>>
<</if>>

<<if Math.abs($slaves[$i].hormones) > 1>>
	<<set $slaves[$i].chem += 0.5>>
<</if>>


code:
Most writing is basically just plain text with branches for different cases.
Important cases to remember:
-Does the slave have a dick/vagina/tits?
-Does the PC have a dick/tits/vagina?
-If the slave has a dick and you plan to use it, can they get erect on their own?
-Is the PC pregnant?
-Is the slave mindbroken?
-Is the slave blind?
-Is the slave pregnant?
-If you penetrate an orifice, is the slave a virgin in that orifice?
-Can the slave move (i.e. is the slave amputated and/or have massive tits and/or a massive dick)?
-Does the slave like/hate trust/fear you?
-Does the slave have fetishes or personality/sexual quirks/flaws that would impact how they react?

It's important to handle every RELEVANT variation of the above cases. Depending on what you're writing, other cases may also warrant consideration; e.g. a breast-play scene will probably need to account for breast size and lactation a lot more than a generic fuck scene. If a scene only applies to a specific type of slave, you can restrict the cases you account for to the ones that are only possible for that type of slave.

There are, broadly speaking, two main ways to do this:
1. Write the same big block of text and then copy/paste it into each relevant case, and tweak the wording slightly.
 ++Less thinking required
 --LOTS of duplicate text; if you need to change something later, you have to change it in many places
2. Decompose the scene into smaller segments or sections that can each be swapped out for the slave type in question.
 ++MUCH easier maintenance
 --Have to figure out how to phrase the scene in a way that can be broken down into discrete chunks

You can also combine the two cases. For example, you may want a complex, interleaved set of <<if>> conditions for the common cases, and then have big blobs for the corner cases that are hard to handle.

It can also be easier if you split the scene into a "prep", "main", and "finish" section (these would all be the same writing block, just 2-3 <<if>> chains in sequence); that way, you could, for example, take all the various possible cases that aren't really unique, and narrate them so that, in the main section, you don't have to do so much explanatory writing for the scene to make sense overall. Then, if necessary, wrap up with the finish section. (See src/pregmod/fSlaveSelfImpreg.tw for an example of this approach)

All the variables for you and the slave are, generally, held in the variables $PC and $activeSlave, respectively. When the PC and the slave have the same attributes, they usually have the same name, but exactly what they do and mean can vary a little bit. RTFM for details. To access a specific variable, you do $var.attribName, so e.g. pregnancy is checked by $activeSlave.preg or $PC.preg. In rarer cases, you'll be dealing with an indexed entry in the $slaves array; if that's the case, you'd use $slaves[_u] or $slaves[$i] (or whatever) instead of $activeSlave. If a second (or third?) slave is present, it will be stored in another variable, the name of which will depend on the scene; for example, when impregnating a slave with another slave, the sperm donor is in $impregnatrix

Conditions are usually checked by
<<if CONDITION>>
SHOW THIS TEXT
<<elseif CONDITION2>>
SHOW THIS TEXT INSTEAD
<<else>>
IF NEITHER CONDITION IS MET, SHOW THIS
<</if>>

Conditions are usually comparative (i.e. $a < $b or $b == 5 or $c != $d.e) and can be chained together with && (and) or || (or) and grouped with parens () - for example:
<<if($a > 1 || ($b == 2 && $c != $a))>>
lets you check that either variable A is greater than one, or both B equals two and C is not equal to A.
There are also a few misc functions that let you check things like whether a slave can get pregnant or whether two slaves are mutually fertile

Variable names are interpolated straight into the text, so if you have a slave named "Beth" then the text
"You fuck $activeSlave.slaveName" becomes "You fuck Beth"
You can also explicitly print a variable by doing <<print _varName>> (for temp variables) or <<print $varName>> (for global variables) which can be useful in various situations; it also lets you print the output of code expressions, like <<print $someNumericVar * 10>>.
If you want to change a variable, you do something like
<<set $activeSlave.devotion += 5>>
Which would, in this case, give a devotion increase of 5.

Colour is changed with YOUR @@.colorname;COLORED TEXT@@ HERE

So a random (really stupid) example might be:
<<if $activeSlave.fetish == 'mindbroken'>>
	Special big block of mindbroken text here.
<<elseif $activeSlave.amp == 1>>
	Special big block of amputee text here.
<<if $PC.dick > 0>>
	<<set _wasVirgin = ''>>
	<<if $activeSlave.vagina > -1>>
		<<set _orifice = 'vagina'>>
		<<if $activeSlave.vagina == 0>>
			<<set _wasVirgin = 'vaginal'>>
		<</if>>
	<<else>>
		<<set _orifice = 'ass'>>
		<<if $activeSlave.anus == 0>>
			<<set _wasVirgin = "anal">>
		<</if>>
	<</if>>
	You fuck $activeSlave.slaveName's _orifice.
	<<if _wasVirgin != ''>>
		<<if $activeSlave.devotion > 50>>
			She @@.hotpink;loves@@ losing her <<print _wasVirgin>> virginity to you.
			<<set $activeSlave.devotion += 5>>
		<<else>>
			She @@.mediumorchid;@@dislikes losing her <<print _wasVirgin>> virginity to you.
			<<set $activeSlave.devotion -= 5>>
		<</if>>
	<</if>>
<<elseif $PC.vagina > 0 && $activeSlave.dick > 0>>
	$activeSlave.slaveName
	<<if $activeSlave.devotion > 50>>
		@@.hotpink;lovingly penetrates@@
		<<set $activeSlave.devotion += 5>>
	<<else>>
		indifferently hammers
	<</if>>
	your pussy.
<<elseif $activeSlave.vagina > -1>>
	Lesbian sex here.
<<else>>
	ERROR - PC doesn't have dick or vagina?
<</if>>

If you need to set a temp variable, prefix it with _ instead of $. This way, you don't go cluttering up the world with variables that only matter inside your little writing segment.

You can "hot-test" stuff by text editing your HTML copy of FC, but it's a little more tedious because you have to "escape" double quotes, <, >, and & with " , < > and & respectively.

Some hints:
1. Write your logic first, so you don't forget to close tags. In other words, it's better to do
<<if $cond>
TODO
<<else>>
TODO
<</if>>
And then fill it in later than it is to end up with a situation where you have a dozen unclosed tags and you can't remember where they are or what they do.

2. For very simple stuff, it's fine to "inline" your stuff. For example, when penetrating a slave, doing "you fuck her <<if $activeSlave.vagina > -1>>pussy<<else>>ass<</if>>" to show "pussy" or "ass" as necessary. However, if you need to do the same comparison a bunch of times, do something like
<<if $activeSlave.vagina > -1>>
	<<set _targetOrifice = "vagina">>
<<else>>
	<<set _targetOrifice = "asshole">>
<</if>
And then, when you need it, do "you fuck her _targetOrifice" in sixteen different places without having the pain in the ass of copy/pasting the same if/else clause every time.

3. INDENT YOUR LOGIC. USE TABS. I'm serious. Don't question me. It will make EVERYONE hate you, when they have to deal with your code, if it's not indented properly.
This is much easier to read:
<<if $cond1>>
	<<if $cond2>>
		whatever
	<<elseif $cond3>>
		whatever
	<<elseif $cond4>>
		<<if $cond5>>
			whatever
		<<else>>
			<<if $cond6>>
				whatever
			<</if>>
		<</if>>
	<<else>>
		whatever
		<<if $cond7>>
			<<if $cond8>>
				whatever
			</if>
		</if>>
	<</if>>
<</if>>
than this:
<<if $cond1>>
<<if $cond2>>
whatever
<<elseif $cond3>>
whatever
<<elseif $cond4>>
<<if $cond5>>
whatever
<<else>>
<<if $cond6>>
whatever
<</if>>
<</if>>
<<else>>
whatever
<<if $cond7>>
<<if $cond8>>
whatever
</if>
</if>>
<</if>>
<</if>>

4. Proof-read your shit before posting it. Spell-check wouldn't hurt.


code:
There are two main changes here.

CHANGE 1: Speed up loading
==========================

The first is to speed up loading the file.

Edit the sugarcube header and change:

    [{key:"_serialize",value:function(e) return Object.freeze

Into this

    [{key:"_serialize",value:function(e)
    /* look here for changes */
    {return JSON.stringify(e)}},{key:"_deserialize",value:function(e){return JSON.parse((!e || e[0]=="{")?e:LZString.decompressFromUTF16(e))}}]),e}();
    /* changes end here */
    return Object.freeze

CHANGE 2: Remember scroll position
==================================

Edit the sugarcube header and change:

    var t=jQuery(this);t.is("[aria-pressed]")&&t.attr("aria-pressed","true"===t.attr("aria-pressed")?"false":"true"),e.apply(this,arguments);

into this:

    var t=jQuery(this);
    const dataPassage = t.attr('data-passage');
    const initialDataPassage = window && window.SugarCube && window.SugarCube.State && window.SugarCube.State.passage;
    const savedYOffset = window.pageYOffset;
    t.is("[aria-pressed]")&&t.attr("aria-pressed","true"===t.attr("aria-pressed")?"false":"true"),e.apply(this,arguments);
    const doJump = function(){ window.scrollTo(0, savedYOffset); }
    if ( dataPassage && (window.lastDataPassageLink === dataPassage || initialDataPassage === dataPassage))
        doJump();
    window.lastDataPassageLink = dataPassage;

This uses two separate methods to detect if we are returning to the same page.  Just checking sugarcube should actually be sufficient, but
no harm in this approach either.

path: devNotes/sugarcube stuff/important for updating sugarcube.txt


code:
/*:: Main stylesheet [stylesheet]*/

body {
	overflow-x: hidden;
}

/* clears SugarCube's default transition */
.passage {
    transition: none;
    -webkit-transition: none;
}

.passage-in {
    opacity: 1 !important;
}

/* default is 54em */
#passages {
    max-width: 100%;
}

/* small trick to hide broken images */
img {
    text-indent: -10000px;
}

.imageRef {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
	background-color: rgba(80, 80, 80, 0.5);
	margin: 2px;
}

.tinyImg {
    height: 120px;
    width: 120px;
    float: left;
}

.smlImg {
    height: 150px;
    width: 150px;
    float: left;
}

.smlImg > img, .smlImg > video {
	height: auto;
}

.medImg {
    height: 300px;
    width: 300px;
    float: right;
}

.medImg > img, .medImg > video {
	height: auto;
}

.lrgRender {
    height: 531px;
    width: 531px;
	margin-right: -50px;
	margin-left: -50px;
    float: right;
	z-index: -1;
}

.lrgVector {
    height: 600px;
    width: 600px;
	margin-right: -125px;
	margin-left: -125px;
    float: right;
	z-index: -1;
}

.lrgRender > div.mask {
	width: 150px;
	height: 100%;
	background: linear-gradient(90deg, rgba(17,17,17,1), rgba(17,17,17,0.8) 60%, rgba(17,17,17,0));
	z-index: 1;
}

.lrgRender > img, .lrgRender > video {
	margin-left: -150px;
	height: 531px;
	width: auto;
}

.lrgVector > div.mask {
	width: 150px;
	height: 100%;
	background: linear-gradient(90deg, rgba(17,17,17,1), rgba(17,17,17,0.8) 60%, rgba(17,17,17,0));
	z-index: 1;
}

.lrgVector > img, .lrgVector > video {
	margin-left: -150px;
	height: 600px;
	width: auto;
}

.lrgVector svg {
    width: 336px;
    height: 600px;
}

object {
    object-fit: scale-down;
    position: absolute;
    top: 0;
	left: 0;
}

img.paperdoll {
    position: absolute;
    top: 0;
	left: 0;
	margin-left: 0;
}

span.plusButton {
	display: inline-block;
	line-height: 25px;
	width: 20px;
	text-align: center;
	border: 1px solid rgba(0, 139, 0, 0.3);
	background: rgba(0, 139, 0, 0.2);
	margin: 2px 0;
}

span.minusButton {
	display: inline-block;
	line-height: 25px;
	width: 20px;
	text-align: center;
	border: 1px solid rgba(184, 0, 0, 0.3);
	background: rgba(184, 0, 0, 0.2);
	margin: 2px 0;
}

span.zeroButton {
	display: inline-block;
	line-height: 25px;
	width: 20px;
	text-align: center;
	border: 1px solid rgba(0, 0, 255, 0.3);
	background: rgba(0, 0, 255, 0.2);
	margin: 2px 0;
}

span.plusButton:hover { background: rgba(0, 139, 0, 0.4); }
span.minusButton:hover { background: rgba(184, 0, 0, 0.4); }
span.zeroButton:hover { background: rgba(0, 0, 255, 0.4); }

span.plusButton > a { display: block; }
span.minusButton > a { display: block; }
span.zeroButton > a { display: block; }

span.plusButton > a:hover { text-decoration: none; }
span.minusButton > a:hover { text-decoration: none; }
span.zeroButton > a:hover { text-decoration: none; }

/* Colors are made as css classes, to allow them to be
   changed for a light color scheme (for example). */
.link { color: #68D } /* link color */
.aquamarine { color: aquamarine }
.coral { color: coral }
.cyan { color: cyan }
.darkgoldenrod { color: darkgoldenrod }
.darkred { color: darkred }
.darkviolet { color: darkviolet }
.deeppink { color: deeppink }
.deepskyblue { color: deepskyblue }
.gold { color: gold }
.goldenrod { color: goldenrod }
.gray { color: gray }
.green { color: green }
.hotpink { color: hotpink }
.lawngreen { color: lawngreen }
.lightcoral { color: lightcoral }
.lightgreen { color: lightgreen }
.lightpink { color: lightpink }
.lightsalmon { color: lightsalmon }
.lime { color: lime }
.limegreen { color: limegreen }
.magenta { color: magenta }
.mediumaquamarine { color: mediumaquamarine }
.mediumorchid { color: mediumorchid }
.mediumseagreen { color: mediumseagreen }
.orange { color: orange }
.orangered { color: orangered }
.orchid { color: orchid }
.pink { color: pink }
.red { color: red }
.seagreen { color: seagreen }
.springgreen { color: springgreen }
.tan { color: tan }
.yellow { color: yellow }
.yellowgreen { color: yellowgreen }

.link a { color: #68D } /* link color */
.aquamarine a { color: aquamarine }
.coral a { color: coral }
.cyan a { color: cyan }
.darkgoldenrod a { color: darkgoldenrod }
.darkred a { color: darkred }
.darkviolet a { color: darkviolet }
.deeppink a { color: deeppink }
.deepskyblue a { color: deepskyblue }
.gold a { color: gold }
.goldenrod a { color: goldenrod }
.gray a { color: gray }
.green a { color: green }
.hotpink a { color: hotpink }
.lawngreen a { color: lawngreen }
.lightcoral a { color: lightcoral }
.lightgreen a { color: lightgreen }
.lightpink a { color: lightpink }
.lightsalmon a { color: lightsalmon }
.lime a { color: lime }
.limegreen a { color: limegreen }
.magenta a { color: magenta }
.mediumaquamarine a { color: mediumaquamarine }
.mediumorchid a { color: mediumorchid }
.mediumseagreen a { color: mediumseagreen }
.orange a { color: orange }
.orangered a { color: orangered }
.orchid a { color: orchid }
.pink a { color: pink }
.red a { color: red }
.seagreen a { color: seagreen }
.springgreen a { color: springgreen }
.tan a { color: tan }
.yellow a { color: yellow }
.yellowgreen a { color: yellowgreen }

/*! <<checkvars>> macro for SugarCube 2.x */
#ui-dialog-body.checkvars{padding:1em}#ui-dialog-body.checkvars h1{font-size:1em;margin-top:0}#ui-dialog-body.checkvars table{border-collapse:collapse;border-spacing:0}#ui-dialog-body.checkvars thead tr{border-bottom:2px solid #444}#ui-dialog-body.checkvars tr:not(:first-child){border-top:1px solid #444}#ui-dialog-body.checkvars td,#ui-dialog-body.checkvars th{padding:.25em 1em}#ui-dialog-body.checkvars td:first-child,#ui-dialog-body.checkvars th:first-child{padding-left:.5em;border-right:1px solid #444}#ui-dialog-body.checkvars td:last-child,#ui-dialog-body.checkvars th:last-child{padding-right:.5em}#ui-dialog-body.checkvars th:first-child{text-align:center}#ui-dialog-body.checkvars td:first-child{font-weight:700;text-align:right}#ui-dialog-body.checkvars td{font-family:monospace,monospace;vertical-align:top;white-space:pre-wrap}#ui-dialog-body.checkvars .scroll-pad{margin:0;padding:0}

/*! <<bugreport>> macro for SugarCube 2.x */
#ui-dialog-body.bugreport #bugreport-info{margin-bottom:1em}#ui-dialog-body.bugreport #bugreport-data{display:block;overflow:auto;font-family:monospace,monospace;background-color:transparent;border:1px solid #444;margin:0;padding:6px;height:auto;min-height:200px;white-space:normal}#ui-dialog-body.bugreport .scroll-pad{margin:0;padding:0}

div.output{
width: 100%;
width: 100vw;
max-width: 100%;
word-break: break-all;
white-space: normal;
}

/*:: accordionStyleSheet [stylesheet]*/
/* Accordion 000-250-006 */

button.accordion {
    cursor: pointer;
    padding: 5px;
    width: 100%;
    margin-bottom: 10px;
    border-bottom: 3px double;
    border-right: 3px double;
    border-left: none;
    border-top: none;
    text-align: left;
    outline: none;
    transition: 0.2s;
    background-color: transparent;
}

button.accordion.active, button.accordion:hover {
    background-color: transparent;
}

button.accordion:before {
    content: '\002B';
    color: #777;
    font-weight: bold;
    float: left;
    margin-right: 5px;
}

.unStaffed {
    background-color: transparent;
    padding: .5em .2em;
    margin-bottom: 1em;
    border-bottom: thin inset grey;
}

.unStaffed:before {
    content: '\00D7';
    color: #777;
    font-weight: bold;
    color: red;
    float: left;
    margin-right: 5px;
}

.unStaffed:after {
    content: attr(data-after);
    float: right;
    margin-left: 2em;
    font-weight: strong;
    color: green;
}

button.accordion:after {
    content: attr(data-after);
    float: right;
    margin-left: 2em;
    font-weight: normal;
    color: green;
}

button.accordion.active:before {
    content: "\2212";
}

.accHidden {
    padding: 0 18px;
	margin-top: 5px;
	margin-bottom: 5px;
    max-height: 0;
    overflow: hidden;
}

/* begin efmCSS */

#graph .linage {
    fill: none;
    stroke: white;
}
#graph .marriage {
    fill: none;
    stroke: white;
}
#graph .node {
    background-color: lightblue;
    border-style: solid;
    border-width: 1px;
}
#graph .nodeText{
    font: 10px sans-serif;
    margin: 0;
    padding: 0;
    color: black;
}
#graph {
    font: 10px sans-serif;
    margin: -20px 0;
    padding: 0;
    color: black;
}

#graph div {
    border-style: solid;
    border-width: 1px;
}

#graph .XY {
    background-color: lightblue;
}

#graph div.XX {
    background-color: pink;
}

#graph div.unknown {
    background-color: gray;
}

#graph div.unknownXY {
    background-color: #808080;
}

#graph div.unknownXX {
    background-color: #808080;
}

#graph .you {
    background-color: red;
}

#graph .emphasis {
    font-style: italic;
    font-weight: bold;
    margin: 0;
    background: #ffffff88;
    border: 2px solid Gold;
	white-space: nowrap;
}

#editFamily {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

#editFamily #familyTable {
}

/* end extended family css */

config.history.tracking = false;

path: devNotes/twine CSS


code:
#!/bin/sh Requires MEGAcmd, git, mv, cd, mkidr, echo
COUNTER=0 LocalDir=~/fc-pregmod/ RemoteDir=FC-GIT U=anon@anon.anon P=13245 && mega-login $U $P
while [ $COUNTER -ge 0 ]; do
	if [ $COUNTER -eq 0 ]; then mega-login $U $P && mega-mkdir $RemoteDir && mega-export -a $RemoteDir && mkdir $LocalDir ; git clone -q https://gitgud.io/pregmodfan/fc-pregmod.git $LocalDir
	fi
	cd $LocalDir/ && AbrevHash=`git log --reverse -n1 --abbrev-commit |grep -m1 commit | sed 's/commit //'`
	if [ $COUNTER -eq 0 ]; then ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-put bin/*.html $RemoteDir
	else if [ "$(git pull)" == "Already up to date." ]; then ehco -n ""
		else clear && rm bin/*.html ; ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-login $U $P && mega-put bin/*.html $RemoteDir
		fi
	fi
	let COUNTER=COUNTER+1 && mega-logout > /dev/null && sleep 300s
done


code:
#!/bin/sh Requires MEGAcmd, git, mv, cd, mkidr, echo
COUNTER=0 LocalDir=~/fc-pregmod/ RemoteDir=FC-GIT U=anon@anon.anon P=13245 && mega-login $U $P
while [ $COUNTER -ge 0 ]; do
	if [ $COUNTER -eq 0 ]; then mega-login $U $P && mega-mkdir $RemoteDir ; mega-export -a $RemoteDir ; mkdir $LocalDir ; git clone -q https://gitgud.io/pregmodfan/fc-pregmod.git $LocalDir
	fi
	cd $LocalDir/ && AbrevHash=`git log -n1 --reverse --abbrev-commit |grep -m1 commit | sed 's/commit //'`
	if [ $COUNTER -eq 0 ]; then echo "First run. Compliling, formatting and placing .html." && ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-put bin/*.html $RemoteDir && echo "Inital compiled .html placed."
	else if [ "$(git pull)" == "Already up to date." ]; then echo "No updated files."
		else echo "Compliling, formatting and placing updated .html." ; rm bin/*.html ; ./compile > /dev/null && mv bin/FC_pregmod.html "bin/FC-pregmod-$(git log -1 --format='%cd' --date='format:%F-%H-%M')-$AbrevHash.html" && mega-login $U $P && mega-put bin/*.html $RemoteDir ; echo "Updated .html placed."
		fi
	fi
	let COUNTER=COUNTER+1 && mega-logout > /dev/null && sleep 300s
done


code:
#!/bin/sh

# setup:
# add this to crontab:
# */15 * * * * cd ~/FC/fc-pregmod && git pull --ff-only origin pregmod-master > ~/FC/git_pull.log 2>&1
# and do "ln -s ~/FC/fc-pregmod/devTools/BuildAndIPFSify.sh .git/hooks/post-merge"
# NOTE: you may need to define XDG_RUNTIME_DIR in your crontab

# TODO: add logic to figure out if we should use ipfs-cluster instead of using the local instance directly.
#			if we use ipfs-cluster we probably don't need to warm ipfs.io's cache.

rm bin/*.html

# if this script is used as the post-merge hook then
# a) git pull has pulled something
# b) $PWD is fc-pregmod
if [ "$(basename "$0")" != "post-merge" ]; then
	# cd to fc-pregmod based on where this script is
	cd "$(readlink -f "$(dirname "$0")")/.." || exit 1
	git pull
	# if there are new html files then git probably pulled something and ran this script as a post-merge hook
	if ls bin/*.html; then
		exit 0
	fi
fi

# If we've done this before then unpin the previous hash so IPFS can GC it if it needs to
if [ -r ../IPFS_hash.txt ]; then
	ipfs pin rm --recursive=true "$(cut -d : -f 2 ../IPFS_hash.txt | tr -d ' ')"
fi

./compile || exit 1

# Keep the build time from changing the hash of the file
sed -Ei -e '/^  \* Built on .+$/d' bin/*.html

# add the date of the last commit to the file, but don't use colons because Windows (still?) doesn't like them
mv bin/*.html "bin/FC pregmod $(git log -1 --format='%cd' --date='format:%F %H-%M').html"

# include the unembedded vector art
ipfs_hash="$(ipfs add -w -Q -r bin/*.html resources)"
echo "IPFS Folder Hash: ${ipfs_hash}" > ../IPFS_hash.txt
ipfs name publish "$ipfs_hash"

# when it's done it will print something like "Published to $your_pubkey: /ipfs/$ipfs_hash"
# You can view the folder at http://127.0.0.1:8080/ipns/$your_pubkey

# make ipfs.io cache the files
# $XDG_RUNTIME_DIR SHOULD be defined, but there are cases where it wouldn't be
if [ -z "${XDG_RUNTIME_DIR+x}" ]; then
	echo "\$XDG_RUNTIME_DIR is unset, bailing"
	exit 2
fi

# throw it into a file so we can loop over lines, not "strings delimited by whitespace"
find resources bin -print | grep -ve '.gitignore' | sed -e 's|bin/||' | grep -Ee '.+\.svg' -e '.html' > "${XDG_RUNTIME_DIR}/files.list"

# ipfs PeerID, it's user specific
PeerID="$(ipfs config show | grep -e 'PeerID' | cut -d: -f 2 | tr -d ' "')"
while IFS= read -r item
do
	echo "https://ipfs.io/ipns/${PeerID}/${item}"
done < "${XDG_RUNTIME_DIR}/files.list" | xargs --max-procs=10 --max-args=1 --replace curl --silent --show-error --range 0-499 --output /dev/null '{}'

rm "${XDG_RUNTIME_DIR}/files.list"


code:
#!/usr/bin/env python3
import fileinput
import re
import sys

WARNING = '\033[93m'
ENDC = '\033[0m'

def myprint(*args):
    print(WARNING, fileinput.filename() + ":", ENDC,*args)

def yield_line_and_islastline(f):
    global filename
    global linenumber
    try:
        prevline = next(f)
        filename = fileinput.filename()
        linenumber = fileinput.filelineno()
    except StopIteration:
        return
    for line in f:
        yield (prevline, f.isfirstline())
        filename = fileinput.filename()
        linenumber = fileinput.filelineno()
        prevline = line
    yield prevline, True

pattern = re.compile(r'(<<(\/?) *(if|for|else|switch|case|replace|link)[^<>]*)')

tagfound = []
try:
    for line, isLastLine in yield_line_and_islastline(fileinput.input()):
        for (whole,end,tag) in re.findall(pattern,line):
            if tag == "else" or tag == 'case':
                if len(tagfound) == 0:
                    myprint("Found", tag, "but with no opening tag:")
                    myprint("  ", linenumber,":", whole)
                    fileinput.nextfile()
                lasttag = tagfound[-1]
                if (tag == "else" and lasttag["tag"] != "if") or (tag == "case" and lasttag["tag"] != "switch"):
                    myprint("Mismatched else: Opening tag was:")
                    myprint("  ",lasttag["linenumber"],":", lasttag["whole"])
                    myprint("But this tag was:")
                    myprint("  ",linenumber,":", whole)
                    fileinput.nextfile()
                    break
            elif end != '/':
                tagfound.append({"whole": whole, "linenumber":linenumber,"tag":tag})
            else:
                if len(tagfound) == 0:
                    myprint("Found closing tag but with no opening tag:")
                    myprint("  ", linenumber,":", whole)
                    fileinput.nextfile()
                    break
                lasttag = tagfound.pop()
                if lasttag["tag"] != tag:
                    myprint("Mismatched tag: Opening tag was:")
                    myprint("  ",lasttag["linenumber"],":", lasttag["whole"])
                    myprint("Closing tag was:")
                    myprint("  ",linenumber,":", whole)
                    fileinput.nextfile()
                    break

        if isLastLine:
            if len(tagfound) != 0:
                myprint("End of file found but", len(tagfound), ("tag hasn't" if len(tagfound)==1 else "tags haven't"), "been closed:")
            for tag in tagfound:
                myprint("  ", tag["linenumber"],":", tag["whole"])
            tagfound = []
except UnicodeDecodeError as e:
    myprint(e)
    print("   Hint: In linux, you can get more details about unicode errors by running:")
    print("     isutf8", fileinput.filename())
    print("   :Note it might be caused by ", filename)