:: MOD_Edit Slave Cheat Datatype Cleanup New [nobr]

<<set $nextButton = "Continue", $nextLink = "Slave Interact">>
/* Cancel Option Check */
<<if $tempSlave == "unset">>
	<<unset $tempSlave>>
	<<goto "Slave Interact">>
<</if>>

<<if $customEvalCode>>
	<<if $customEvalCode.charAt(0) != "(" || $nextLink == ")">> /* second condition is only there for sanityCheck */
		<<set $customEvalCode = "(" + $customEvalCode + ")">>	
	<</if>>
	<<if typeof eval($customEvalCode) === "function">>
		<<run (eval($customEvalCode))($tempSlave)>>
	<</if>>
<</if>>
<<unset $customEvalCode>>

<<set $rep = Number($rep) || 0>>
<<set $cash = Number($cash) || 0>>
<<set $week = Number($week) || 1>>

<<set $tempSlave.indenture = Number($tempSlave.indenture) || 0>>
<<set $tempSlave.indentureRestrictions = Number($tempSlave.indentureRestrictions) || 0>>
<<set $tempSlave.weekAcquired = Number($tempSlave.weekAcquired) || 0>>

<<if $familyTesting == 0 >>
	<<set $tempSlave.relationTarget = Number($tempSlave.relationTarget) || 0>>
<<else>>
	<<set $tempSlave.mother = Number($tempSlave.mother) || 0>>
	<<set $tempSlave.father = Number($tempSlave.father) || 0>>
<</if>>
<<set $tempSlave.relationship = Number($tempSlave.relationship) || 0>>
<<set $tempSlave.relationshipTarget = Number($tempSlave.relationshipTarget) || 0>>
<<set $tempSlave.rivalry = Number($tempSlave.rivalry) || 0>>
<<set $tempSlave.rivalryTarget = Number($tempSlave.rivalryTarget) || 0>>
<<set $tempSlave.actualAge = Number($tempSlave.actualAge)>>
<<set $tempSlave.visualAge = Number($tempSlave.visualAge) || 18>>
<<set $tempSlave.physicalAge = Number($tempSlave.physicalAge) || 18>>
<<set $tempSlave.ovaryAge = Number($tempSlave.ovaryAge) || 18>>
<<set $tempSlave.ageImplant = Number($tempSlave.ageImplant) || 0>>
<<set $tempSlave.birthWeek = Number($tempSlave.birthWeek) || 0>>
<<set $tempSlave.health = Number($tempSlave.health) || 0>>
<<set $tempSlave.chem = Number($tempSlave.chem) || 0>>
<<set $tempSlave.addict = Number($tempSlave.addict) || 0>>
<<set $tempSlave.devotion = Number($tempSlave.devotion) || 0>>
<<set $tempSlave.oldDevotion = Number($tempSlave.oldDevotion) || 0>>
<<set $tempSlave.trust = Number($tempSlave.trust) || 0>>
<<set $tempSlave.oldTrust = Number($tempSlave.oldTrust) || 0>>
<<set $tempSlave.face = Number($tempSlave.face) || 0>>
<<set $tempSlave.faceImplant = Number($tempSlave.faceImplant) || 0>>
<<set $tempSlave.bald = Number($tempSlave.bald) || 0>>
<<set $tempSlave.hLength = Number($tempSlave.hLength) || 0>>
<<set $tempSlave.lips = Number($tempSlave.lips) || 0>>
<<set $tempSlave.lipsImplant = Number($tempSlave.lipsImplant) || 0>>
<<set $tempSlave.voiceImplant = Number($tempSlave.voiceImplant) || 0>>
<<set $tempSlave.voice = Number($tempSlave.voice) || 0>>
<<set $tempSlave.accent = Number($tempSlave.accent) || 0>>
<<set $tempSlave.amp = Number($tempSlave.amp) || 0>>
<<set $tempSlave.fuckdoll = Number($tempSlave.fuckdoll) || 0>>
<<set $tempSlave.muscles = Number($tempSlave.muscles) || 0>>
<<set $tempSlave.weight = Number($tempSlave.weight) || 0>>
<<set $tempSlave.waist = Number($tempSlave.waist) || 0>>
<<set $tempSlave.height = Number($tempSlave.height) || 0>>
<<set $tempSlave.heightImplant = Number($tempSlave.heightImplant) || 0>>
<<set $tempSlave.bellyImplant = Number($tempSlave.bellyImplant)>>
<<set $tempSlave.bellySag = Number($tempSlave.bellySag) || 0>>
<<set $tempSlave.boobs = Number($tempSlave.boobs) || 200>>
<<set $tempSlave.boobsImplant = Number($tempSlave.boobsImplant) || 0>>
<<set $tempSlave.lactation = Number($tempSlave.lactation) || 0>>
<<set $tempSlave.areolae = Number($tempSlave.areolae) || 0>>
<<set $tempSlave.butt = Number($tempSlave.butt) || 0>>
<<set $tempSlave.buttImplant = Number($tempSlave.buttImplant) || 0>>
<<set $tempSlave.anus = Number($tempSlave.anus) || 0>>
<<set $tempSlave.vagina = Number($tempSlave.vagina) || 0>>
<<set $tempSlave.vaginaLube = Number($tempSlave.vaginaLube) || 0>>
<<set $tempSlave.lactationAdaptation = Number($tempSlave.lactationAdaptation) || 0>>
<<set $tempSlave.pubertyAgeXX = Number($tempSlave.pubertyAgeXX) || 13>>
<<set $tempSlave.preg = Number($tempSlave.preg) || 0>>
<<set $tempSlave.pregSource = Number($tempSlave.pregSource) || 0>>
<<set $tempSlave.pregType = Number($tempSlave.pregType) || 0>>
<<if $tempSlave.broodmother == 0>>
	<<set WombInit($tempSlave)>> /* just to make sure */
	<<set $tempSlave.womb.length = 0>> /* simple way to delete all fetuses */
	<<set WombImpregnate($tempSlave, $tempSlave.pregType, $tempSlave.pregSource, $tempSlave.preg)>> /* recreates fetuses */
<<else>>
	<<set WombNormalizePreg($tempSlave)>>
<</if>>
<<set $tempSlave.pregWeek = Number($tempSlave.pregWeek) || Math.max($tempSlave.preg, 0)>>
<<if $tempSlave.preg <= 0>>
	<<set $tempSlave.pregKnown = 0>>
<<elseif $tempSlave.preg > 0>>
	<<set $tempSlave.pregKnown = 1>>
<</if>>
<<set $tempSlave.dick = Number($tempSlave.dick) || 0>>
<<set $tempSlave.clit = Number($tempSlave.clit) || 0>>
<<set $tempSlave.labia = Number($tempSlave.labia) || 0>>
<<set $tempSlave.balls = Number($tempSlave.balls) || 0>>
<<set $tempSlave.foreskin = Number($tempSlave.foreskin) || 0>>
<<set $tempSlave.scrotum = Number($tempSlave.scrotum) || 0>>
<<set $tempSlave.pubertyAgeXY = Number($tempSlave.pubertyAgeXY) || 13>>
<<set $tempSlave.oralSkill = Number($tempSlave.oralSkill) || 0>>
<<set $tempSlave.vaginalSkill = Number($tempSlave.vaginalSkill) || 0>>
<<set $tempSlave.analSkill = Number($tempSlave.analSkill) || 0>>
<<set $tempSlave.whoreSkill = Number($tempSlave.whoreSkill) || 0>>
<<set $tempSlave.entertainSkill = Number($tempSlave.entertainSkill) || 0>>
<<set $tempSlave.intelligence = Number($tempSlave.intelligence) || 0>>
<<set $tempSlave.intelligenceImplant = Number($tempSlave.intelligenceImplant) || 0>>
<<set $tempSlave.fetishStrength = Number($tempSlave.fetishStrength) || 0>>
<<set $tempSlave.attrXY = Number($tempSlave.attrXY) || 0>>
<<set $tempSlave.attrXX = Number($tempSlave.attrXX) || 0>>
<<set $tempSlave.energy = Number($tempSlave.energy) || 0>>
<<set $tempSlave.penetrativeCount = Number($tempSlave.penetrativeCount) || 0>>
<<set $tempSlave.oralCount = Number($tempSlave.oralCount) || 0>>
<<set $tempSlave.vaginalCount = Number($tempSlave.vaginalCount) || 0>>
<<set $tempSlave.analCount = Number($tempSlave.analCount) || 0>>
<<set $tempSlave.publicCount = Number($tempSlave.publicCount) || 0>>
<<set $tempSlave.mammaryCount = Number($tempSlave.mammaryCount) || 0>>
<<set $tempSlave.birthsTotal = Number($tempSlave.birthsTotal) || 0>>
<<set $tempSlave.pitKills = Number($tempSlave.pitKills) || 0>>
<<set $tempSlave.prestige = Number($tempSlave.prestige) || 0>>

/* Dependency Check */
<br>
<<if $tempSlave.indenture == -1>>
	<<set $tempSlave.indentureRestrictions = 0>>
<<elseif $tempSlave.indenture < -1>>
	<<set $tempSlave.indenture = -1>>
	<<print "Indenture was smaller than -1 reset to Fulltime Slave">><br>
<<elseif $tempSlave.indentureRestrictions < 0>>
	<<set $tempSlave.indentureRestrictions = 0>>
	<<print "Indenture Restriction was smaller than 0 reset to No Restrictions">><br>
<<elseif $tempSlave.indentureRestrictions > 2>>
	<<set $tempSlave.indentureRestrictions = 2>>
	<<print "Indenture Restrictions was bigger than 2 reset to Full Restrictions">><br>
<</if>>
<<if $tempSlave.weekAcquired < 0>>
	<<set $tempSlave.weekAcquired = 0>>
	<<print "Week Acquired was negative reset to 0">><br>
<</if>>
<<if ($tempSlave.relationshipTarget == $tempSlave.ID) && ($tempSlave.relationship > 0)>>
	<<set $tempSlave.relationshipTarget = 0>>
	<<set $tempSlave.relationship = -1>>
	<<print "The Slave was in a relation with herself reset to emotional Slut">><br>
<</if>>
<<if ($tempSlave.rivalryTarget == $tempSlave.ID) && ($tempSlave.rivalry > 0)>>
	<<set $tempSlave.rivalryTarget = 0>>
	<<set $tempSlave.rivalry = 0>>
	<<print "The Slave was her own Rival reset to No Rivalry">><br>
<</if>>
<<if $tempSlave.actualAge < 0>>
	<<print "Slave actual Age is set too low, reset to Arcology Minimum Age">><br>
	<<set $tempSlave.actualAge = $minimumSlaveAge>>
<</if>>
<<if $tempSlave.physicalAge < 0>>
	<<print "Slave physical Age is set too low, reset to Arcology Minimum Age">><br>
	<<set $tempSlave.physicalAge = $minimumSlaveAge>>
<</if>>
<<if $tempSlave.visualAge < 0>>
	<<print "Slave visual Age is set too low, reset to Arcology Minimum Age">><br>
	<<set $tempSlave.visualAge = $minimumSlaveAge>>
<</if>>
<<if ($tempSlave.ageImplant == 1) && ($tempSlave.visualAge < 25)>>
	<<print "Slaves Visual Age is smaller than 25 reset to no lifting">><br>
	<<set $tempSlave.ageImplant = 0>>
<</if>>
<<if $tempSlave.ovaryAge < 0>>
	<<print "Slave ovary Age is set too low, reset to match physical age">><br>
	<<set $tempSlave.ovaryAge = $tempSlave.physicalAge>>
<</if>>
<<if $tempSlave.chem < 0>>
	<<print "Slaves DNA Error is set too low, reset to 0">><br>
	<<set $tempSlave.chem = 0>>
<</if>>
<<if $tempSlave.face < -100>>
	<<print "Face Beauty was set too low, reset to -100">><br>
	<<set $tempSlave.face = -100>>
<<elseif $tempSlave.face > 100>>
	<<print "Face Beauty was set too high, reset to 100">><br>
	<<set $tempSlave.face = 100>>
<</if>>
<<if $tempSlave.hLength < 0>>
	<<print "Slaves Hair length was set too low, reset to 0">><br>
	<<set $tempSlave.hLength = 0>>
<</if>>
<<if $tempSlave.lips < 0>>
	<<print "Lips size too small, reset to 0">><br>
	<<set $tempSlave.lips = 0>>
<<elseif $tempSlave.lips > 100>>
	<<print "Lips size too high, reset to 100">><br>
	<<set $tempSlave.lips = 100>>
<</if>>
<<if ($tempSlave.voice == 0) && ($tempSlave.voiceImplant != 0)>>
	<<print "Slave is mute, voice surgery reset" >><br>
	<<set $tempSlave.voiceImplant = 0>>
<</if>>
<<if ($tempSlave.voice == 3) && ($tempSlave.voiceImplant < 0)>>
	<<print "Voice surgery too low, voice surgery reset" >><br>
	<<set $tempSlave.voiceImplant = 0>>
<</if>>
<<if ($tempSlave.voice == 1) && ($tempSlave.voiceImplant > 0)>>
	<<print "Voice surgery too high, voice surgery reset" >><br>
	<<set $tempSlave.voiceImplant = 0>>
<</if>>
<<if $tempSlave.amp < -5>>
	<<print "Amputation Value too low, reset to -5 (Cybernetic limbs)">><br>
	<<set $tempSlave.amp = -5>>
<<elseif $tempSlave.amp > 1>>
	<<print "Amputation Value too high, reset to 1 (Amputated)">><br>
	<<set $tempSlave.amp = 1>>
<</if>>
<<if ($tempSlave.amp == 0) && ($tempSlave.PLimb > 0)>>
	<<print "Slave has Normal Limbs, Limb Interface reset to 0 (No Interface)">><br>
	<<set $tempSlave.PLimb = 0>>
<</if>>
<<if ($tempSlave.PLimb == 0) && ($tempSlave.amp < 0)>>
	<<print "Slave has no Prosthetic limb Interface, limbs reset to 1 (Amputated)">>
	<<set _tempLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
	<<set _tempLimbs.type = $tempSlave.amp, _tempLimbs.armsTat = $tempSlave.armsTat, _tempLimbs.legsTat = $tempSlave.legsTat>>
	<<if !Array.isArray($tempSlave.readyLimbs)>>
		<<set $tempSlave.readyLimbs = []>>
	<</if>>
	<<set $tempSlave.readyLimbs.push(_tempLimbs)>>
	<<set $tempSlave.amp = 1>>
<</if>>
<<if ($tempSlave.amp != 0)>>
	<<set $tempSlave.heightImplant = 0>>
	<<if $tempSlave.amp == 1>>
		<<set $tempSlave.legsTat = 0>>
		<<set $tempSlave.armsTat = 0>>
	<</if>>
	<<set $tempSlave.nails = 0>>
	<<set $tempSlave.heels = 0>>
	<<if $tempSlave.brand != 0>>
		<<if ($tempSlave.brandLocation == "left upper arm") || ($tempSlave.brandLocation == "right upper arm") || ($tempSlave.brandLocation == "upper arms")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left lower arm") || ($tempSlave.brandLocation == "right lower arm") || ($tempSlave.brandLocation == "lower arms")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left wrist") || ($tempSlave.brandLocation == "right wrist") || ($tempSlave.brandLocation == "wrists")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left hand") || ($tempSlave.brandLocation == "right hand") || ($tempSlave.brandLocation == "hands")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left thigh") || ($tempSlave.brandLocation == "right thigh") || ($tempSlave.brandLocation == "thighs")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left calf") || ($tempSlave.brandLocation == "right calf") || ($tempSlave.brandLocation == "calves")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left ankle") || ($tempSlave.brandLocation == "right ankle") || ($tempSlave.brandLocation == "ankles")>>
			<<set $tempSlave.brand = 0>>
		<<elseif ($tempSlave.brandLocation == "left foot") || ($tempSlave.brandLocation == "right foot") || ($tempSlave.brandLocation == "feet")>>
			<<set $tempSlave.brand = 0>>
		<</if>>
	<</if>>
<</if>>
<<if $tempSlave.fuckdoll < 0>>
	<<print "Fuckdoll Value too low, reset to 0 (Not a Fuckdoll)">><br>
	<<set $tempSlave.fuckdoll = 0>>
<<elseif $tempSlave.fuckdoll > 100>>
	<<print "Fuckdoll Value too high, reset to 100 (Total Fuckdoll)">><br>
	<<set $tempSlave.fuckdoll = 100>>
<</if>>
<<if $tempSlave.muscles < -100>>
	<<print "Muscle Value too low, reset to -100 (Frail)">><br>
	<<set $tempSlave.muscles = 0>>
<<elseif $tempSlave.muscles > 100>>
	<<print "Muscle Value too high, reset to 100 (Hugely Muscular)">><br>
	<<set $tempSlave.muscles = 100>>
<</if>>
<<if $tempSlave.weight < -100>>
	<<print "Weight Value too low, reset to -100 (Emaciated)">><br>
	<<set $tempSlave.weight = -100>>
<<elseif $tempSlave.weight > 200 >>
	<<print "Weight Value too high, reset to 200 (Extremely Obese)">><br>
	<<set $tempSlave.weight = 200>>
<</if>>
<<if $tempSlave.waist < -100>>
	<<print "Waist Value too low, reset to -100 (Absurd)">><br>
	<<set $tempSlave.waist = -100>>
<<elseif $tempSlave.waist > 100>>
	<<print "Waist Value too high, reset to 100 (Masculine)">><br>
	<<set $tempSlave.waist = 100>>
<</if>>
<<if $tempSlave.height < 1>>
	<<print "Height Value too low, reset to 140 (Seriously its still a Human Being)">><br>
	<<set $tempSlave.height = 140>>
<</if>>
<<if $tempSlave.heightImplant < -1>>
	<<print "heightImplant Value too low, reset to -1 (Artificially Shortened)">><br>
	<<set $tempSlave.heightImplant = -1>>
<<elseif $tempSlave.heightImplant > 1>>
	<<print "heightImplant Value too high, reset to 1 (Artificially Lengthened)">><br>
<</if>>
<<if $tempSlave.bellyImplant < -1>>
	<<print "Belly Implant Value too low, reset -1 (no Implant)">><br>
	<<set $tempSlave.bellyImplant = -1>>
<</if>>
<<if $tempSlave.bellySag < 0>>
	<<print "Bellysag Value too low, reset 0">><br>
	<<set $tempSlave.bellySag = 0>>
<</if>>
<<if $tempSlave.boobs < 0>>
	<<print "Breasts Value too low, reset to 200">><br>
	<<set $tempSlave.boobs = 200>>
<</if>>
<<if $tempSlave.boobsImplant < 0>>
	<<print "Breast Implant Value too low, reset to 0">><br>
	<<set $tempSlave.boobsImplant = 0>>
<</if>>
<<if $tempSlave.butt < 0>>
	<<print "Butt Value too low, reset to 0">><br>
	<<set $tempSlave.butt = 0>>
<</if>>
<<if (ndef $tempSlave.pubertyAgeXX) || ($tempSlave.pubertyAgeXX < 0)>>
	<<print "Puberty Age was not set or set too low, reset to Arcology fertility age">><br>
	<<set $tempSlave.pubertyAgeXX = $fertilityAge>>
<</if>>
<<if (ndef $tempSlave.pubertyXX) && ($tempSlave.physicalAge >= $tempSlave.pubertyAgeXX)>>
	<<set $tempSlave.pubertyXX = 1>>
<<elseif (ndef $tempSlave.pubertyXX) && ($tempSlave.physicalAge < $tempSlave.pubertyAgeXX)>>
	<<set $tempSlave.pubertyXX = 0>>
<</if>>
<<if $tempSlave.dick < 0>>
	<<print "Slave Dick Value set too low, reset to 0 (No Dick)" >><br>
	<<set $tempSlave.dick = 0>>
<</if>>
<<if $tempSlave.dick == 0>>
	<<set $tempSlave.dickTat = 0>>
<</if>>
<<if ($tempSlave.vagina == -1) >>
	<<set $tempSlave.labia = 0>>
	<<set $tempSlave.clit = 0>>
	<<set $tempSlave.cervixImplant = 0>>
	<<set $tempSlave.ovaries = 0>>
<</if>>
<<if ($tempSlave.cervixImplant == 1) && ($tempSlave.ovaries == 0)>>
	<<print "Slave has no Ovaries Cervix Implant reset to 0 (Not Implanted)" >><br>
	<<set $tempSlave.cervixImplant = 0>>
<</if>>
<<if ($tempSlave.cervixImplant == 1) && ($tempSlave.preg == -2)>>
	<<print "Slave is Sterile, Cervix Implant reset to 0 (Not Implanted)">><br>
	<<set $tempSlave.cervixImplant = 0>>
<</if>>
<<if ($tempSlave.clit > 0) && ($tempSlave.dick > 0 )>>
	<<print "No Giant Clit when Dick is present, reset Clit to 0 (Normal)" >><br>
	<<set $tempSlave.clit = 0>>
<</if>>
<<if ($tempSlave.ovaries == 0) && ($tempSlave.mpreg == 0) && ($tempSlave.preg >0)>>
	<<print "Slave has no Ovaries and no Analwomb, Pregnancy reset to 0">><br>
	<<set $tempSlave.preg = 0>>
	<<set $tempSlave.pregType = 0>>
	<<set $tempSlave.pregSource = 0>>
	<<set $tempSlave.pregWeek = 0>>
<</if>>
<<if ($tempSlave.pubertyXX != 1) && ($tempSlave.physicalAge >= $tempSlave.pubertyAgeXX)>>
	<<print "Slaves physical Age is equal or higher than female Puberty Age, Puberty set to 1 (Post Puberty)" >><br>
	<<set $tempSlave.pubertyXX = 1>>
<</if>>
<<if ($tempSlave.ovaries == 1) && ($tempSlave.mpreg == 1)>>
	<<print "Slave has a working Vagina, Analwomb got removed" >><br>
	<<set $tempSlave.mpreg = 0>>
<</if>>
<<if ($tempSlave.pubertyXX == 0) && ($tempSlave.preg > 0)>>
	<<print "Slave is not fertile (Pre-Puberty) and has no Anal Womb, pregnancy aborted !">><br>
	<<set $tempSlave.preg = 0>>
	<<set $tempSlave.pregType = 0>>
	<<set $tempSlave.pregSource = 0>>
	<<set $tempSlave.pregWeek = 0>>
<</if>>
<<if $tempSlave.balls < 0>>
	<<print "Slave Balls Value set too low, reset to 0 (No Balls)">><br>
	<<set $tempSlave.balls = 0>>
<</if>>
<<if $tempSlave.foreskin < 0>>
	<<print "Slave Foreskin Value set too low, reset to 0 (None)">><br>
	<<set $tempSlave.foreskin = 0>>
<</if>>
<<if $tempSlave.scrotum < 0>>
	<<print "Slave Scrotum Value set too low, reset to 0 (No Scrotum)">><br>
	<<set $tempSlave.scrotum = 0>>
<</if>>
<<if (ndef $tempSlave.pubertyAgeXY) || ($tempSlave.pubertyAgeXY < 0)>>
	<<print "XY Puberty Age was not set or set too low, reset to Arcology Puberty Age">><br>
	<<set $tempSlave.pubertyAgeXY = $potencyAge>>
<</if>>
<<if (ndef $tempSlave.pubertyXY) && ($tempSlave.physicalAge >= $tempSlave.pubertyAgeXY)>>
	<<set $tempSlave.pubertyXY = 1>>
<<elseif (ndef $tempSlave.pubertyXY) && ($tempSlave.physicalAge < $tempSlave.pubertyAgeXY)>>
	<<set $tempSlave.pubertyXY = 0>>
<</if>>
<<if ($tempSlave.physicalAge >= $tempSlave.pubertyAgeXY) && ($tempSlave.pubertyXY != 1)>>
	<<print "Slaves physical Age is equal or higher than male Puberty Age, Puberty set to 1 (Post Puberty)" >><br>
	<<set $tempSlave.pubertyXY = 1>>
<</if>>
<<if $tempSlave.oralSkill < 0>>
	<<print "Oral Skill Value set too low, reset to 0">><br>
	<<set $tempSlave.oralSkill = 0>>
<<elseif $tempSlave.oralSkill > 100>>
	<<print "Oral Skill Value set too high, reset to 100">><br>
	<<set $tempSlave.oralSkill = 100>>
<</if>>
<<if $tempSlave.vaginalSkill < 0>>
	<<print "Vaginal Skill Value too low, reset to 0">><br>
	<<set $tempSlave.vaginalSkill = 0>>
<<elseif $tempSlave.vaginalSkill > 100>>
	<<print "Vaginal Skill Value too high, reset to 100">><br>
	<<set $tempSlave.vaginalSkill = 100>>
<</if>>
<<if $tempSlave.analSkill < 0>>
	<<print "Anal Skill Value set too low, reset to 0">><br>
	<<set $tempSlave.analSkill = 0>>
<<elseif $tempSlave.analSkill > 100>>
	<<print "Anal Skill Value set too high, reset to 100">><br>
	<<set $tempSlave.analSkill = 100>>
<</if>>
<<if $tempSlave.whoreSkill < 0>>
	<<print "Whoring Skill Value set too low, reset to 0">><br>
	<<set $tempSlave.whoreSkill = 0>>
<<elseif $tempSlave.whoreSkill > 100>>
	<<print "Whoring Skill Value set too high, reset to 100">><br>
	<<set $tempSlave.whoreSkill = 100>>
<</if>>
<<if $tempSlave.entertainSkill < 0>>
	<<print "Entertainment Skill Value set too low, reset to 0">><br>
	<<set $tempSlave.entertainSkill = 0>>
<<elseif $tempSlave.entertainSkill > 100>>
	<<print "Entertainment Skill Value set too high, reset to 100">><br>
	<<set $tempSlave.entertainSkill = 100>>
<</if>>
<<if $tempSlave.intelligence < -100>>
	<<print "Slave Intelligence Value set too low, reset to -100">><br>
	<<set $tempSlave.intelligence = -100>>
<<elseif $tempSlave.intelligence > 100>>
	<<print "Slave Intelligence Value set too high, reset to 100">><br>
	<<set $tempSlave.intelligence = 100>>
<</if>>
<<if $tempSlave.intelligenceImplant < 0>>
	<<print "Slave intelligenceImplant Value set too low, reset to 0">><br>
	<<set $tempSlave.intelligenceImplant = 0>>
<<elseif $tempSlave.intelligenceImplant > 30>>
	<<print "Slave intelligenceImplant Value set too high, reset to 30">><br>
	<<set $tempSlave.intelligenceImplant = 30>>
<</if>>
<<if $tempSlave.fetishStrength < 0>>
	<<print "Fetish Strength set too low, reset to 0">><br>
	<<set $tempSlave.fetishStrength = 0>>
<<elseif $tempSlave.fetishStrength > 100>>
	<<print "Fetish Strength set too high, reset to 100">><br>
	<<set $tempSlave.fetishStrength = 100>>
<</if>>
<<if $tempSlave.energy < 0>>
	<<print "Sex Drive was set too low, reset to 0">><br>
	<<set $tempSlave.energy = 0>>
<<elseif $tempSlave.energy > 100>>
	<<print "Sex Drive was set too high, reset to 100">><br>
	<<set $tempSlave.energy = 100>>
<</if>>
<<if $tempSlave.penetrativeCount < 0>>
	<<print "Penetrative sex Count was set too low, reset to 0">><br>
	<<set $tempSlave.penetrativeCount = 0>>
<</if>>
<<if $tempSlave.oralCount < 0>>
	<<print "Oral sex Count set too low, reset to 0">><br>
	<<set $tempSlave.oralCount = 0>>
<</if>>
<<if $tempSlave.vaginalCount < 0>>
	<<print "Vaginal sex Count set too low, reset to 0">><br>
	<<set $tempSlave.vaginalCount = 0>>
<</if>>
<<if $tempSlave.analCount < 0>>
	<<print "Anal sex Count set too low, reset to 0">><br>
	<<set $tempSlave.analCount = 0>>
<</if>>
<<if $tempSlave.publicCount < 0>>
	<<print "Public sex Count set too low, reset 0">><br>
	<<set $tempSlave.publicCount = 0>>
<</if>>
<<if $tempSlave.mammaryCount < 0>>
	<<print "Titjobs Count set too low, reset to 0">><br>
	<<set $tempSlave.mammaryCount = 0>>
<</if>>
<<if $tempSlave.birthsTotal < 0>>
	<<print "Total birth Count set too low, reset to 0">><br>
	<<set $tempSlave.birthsTotal = 0>>
<</if>>
<<if $tempSlave.pitKills < 0>>
	<<print "Pit Kills Count set too low, reset to 0">><br>
	<<set $tempSlave.pitKills = 0>>
<</if>>
<<if $tempSlave.prestige < 0>>
	<<print "Prestige set too low, reset to 0">><br>
	<<set $tempSlave.prestige = 0>>
<<elseif $tempSlave.prestige > 3>>
	<<print "Prestige set too high, reset to 3">><br>
	<<set $tempSlave.prestige = 3>>
<</if>>
<<if $tempSlave.breedingMark == 1 && ["whore", "serve the public", "work a glory hole", "work in the dairy", "serve in the club", "be the DJ", "be the Madam", "live with your Head Girl", "be confined in the arcade", "work in the brothel", "be a subordinate slave"].includes($tempSlave.assignment)>>
	<<print "Eugenics Breeding Marked slave detected in questionable use, defaulting slave assignment to 'rest'">><br>
	<<= assignJob($tempSlave, "rest")>>
<</if>>
<<run SetBellySize($tempSlave)>>

<br>
You perform the dark rituals, pray to the dark gods and sold your soul for the power to change and mold slaves to your will.

<br><br>This slave has been changed forever and you have lost a bit of your soul, YOU CHEATER!

<<set $activeSlave = clone($tempSlave)>>
<<unset $tempSlave>>
<<set _escn = $slaveIndices[$activeSlave.ID]>>
<<if def _escn>>
	<<set $slaves[_escn] = clone($activeSlave)>>
<</if>>
