diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt index 4169dcfc187f3b83ed8dbcc615e5c489b03dd9d2..827e30c142475095ca30c482731d2adec25030e7 100644 --- a/devNotes/VersionChangeLog-Premod+LoliMod.txt +++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt @@ -1,5 +1,15 @@ Pregmod +0.10.7.1-1.7.x + +01/26/2019 + + 0 + -corporation overhauled + -more farmyard development + -food resource and management (optional) + -fixes + 0.10.7.1-1.6.x 01/23/2019 diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt index 27d8a909666a143da715c6827defdadad5925079..aefeb7daa54ab81fbdb9587926c9fd7a6f2783c2 100644 --- a/slave variables documentation - Pregmod.txt +++ b/slave variables documentation - Pregmod.txt @@ -3457,11 +3457,35 @@ geneMods: 0 - no 1 - yes +slaveCost: +Amount of cash paid to acquire the slave +accepts negative numbers, 0, or 1. +1 - unknown price +0 - free +negative - amount paid + +lifetimeCashExpenses: +Amount of cash you have spent because of this slave +accepts negative numbers or 0 + +lifetimeCashIncome: +Total amount of cash you have earned because of this slave +accepts positive numbers or 0 + +lastWeeksCashIncome: +Amount of cash you have earned because of this slave last week +accepts positive numbers or 0 + +lifetimeRepExpenses: +lifetimeRepIncome: +lastWeeksRepIncome: +Not currently used, will work similarly to the cash variables above + How to set up your own hero slave. -The default slave template used: -<<set $activeSlave = {slaveName: "blank", slaveSurname: 0, birthName: "blank", birthSurname: 0, genes: "XX", pronoun: "she", possessive: "her", possessivePronoun: "hers", objectReflexive: "herself", object: "her", noun: "girl", weekAcquired: 0, origin: 0, career: 0, ID: 0, prestige: 0, pornFeed: 0, pornFame: 0, pornFameSpending: 0, pornPrestige: 0, pornPrestigeDesc: 0, pornFameType: "none", pornFocus: "none", pornTypeGeneral: 0, pornTypeFuckdoll: 0, pornTypeRape: 0, pornTypePreggo: 0, pornTypeBBW: 0, pornTypeGainer: 0, pornTypeStud: 0, pornTypeLoli: 0, pornTypeDeepThroat: 0, pornTypeStruggleFuck: 0, pornTypePainal: 0, pornTypeTease: 0, pornTypeRomantic: 0, pornTypePervert: 0, pornTypeCaring: 0, pornTypeUnflinching: 0, pornTypeSizeQueen: 0, pornTypeNeglectful: 0, pornTypeCumAddict: 0, pornTypeAnalAddict: 0, pornTypeAttentionWhore: 0, pornTypeBreastGrowth: 0, pornTypeAbusive: 0, pornTypeMalicious: 0, pornTypeSelfHating: 0, pornTypeBreeder: 0, pornTypeSub: 0, pornTypeCumSlut: 0, pornTypeAnal: 0, pornTypeHumiliation: 0, pornTypeBoobs: 0, pornTypeDom: 0, pornTypeSadist: 0, pornTypeMasochist: 0, pornTypePregnancy: 0, prestigeDesc: 0, recruiter: 0, relation: 0, relationTarget: 0, relationship: 0, relationshipTarget: 0, rivalry: 0, rivalryTarget: 0, subTarget: 0, father: 0, mother: 0, daughters: 0, sisters: 0, canRecruit: 0, choosesOwnAssignment: 0, assignment: "rest", assignmentVisible: 1, sentence: 0, training: 0, toyHole: "all her holes", indenture: -1, indentureRestrictions: 0, birthWeek: random(0,51), actualAge: 18, visualAge: 18, physicalAge: 18, ovaryAge: 18, ageImplant: 0, health: 0, minorInjury: 0, trust: 0, oldTrust: 0, devotion: 0, oldDevotion: 0, weight: 0, muscles: 0, height: 170, heightImplant: 0, nationality: "slave", race: "white", origRace: "white", markings: "none", eyes: 1, eyeColor: "brown", origEye: "brown", pupil: "circular", sclerae: "white", eyewear: "none", hears: 0, earwear: "none", earImplant: 0, origHColor: "brown", hColor: "brown", pubicHColor: "brown", underArmHColor: "brown", eyebrowHColor: "brown", origSkin: "light", skin: "light", hLength: 60, eyebrowFullness: "natural", hStyle: "short", pubicHStyle: "neat", underArmHStyle: "neat", eyebrowHStyle: "natural", waist: 0, corsetPiercing: 0, PLimb: 0, amp: 0, heels:0, voice: 2, voiceImplant: 0, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 0, boobsImplant: 0, boobsImplantType: 0, boobShape: "normal", nipples: "cute", nipplesPiercing: 0, nipplesAccessory: 0, areolae: 0, areolaePiercing: 0, areolaeShape: "circle", boobsTat: 0, lactation: 0, lactationAdaptation: 0, milk: 0, cum: 0, hips: 0, hipsImplant: 0, butt: 0, buttImplant: 0, buttImplantType: 0, buttTat: 0, face: 0, faceImplant: 0, faceShape: "normal", lips: 15, lipsImplant: 0, lipsPiercing: 0, lipsTat: 0, teeth: "normal", tonguePiercing: 0, vagina: 0, vaginaLube: 0, vaginaPiercing: 0, vaginaTat: 0, preg: -1, pregSource: 0, pregType: 0, pregAdaptation: 50, superfetation: 0, ovaImplant: 0, wombImplant: "none", broodmother: 0, broodmotherFetuses: 0, broodmotherOnHold: 0, broodmotherCountDown: 0, labor: 0, births: 0, cSec: 0, bellyAccessory: "none", labia: 0, clit: 0, clitPiercing: 0, clitSetting: "vanilla", foreskin: 0, anus: 0, dick: 0, analArea: 1, dickPiercing: 0, dickTat: 0, prostate: 0, balls: 0, scrotum: 0, ovaries: 0, anusPiercing: 0, anusTat: 0, makeup: 0, nails: 0, brand: 0, brandLocation: 0, earPiercing: 0, nosePiercing: 0, eyebrowPiercing: 0, navelPiercing: 0, shouldersTat: 0, armsTat: 0, legsTat: 0, backTat: 0, stampTat: 0, vaginalSkill: 0, oralSkill: 0, analSkill: 0, whoreSkill: 0, entertainSkill: 0, combatSkill: 0, livingRules: "spare", speechRules: "restrictive", releaseRules: "restrictive", relationshipRules: "restrictive", standardPunishment: "situational", standardReward: "situational", useRulesAssistant: 1, diet: "healthy", dietCum: 0, dietMilk: 0, tired: 0, hormones: 0, drugs: "no drugs", curatives: 0, chem: 0, aphrodisiacs: 0, addict: 0, fuckdoll: 0, choosesOwnClothes: 0, clothes: "no clothing", collar: "none", shoes: "none", vaginalAccessory: "none", dickAccessory: "none", legAccessory: "none", buttplug: "none", buttplugAttachment: "none", intelligence: 0, intelligenceImplant: 0, energy: 50, need: 0, attrXX: 0, attrXY: 0, attrKnown: 0, fetish: "none", fetishStrength: 70, fetishKnown: 0, behavioralFlaw: "none", behavioralQuirk: "none", sexualFlaw: "none", sexualQuirk: "none", oralCount: 0, vaginalCount: 0, analCount: 0, mammaryCount: 0, penetrativeCount: 0, publicCount: 0, pitKills: 0, customTat: "", customLabel: "", customDesc: "", customTitle: "", customTitleLisp: "", rudeTitle: 0, customImage: 0, currentRules: [], bellyTat: 0, induce: 0, mpreg: 0, inflation: 0, inflationType: "none", inflationMethod: 0, milkSource: 0, cumSource: 0, burst: 0, pregKnown: 0, pregWeek: 0, belly: 0, bellyPreg: 0, bellyFluid: 0, bellyImplant: -1, bellySag: 0, bellySagPreg: 0, bellyPain: 0, cervixImplant: 0, birthsTotal: 0, pubertyAgeXX: 13, pubertyAgeXY: 13, scars: 0, breedingMark: 0, bodySwap: 0, HGExclude: 0, ballType: "human", eggType: "human", reservedChildren: 0, reservedChildrenNursery: 0, choosesOwnChastity: 0, pregControl: "none", readyLimbs: [], ageAdjust: 0, bald: 0, origBodyOwner: "", origBodyOwnerID: 0, death: "", hormoneBalance: 0, onDiet: 0, breastMesh: 0, slavesFathered: 0, PCChildrenFathered: 0, slavesKnockedUp: 0, PCKnockedUp: 0, prematureBirth: 0, premature: 0, origSkin: "white", vasectomy: 0, haircuts: 0, newGamePlus: 0, skillHG: 0, skillRC: 0, skillBG: 0, skillMD: 0, skillDJ: 0, skillNU: 0, skillTE: 0, skillAT: 0, skillMT: 0, skillST: 0, skillMM: 0, skillFA: 0, skillWA: 0, skillS: 0, skillE: 0, skillW: 0, tankBaby: 0, geneMods: {NCS: 0, rapidCellGrowth: 0}, NCSyouthening: 0, override_Race: 0, override_Skin: 0, override_Eye_Color: 0, override_H_Color: 0, override_Pubic_H_Color: 0, override_Arm_H_Color: 0, override_Brow_H_Color: 0, missingEyes: 0, missingArms: 0, missingLegs: 0}>> +<<set $activeSlave = {slaveName: "blank", slaveSurname: 0, birthName: "blank", birthSurname: 0, genes: "XX", pronoun: "she", possessive: "her", possessivePronoun: "hers", objectReflexive: "herself", object: "her", noun: "girl", weekAcquired: 0, origin: 0, career: 0, ID: 0, prestige: 0, pornFeed: 0, pornFame: 0, pornFameSpending: 0, pornPrestige: 0, pornPrestigeDesc: 0, pornFameType: "none", pornFocus: "none", pornTypeGeneral: 0, pornTypeFuckdoll: 0, pornTypeRape: 0, pornTypePreggo: 0, pornTypeBBW: 0, pornTypeGainer: 0, pornTypeStud: 0, pornTypeLoli: 0, pornTypeDeepThroat: 0, pornTypeStruggleFuck: 0, pornTypePainal: 0, pornTypeTease: 0, pornTypeRomantic: 0, pornTypePervert: 0, pornTypeCaring: 0, pornTypeUnflinching: 0, pornTypeSizeQueen: 0, pornTypeNeglectful: 0, pornTypeCumAddict: 0, pornTypeAnalAddict: 0, pornTypeAttentionWhore: 0, pornTypeBreastGrowth: 0, pornTypeAbusive: 0, pornTypeMalicious: 0, pornTypeSelfHating: 0, pornTypeBreeder: 0, pornTypeSub: 0, pornTypeCumSlut: 0, pornTypeAnal: 0, pornTypeHumiliation: 0, pornTypeBoobs: 0, pornTypeDom: 0, pornTypeSadist: 0, pornTypeMasochist: 0, pornTypePregnancy: 0, prestigeDesc: 0, recruiter: 0, relation: 0, relationTarget: 0, relationship: 0, relationshipTarget: 0, rivalry: 0, rivalryTarget: 0, subTarget: 0, father: 0, mother: 0, daughters: 0, sisters: 0, canRecruit: 0, choosesOwnAssignment: 0, assignment: "rest", assignmentVisible: 1, sentence: 0, training: 0, toyHole: "all her holes", indenture: -1, indentureRestrictions: 0, birthWeek: random(0,51), actualAge: 18, visualAge: 18, physicalAge: 18, ovaryAge: 18, ageImplant: 0, health: 0, minorInjury: 0, trust: 0, oldTrust: 0, devotion: 0, oldDevotion: 0, weight: 0, muscles: 0, height: 170, heightImplant: 0, nationality: "slave", race: "white", origRace: "white", markings: "none", eyes: 1, eyeColor: "brown", origEye: "brown", pupil: "circular", sclerae: "white", eyewear: "none", hears: 0, earwear: "none", earImplant: 0, origHColor: "brown", hColor: "brown", pubicHColor: "brown", underArmHColor: "brown", eyebrowHColor: "brown", origSkin: "light", skin: "light", hLength: 60, eyebrowFullness: "natural", hStyle: "short", pubicHStyle: "neat", underArmHStyle: "neat", eyebrowHStyle: "natural", waist: 0, corsetPiercing: 0, PLimb: 0, amp: 0, heels:0, voice: 2, voiceImplant: 0, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 0, boobsImplant: 0, boobsImplantType: 0, boobShape: "normal", nipples: "cute", nipplesPiercing: 0, nipplesAccessory: 0, areolae: 0, areolaePiercing: 0, areolaeShape: "circle", boobsTat: 0, lactation: 0, lactationAdaptation: 0, milk: 0, cum: 0, hips: 0, hipsImplant: 0, butt: 0, buttImplant: 0, buttImplantType: 0, buttTat: 0, face: 0, faceImplant: 0, faceShape: "normal", lips: 15, lipsImplant: 0, lipsPiercing: 0, lipsTat: 0, teeth: "normal", tonguePiercing: 0, vagina: 0, vaginaLube: 0, vaginaPiercing: 0, vaginaTat: 0, preg: -1, pregSource: 0, pregType: 0, pregAdaptation: 50, superfetation: 0, ovaImplant: 0, wombImplant: "none", broodmother: 0, broodmotherFetuses: 0, broodmotherOnHold: 0, broodmotherCountDown: 0, labor: 0, births: 0, cSec: 0, bellyAccessory: "none", labia: 0, clit: 0, clitPiercing: 0, clitSetting: "vanilla", foreskin: 0, anus: 0, dick: 0, analArea: 1, dickPiercing: 0, dickTat: 0, prostate: 0, balls: 0, scrotum: 0, ovaries: 0, anusPiercing: 0, anusTat: 0, makeup: 0, nails: 0, brand: 0, brandLocation: 0, earPiercing: 0, nosePiercing: 0, eyebrowPiercing: 0, navelPiercing: 0, shouldersTat: 0, armsTat: 0, legsTat: 0, backTat: 0, stampTat: 0, vaginalSkill: 0, oralSkill: 0, analSkill: 0, whoreSkill: 0, entertainSkill: 0, combatSkill: 0, livingRules: "spare", speechRules: "restrictive", releaseRules: "restrictive", relationshipRules: "restrictive", standardPunishment: "situational", standardReward: "situational", useRulesAssistant: 1, diet: "healthy", dietCum: 0, dietMilk: 0, tired: 0, hormones: 0, drugs: "no drugs", curatives: 0, chem: 0, aphrodisiacs: 0, addict: 0, fuckdoll: 0, choosesOwnClothes: 0, clothes: "no clothing", collar: "none", shoes: "none", vaginalAccessory: "none", dickAccessory: "none", legAccessory: "none", buttplug: "none", buttplugAttachment: "none", intelligence: 0, intelligenceImplant: 0, energy: 50, need: 0, attrXX: 0, attrXY: 0, attrKnown: 0, fetish: "none", fetishStrength: 70, fetishKnown: 0, behavioralFlaw: "none", behavioralQuirk: "none", sexualFlaw: "none", sexualQuirk: "none", oralCount: 0, vaginalCount: 0, analCount: 0, mammaryCount: 0, penetrativeCount: 0, publicCount: 0, pitKills: 0, customTat: "", customLabel: "", customDesc: "", customTitle: "", customTitleLisp: "", rudeTitle: 0, customImage: 0, currentRules: [], bellyTat: 0, induce: 0, mpreg: 0, inflation: 0, inflationType: "none", inflationMethod: 0, milkSource: 0, cumSource: 0, burst: 0, pregKnown: 0, pregWeek: 0, belly: 0, bellyPreg: 0, bellyFluid: 0, bellyImplant: -1, bellySag: 0, bellySagPreg: 0, bellyPain: 0, cervixImplant: 0, birthsTotal: 0, pubertyAgeXX: 13, pubertyAgeXY: 13, scars: 0, breedingMark: 0, bodySwap: 0, HGExclude: 0, ballType: "human", eggType: "human", reservedChildren: 0, reservedChildrenNursery: 0, choosesOwnChastity: 0, pregControl: "none", readyLimbs: [], ageAdjust: 0, bald: 0, origBodyOwner: "", origBodyOwnerID: 0, death: "", hormoneBalance: 0, onDiet: 0, breastMesh: 0, slavesFathered: 0, PCChildrenFathered: 0, slavesKnockedUp: 0, PCKnockedUp: 0, prematureBirth: 0, premature: 0, origSkin: "white", vasectomy: 0, haircuts: 0, newGamePlus: 0, skillHG: 0, skillRC: 0, skillBG: 0, skillMD: 0, skillDJ: 0, skillNU: 0, skillTE: 0, skillAT: 0, skillMT: 0, skillST: 0, skillMM: 0, skillFA: 0, skillWA: 0, skillS: 0, skillE: 0, skillW: 0, tankBaby: 0, geneMods: {NCS: 0, rapidCellGrowth: 0}, NCSyouthening: 0, override_Race: 0, override_Skin: 0, override_Eye_Color: 0, override_H_Color: 0, override_Pubic_H_Color: 0, override_Arm_H_Color: 0, override_Brow_H_Color: 0, missingEyes: 0, missingArms: 0, missingLegs: 0, slaveCost: 0, lifetimeCashExpenses: 0, lifetimeCashIncome: 0, lastWeeksCashIncome: 0, lifetimeRepExpenses: 0, lifetimeRepIncome: 0, lastWeeksRepIncome: 0}>> Making your slave; add their name to the following, then go down the documentation adding in your changes. -each variable must be separated from the last by a comma followed by a space diff --git a/src/SecExp/securityReport.tw b/src/SecExp/securityReport.tw index 7b4c7e2c639d3151cf706ef434b53d1f23cc366f..2d1b8ca4e6f956d52b3822fc88c34ceeb66dddd2 100644 --- a/src/SecExp/securityReport.tw +++ b/src/SecExp/securityReport.tw @@ -282,7 +282,7 @@ <<set $crime = Math.clamp(_newCrime,0,100)>> <<if $militiaFounded == 1 || $activeUnits >= 1>> - <br> + <br><br> <strong> Military</strong>: /* militia */ <<if $SF.Toggle && $SF.Active >= 1 && $SF.Size > 10>> Having a powerful special force attracts a lot of citizens, hopeful that they may be able to fight along side it. diff --git a/src/debugging/debugJS.js b/src/debugging/debugJS.js index e58085d898de4c1bfd67c8c06f808772c8ab439e..7f1a9650c8aa8a80997420bc6d522bd6068ad8c4 100644 --- a/src/debugging/debugJS.js +++ b/src/debugging/debugJS.js @@ -75,7 +75,7 @@ window.findNaN = function findNan() { var result = []; for (var key in flatV) { if (Number.isNaN(flatV[key])) { - result.push('$'+key); + result.push('$$'+key); /* double dollar signs to escape sugarcube markup */ } } return result; diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index b2299232438a252591c8500c68f65abd6b0b7ea9..93bf7cd406a67d92906e968dd7afbc40e9996779 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -2628,7 +2628,7 @@ LORE: INTERVIEWS <br>''DrNoOne'' wrote the bulk slave purchase and persistent summary code. <br>''Mauve'' provided vector art for chastity belts and limp dicks. <br>''Klorpa'' for dozens of new nationalities and boundless new names and nicknames. Also monokinis, middle eastern clothing and aprons. Also the hearing overhaul. Has declared war on bad spelling, grammar and formatting. - <br>'',owercasedonkey'' for various additions, not limited to the budget overhaul. + <br>''lowercasedonkey'' for various additions, not limited to the budget overhaul. <br>''amomynous0'' for bug reports and testing in addition to SFmod unit descriptions. <br>''wepsrd'' for QOL (hormonal balance cheat and lactation adaptation to new menu) fixes. diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 9594ad4b8172533c1dbfb088043e0f97479098df..226af19c8fdc857f3781c13198d179110a143ca1 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with thi <<set $returnTo = "init", $nextButton = "Continue", $nextLink = "Alpha disclaimer">> <<unset $releaseID>> -<<set $ver = "0.10.7", $pmodVer = "1.6.X", $releaseID = 1039>> -<<if ndef $pmodVer>><<set $pmodVer = "1.6.X">><</if>> +<<set $ver = "0.10.7", $pmodVer = "1.7.X", $releaseID = 1040>> +<<if ndef $pmodVer>><<set $pmodVer = "1.7.X">><</if>> /* This needs to be broken down into individual files that can be added to StoryInit instead. */ diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 0d08a8dba843f8dd01e0aa64a61440bfe0f2bfdc..17e94be3fb6a06098e5eef4501dc5e7605a5d0d5 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -25,586 +25,591 @@ If you want slave.value to be a string, there's no easy tricks to make sure it's already an accepted value. The simplest way is the following if (typeof slave.value !== "string") slave.value = default; */ -window.SlaveDatatypeCleanup = function SlaveDatatypeCleanup (slave) { - slaveAgeDatatypeCleanup(slave); - slavePhysicalDatatypeCleanup(slave); - slaveFaceDatatypeCleanup(slave); - slaveHairDatatypeCleanup(slave); - slaveBoobsDatatypeCleanup(slave); - slaveButtDatatypeCleanup(slave); - slavePregnancyDatatypeCleanup(slave); - slaveBellyDatatypeCleanup(slave); - slaveGenitaliaDatatypeCleanup(slave); - slaveImplantsDatatypeCleanup(slave); - slavePiercingsDatatypeCleanup(slave); - slaveTattooDatatypeCleanup(slave); - slaveCosmeticsDatatypeCleanup(slave); - slaveDietDatatypeCleanup(slave); - slavePornDatatypeCleanup(slave); - slaveRelationDatatypeCleanup(slave); - slaveSkillsDatatypeCleanup(slave); - slaveStatCountDatatypeCleanup(slave); - slavePreferencesDatatypeCleanup(slave); - slaveRulesDatatypeCleanup(slave); - slaveCustomStatsDatatypeCleanup(slave); - slaveMiscellaneousDatatypeCleanup(slave); - generatePronouns(slave); -}; - -window.slaveAgeDatatypeCleanup = function slaveAgeDatatypeCleanup(slave) { - const V = State.variables; - - slave.birthWeek = Math.clamp(+slave.birthWeek, 0, 51) || 0; - if (slave.age > 0) { - slave.actualAge = Math.clamp(+slave.actualAge, V.minimumSlaveAge, Infinity) || slave.age; /* if undefined, this sets to slave.age */ - } else { - slave.actualAge = Math.clamp(+slave.actualAge, V.minimumSlaveAge, Infinity) || 18; - slave.age = slave.actualAge; - } - slave.visualAge = Math.max(+slave.visualAge, 0) || slave.actualAge; - slave.physicalAge = Math.max(+slave.physicalAge, 0) || slave.actualAge; - slave.ovaryAge = Math.max(+slave.ovaryAge, 0) || slave.physicalAge; - slave.pubertyAgeXX = Math.max(+slave.pubertyAgeXX, 0) || V.fertilityAge; - slave.pubertyAgeXY = Math.max(+slave.pubertyAgeXY, 0) || V.potencyAge; - slave.ageAdjust = Math.clamp(+slave.ageAdjust, -40, 40) || 0; - slave.NCSyouthening = Math.max(+slave.NCSyouthening, 0) || 0; -}; - -window.slavePhysicalDatatypeCleanup = function slavePhysicalDatatypeCleanup(slave) { - if (typeof slave.nationality !== "string") { - slave.nationality = "slave"; - } - if (typeof slave.race !== "string") { - nationalityToRace(slave); - } - if (typeof slave.origRace !== "string") { - slave.origRace = slave.race; - } - if (typeof slave.skin !== "string") { - slave.skin = "light"; - } - if (typeof slave.origSkin !== "string") { - slave.origSkin = slave.skin; - } - if (typeof slave.minorInjury !== "string") { - slave.minorInjury = 0; - } - slave.health = Math.clamp(+slave.health, -100, 100) || 0; - slave.muscles = Math.clamp(+slave.muscles, -100, 100) || 0; - slave.weight = Math.clamp(+slave.weight, -100, 200) || 0; - slave.waist = Math.clamp(+slave.waist, -100, 100) || 0; - slave.height = Math.round(Math.max(+slave.height, 0)) || Math.round(Height.mean(slave)); - slave.shoulders = Math.clamp(+slave.shoulders, -2, 2) || 0; - slave.hips = Math.clamp(+slave.hips, -2, 3) || 0; -}; - -window.slaveFaceDatatypeCleanup = function slaveFaceDatatypeCleanup(slave) { - slave.face = Math.clamp(+slave.face, -100, 100) || 0; - if (typeof slave.faceShape !== "string") { - slave.faceShape = "normal"; - } - slave.eyes = Math.clamp(+slave.eyes, -3, 1) || 1; /* if 0 or undefined, this sets to 1 */ - if (typeof slave.eyeColor !== "string") { - slave.eyeColor = "brown"; - } - if (typeof slave.origEye !== "string") { - slave.origEye = slave.eyeColor; - } - if (typeof slave.pupil !== "string") { - slave.pupil = "circular"; - } - if (typeof slave.sclerae !== "string") { - slave.sclerae = "white"; - } - if (slave.lips !== 0) { - slave.lips = Math.clamp(+slave.lips, 0, 100) || 15; - } -}; - -window.slaveHairDatatypeCleanup = function slaveHairDatatypeCleanup(slave) { - if (typeof slave.hColor !== "string") { - slave.hColor = "brown"; - } - if (typeof slave.origHColor !== "string") { - slave.origHColor = slave.hColor; - } - if (slave.hLength !== 0) { - slave.hLength = Math.clamp(+slave.hLength, 0, 300) || 60; - } - if (typeof slave.hStyle !== "string") { - slave.hStyle = "long"; - } - slave.haircuts = Math.clamp(+slave.haircuts, 0, 1) || 0; - slave.bald = Math.clamp(+slave.bald, 0, 1) || 0; - if (typeof slave.pubicHColor !== "string") { - slave.pubicHColor = slave.hColor; - } - if (typeof slave.pubicHStyle !== "string") { - slave.pubicHStyle = "neat"; - } - if (typeof slave.underArmHColor !== "string") { - slave.underArmHColor = "slave.hColor"; - } - if (typeof slave.underArmHStyle !== "string") { - slave.underArmHStyle = "waxed"; - } - if (typeof slave.eyebrowHColor !== "string") { - slave.eyebrowHColor = "slave.hColor"; - } - if (typeof slave.eyebrowHStyle !== "string") { - slave.eyebrowHStyle = "natural"; - } - if (typeof slave.eyebrowFullness !== "string") { - slave.eyebrowFullness = "natural"; - } -}; - -window.slaveBoobsDatatypeCleanup = function slaveBoobsDatatypeCleanup(slave) { - slave.boobs = Math.max(+slave.boobs, 100) || 200; - if (typeof slave.boobShape !== "string") { - slave.boobShape = "normal"; - } - if (typeof slave.nipples !== "string") { - slave.nipples = "cute"; - } - if (typeof slave.nipplesAccessory !== "string") { - slave.nipplesAccessory = "none"; - } - slave.areolae = Math.clamp(+slave.areolae, 0, 3) || 0; - if (typeof slave.areolaeShape !== "string") { - slave.areolaeShape = "circle"; - } - slave.lactation = Math.clamp(+slave.lactation, 0, 2) || 0; - slave.boobsMilk = Math.max(+slave.boobsMilk, 0) || 0; - slave.lactationAdaptation = Math.clamp(+slave.lactationAdaptation, 0, 100) || 0; -}; - -window.slaveButtDatatypeCleanup = function slaveButtDatatypeCleanup(slave) { - if (slave.butt !== 0) { - slave.butt = Math.clamp(+slave.butt, 0, 20) || 1; - } - slave.anus = Math.clamp(+slave.anus, 0, 4) || 0; - slave.analArea = Math.max(+slave.analArea, 0) || 0; -}; - -window.slavePregnancyDatatypeCleanup = function slavePregnancyDatatypeCleanup(slave) { - slave.induce = Math.clamp(+slave.induce, 0, 1) || 0; - slave.labor = Math.clamp(+slave.labor, 0, 1) || 0; - slave.cSec = Math.clamp(+slave.cSec, 0, 1) || 0; - slave.prematureBirth = Math.clamp(+slave.prematureBirth, 0, 1) || 0; - slave.ovaries = Math.clamp(+slave.ovaries, 0, 1) || 0; - slave.vasectomy = Math.clamp(+slave.vasectomy, 0, 1) || 0; - slave.mpreg = Math.clamp(+slave.mpreg, 0, 1) || 0; - if (slave.pregAdaptation !== 0) { - slave.pregAdaptation = Math.max(+slave.pregAdaptation, 0) || 50; - } - slave.ovaImplant = Math.clamp(+slave.ovaImplant, -1, 2) || 0; - slave.broodmother = Math.clamp(+slave.broodmother, 0, 3) || 0; - slave.broodmotherFetuses = Math.max(+slave.broodmotherFetuses, 0) || 0; - slave.broodmotherOnHold = Math.clamp(+slave.broodmotherOnHold, 0, 1) || 0; - slave.pregSource = +slave.pregSource || 0; - if (typeof slave.pregControl !== "string") { - slave.pregControl = "none"; - } - WombNormalizePreg(slave); -}; - -window.slaveBellyDatatypeCleanup = function slaveBellyDatatypeCleanup(slave) { - slave.inflation = Math.clamp(+slave.inflation, 0, 3) || 0; - if (typeof slave.inflationType !== "string") { - slave.inflationType = "none"; - } - slave.inflationMethod = Math.clamp(+slave.inflationMethod, 0, 3) || 0; - slave.milkSource = Math.max(+slave.milkSource, 0) || 0; - slave.cumSource = Math.max(+slave.cumSource, 0) || 0; - slave.burst = Math.clamp(+slave.burst, 0, 1) || 0; - if (slave.bellyImplant !== 0) { - slave.bellyImplant = Math.max(+slave.bellyImplant, -1) || -1; - } - slave.cervixImplant = Math.clamp(+slave.cervixImplant, 0, 3) || 0; - slave.bellySag = Math.max(+slave.bellySag, 0) || 0; - slave.bellySagPreg = Math.max(+slave.bellySagPreg, 0) || slave.bellySag; - slave.bellyPain = Math.clamp(+slave.bellyPain, 0, 2) || 0; - SetBellySize(slave); -}; - -window.slaveGenitaliaDatatypeCleanup = function slaveGenitaliaDatatypeCleanup(slave) { - slave.vagina = Math.clamp(+slave.vagina, -1, 10) || 0; - slave.vaginaLube = Math.clamp(+slave.vaginaLube, 0, 2) || 0; - slave.labia = Math.clamp(+slave.labia, 0, 3) || 0; - slave.clit = Math.clamp(+slave.clit, 0, 5) || 0; - slave.foreskin = Math.max(+slave.foreskin, 0) || 0; - slave.dick = Math.max(+slave.dick, 0) || 0; - if (slave.dick && slave.prostate !== 0) { - slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 1; - } else { - slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 0; - } - slave.balls = Math.max(+slave.balls, 0) || 0; - if (slave.scrotum !== 0) { - slave.scrotum = Math.max(+slave.scrotum, 0) || slave.balls; - } -}; - -window.slaveImplantsDatatypeCleanup = function slaveImplantsDatatypeCleanup(slave) { - slave.ageImplant = Math.clamp(+slave.ageImplant, 0, 1) || 0; - slave.faceImplant = Math.clamp(+slave.faceImplant, 0, 100) || 0; - slave.lipsImplant = Math.clamp(+slave.lipsImplant, 0, 100) || 0; - slave.voiceImplant = Math.clamp(+slave.voiceImplant, -1, 1) || 0; - slave.boobsImplant = Math.max(+slave.boobsImplant, 0) || 0; - slave.boobsImplantType = Math.clamp(+slave.boobsImplantType, 0, 1) || 0; - slave.breastMesh = Math.clamp(+slave.breastMesh, 0, 1) || 0; - slave.buttImplant = Math.clamp(+slave.buttImplant, 0, 3) || 0; - slave.buttImplantType = Math.clamp(+slave.buttImplantType, 0, 1) || 0; - slave.heightImplant = Math.clamp(+slave.heightImplant, -1, 1) || 0; - slave.earImplant = Math.clamp(+slave.earImplant, 0, 1) || 0; - slave.shouldersImplant = Math.clamp(+slave.shouldersImplant, -1, 1) || 0; - slave.hipsImplant = Math.clamp(+slave.hipsImplant, -1, 1) || 0; -}; - -window.slavePiercingsDatatypeCleanup = function slavePiercingsDatatypeCleanup(slave) { - slave.earPiercing = Math.clamp(+slave.earPiercing, 0, 2) || 0; - slave.nosePiercing = Math.clamp(+slave.nosePiercing, 0, 2) || 0; - slave.eyebrowPiercing = Math.clamp(+slave.eyebrowPiercing, 0, 2) || 0; - slave.lipsPiercing = Math.clamp(+slave.lipsPiercing, 0, 2) || 0; - slave.tonguePiercing = Math.clamp(+slave.tonguePiercing, 0, 2) || 0; - slave.nipplesPiercing = Math.clamp(+slave.nipplesPiercing, 0, 2) || 0; - slave.areolaePiercing = Math.clamp(+slave.areolaePiercing, 0, 2) || 0; - slave.corsetPiercing = Math.clamp(+slave.corsetPiercing, 0, 1) || 0; - slave.navelPiercing = Math.clamp(+slave.navelPiercing, 0, 2) || 0; - slave.clitPiercing = Math.clamp(+slave.clitPiercing, 0, 3) || 0; - slave.vaginaPiercing = Math.clamp(+slave.vaginaPiercing, 0, 2) || 0; - slave.dickPiercing = Math.clamp(+slave.dickPiercing, 0, 2) || 0; - slave.anusPiercing = Math.clamp(+slave.anusPiercing, 0, 2) || 0; -}; - -window.slaveTattooDatatypeCleanup = function slaveTattooDatatypeCleanup(slave) { - if (typeof slave.shouldersTat !== "string") { - slave.shouldersTat = 0; - } - if (typeof slave.lipsTat !== "string") { - slave.lipsTat = 0; - } - if (typeof slave.boobsTat !== "string") { - slave.boobsTat = 0; - } - if (typeof slave.armsTat !== "string") { - slave.armsTat = 0; - } - if (typeof slave.backTat !== "string") { - slave.backTat = 0; - } - if (typeof slave.stampTat !== "string") { - slave.stampTat = 0; - } - if (typeof slave.buttTat !== "string") { - slave.buttTat = 0; - } - if (typeof slave.vaginaTat !== "string") { - slave.vaginaTat = 0; - } - if (typeof slave.dickTat !== "string") { - slave.dickTat = 0; - } - if (typeof slave.anusTat !== "string") { - slave.anusTat = 0; - } - if (typeof slave.legsTat !== "string") { - slave.legsTat = 0; - } - if (typeof slave.bellyTat !== "string") { - slave.bellyTat = 0; - } - if (typeof slave.customTat !== "string") { - slave.customTat = ""; - } -}; - -window.slaveCosmeticsDatatypeCleanup = function slaveCosmeticsDatatypeCleanup(slave) { - slave.makeup = Math.clamp(+slave.makeup, 0, 8) || 0; - slave.nails = Math.clamp(+slave.nails, 0, 9) || 0; - slave.scars = Math.clamp(+slave.scars, 0, 6) || 0; - slave.choosesOwnClothes = Math.clamp(+slave.choosesOwnClothes, 0, 1) || 0; - if (typeof slave.clothes !== "string") { - slave.clothes = "no clothing"; - } - if (typeof slave.collar !== "string") { - slave.collar = "none"; - } - if (typeof slave.shoes !== "string") { - slave.shoes = "none"; - } - if (typeof slave.eyewear !== "string") { - slave.eyewear = "none"; - } - slave.brand = Math.clamp(+slave.brand, 0, 1) || 0; - if (typeof slave.brandLocation !== "string") { - slave.brandLocation = 0; - } - if (typeof slave.markings !== "string") { - slave.markings = "none"; - } - if (typeof slave.bellyAccessory !== "string") { - slave.bellyAccessory = "none"; - } - if (typeof slave.vaginalAccessory !== "string") { - slave.vaginalAccessory = "none"; - } - if (typeof slave.dickAccessory !== "string") { - slave.dickAccessory = "none"; - } - if (typeof slave.legAccessory !== "string") { - slave.legAccessory = "none"; - } - if (typeof slave.buttplug !== "string") { - slave.buttplug = "none"; - } - if (typeof slave.buttplugAttachment !== "string") { - slave.buttplugAttachment = "none"; - } - if (typeof slave.headAccessory !== "string") { - slave.headAccessory = "none"; - } - if (typeof slave.rearAccessory !== "string") { - slave.rearAccessory = "none"; - } - if (typeof slave.backAccessory !== "string") { - slave.backAccessory = "none"; - } -}; - -window.slaveDietDatatypeCleanup = function slaveDietDatatypeCleanup(slave) { - if (typeof slave.diet !== "string") { - slave.diet = "healthy"; - } - slave.dietCum = Math.clamp(+slave.dietCum, 0, 2) || 0; - slave.dietMilk = Math.clamp(+slave.dietMilk, 0, 2) || 0; - slave.onDiet = Math.clamp(+slave.onDiet, 0, 1) || 0; - slave.hormones = Math.clamp(+slave.hormones, -2, 2) || 0; - slave.hormoneBalance = Math.clamp(+slave.hormoneBalance, -400, 400) || 0; - if (typeof slave.drugs !== "string") { - slave.drugs = "no drugs"; - } - slave.aphrodisiacs = Math.clamp(+slave.aphrodisiacs, 0, 2) || 0; - slave.curatives = Math.clamp(+slave.curatives, 0, 2) || 0; -}; - -window.slavePornDatatypeCleanup = function slavePornDatatypeCleanup(slave) { - slave.pornFeed = Math.clamp(+slave.pornFeed, 0, 1) || 0; - slave.pornFame = Math.max(+slave.pornFame, 0) || 0; - slave.pornFameSpending = Math.max(+slave.pornFameSpending, 0) || 0; - slave.pornPrestige = Math.clamp(+slave.pornPrestige, 0, 3) || 0; - if (typeof slave.pornPrestigeDesc !== "string") { - slave.pornPrestigeDesc = 0; - } - if (typeof slave.pornFameType !== "string") { - slave.pornFameType = "none"; - } - if (typeof slave.pornFocus !== "string") { - slave.pornFocus = "none"; - } - slave.pornTypeGeneral = Math.max(+slave.pornTypeGeneral, 0) || 0; - slave.pornTypeFuckdoll = Math.max(+slave.pornTypeFuckdoll, 0) || 0; - slave.pornTypeRape = Math.max(+slave.pornTypeRape, 0) || 0; - slave.pornTypePreggo = Math.max(+slave.pornTypePreggo, 0) || 0; - slave.pornTypeBBW = Math.max(+slave.pornTypeBBW, 0) || 0; - slave.pornTypeGainer = Math.max(+slave.pornTypeGainer, 0) || 0; - slave.pornTypeStud = Math.max(+slave.pornTypeStud, 0) || 0; - slave.pornTypeLoli = Math.max(+slave.pornTypeLoli, 0) || 0; - slave.pornTypeDeepThroat = Math.max(+slave.pornTypeDeepThroat, 0) || 0; - slave.pornTypeStruggleFuck = Math.max(+slave.pornTypeStruggleFuck, 0) || 0; - slave.pornTypePainal = Math.max(+slave.pornTypePainal, 0) || 0; - slave.pornTypeTease = Math.max(+slave.pornTypeTease, 0) || 0; - slave.pornTypeRomantic = Math.max(+slave.pornTypeRomantic, 0) || 0; - slave.pornTypePervert = Math.max(+slave.pornTypePervert, 0) || 0; - slave.pornTypeCaring = Math.max(+slave.pornTypeCaring, 0) || 0; - slave.pornTypeUnflinching = Math.max(+slave.pornTypeUnflinching, 0) || 0; - slave.pornTypeSizeQueen = Math.max(+slave.pornTypeSizeQueen, 0) || 0; - slave.pornTypeNeglectful = Math.max(+slave.pornTypeNeglectful, 0) || 0; - slave.pornTypeCumAddict = Math.max(+slave.pornTypeCumAddict, 0) || 0; - slave.pornTypeAnalAddict = Math.max(+slave.pornTypeAnalAddict, 0) || 0; - slave.pornTypeAttentionWhore = Math.max(+slave.pornTypeAttentionWhore, 0) || 0; - slave.pornTypeBreastGrowth = Math.max(+slave.pornTypeBreastGrowth, 0) || 0; - slave.pornTypeAbusive = Math.max(+slave.pornTypeAbusive, 0) || 0; - slave.pornTypeMalicious = Math.max(+slave.pornTypeMalicious, 0) || 0; - slave.pornTypeSelfHating = Math.max(+slave.pornTypeSelfHating, 0) || 0; - slave.pornTypeBreeder = Math.max(+slave.pornTypeBreeder, 0) || 0; - slave.pornTypeSub = Math.max(+slave.pornTypeSub, 0) || 0; - slave.pornTypeCumSlut = Math.max(+slave.pornTypeCumSlut, 0) || 0; - slave.pornTypeAnal = Math.max(+slave.pornTypeAnal, 0) || 0; - slave.pornTypeHumiliation = Math.max(+slave.pornTypeHumiliation, 0) || 0; - slave.pornTypeBoobs = Math.max(+slave.pornTypeBoobs, 0) || 0; - slave.pornTypeDom = Math.max(+slave.pornTypeDom, 0) || 0; - slave.pornTypeSadist = Math.max(+slave.pornTypeSadist, 0) || 0; - slave.pornTypeMasochist = Math.max(+slave.pornTypeMasochist, 0) || 0; - slave.pornTypePregnancy = Math.max(+slave.pornTypePregnancy, 0) || 0; -}; - -window.slaveRelationDatatypeCleanup = function slaveRelationDatatypeCleanup(slave) { - slave.mother = +slave.mother || 0; - slave.father = +slave.father || 0; - if (State.variables.familyTesting == 0) { - slave.relationTarget = Math.max(+slave.relationTarget, 0) || 0; - } - slave.canRecruit = Math.clamp(+slave.canRecruit, 0, 1) || 0; - slave.relationship = Math.clamp(+slave.relationship, -3, 5) || 0; - slave.relationshipTarget = Math.max(+slave.relationshipTarget, 0) || 0; - slave.rivalryTarget = Math.max(+slave.rivalryTarget, 0) || 0; - slave.rivalry = Math.clamp(+slave.rivalry, 0, 3) || 0; - slave.cloneID = +slave.cloneID || 0; -}; - -window.slaveSkillsDatatypeCleanup = function slaveSkillsDatatypeCleanup(slave) { - slave.oralSkill = Math.clamp(+slave.oralSkill, 0, 100) || 0; - slave.vaginalSkill = Math.clamp(+slave.vaginalSkill, 0, 100) || 0; - slave.analSkill = Math.clamp(+slave.analSkill, 0, 100) || 0; - slave.whoreSkill = Math.clamp(+slave.whoreSkill, 0, 100) || 0; - slave.entertainSkill = Math.clamp(+slave.entertainSkill, 0, 100) || 0; - slave.combatSkill = Math.clamp(+slave.combatSkill, 0, 1) || 0; - slave.skillHG = Math.clamp(+slave.skillHG, 0, 200) || 0; - slave.skillRC = Math.clamp(+slave.skillRC, 0, 200) || 0; - slave.skillBG = Math.clamp(+slave.skillBG, 0, 200) || 0; - slave.skillMD = Math.clamp(+slave.skillMD, 0, 200) || 0; - slave.skillDJ = Math.clamp(+slave.skillDJ, 0, 200) || 0; - slave.skillNU = Math.clamp(+slave.skillNU, 0, 200) || 0; - slave.skillTE = Math.clamp(+slave.skillTE, 0, 200) || 0; - slave.skillAT = Math.clamp(+slave.skillAT, 0, 200) || 0; - slave.skillMT = Math.clamp(+slave.skillMT, 0, 200) || 0; - slave.skillST = Math.clamp(+slave.skillST, 0, 200) || 0; - slave.skillMM = Math.clamp(+slave.skillMM, 0, 200) || 0; - slave.skillFA = Math.clamp(+slave.skillFA, 0, 200) || 0; - slave.skillWA = Math.clamp(+slave.skillWA, 0, 200) || 0; - slave.skillS = Math.clamp(+slave.skillS, 0, 200) || 0; - slave.skillE = Math.clamp(+slave.skillE, 0, 200) || 0; - slave.skillW = Math.clamp(+slave.skillW, 0, 200) || 0; -}; - -window.slaveStatCountDatatypeCleanup = function slaveStatCountDatatypeCleanup(slave) { - slave.oralCount = Math.max(+slave.oralCount, 0) || 0; - slave.vaginalCount = Math.max(+slave.vaginalCount, 0) || 0; - slave.analCount = Math.max(+slave.analCount, 0) || 0; - slave.publicCount = Math.max(+slave.publicCount, 0) || 0; - slave.mammaryCount = Math.max(+slave.mammaryCount, 0) || 0; - slave.penetrativeCount = Math.max(+slave.penetrativeCount, 0) || 0; - slave.pitKills = Math.max(+slave.pitKills, 0) || 0; - slave.milk = Math.max(+slave.milk, 0) || 0; - slave.cum = Math.max(+slave.cum, 0) || 0; - slave.births = Math.max(+slave.births, 0) || 0; - slave.birthsTotal = Math.max(+slave.birthsTotal, 0) || slave.births; - slave.laborCount = Math.max(+slave.laborCount, 0) || slave.birthsTotal; - slave.slavesFathered = Math.max(+slave.slavesFathered, 0) || 0; - slave.PCChildrenFathered = Math.max(+slave.PCChildrenFathered, 0) || 0; - slave.slavesKnockedUp = Math.max(+slave.slavesKnockedUp, 0) || 0; - slave.PCKnockedUp = Math.max(+slave.PCKnockedUp, 0) || 0; - slave.bodySwap = Math.max(+slave.bodySwap, 0) || 0; -}; - -window.slavePreferencesDatatypeCleanup = function slavePreferencesDatatypeCleanup(slave) { - slave.energy = Math.clamp(+slave.energy, 0, 100) || 0; - slave.need = Math.max(+slave.need, 0) || 0; - slave.attrXY = Math.clamp(+slave.attrXY, 0, 100) || 0; - slave.attrXX = Math.clamp(+slave.attrXX, 0, 100) || 0; - slave.attrKnown = Math.clamp(+slave.attrKnown, 0, 1) || 0; - slave.fetishStrength = Math.clamp(+slave.fetishStrength, 0, 100) || 0; - slave.fetishKnown = Math.clamp(+slave.fetishKnown, 0, 1) || 0; -}; - -window.slaveRulesDatatypeCleanup = function slaveRulesDatatypeCleanup(slave) { - if (typeof slave.standardPunishment !== "string") { - slave.standardPunishment = "situational"; - } - if (typeof slave.standardReward !== "string") { - slave.standardReward = "situational"; - } - if (slave.useRulesAssistant !== 0) { - slave.useRulesAssistant = 1; - } - slave.choosesOwnAssignment = Math.clamp(+slave.choosesOwnAssignment, 0) || 0; - slave.HGExclude = Math.clamp(+slave.HGExclude, 0, 1) || 0; - slave.choosesOwnChastity = Math.clamp(+slave.choosesOwnChastity, 0, 1) || 0; - slave.breedingMark = Math.clamp(+slave.breedingMark, 0, 1) || 0; - slave.rudeTitle = Math.clamp(+slave.rudeTitle, 0, 1) || 0; -}; - -window.slaveCustomStatsDatatypeCleanup = function slaveCustomStatsDatatypeCleanup(slave) { - if (typeof slave.customLabel !== "string") { - slave.customLabel = ""; - } - if (typeof slave.customDesc !== "string") { - slave.customDesc = ""; - } - if (typeof slave.customTitle !== "string") { - slave.customTitle = ""; - } - if (typeof slave.customTitleLisp !== "string") { - slave.customTitleLisp = ""; - } - if (typeof slave.customImage !== "string") { - slave.customImage = 0; - } -}; - -window.slaveMiscellaneousDatatypeCleanup = function slaveMiscellaneousDatatypeCleanup(slave) { - slave.weekAcquired = Math.max(+slave.weekAcquired, 0) || 0; - slave.newGamePlus = Math.clamp(+slave.newGamePlus, 0, 1) || 0; - slave.prestige = Math.clamp(+slave.prestige, 0, 3) || 0; - slave.devotion = Math.clamp(+slave.devotion, -100, 100) || 0; - slave.oldDevotion = Math.clamp(+slave.oldDevotion, -100, 100) || 0; - slave.trust = Math.clamp(+slave.trust, -100, 100) || 0; - slave.oldTrust = Math.clamp(+slave.oldTrust, -100, 100) || 0; - slave.fuckdoll = Math.clamp(+slave.fuckdoll, 0, 100) || 0; - slave.chem = Math.max(+slave.chem, 0) || 0; - slave.addict = Math.max(+slave.addict, 0) || 0; - slave.intelligence = Math.clamp(+slave.intelligence, -100, 100) || 0; - slave.intelligenceImplant = Math.clamp(+slave.intelligenceImplant, 0, 30) || 0; - slave.premature = Math.clamp(+slave.premature, 0, 1) || 0; - slave.tankBaby = Math.clamp(+slave.tankBaby, 0, 2) || 0; - slave.subTarget = Math.max(+slave.subTarget, 0) || 0; - slave.sentence = Math.max(+slave.sentence, 0) || 0; - slave.training = Math.clamp(+slave.training, 0, 150) || 0; - if (slave.indenture !== 0) { - slave.indenture = Math.max(+slave.indenture, -1) || -1; - } - slave.indentureRestrictions = Math.clamp(+slave.indentureRestriction, 0, 2) || 0; - slave.tired = Math.clamp(+slave.tired, 0, 1) || 0; - slave.hears = Math.clamp(+slave.hears, -2, 0) || 0; - if (typeof slave.earwear !== "string") { - slave.earwear = "none"; - } - slave.heels = Math.clamp(+slave.heels, 0, 1) || 0; - slave.amp = Math.clamp(+slave.amp, -5, 1) || 0; - slave.PLimb = Math.clamp(+slave.PLimb, 0, 1) || 0; - if (slave.voice !== 0) { - slave.voice = Math.clamp(+slave.voice, 0, 3) || 1; - } - slave.electrolarynx = Math.clamp(+slave.electrolarynx, 0, 1) || 0; - slave.accent = Math.clamp(+slave.accent, 0, 3) || 0; - slave.missingEyes = Math.clamp(+slave.missingEyes, 0, 3) || 0; - slave.missingArms = Math.clamp(+slave.missingArms, 0, 3) || 0; - slave.missingLegs = Math.clamp(+slave.missingLegs, 0, 3) || 0; - if (typeof slave.ballType !== "string") { - slave.ballType = "human"; - } - if (typeof slave.eggType !== "string") { - slave.eggType = "human"; - } - if (typeof slave.origBodyOwner !== "string") { - slave.origBodyOwner = ""; - } - slave.origBodyOwnerID = Math.max(+slave.origBodyOwnerID, 0) || 0; - if (typeof slave.death !== "string") { - slave.death = ""; - } - if (slave.slaveCost !== 0) { - slave.slaveCost = Math.min(+slave.slaveCost, 1) || 1; - } - slave.lifetimeCashExpenses = Math.max(+slave.lifetimeCashExpenses, 0) || 0; - slave.lifetimeCashIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; - slave.lastWeeksCashIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; - slave.lifetimeRepExpenses = Math.max(+slave.lifetimeCashExpenses, 0) || 0; - slave.lifetimeRepIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; - slave.lastWeeksRepIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; -}; +window.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() { + "use strict"; + let V; + return SlaveDatatypeCleanup; + + function SlaveDatatypeCleanup(slave) { + V = State.variables; + slaveAgeDatatypeCleanup(slave); + slavePhysicalDatatypeCleanup(slave); + slaveFaceDatatypeCleanup(slave); + slaveHairDatatypeCleanup(slave); + slaveBoobsDatatypeCleanup(slave); + slaveButtDatatypeCleanup(slave); + slavePregnancyDatatypeCleanup(slave); + slaveBellyDatatypeCleanup(slave); + slaveGenitaliaDatatypeCleanup(slave); + slaveImplantsDatatypeCleanup(slave); + slavePiercingsDatatypeCleanup(slave); + slaveTattooDatatypeCleanup(slave); + slaveCosmeticsDatatypeCleanup(slave); + slaveDietDatatypeCleanup(slave); + slavePornDatatypeCleanup(slave); + slaveRelationDatatypeCleanup(slave); + slaveSkillsDatatypeCleanup(slave); + slaveStatCountDatatypeCleanup(slave); + slavePreferencesDatatypeCleanup(slave); + slaveRulesDatatypeCleanup(slave); + slaveCustomStatsDatatypeCleanup(slave); + slaveMiscellaneousDatatypeCleanup(slave); + generatePronouns(slave); + } + + function slaveAgeDatatypeCleanup(slave) { + slave.birthWeek = Math.clamp(+slave.birthWeek, 0, 51) || 0; + if (slave.age > 0) { + slave.actualAge = Math.clamp(+slave.actualAge, V.minimumSlaveAge, Infinity) || slave.age; /* if undefined, this sets to slave.age */ + } else { + slave.actualAge = Math.clamp(+slave.actualAge, V.minimumSlaveAge, Infinity) || 18; + slave.age = slave.actualAge; + } + slave.visualAge = Math.max(+slave.visualAge, 0) || slave.actualAge; + slave.physicalAge = Math.max(+slave.physicalAge, 0) || slave.actualAge; + slave.ovaryAge = Math.max(+slave.ovaryAge, 0) || slave.physicalAge; + slave.pubertyAgeXX = Math.max(+slave.pubertyAgeXX, 0) || V.fertilityAge; + slave.pubertyAgeXY = Math.max(+slave.pubertyAgeXY, 0) || V.potencyAge; + slave.ageAdjust = Math.clamp(+slave.ageAdjust, -40, 40) || 0; + slave.NCSyouthening = Math.max(+slave.NCSyouthening, 0) || 0; + } + + function slavePhysicalDatatypeCleanup(slave) { + if (typeof slave.nationality !== "string") { + slave.nationality = "slave"; + } + if (typeof slave.race !== "string") { + nationalityToRace(slave); + } + if (typeof slave.origRace !== "string") { + slave.origRace = slave.race; + } + if (typeof slave.skin !== "string") { + slave.skin = "light"; + } + if (typeof slave.origSkin !== "string") { + slave.origSkin = slave.skin; + } + if (typeof slave.minorInjury !== "string") { + slave.minorInjury = 0; + } + slave.health = Math.clamp(+slave.health, -100, 100) || 0; + slave.muscles = Math.clamp(+slave.muscles, -100, 100) || 0; + slave.weight = Math.clamp(+slave.weight, -100, 200) || 0; + slave.waist = Math.clamp(+slave.waist, -100, 100) || 0; + slave.height = Math.round(Math.max(+slave.height, 0)) || Math.round(Height.mean(slave)); + slave.shoulders = Math.clamp(+slave.shoulders, -2, 2) || 0; + slave.hips = Math.clamp(+slave.hips, -2, 3) || 0; + } + + function slaveFaceDatatypeCleanup(slave) { + slave.face = Math.clamp(+slave.face, -100, 100) || 0; + if (typeof slave.faceShape !== "string") { + slave.faceShape = "normal"; + } + slave.eyes = Math.clamp(+slave.eyes, -3, 1) || 1; /* if 0 or undefined, this sets to 1 */ + if (typeof slave.eyeColor !== "string") { + slave.eyeColor = "brown"; + } + if (typeof slave.origEye !== "string") { + slave.origEye = slave.eyeColor; + } + if (typeof slave.pupil !== "string") { + slave.pupil = "circular"; + } + if (typeof slave.sclerae !== "string") { + slave.sclerae = "white"; + } + if (slave.lips !== 0) { + slave.lips = Math.clamp(+slave.lips, 0, 100) || 15; + } + } + + function slaveHairDatatypeCleanup(slave) { + if (typeof slave.hColor !== "string") { + slave.hColor = "brown"; + } + if (typeof slave.origHColor !== "string") { + slave.origHColor = slave.hColor; + } + if (slave.hLength !== 0) { + slave.hLength = Math.clamp(+slave.hLength, 0, 300) || 60; + } + if (typeof slave.hStyle !== "string") { + slave.hStyle = "long"; + } + slave.haircuts = Math.clamp(+slave.haircuts, 0, 1) || 0; + slave.bald = Math.clamp(+slave.bald, 0, 1) || 0; + if (typeof slave.pubicHColor !== "string") { + slave.pubicHColor = slave.hColor; + } + if (typeof slave.pubicHStyle !== "string") { + slave.pubicHStyle = "neat"; + } + if (typeof slave.underArmHColor !== "string") { + slave.underArmHColor = "slave.hColor"; + } + if (typeof slave.underArmHStyle !== "string") { + slave.underArmHStyle = "waxed"; + } + if (typeof slave.eyebrowHColor !== "string") { + slave.eyebrowHColor = "slave.hColor"; + } + if (typeof slave.eyebrowHStyle !== "string") { + slave.eyebrowHStyle = "natural"; + } + if (typeof slave.eyebrowFullness !== "string") { + slave.eyebrowFullness = "natural"; + } + } + + function slaveBoobsDatatypeCleanup(slave) { + slave.boobs = Math.max(+slave.boobs, 100) || 200; + if (typeof slave.boobShape !== "string") { + slave.boobShape = "normal"; + } + if (typeof slave.nipples !== "string") { + slave.nipples = "cute"; + } + if (typeof slave.nipplesAccessory !== "string") { + slave.nipplesAccessory = "none"; + } + slave.areolae = Math.clamp(+slave.areolae, 0, 3) || 0; + if (typeof slave.areolaeShape !== "string") { + slave.areolaeShape = "circle"; + } + slave.lactation = Math.clamp(+slave.lactation, 0, 2) || 0; + slave.boobsMilk = Math.max(+slave.boobsMilk, 0) || 0; + slave.lactationAdaptation = Math.clamp(+slave.lactationAdaptation, 0, 100) || 0; + } + + function slaveButtDatatypeCleanup(slave) { + if (slave.butt !== 0) { + slave.butt = Math.clamp(+slave.butt, 0, 20) || 1; + } + slave.anus = Math.clamp(+slave.anus, 0, 4) || 0; + slave.analArea = Math.max(+slave.analArea, 0) || 0; + } + + function slavePregnancyDatatypeCleanup(slave) { + slave.induce = Math.clamp(+slave.induce, 0, 1) || 0; + slave.labor = Math.clamp(+slave.labor, 0, 1) || 0; + slave.cSec = Math.clamp(+slave.cSec, 0, 1) || 0; + slave.prematureBirth = Math.clamp(+slave.prematureBirth, 0, 1) || 0; + slave.ovaries = Math.clamp(+slave.ovaries, 0, 1) || 0; + slave.vasectomy = Math.clamp(+slave.vasectomy, 0, 1) || 0; + slave.mpreg = Math.clamp(+slave.mpreg, 0, 1) || 0; + if (slave.pregAdaptation !== 0) { + slave.pregAdaptation = Math.max(+slave.pregAdaptation, 0) || 50; + } + slave.ovaImplant = Math.clamp(+slave.ovaImplant, -1, 2) || 0; + slave.broodmother = Math.clamp(+slave.broodmother, 0, 3) || 0; + slave.broodmotherFetuses = Math.max(+slave.broodmotherFetuses, 0) || 0; + slave.broodmotherOnHold = Math.clamp(+slave.broodmotherOnHold, 0, 1) || 0; + slave.pregSource = +slave.pregSource || 0; + if (typeof slave.pregControl !== "string") { + slave.pregControl = "none"; + } + WombNormalizePreg(slave); + } + + function slaveBellyDatatypeCleanup(slave) { + slave.inflation = Math.clamp(+slave.inflation, 0, 3) || 0; + if (typeof slave.inflationType !== "string") { + slave.inflationType = "none"; + } + slave.inflationMethod = Math.clamp(+slave.inflationMethod, 0, 3) || 0; + slave.milkSource = Math.max(+slave.milkSource, 0) || 0; + slave.cumSource = Math.max(+slave.cumSource, 0) || 0; + slave.burst = Math.clamp(+slave.burst, 0, 1) || 0; + if (slave.bellyImplant !== 0) { + slave.bellyImplant = Math.max(+slave.bellyImplant, -1) || -1; + } + slave.cervixImplant = Math.clamp(+slave.cervixImplant, 0, 3) || 0; + slave.bellySag = Math.max(+slave.bellySag, 0) || 0; + slave.bellySagPreg = Math.max(+slave.bellySagPreg, 0) || slave.bellySag; + slave.bellyPain = Math.clamp(+slave.bellyPain, 0, 2) || 0; + SetBellySize(slave); + } + + function slaveGenitaliaDatatypeCleanup(slave) { + slave.vagina = Math.clamp(+slave.vagina, -1, 10) || 0; + slave.vaginaLube = Math.clamp(+slave.vaginaLube, 0, 2) || 0; + slave.labia = Math.clamp(+slave.labia, 0, 3) || 0; + slave.clit = Math.clamp(+slave.clit, 0, 5) || 0; + slave.foreskin = Math.max(+slave.foreskin, 0) || 0; + slave.dick = Math.max(+slave.dick, 0) || 0; + if (slave.dick && slave.prostate !== 0) { + slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 1; + } else { + slave.prostate = Math.clamp(+slave.prostate, 0, 3) || 0; + } + slave.balls = Math.max(+slave.balls, 0) || 0; + if (slave.scrotum !== 0) { + slave.scrotum = Math.max(+slave.scrotum, 0) || slave.balls; + } + } + + function slaveImplantsDatatypeCleanup(slave) { + slave.ageImplant = Math.clamp(+slave.ageImplant, 0, 1) || 0; + slave.faceImplant = Math.clamp(+slave.faceImplant, 0, 100) || 0; + slave.lipsImplant = Math.clamp(+slave.lipsImplant, 0, 100) || 0; + slave.voiceImplant = Math.clamp(+slave.voiceImplant, -1, 1) || 0; + slave.boobsImplant = Math.max(+slave.boobsImplant, 0) || 0; + slave.boobsImplantType = Math.clamp(+slave.boobsImplantType, 0, 1) || 0; + slave.breastMesh = Math.clamp(+slave.breastMesh, 0, 1) || 0; + slave.buttImplant = Math.clamp(+slave.buttImplant, 0, 3) || 0; + slave.buttImplantType = Math.clamp(+slave.buttImplantType, 0, 1) || 0; + slave.heightImplant = Math.clamp(+slave.heightImplant, -1, 1) || 0; + slave.earImplant = Math.clamp(+slave.earImplant, 0, 1) || 0; + slave.shouldersImplant = Math.clamp(+slave.shouldersImplant, -1, 1) || 0; + slave.hipsImplant = Math.clamp(+slave.hipsImplant, -1, 1) || 0; + } + + function slavePiercingsDatatypeCleanup(slave) { + slave.earPiercing = Math.clamp(+slave.earPiercing, 0, 2) || 0; + slave.nosePiercing = Math.clamp(+slave.nosePiercing, 0, 2) || 0; + slave.eyebrowPiercing = Math.clamp(+slave.eyebrowPiercing, 0, 2) || 0; + slave.lipsPiercing = Math.clamp(+slave.lipsPiercing, 0, 2) || 0; + slave.tonguePiercing = Math.clamp(+slave.tonguePiercing, 0, 2) || 0; + slave.nipplesPiercing = Math.clamp(+slave.nipplesPiercing, 0, 2) || 0; + slave.areolaePiercing = Math.clamp(+slave.areolaePiercing, 0, 2) || 0; + slave.corsetPiercing = Math.clamp(+slave.corsetPiercing, 0, 1) || 0; + slave.navelPiercing = Math.clamp(+slave.navelPiercing, 0, 2) || 0; + slave.clitPiercing = Math.clamp(+slave.clitPiercing, 0, 3) || 0; + slave.vaginaPiercing = Math.clamp(+slave.vaginaPiercing, 0, 2) || 0; + slave.dickPiercing = Math.clamp(+slave.dickPiercing, 0, 2) || 0; + slave.anusPiercing = Math.clamp(+slave.anusPiercing, 0, 2) || 0; + } + + function slaveTattooDatatypeCleanup(slave) { + if (typeof slave.shouldersTat !== "string") { + slave.shouldersTat = 0; + } + if (typeof slave.lipsTat !== "string") { + slave.lipsTat = 0; + } + if (typeof slave.boobsTat !== "string") { + slave.boobsTat = 0; + } + if (typeof slave.armsTat !== "string") { + slave.armsTat = 0; + } + if (typeof slave.backTat !== "string") { + slave.backTat = 0; + } + if (typeof slave.stampTat !== "string") { + slave.stampTat = 0; + } + if (typeof slave.buttTat !== "string") { + slave.buttTat = 0; + } + if (typeof slave.vaginaTat !== "string") { + slave.vaginaTat = 0; + } + if (typeof slave.dickTat !== "string") { + slave.dickTat = 0; + } + if (typeof slave.anusTat !== "string") { + slave.anusTat = 0; + } + if (typeof slave.legsTat !== "string") { + slave.legsTat = 0; + } + if (typeof slave.bellyTat !== "string") { + slave.bellyTat = 0; + } + if (typeof slave.customTat !== "string") { + slave.customTat = ""; + } + } + + function slaveCosmeticsDatatypeCleanup(slave) { + slave.makeup = Math.clamp(+slave.makeup, 0, 8) || 0; + slave.nails = Math.clamp(+slave.nails, 0, 9) || 0; + slave.scars = Math.clamp(+slave.scars, 0, 6) || 0; + slave.choosesOwnClothes = Math.clamp(+slave.choosesOwnClothes, 0, 1) || 0; + if (typeof slave.clothes !== "string") { + slave.clothes = "no clothing"; + } + if (typeof slave.collar !== "string") { + slave.collar = "none"; + } + if (typeof slave.shoes !== "string") { + slave.shoes = "none"; + } + if (typeof slave.eyewear !== "string") { + slave.eyewear = "none"; + } + slave.brand = Math.clamp(+slave.brand, 0, 1) || 0; + if (typeof slave.brandLocation !== "string") { + slave.brandLocation = 0; + } + if (typeof slave.markings !== "string") { + slave.markings = "none"; + } + if (typeof slave.bellyAccessory !== "string") { + slave.bellyAccessory = "none"; + } + if (typeof slave.vaginalAccessory !== "string") { + slave.vaginalAccessory = "none"; + } + if (typeof slave.dickAccessory !== "string") { + slave.dickAccessory = "none"; + } + if (typeof slave.legAccessory !== "string") { + slave.legAccessory = "none"; + } + if (typeof slave.buttplug !== "string") { + slave.buttplug = "none"; + } + if (typeof slave.buttplugAttachment !== "string") { + slave.buttplugAttachment = "none"; + } + if (typeof slave.headAccessory !== "string") { + slave.headAccessory = "none"; + } + if (typeof slave.rearAccessory !== "string") { + slave.rearAccessory = "none"; + } + if (typeof slave.backAccessory !== "string") { + slave.backAccessory = "none"; + } + } + + function slaveDietDatatypeCleanup(slave) { + if (typeof slave.diet !== "string") { + slave.diet = "healthy"; + } + slave.dietCum = Math.clamp(+slave.dietCum, 0, 2) || 0; + slave.dietMilk = Math.clamp(+slave.dietMilk, 0, 2) || 0; + slave.onDiet = Math.clamp(+slave.onDiet, 0, 1) || 0; + slave.hormones = Math.clamp(+slave.hormones, -2, 2) || 0; + slave.hormoneBalance = Math.clamp(+slave.hormoneBalance, -400, 400) || 0; + if (typeof slave.drugs !== "string") { + slave.drugs = "no drugs"; + } + slave.aphrodisiacs = Math.clamp(+slave.aphrodisiacs, 0, 2) || 0; + slave.curatives = Math.clamp(+slave.curatives, 0, 2) || 0; + } + + function slavePornDatatypeCleanup(slave) { + slave.pornFeed = Math.clamp(+slave.pornFeed, 0, 1) || 0; + slave.pornFame = Math.max(+slave.pornFame, 0) || 0; + slave.pornFameSpending = Math.max(+slave.pornFameSpending, 0) || 0; + slave.pornPrestige = Math.clamp(+slave.pornPrestige, 0, 3) || 0; + if (typeof slave.pornPrestigeDesc !== "string") { + slave.pornPrestigeDesc = 0; + } + if (typeof slave.pornFameType !== "string") { + slave.pornFameType = "none"; + } + if (typeof slave.pornFocus !== "string") { + slave.pornFocus = "none"; + } + slave.pornTypeGeneral = Math.max(+slave.pornTypeGeneral, 0) || 0; + slave.pornTypeFuckdoll = Math.max(+slave.pornTypeFuckdoll, 0) || 0; + slave.pornTypeRape = Math.max(+slave.pornTypeRape, 0) || 0; + slave.pornTypePreggo = Math.max(+slave.pornTypePreggo, 0) || 0; + slave.pornTypeBBW = Math.max(+slave.pornTypeBBW, 0) || 0; + slave.pornTypeGainer = Math.max(+slave.pornTypeGainer, 0) || 0; + slave.pornTypeStud = Math.max(+slave.pornTypeStud, 0) || 0; + slave.pornTypeLoli = Math.max(+slave.pornTypeLoli, 0) || 0; + slave.pornTypeDeepThroat = Math.max(+slave.pornTypeDeepThroat, 0) || 0; + slave.pornTypeStruggleFuck = Math.max(+slave.pornTypeStruggleFuck, 0) || 0; + slave.pornTypePainal = Math.max(+slave.pornTypePainal, 0) || 0; + slave.pornTypeTease = Math.max(+slave.pornTypeTease, 0) || 0; + slave.pornTypeRomantic = Math.max(+slave.pornTypeRomantic, 0) || 0; + slave.pornTypePervert = Math.max(+slave.pornTypePervert, 0) || 0; + slave.pornTypeCaring = Math.max(+slave.pornTypeCaring, 0) || 0; + slave.pornTypeUnflinching = Math.max(+slave.pornTypeUnflinching, 0) || 0; + slave.pornTypeSizeQueen = Math.max(+slave.pornTypeSizeQueen, 0) || 0; + slave.pornTypeNeglectful = Math.max(+slave.pornTypeNeglectful, 0) || 0; + slave.pornTypeCumAddict = Math.max(+slave.pornTypeCumAddict, 0) || 0; + slave.pornTypeAnalAddict = Math.max(+slave.pornTypeAnalAddict, 0) || 0; + slave.pornTypeAttentionWhore = Math.max(+slave.pornTypeAttentionWhore, 0) || 0; + slave.pornTypeBreastGrowth = Math.max(+slave.pornTypeBreastGrowth, 0) || 0; + slave.pornTypeAbusive = Math.max(+slave.pornTypeAbusive, 0) || 0; + slave.pornTypeMalicious = Math.max(+slave.pornTypeMalicious, 0) || 0; + slave.pornTypeSelfHating = Math.max(+slave.pornTypeSelfHating, 0) || 0; + slave.pornTypeBreeder = Math.max(+slave.pornTypeBreeder, 0) || 0; + slave.pornTypeSub = Math.max(+slave.pornTypeSub, 0) || 0; + slave.pornTypeCumSlut = Math.max(+slave.pornTypeCumSlut, 0) || 0; + slave.pornTypeAnal = Math.max(+slave.pornTypeAnal, 0) || 0; + slave.pornTypeHumiliation = Math.max(+slave.pornTypeHumiliation, 0) || 0; + slave.pornTypeBoobs = Math.max(+slave.pornTypeBoobs, 0) || 0; + slave.pornTypeDom = Math.max(+slave.pornTypeDom, 0) || 0; + slave.pornTypeSadist = Math.max(+slave.pornTypeSadist, 0) || 0; + slave.pornTypeMasochist = Math.max(+slave.pornTypeMasochist, 0) || 0; + slave.pornTypePregnancy = Math.max(+slave.pornTypePregnancy, 0) || 0; + } + + function slaveRelationDatatypeCleanup(slave) { + slave.mother = +slave.mother || 0; + slave.father = +slave.father || 0; + if (V.familyTesting == 0) { + slave.relationTarget = Math.max(+slave.relationTarget, 0) || 0; + } + slave.canRecruit = Math.clamp(+slave.canRecruit, 0, 1) || 0; + slave.relationship = Math.clamp(+slave.relationship, -3, 5) || 0; + slave.relationshipTarget = Math.max(+slave.relationshipTarget, 0) || 0; + slave.rivalryTarget = Math.max(+slave.rivalryTarget, 0) || 0; + slave.rivalry = Math.clamp(+slave.rivalry, 0, 3) || 0; + slave.cloneID = +slave.cloneID || 0; + } + + function slaveSkillsDatatypeCleanup(slave) { + slave.oralSkill = Math.clamp(+slave.oralSkill, 0, 100) || 0; + slave.vaginalSkill = Math.clamp(+slave.vaginalSkill, 0, 100) || 0; + slave.analSkill = Math.clamp(+slave.analSkill, 0, 100) || 0; + slave.whoreSkill = Math.clamp(+slave.whoreSkill, 0, 100) || 0; + slave.entertainSkill = Math.clamp(+slave.entertainSkill, 0, 100) || 0; + slave.combatSkill = Math.clamp(+slave.combatSkill, 0, 1) || 0; + slave.skillHG = Math.clamp(+slave.skillHG, 0, 200) || 0; + slave.skillRC = Math.clamp(+slave.skillRC, 0, 200) || 0; + slave.skillBG = Math.clamp(+slave.skillBG, 0, 200) || 0; + slave.skillMD = Math.clamp(+slave.skillMD, 0, 200) || 0; + slave.skillDJ = Math.clamp(+slave.skillDJ, 0, 200) || 0; + slave.skillNU = Math.clamp(+slave.skillNU, 0, 200) || 0; + slave.skillTE = Math.clamp(+slave.skillTE, 0, 200) || 0; + slave.skillAT = Math.clamp(+slave.skillAT, 0, 200) || 0; + slave.skillMT = Math.clamp(+slave.skillMT, 0, 200) || 0; + slave.skillST = Math.clamp(+slave.skillST, 0, 200) || 0; + slave.skillMM = Math.clamp(+slave.skillMM, 0, 200) || 0; + slave.skillFA = Math.clamp(+slave.skillFA, 0, 200) || 0; + slave.skillWA = Math.clamp(+slave.skillWA, 0, 200) || 0; + slave.skillS = Math.clamp(+slave.skillS, 0, 200) || 0; + slave.skillE = Math.clamp(+slave.skillE, 0, 200) || 0; + slave.skillW = Math.clamp(+slave.skillW, 0, 200) || 0; + } + + function slaveStatCountDatatypeCleanup(slave) { + slave.oralCount = Math.max(+slave.oralCount, 0) || 0; + slave.vaginalCount = Math.max(+slave.vaginalCount, 0) || 0; + slave.analCount = Math.max(+slave.analCount, 0) || 0; + slave.publicCount = Math.max(+slave.publicCount, 0) || 0; + slave.mammaryCount = Math.max(+slave.mammaryCount, 0) || 0; + slave.penetrativeCount = Math.max(+slave.penetrativeCount, 0) || 0; + slave.pitKills = Math.max(+slave.pitKills, 0) || 0; + slave.milk = Math.max(+slave.milk, 0) || 0; + slave.cum = Math.max(+slave.cum, 0) || 0; + slave.births = Math.max(+slave.births, 0) || 0; + slave.birthsTotal = Math.max(+slave.birthsTotal, 0) || slave.births; + slave.laborCount = Math.max(+slave.laborCount, 0) || slave.birthsTotal; + slave.slavesFathered = Math.max(+slave.slavesFathered, 0) || 0; + slave.PCChildrenFathered = Math.max(+slave.PCChildrenFathered, 0) || 0; + slave.slavesKnockedUp = Math.max(+slave.slavesKnockedUp, 0) || 0; + slave.PCKnockedUp = Math.max(+slave.PCKnockedUp, 0) || 0; + slave.bodySwap = Math.max(+slave.bodySwap, 0) || 0; + } + + function slavePreferencesDatatypeCleanup(slave) { + slave.energy = Math.clamp(+slave.energy, 0, 100) || 0; + slave.need = Math.max(+slave.need, 0) || 0; + slave.attrXY = Math.clamp(+slave.attrXY, 0, 100) || 0; + slave.attrXX = Math.clamp(+slave.attrXX, 0, 100) || 0; + slave.attrKnown = Math.clamp(+slave.attrKnown, 0, 1) || 0; + slave.fetishStrength = Math.clamp(+slave.fetishStrength, 0, 100) || 0; + slave.fetishKnown = Math.clamp(+slave.fetishKnown, 0, 1) || 0; + } + + function slaveRulesDatatypeCleanup(slave) { + if (typeof slave.standardPunishment !== "string") { + slave.standardPunishment = "situational"; + } + if (typeof slave.standardReward !== "string") { + slave.standardReward = "situational"; + } + if (slave.useRulesAssistant !== 0) { + slave.useRulesAssistant = 1; + } + slave.choosesOwnAssignment = Math.clamp(+slave.choosesOwnAssignment, 0) || 0; + slave.HGExclude = Math.clamp(+slave.HGExclude, 0, 1) || 0; + slave.choosesOwnChastity = Math.clamp(+slave.choosesOwnChastity, 0, 1) || 0; + slave.breedingMark = Math.clamp(+slave.breedingMark, 0, 1) || 0; + slave.rudeTitle = Math.clamp(+slave.rudeTitle, 0, 1) || 0; + } + + function slaveCustomStatsDatatypeCleanup(slave) { + if (typeof slave.customLabel !== "string") { + slave.customLabel = ""; + } + if (typeof slave.customDesc !== "string") { + slave.customDesc = ""; + } + if (typeof slave.customTitle !== "string") { + slave.customTitle = ""; + } + if (typeof slave.customTitleLisp !== "string") { + slave.customTitleLisp = ""; + } + if (typeof slave.customImage !== "string") { + slave.customImage = 0; + } + } + + function slaveMiscellaneousDatatypeCleanup(slave) { + slave.weekAcquired = Math.max(+slave.weekAcquired, 0) || 0; + slave.newGamePlus = Math.clamp(+slave.newGamePlus, 0, 1) || 0; + slave.prestige = Math.clamp(+slave.prestige, 0, 3) || 0; + slave.devotion = Math.clamp(+slave.devotion, -100, 100) || 0; + slave.oldDevotion = Math.clamp(+slave.oldDevotion, -100, 100) || 0; + slave.trust = Math.clamp(+slave.trust, -100, 100) || 0; + slave.oldTrust = Math.clamp(+slave.oldTrust, -100, 100) || 0; + slave.fuckdoll = Math.clamp(+slave.fuckdoll, 0, 100) || 0; + slave.chem = Math.max(+slave.chem, 0) || 0; + slave.addict = Math.max(+slave.addict, 0) || 0; + slave.intelligence = Math.clamp(+slave.intelligence, -100, 100) || 0; + slave.intelligenceImplant = Math.clamp(+slave.intelligenceImplant, 0, 30) || 0; + slave.premature = Math.clamp(+slave.premature, 0, 1) || 0; + slave.tankBaby = Math.clamp(+slave.tankBaby, 0, 2) || 0; + slave.subTarget = Math.max(+slave.subTarget, 0) || 0; + slave.sentence = Math.max(+slave.sentence, 0) || 0; + slave.training = Math.clamp(+slave.training, 0, 150) || 0; + if (slave.indenture !== 0) { + slave.indenture = Math.max(+slave.indenture, -1) || -1; + } + slave.indentureRestrictions = Math.clamp(+slave.indentureRestriction, 0, 2) || 0; + slave.tired = Math.clamp(+slave.tired, 0, 1) || 0; + slave.hears = Math.clamp(+slave.hears, -2, 0) || 0; + if (typeof slave.earwear !== "string") { + slave.earwear = "none"; + } + slave.heels = Math.clamp(+slave.heels, 0, 1) || 0; + slave.amp = Math.clamp(+slave.amp, -5, 1) || 0; + slave.PLimb = Math.clamp(+slave.PLimb, 0, 1) || 0; + if (slave.voice !== 0) { + slave.voice = Math.clamp(+slave.voice, 0, 3) || 1; + } + slave.electrolarynx = Math.clamp(+slave.electrolarynx, 0, 1) || 0; + slave.accent = Math.clamp(+slave.accent, 0, 3) || 0; + slave.missingEyes = Math.clamp(+slave.missingEyes, 0, 3) || 0; + slave.missingArms = Math.clamp(+slave.missingArms, 0, 3) || 0; + slave.missingLegs = Math.clamp(+slave.missingLegs, 0, 3) || 0; + if (typeof slave.ballType !== "string") { + slave.ballType = "human"; + } + if (typeof slave.eggType !== "string") { + slave.eggType = "human"; + } + if (typeof slave.origBodyOwner !== "string") { + slave.origBodyOwner = ""; + } + slave.origBodyOwnerID = Math.max(+slave.origBodyOwnerID, 0) || 0; + if (typeof slave.death !== "string") { + slave.death = ""; + } + if (slave.slaveCost !== 0) { + slave.slaveCost = Math.min(+slave.slaveCost, 1) || 1; + } + slave.lifetimeCashExpenses = Math.min(+slave.lifetimeCashExpenses, 0) || 0; + slave.lifetimeCashIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; + slave.lastWeeksCashIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; + slave.lifetimeRepExpenses = Math.min(+slave.lifetimeCashExpenses, 0) || 0; + slave.lifetimeRepIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; + slave.lastWeeksRepIncome = Math.max(+slave.lifetimeCashIncome, 0) || 0; + } +})(); /* a lot of this may need to be removed */ window.ChildDatatypeCleanup = function ChildDatatypeCleanup(child) { @@ -1328,37 +1333,190 @@ window.ArcologyDatatypeCleanup = function ArcologyDatatypeCleanup() { V.TFS.schoolProsperity = Math.clamp(+V.TFS.schoolProsperity, -10, 10) || 0; }; -window.FacilityNameCleanup = function FacilityNameCleanup() { - const V = State.variables; - V.arcologies[0].name = V.arcologies[0].name || "Arcology X-4"; - V.brothelName = V.brothelName || "the Brothel"; - V.brothelNameCaps = V.brothelNameCaps || "The Brothel"; - V.dairyName = V.dairyName || "the Dairy"; - V.dairyNameCaps = V.dairyNameCaps || "The Dairy"; - V.clubName = V.clubName || "the Club"; - V.clubNameCaps = V.clubNameCaps || "The Club"; - V.servantsQuartersName = V.servantsQuartersName || "the Servants' Quarters"; - V.servantsQuartersNameCaps = V.servantsQuartersNameCaps || "The Servants' Quarters"; - V.schoolroomName = V.schoolroomName || "the Schoolroom"; - V.schoolroomNameCaps = V.schoolroomNameCaps || "The Schoolroom"; - V.spaName = V.spaName || "the Spa"; - V.spaNameCaps = V.spaNameCaps || "The Spa"; - V.nurseryName = V.nurseryName || "the Nursery"; - V.nurseryNameCaps = V.nurseryNameCaps || "The Nursery"; - V.clinicName = V.clinicName || "the Clinic"; - V.clinicNameCaps = V.clinicNameCaps || "The Clinic"; - V.arcadeName = V.arcadeName || "the Arcade"; - V.arcadeNameCaps = V.arcadeNameCaps || "The Arcade"; - V.cellblockName = V.cellblockName || "the Cellblock"; - V.cellblockNameCaps = V.cellblockNameCaps || "The Cellblock"; - V.masterSuiteName = V.masterSuiteName || "the Master Suite"; - V.masterSuiteNameCaps = V.masterSuiteNameCaps || "The Master Suite"; - V.HGSuiteName = V.HGSuiteName || "the Head Girl Suite"; - V.HGSuiteNameCaps = V.HGSuiteNameCaps || "The Head Girl Suite"; - V.pitName = V.pitName || "the Pit"; - V.pitNameCaps = V.pitNameCaps || "The Pit"; - V.incubatorName = V.incubatorName || "the Incubator"; - V.incubatorNameCaps = V.incubatorNameCaps || "The Incubator"; - V.farmyardName = V.farmyardName || "the Farmyard"; - V.farmyardNameCaps = V.farmyardNameCaps || "The Farmyard"; -}; +window.FacilityDatatypeCleanup = (function() { + "use strict"; + let V; + return FacilityDatatypeCleanup; + + function FacilityDatatypeCleanup() { + V = State.variables; + /* common variables */ + FacilityIDArrayCleanup(); + FacilityDecorationCleanup(); + FacilityNameCleanup(); + /* facility specific variables */ + BrothelDatatypeCleanup(); + DairyDatatypeCleanup(); + ClubDatatypeCleanup(); + ServantsQuartersDatatypeCleanup(); + SchoolroomDatatypeCleanup(); + } + + function FacilityIDArrayCleanup() { + function helperFunction(facilityIDArray) { + if (!Array.isArray(facilityIDArray)) + facilityIDArray = []; + else if (typeof facilityIDArray[0] === "object") + facilityIDArray = facilityIDArray.map(function(a) { return a.ID; }); + } + helperFunction(V.BrothiIDs); + helperFunction(V.DairyiIDs); + helperFunction(V.ClubiIDs); + helperFunction(V.ServQiIDs); + helperFunction(V.SchlRiIDs); + helperFunction(V.SpaiIDs); + helperFunction(V.CliniciIDs); + helperFunction(V.ArcadeiIDs); + helperFunction(V.CellBiIDs); + helperFunction(V.MastSiIDs); + helperFunction(V.HGSuiteiIDs); + helperFunction(V.NurseryiIDs); + helperFunction(V.FarmyardiIDs); + } + + function FacilityDecorationCleanup() { + if (typeof V.brothelDecoration !== "string") + V.brothelDecoration = "standard"; + if (typeof V.dairyDecoration !== "string") + V.dairyDecoration = "standard"; + if (typeof V.clubDecoration !== "string") + V.clubDecoration = "standard"; + if (typeof V.servantsQuartersDecoration !== "string") + V.servantsQuartersDecoration = "standard"; + if (typeof V.schoolroomDecoration !== "string") + V.schoolroomDecoration = "standard"; + if (typeof V.spaDecoration !== "string") + V.spaDecoration = "standard"; + if (typeof V.clinicDecoration !== "string") + V.clinicDecoration = "standard"; + if (typeof V.arcadeDecoration !== "string") + V.arcadeDecoration = "standard"; + if (typeof V.cellblockDecoration !== "string") + V.cellblockDecoration = "standard"; + if (typeof V.masterSuiteDecoration !== "string") + V.masterSuiteDecoration = "standard"; + if (typeof V.nurseryDecoration !== "string") + V.nurseryDecoration = "standard"; + if (typeof V.farmyardDecoration !== "string") + V.farmyardDecoration = "standard"; + if (typeof V.brothelDecoration !== "string") + V.brothelDecoration = "standard"; + } + + function FacilityNameCleanup() { + V.arcologies[0].name = V.arcologies[0].name || "Arcology X-4"; + V.brothelName = V.brothelName || "the Brothel"; + V.brothelNameCaps = V.brothelNameCaps || "The Brothel"; + V.dairyName = V.dairyName || "the Dairy"; + V.dairyNameCaps = V.dairyNameCaps || "The Dairy"; + V.clubName = V.clubName || "the Club"; + V.clubNameCaps = V.clubNameCaps || "The Club"; + V.servantsQuartersName = V.servantsQuartersName || "the Servants' Quarters"; + V.servantsQuartersNameCaps = V.servantsQuartersNameCaps || "The Servants' Quarters"; + V.schoolroomName = V.schoolroomName || "the Schoolroom"; + V.schoolroomNameCaps = V.schoolroomNameCaps || "The Schoolroom"; + V.spaName = V.spaName || "the Spa"; + V.spaNameCaps = V.spaNameCaps || "The Spa"; + V.nurseryName = V.nurseryName || "the Nursery"; + V.nurseryNameCaps = V.nurseryNameCaps || "The Nursery"; + V.clinicName = V.clinicName || "the Clinic"; + V.clinicNameCaps = V.clinicNameCaps || "The Clinic"; + V.arcadeName = V.arcadeName || "the Arcade"; + V.arcadeNameCaps = V.arcadeNameCaps || "The Arcade"; + V.cellblockName = V.cellblockName || "the Cellblock"; + V.cellblockNameCaps = V.cellblockNameCaps || "The Cellblock"; + V.masterSuiteName = V.masterSuiteName || "the Master Suite"; + V.masterSuiteNameCaps = V.masterSuiteNameCaps || "The Master Suite"; + V.HGSuiteName = V.HGSuiteName || "the Head Girl Suite"; + V.HGSuiteNameCaps = V.HGSuiteNameCaps || "The Head Girl Suite"; + V.pitName = V.pitName || "the Pit"; + V.pitNameCaps = V.pitNameCaps || "The Pit"; + V.incubatorName = V.incubatorName || "the Incubator"; + V.incubatorNameCaps = V.incubatorNameCaps || "The Incubator"; + V.farmyardName = V.farmyardName || "the Farmyard"; + V.farmyardNameCaps = V.farmyardNameCaps || "The Farmyard"; + } + + function BrothelDatatypeCleanup() { + /* ads */ + V.brothelAdsSpending = Math.clamp(+V.brothelAdsSpending, 0, 5000) || 0; + V.brothelAdsStacked = Math.clamp(+V.brothelAdsStacked, -1, 1) || 0; + V.brothelAdsImplanted = Math.clamp(+V.brothelAdsImplanted, -1, 1) || 0; + V.brothelAdsModded = Math.clamp(+V.brothelAdsModded, -1, 1) || 0; + V.brothelAdsPreg = Math.clamp(+V.brothelAdsPreg, -1, 1) || 0; + V.brothelAdsOld = Math.clamp(+V.brothelAdsOld, -3, 1) || 0; + V.brothelAdsXX = Math.clamp(+V.brothelAdsXX, -1, 1) || 0; + /* upgrades */ + V.brothel = Math.max(+V.brothel, 0) || 0; + V.brothelUpgradeDrugs = Math.clamp(+V.brothelUpgradeDrugs, 0, 2) || 0; + /* madam */ + V.Madam = V.slaves.find(function(s) { return s.assignment === "be the Madam"; }) || 0; + V.MadamIgnoresFlaws = Math.clamp(+V.MadamIgnoresFlaws, 0, 1) || 0; + } + + function DairyDatatypeCleanup() { + /* upgrades */ + V.dairy = Math.max(+V.dairy, 0) || 0; + V.dairyFeedersUpgrade = Math.clamp(+V.dairyFeedersUpgrade, 0, 1) || 0; + V.dairyFeedersSetting = Math.clamp(+V.dairyFeedersSetting, 0, 2) || 0; + V.dairyPregUpgrade = Math.clamp(+V.dairyPregUpgrade, 0, 1) || 0; + V.dairyPregSetting = Math.clamp(+V.dairyPregSetting, 0, 3) || 0; + V.dairyStimulatorsUpgrade = Math.clamp(+V.dairyStimulatorsUpgrade, 0, 1) || 0; + V.dairyStimulatorsSetting = Math.clamp(+V.dairyStimulatorsSetting, 0, 2) || 0; + V.dairyRestraintsUpgrade = Math.clamp(+V.dairyRestraintsUpgrade, 0, 1) || 0; + V.dairyRestraintsSetting = Math.clamp(+V.dairyRestraintsSetting, 0, 2) || 0; + V.dairySlimMaintainUpgrade = Math.clamp(+V.dairySlimMaintainUpgrade, 0, 1) || 0; + V.dairySlimMaintain = Math.clamp(+V.dairySlimMaintain, 0, 1) || 0; + V.dairyPrepUpgrade = Math.clamp(+V.dairyPrepUpgrade, 0, 1) || 0; + V.dairyHyperPregRemodel = Math.clamp(+V.dairyHyperPregRemodel, 0, 1) || 0; + V.dairyImplantsSetting = Math.clamp(+V.dairyImplantsSetting, 0, 3) || 0; + V.dairyWeightSetting = Math.clamp(+V.dairyWeightSetting, 0, 4) || 0; + /* bioreactors */ + V.bioreactorsAnnounced = Math.clamp(+V.bioreactorsAnnounced, 0, 1) || 0; + V.createBioreactors = Math.clamp(+V.createBioreactors, 0, 1) || 0; + V.dairyUpgradeMenials = Math.clamp(+V.dairyUpgradeMenials, 0, 1) || 0; + V.bioreactorsHerm = Math.max(+V.bioreactorsHerm, 0) || 0; + V.bioreactorsXX = Math.max(+V.bioreactorsXX, 0) || 0; + V.bioreactorsXY = Math.max(+V.bioreactorsXY, 0) || 0; + V.bioreactorsBarren = Math.max(+V.bioreactorsBarren, 0) || 0; + /* milkmaid */ + V.Milkmaid = V.slaves.find(function(s) { return s.assignment === "be the Milkmaid"; }) || 0; + V.milkmaidImpregnates = Math.clamp(+V.milkmaidImpregnates, 0, 1) || 0; + } + + function ClubDatatypeCleanup() { + /* ads */ + V.clubAdsSpending = Math.clamp(+V.clubAdsSpending, 0, 5000) || 0; + V.clubAdsStacked = Math.clamp(+V.clubAdsStacked, -1, 1) || 0; + V.clubAdsImplanted = Math.clamp(+V.clubAdsImplanted, -1, 1) || 0; + V.clubAdsModded = Math.clamp(+V.clubAdsModded, -1, 1) || 0; + V.clubAdsPreg = Math.clamp(+V.clubAdsPreg, -1, 1) || 0; + V.clubAdsOld = Math.clamp(+V.clubAdsOld, -3, 1) || 0; + V.clubAdsXX = Math.clamp(+V.clubAdsXX, -1, 1) || 0; + /* upgrades */ + V.club = Math.max(+V.club, 0) || 0; + V.clubUpgradePDAs = Math.clamp(+V.clubUpgradePDAs, 0, 1) || 0; + /* madam */ + V.DJ = V.slaves.find(function(s) { return s.assignment === "be the DJ"; }) || 0; + V.DJignoresFlaws = Math.clamp(+V.DJignoresFlaws, 0, 1) || 0; + } + + function ServantsQuartersDatatypeCleanup() { + /* upgrades */ + V.servantsQuarters = Math.max(+V.servantsQuarters, 0) || 0; + V.servantsQuartersUpgradeMonitoring = Math.clamp(+V.servantsQuartersUpgradeMonitoring, 0, 1) || 0; + /* stewardess */ + V.Stewardess = V.slaves.find(function(s) { return s.assignment === "be the Stewardess"; }) || 0; + V.stewardessImpregnates = Math.clamp(+V.stewardessImpregnates, 0, 1) || 0; + } + + function SchoolroomDatatypeCleanup() { + /* upgrades */ + V.schoolroom = Math.max(+V.schoolroom, 0) || 0; + V.schoolroomUpgradeSkills = Math.clamp(+V.schoolroomUpgradeSkills, 0, 1) || 0; + V.schoolroomUpgradeLanguage = Math.clamp(+V.schoolroomUpgradeLanguage, 0, 1) || 0; + V.schoolroomUpgradeRemedial = Math.clamp(+V.schoolroomUpgradeRemedial, 0, 1) || 0; + /* stewardess */ + V.Schoolteacher = V.slaves.find(function(s) { return s.assignment === "be the Schoolteacher"; }) || 0; + } +})(); diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 39c9cd6e1fba47c6220f9519b0c6e6ccf1ef77ad..e02c059bb277b158e4c58bf1ef5ddf72460e3fb6 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1110,8 +1110,14 @@ The third category, the "slave slot" is completely optional. Sometimes you just window.cashX = function(cost, what, who) { const V = State.variables; - if(isNaN(cost)){ - V.lastWeeksErrors += `NaN: "${cost}" at ${what}, + if (typeof cost !== "number") { + V.lastWeeksErrors += `"${cost}" at ${what} is not of type "number", + `; + } else if (Number.isNaN(cost)) { + V.lastWeeksErrors += `"${cost}" at ${what} is NaN, + `; + } else if (cost === -Infinity || cost === Infinity) { + V.lastWeeksErrors += `"${cost}" at ${what} is infinity, `; } else { diff --git a/src/pregmod/manageCorporation.tw b/src/pregmod/manageCorporation.tw index 58ecba5315d0ec03499d8c260be007fcd157926c..61be792df67275f9c5e4df1e825bfd0b6d0dac49 100644 --- a/src/pregmod/manageCorporation.tw +++ b/src/pregmod/manageCorporation.tw @@ -28,24 +28,26 @@ __Incorporation__ <br>A focus on offering menial services. <<print cashFormat(300000)>> [[Menial Services|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(300000), "stocksTraded"), $corpDiv = 1, $corpDivMenial = 1, $corpDivMenialDev = 20, $corpDivMenialSlaves = 20, $corpDivMenialFromMarket = 1, $corpCash = 20000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 300000, $corpAssetsSlave = 0, $corpAssetsDevOld = 130000, $corpAssetsDev = 0]] <<if $cash > 340000>> <br>A focus on whoring out slaves. <<print cashFormat(340000)>> [[Escort Service|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(340000), "stocksTraded"), $corpDiv = 1, $corpDivWhore = 1, $corpDivWhoreDev = 10, $corpDivWhoreSlaves = 10, $corpDivWhoreFromMarket = 1, $corpCash = 50000, $personalShares = 2000, $publicShares = 1000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 260000, $corpAssetsSlave = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] + <<else>> + You lack the funds for the final option. You need @@.yellowgreen;<<print cashFormat(340000)>>@@ for it. <</if>> <<else>> - You lack the funds for the final option. + You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(300000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ <</if>> <<else>> - You lack the funds for some options. + You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(270000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ <</if>> <<else>> - You lack the funds for some options. + You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(250000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ <</if>> <<else>> - You lack the funds for many options. + You lack the funds for many options. You need at least @@.yellowgreen;<<print cashFormat(210000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ <</if>> <<else>> - You lack the funds for most options. + You lack the funds for most options. You need at least @@.yellowgreen;<<print cashFormat(200000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ <</if>> <<else>> - You lack the funds to found a slave corporation. + You lack the funds to found a slave corporation. You need at least @@.yellowgreen;<<print cashFormat(150000)>>@@ and at most @@.yellowgreen;<<print cashFormat(340000)>>.@@ <</if>> <br>[[8-7 Share Split|Manage Corporation][$vanillaShareSplit = 0]] <<else>> /*8/7 split on the shares instead of 2/1*/ @@ -66,24 +68,26 @@ __Incorporation__ <br>A focus on offering menial services. <<print cashFormat(240000)>> [[Menial Services|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(240000), "stocksTraded"), $corpDiv = 1, $corpDivMenial = 1, $corpDivMenialDev = 20, $corpDivMenialSlaves = 20, $corpDivMenialFromMarket = 1, $corpCash = 20000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 300000, $corpAssetsSlave = 0, $corpAssetsDevOld = 130000, $corpAssetsDev = 0]] <<if $cash > 272000>> <br>A focus on whoring out slaves. <<print cashFormat(272000)>> [[Escort Service|Manage Corporation][$corpIncorporated = 1, cashX(forceNeg(272000), "stocksTraded"), $corpDiv = 1, $corpDivWhore = 1, $corpDivWhoreDev = 10, $corpDivWhoreSlaves = 10, $corpDivWhoreFromMarket = 1, $corpCash = 50000, $personalShares = 8000, $publicShares = 7000, $corpDividend = 0, $dividendTimer = 13, $corpRev = 0, $corpRevOld = 0, $corpAssetsSlaveOld = 260000, $corpAssetsSlave = 0, $corpAssetsDevOld = 200000, $corpAssetsDev = 0]] + <<else>> + You lack the funds for the final option. You need @@.yellowgreen;<<print cashFormat(272000)>>@@ for it. <</if>> <<else>> - You lack the funds for the final option. + You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(240000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ <</if>> <<else>> - You lack the funds for some options. + You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(216000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ <</if>> <<else>> - You lack the funds for some options. + You lack the funds for some options. You need at least @@.yellowgreen;<<print cashFormat(200000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ <</if>> <<else>> - You lack the funds for many options. + You lack the funds for many options. You need at least @@.yellowgreen;<<print cashFormat(168000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ <</if>> <<else>> - You lack the funds for most options. + You lack the funds for most options. You need at least @@.yellowgreen;<<print cashFormat(160000)>>@@ for the next option and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ <</if>> <<else>> - You lack the funds to found a slave corporation. + You lack the funds to found a slave corporation. You need at least @@.yellowgreen;<<print cashFormat(120000)>>@@ and at most @@.yellowgreen;<<print cashFormat(272000)>>.@@ <</if>> <br>[[2-1 Share Split|Manage Corporation][$vanillaShareSplit = 1]] <</if>> @@ -480,7 +484,7 @@ __Division Management__ Auto send slaves to undergo surgery <<link "Stop Auto Send">><<unset $corpDivBreakToSurgery>><<goto "Manage Corporation">><</link>> <</if>> | - <<if ndef $corpDivBreakToTrain>> + <<if def $corpDivBreakToTrain>> <<unset $corpDivBreakToTrain>> <</if>> <<elseif $corpDivTrain > 0>> @@ -539,7 +543,7 @@ __Division Management__ _corpDivSurgeryCostPU = Math.trunc(_corpDivSurgeryCost / ($corpDivSurgerySlaves * 0.5)), _corpDivSurgeryRev = menialSlaveCost() * 23, _corpDivSurgeryProc = Math.trunc($corpDivSurgeryDev * 0.5)>> - <br>The corporation has a pysical slave modification division. + <br>The corporation has a physical slave modification division. <br>It can modify an average of @@.green;<<print _corpDivSurgeryProc>> slaves@@ each week when filled to capacity ($corpDivSurgeryDev). <br>It costs @@.yellowgreen;<<print cashFormat(_corpDivSurgeryCost)>>@@ to run. On average that is @@.yellowgreen;<<print cashFormat(_corpDivSurgeryCostPU)>>@@ per slave. <br>The improved slaves can be sold for @@.yellowgreen;<<print cashFormat(_corpDivSurgeryRev)>>@@ each. @@ -1174,6 +1178,7 @@ __Division Management__ <<goto "Manage Corporation">> <</link>> <</if>> + <br> <</if>> <<if $corpDivWhore == 0>> @@ -1433,7 +1438,7 @@ __Slave specialization__ <br>Slaves are given [[No Education|Manage Corporation][$corpSpecEducation == 0, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Basic Education|Manage Corporation][$corpSpecEducation = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] <</if>> <<if ndef $corpSpecImplants && $corpDivSurgery > 0>> /*This used to be $surgicalUpgradeImplants, it is the surgery specialization*/ - <br>Slave implants are [[Applied|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] + <br>Slave implants are [[Applied|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Not Applied|Manage Corporation][$corpSpecImplants = 0, $corpSpecTimer = 2]] <</if>> <<if ndef $corpSpecGenitalia && $corpDivSurgery > 100>> /*This used to be $surgicalUpgradeGenitalia, it is the surgery specialization*/ <br>Slaves get their genitalia reconfigured [[Add Pussy|Manage Corporation][$corpSpecPussy = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Pussy|Manage Corporation][$corpSpecPussy = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Add Dick|Manage Corporation][$corpSpecDick = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Dick|Manage Corporation][$corpSpecDick = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Add Balls|Manage Corporation][$corpSpecBalls = 1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | [[Remove Balls|Manage Corporation][$corpSpecBalls = -1, $corpSpecGenitalia = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] @@ -1955,6 +1960,11 @@ __Slave specialization__ <<if $corpSpecTimer == 0>> [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken += 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecToken += 2, $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> <</if>> + <<elseif $corpSpecImplants == 0>> + <br>The corporation keeps their slaves entirely implant free. + <<if $corpSpecTimer == 0 && $corpSpecToken > 0>> + [[Tasteful Implants|Manage Corporation][$corpSpecImplants = 1, $corpSpecToken -= 1, $corpSpecTimer = 2]] | <<link "No Focus">><<unset $corpSpecImplants>><<set $corpSpecTimer = 2>><<goto "Manage Corporation">><</link>> + <</if>> <</if>> <<if ndef $corpSpecPussy && ndef $corpSpecDick && ndef $corpSpecBalls && $corpSpecGenitalia == 1>> <<set ndef $corpSpecGenitalia, diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 36da2c0c97bfbb923573016b7be59c4da90e5715..f2f935af3f7ae704238ad35e8949aa2525d846cc 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -631,9 +631,6 @@ <<if ndef $freshPC>> <<set $freshPC = 0>> <</if>> -<<if ndef $brothelAdsPreg>> - <<set $brothelAdsPreg = 0>> -<</if>> <<if ndef $dairyHyperPregRemodel>> <<set $dairyHyperPregRemodel = 0>> <</if>> @@ -643,9 +640,6 @@ <<if ndef $dairyImplantsSetting>> <<set $dairyImplantsSetting = 1>> <</if>> -<<if ndef $clubAdsPreg>> - <<set $clubAdsPreg = 0>> -<</if>> <<if ndef $spaFix>> <<set $spaFix = 0>> <</if>> @@ -694,12 +688,6 @@ <<if ndef $incubatorGrowthStimsSetting>> <<set $incubatorGrowthStimsSetting = 0>> <</if>> -<<if ndef $incubatorName>> - <<set $incubatorName = "the Incubator">> -<</if>> -<<if ndef $incubatorNameCaps>> - <<set $incubatorNameCaps = "The Incubator">> -<</if>> <<if ndef $reservedChildren>> <<set $reservedChildren = 0>> <</if>> @@ -719,12 +707,6 @@ <<if ndef $nurserySlaves>> <<set $nurserySlaves = 0>> <</if>> -<<if ndef $NurseryiIDs>> - <<set $NurseryiIDs = []>> -<</if>> -<<if $NurseryiIDs.length > 0 && typeof $NurseryiIDs[0] === 'object'>> - <<set $NurseryiIDs = $NurseryiIDs.map(function(a) { return a.ID; })>> -<</if>> <<if ndef $Matron>> <<set $Matron = 0>> <</if>> @@ -737,15 +719,6 @@ <<if ndef $MatronInfluence>> <<set $MatronInfluence = 0>> <</if>> -<<if ndef $nurseryName>> - <<set $nurseryName = "the Nursery">> -<</if>> -<<if ndef $nurseryNameCaps>> - <<set $nurseryNameCaps = "The Nursery">> -<</if>> -<<if ndef $nurseryDecoration>> - <<set $nurseryDecoration = "standard">> -<</if>> <<if ndef $nurseryWeight>> <<set $nurseryWeight = 0>> <</if>> @@ -783,24 +756,9 @@ <<set $cribsFreed = []>> <</if>> -<<if ndef $FarmyardiIDs>> - <<set $FarmyardiIDs = []>> -<</if>> -<<if $FarmyardiIDs.length > 0 && typeof $FarmyardiIDs[0] === 'object'>> - <<set $FarmyardiIDs = $FarmyardiIDs.map(function(a) { return a.ID; })>> -<</if>> <<if ndef $Farmer>> <<set $Farmer = 0>> <</if>> -<<if ndef $farmyardName>> - <<set $farmyardName = "the Farmyard">> -<</if>> -<<if ndef $farmyardNameCaps>> - <<set $farmyardNameCaps = "The Farmyard">> -<</if>> -<<if ndef $farmyardDecoration>> - <<set $farmyardDecoration = "standard">> -<</if>> <<if ndef $farmyard>> <<set $farmyard = 0>> <</if>> @@ -1809,148 +1767,6 @@ Setting missing global variables: <<set $roomsPopulation = 0>> <</if>> -<<if ndef $BrothiIDs>> - <<set $BrothiIDs = []>> -<</if>> -<<if $BrothiIDs.length > 0 && typeof $BrothiIDs[0] === 'object'>> - <<set $BrothiIDs = $BrothiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $brothelName>> - <<set $brothelName = "the Brothel">> -<</if>> -<<if ndef $brothelNameCaps>> - <<set $brothelNameCaps = "The Brothel">> -<</if>> -<<if ndef $brothelDecoration>> - <<set $brothelDecoration = "standard">> -<</if>> - -<<if ndef $DairyiIDs>> - <<set $DairyiIDs = []>> -<</if>> -<<if $DairyiIDs.length > 0 && typeof $DairyiIDs[0] === 'object'>> - <<set $DairyiIDs = $DairyiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $dairyName>> - <<set $dairyName = "the Dairy">> -<</if>> -<<if ndef $dairyNameCaps>> - <<set $dairyNameCaps = "The Dairy">> -<</if>> -<<if ndef $dairyDecoration>> - <<set $dairyDecoration = "standard">> -<</if>> -<<if ndef $dairyFeedersUpgrade>> - <<set $dairyFeedersUpgrade = 0>> -<</if>> -<<if ndef $dairyStimulatorsUpgrade>> - <<set $dairyStimulatorsUpgrade = 0>> -<</if>> -<<if ndef $dairyPregUpgrade>> - <<set $dairyPregUpgrade = 0>> -<</if>> - -<<if ndef $createBioreactors>> - <<set $createBioreactors = 0>> -<</if>> -<<if ndef $bioreactorsAnnounced>> - <<set $bioreactorsAnnounced = 0>> -<</if>> -<<if ndef $bioreactorsHerm>> - <<set $bioreactorsHerm = 0>> -<</if>> -<<if ndef $bioreactorsXX>> - <<set $bioreactorsXX = 0>> -<</if>> -<<if ndef $bioreactorsXY>> - <<set $bioreactorsXY = 0>> -<</if>> -<<if ndef $bioreactorsBarren>> - <<set $bioreactorsBarren = 0>> -<</if>> - -<<if ndef $ClubiIDs>> - <<set $ClubiIDs = []>> -<</if>> -<<if $ClubiIDs.length > 0 && typeof $ClubiIDs[0] === 'object'>> - <<set $ClubiIDs = $ClubiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $clubName>> - <<set $clubName = "the Club">> -<</if>> -<<if ndef $clubNameCaps>> - <<set $clubNameCaps = "The Club">> -<</if>> -<<if ndef $clubDecoration>> - <<set $clubDecoration = "standard">> -<</if>> - -<<if ndef $ServQiIDs>> - <<set $ServQiIDs = []>> -<</if>> -<<if $ServQiIDs.length > 0 && typeof $ServQiIDs[0] === 'object'>> - <<set $ServQiIDs = $ServQiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $servantsQuartersName>> - <<set $servantsQuartersName = "the Servants' Quarters">> -<</if>> -<<if ndef $servantsQuartersNameCaps>> - <<set $servantsQuartersNameCaps = "The Servants' Quarters">> -<</if>> -<<if ndef $servantsQuartersDecoration >> - <<set $servantsQuartersDecoration = "standard">> -<</if>> - -<<if ndef $SchlRiIDs>> - <<set $SchlRiIDs = []>> -<</if>> -<<if $SchlRiIDs.length > 0 && typeof $SchlRiIDs[0] === 'object'>> - <<set $SchlRiIDs = $SchlRiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $schoolroomName>> - <<set $schoolroomName = "the Schoolroom">> -<</if>> -<<if ndef $schoolroomNameCaps>> - <<set $schoolroomNameCaps = "The Schoolroom">> -<</if>> -<<if ndef $schoolroomUpgradeSkills>> - <<set $schoolroomUpgradeSkills = 0>> -<</if>> -<<if ndef $schoolroomUpgradeLanguage>> - <<set $schoolroomUpgradeLanguage = 0>> -<</if>> -<<if ndef $schoolroomDecoration>> - <<set $schoolroomDecoration = "standard">> -<</if>> - -<<if ndef $SpaiIDs>> - <<set $SpaiIDs = []>> -<</if>> -<<if $SpaiIDs.length > 0 && typeof $SpaiIDs[0] === 'object'>> - <<set $SpaiIDs = $SpaiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $spaName>> - <<set $spaName = "the Spa">> -<</if>> -<<if ndef $spaNameCaps>> - <<set $spaNameCaps = "The Spa">> -<</if>> -<<if ndef $spaDecoration>> - <<set $spaDecoration = "standard">> -<</if>> - -<<if ndef $CliniciIDs>> - <<set $CliniciIDs = []>> -<</if>> -<<if $CliniciIDs.length > 0 && typeof $CliniciIDs[0] === 'object'>> - <<set $CliniciIDs = $CliniciIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $clinicName>> - <<set $clinicName = "the Clinic">> -<</if>> -<<if ndef $clinicNameCaps>> - <<set $clinicNameCaps = "The Clinic">> -<</if>> <<if ndef $clinicSlaves>> <<set $clinicSlaves = 0>> <</if>> @@ -1963,57 +1779,11 @@ Setting missing global variables: <<if ndef $clinicUpgradeScanner>> <<set $clinicUpgradeScanner = 0>> <</if>> -<<if ndef $clinicDecoration>> - <<set $clinicDecoration = "standard">> -<</if>> -<<if ndef $ArcadeiIDs>> - <<set $ArcadeiIDs = []>> -<</if>> -<<if $ArcadeiIDs.length > 0 && typeof $ArcadeiIDs[0] === 'object'>> - <<set $ArcadeiIDs = $ArcadeiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $arcadeName>> - <<set $arcadeName = "the Arcade">> -<</if>> -<<if ndef $arcadeNameCaps>> - <<set $arcadeNameCaps = "The Arcade">> -<</if>> -<<if ndef $arcadeDecoration>> - <<set $arcadeDecoration = "standard">> -<</if>> - -<<if ndef $CellBiIDs>> - <<set $CellBiIDs = []>> -<</if>> -<<if $CellBiIDs.length > 0 && typeof $CellBiIDs[0] === 'object'>> - <<set $CellBiIDs = $CellBiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $cellblockName>> - <<set $cellblockName = "the Cellblock">> -<</if>> -<<if ndef $cellblockNameCaps>> - <<set $cellblockNameCaps = "The Cellblock">> -<</if>> -<<if ndef $cellblockDecoration>> - <<set $cellblockDecoration = "standard">> -<</if>> <<if ndef $cellblockWardenCumsInside>> <<set $cellblockWardenCumsInside = 0>> <</if>> -<<if ndef $MastSiIDs>> - <<set $MastSiIDs = []>> -<</if>> -<<if $MastSiIDs.length > 0 && typeof $MastSiIDs[0] === 'object'>> - <<set $MastSiIDs = $MastSiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $masterSuiteName>> - <<set $masterSuiteName = "the Master Suite">> -<</if>> -<<if ndef $masterSuiteNameCaps>> - <<set $masterSuiteNameCaps = "The Master Suite">> -<</if>> <<if ndef $masterSuiteUpgradePregnancy>> <<set $masterSuiteUpgradePregnancy = 0>> <</if>> @@ -2029,22 +1799,7 @@ Setting missing global variables: <<if ndef $universalHGImpregnateMasterSuiteToggle>> <<set $universalHGImpregnateMasterSuiteToggle = 0>> <</if>> -<<if ndef $masterSuiteDecoration>> - <<set $masterSuiteDecoration = "standard">> -<</if>> -<<if ndef $HGSuiteiIDs>> - <<set $HGSuiteiIDs = []>> -<</if>> -<<if $HGSuiteiIDs.length > 0 && typeof $HGSuiteiIDs[0] === 'object'>> - <<set $HGSuiteiIDs = $HGSuiteiIDs.map(function(a) { return a.ID; })>> -<</if>> -<<if ndef $HGSuiteName>> - <<set $HGSuiteName = "the Head Girl Suite">> -<</if>> -<<if ndef $HGSuiteNameCaps>> - <<set $HGSuiteNameCaps = "The Head Girl Suite">> -<</if>> <<if ndef $HGSuiteSurgery>> <<set $HGSuiteSurgery = 1>> <</if>> @@ -2058,12 +1813,8 @@ Setting missing global variables: <<set $HGSuiteEquality = 0>> <</if>> -<<if ndef $pitName>> - <<set $pitName = "the Pit">> -<</if>> -<<if ndef $pitNameCaps>> - <<set $pitNameCaps = "The Pit">> -<</if>> +<<run FacilityDatatypeCleanup()>> + <<if ndef $fighterIDs>> <<set $fighterIDs = []>> <</if>> @@ -2875,6 +2626,7 @@ Setting missing global variables: <<set $corpEasy = 0>> <</if>> <</if>> +<<set $dividendTimer = $dividendTimer || 13>> /*Removing the old Corp from save*/ <<if ndef $newCorp>> diff --git a/src/uncategorized/arcadeReport.tw b/src/uncategorized/arcadeReport.tw index cfe836451cea315cdb52bb3b1e88337acf90459f..032e4a71b79f1ba5bbbecc8993335f05299e6a36 100644 --- a/src/uncategorized/arcadeReport.tw +++ b/src/uncategorized/arcadeReport.tw @@ -236,11 +236,11 @@ <<if _FD > -1>> <<set $activeSlave = $slaves[_FD]>> <<elseif _Con > -1>> - <<set $activeSlave = $slaves[_Age]>> + <<set $activeSlave = $slaves[_Con]>> <<elseif _MB > -1>> <<set $activeSlave = $slaves[_MB]>> <<elseif _Age > -1>> - <<set $activeSlave = $slaves[_Con]>> + <<set $activeSlave = $slaves[_Age]>> <</if>> <<if $activeSlave != 0>> <<setLocalPronouns $activeSlave>> diff --git a/src/uncategorized/corporationDevelopments.tw b/src/uncategorized/corporationDevelopments.tw index 2f3493768e9ab7a1604d3580ac5b35f28fa32ceb..efa17afa0ff958f816bac757681fe317bac9a651 100644 --- a/src/uncategorized/corporationDevelopments.tw +++ b/src/uncategorized/corporationDevelopments.tw @@ -418,7 +418,7 @@ _corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> $corpDivTrainSlaves2 = 0>> to the market and made @@.yellowgreen;<<print cashFormat(_corpDivTrainRev)>>.@@ <</if>> - <<elseif $corpDivTrainSlaves2 > 0>>It is holding <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 trained slaves<<else>>one trained slave<<else>> at the end of the week.<</if>> + <<elseif $corpDivTrainSlaves2 > 0>>It is holding <<if $corpDivTrainSlaves2 > 1>>$corpDivTrainSlaves2 trained slaves<<elseif $corpDivTrainSlaves2 == 1>>one trained slave<<else>> at the end of the week.<</if>> <<if $corpDivTrainSlaves2 > Math.trunc($corpDivTrainDev * 0.4)>> <<if $corpDivTrainSurgeryTimer < 5 || $corpDivSurgery == 0>> <<set _corpDivTrainCapSlaves = $corpDivTrainSlaves2 - Math.trunc($corpDivTrainDev * 0.4), @@ -488,7 +488,7 @@ _corpDivWhoreSlavesRoom = corpDivWhoreSlavesRoom()>> $corpDivWhoreSlaves = $corpDivWhoreDev>> <<elseif $corpDivWhoreFromMarket == 1 && _corpDivWhoreSlavesRoom > 0>> It replenished its slave stock and bought <<print _corpDivWhoreSlavesRoom>> trained whores from the market. - <<set _corpDivWhoreAssetsSlave -= _corpDivWhoreSlavesRoom * 26 * menialSlaveCost(_corpDivWhoreSlavesRoom), + <<set _corpDivWhoreAssetsSlave = _corpDivWhoreSlavesRoom * 26 * menialSlaveCost(_corpDivWhoreSlavesRoom), $corpCash -= _corpDivWhoreAssetsSlave, $corpAssetsSlave += _corpDivWhoreAssetsSlave, $corpDivWhoreSlaves = $corpDivWhoreDev>> diff --git a/src/uncategorized/dairy.tw b/src/uncategorized/dairy.tw index 20ead7606363b282be2215bcb13c0bfb9321df93..e26e317a5121c0b8060b68e0001332329e9d4455 100644 --- a/src/uncategorized/dairy.tw +++ b/src/uncategorized/dairy.tw @@ -381,7 +381,7 @@ $dairyNameCaps <</if>> <<set _Tmult2 = Math.trunc(5000*$upgradeMultiplierArcology)>> -<<if ($dairyPregUpgrade == 2) || ($dairyStimulatorsSetting == 2)>> +<<if ($dairyPregSetting == 2) || ($dairyStimulatorsSetting == 2)>> <br> <<if $dairyPrepUpgrade == 1>> $dairyNameCaps features a preparatory raper designed to gape slaves for integration. diff --git a/src/uncategorized/main.tw b/src/uncategorized/main.tw index 15a86ebf74830ad4b2324fb295e80af8178a4c4e..0f8a78e26df06f187a4299e786f8eda846a4212f 100644 --- a/src/uncategorized/main.tw +++ b/src/uncategorized/main.tw @@ -69,7 +69,6 @@ <<set $nextButton = "END WEEK", $nextLink = "End Week", $showEncyclopedia = 1, $encyclopedia = "How to Play">> <<set $costs = Math.trunc(predictCost($slaves))>> -<<run FacilityNameCleanup()>> <<if ($PC.customTitle == "")>> <<set $PC.customTitle = undefined, $PC.customTitleLisp = undefined>> <</if>> diff --git a/src/uncategorized/neighborsDevelopment.tw b/src/uncategorized/neighborsDevelopment.tw index 28e88254bd3570bf6c23b3bdcc6003a0090eb9cb..1ca6964a9ef8f5b02954aa531a0e5e475aab4dd4 100644 --- a/src/uncategorized/neighborsDevelopment.tw +++ b/src/uncategorized/neighborsDevelopment.tw @@ -1107,7 +1107,7 @@ has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc((0.1*$arcol <</if>> <<if $arcologies[$i].FSBodyPurist != "unset">> <<if $corpIncorporated == 1>> - <<if def $corpSpecImplants>> + <<if $corpSpecImplants == 0>> <<if $corpSpecAmputee != 1>> It's a @@.lightgreen;good market@@ for your corporation's implant-free slaves, improving sales and helping social progress. <<set $arcologies[$i].FSBodyPurist += 1>> diff --git a/src/uncategorized/pSnatchAndGrabResult.tw b/src/uncategorized/pSnatchAndGrabResult.tw index d693039a1820b7a7261a83db2441f8a91d64b899..5161465af1a5233a311a24021c7f826d1633dce4 100644 --- a/src/uncategorized/pSnatchAndGrabResult.tw +++ b/src/uncategorized/pSnatchAndGrabResult.tw @@ -128,7 +128,7 @@ <<slaveCost $activeSlave>> <<set $slaveCost -= 1000>> <<setLocalPronouns $activeSlave>> -<<set $activeSlave.slaveCost = 10000>> +<<set $activeSlave.slaveCost = -10000>> In the middle of the night, there is a polite knock on your penthouse door. You are alerted by $assistantName, who observes with some irritation that the mercenary who knocked has gone, has left a large case outside the door, and has satisfied the security systems that the case contains nothing hazardous. diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw index ff9547df7b9ea89cb2ed257ad0d0a4794e0228c2..1d855bc7a0c23266ece9d0dc6bfb3d564002cc0c 100644 --- a/src/utility/slaveCreationWidgets.tw +++ b/src/utility/slaveCreationWidgets.tw @@ -1896,7 +1896,7 @@ <<set $activeSlave.health = random(25,50)>> <<if $corpSpecDevotion > 0>> - <<set $activeSlave.devotion = random(-120,-90) * $corpSpecDevotion * 30>> + <<set $activeSlave.devotion = random(-120,-90) + $corpSpecDevotion * 30>> <<if $corpSpecDevotion == 1>> It does everything it can to make trainees furious. <<elseif $corpSpecDevotion == 2>>