diff --git a/src/npc/generate/generateMarketSlave.js b/src/npc/generate/generateMarketSlave.js index 1b17b339e9a75cbee94f4ba446fe5f9c858903d5..94679e8e20d0df948da566739e273aa766dcdb38 100644 --- a/src/npc/generate/generateMarketSlave.js +++ b/src/npc/generate/generateMarketSlave.js @@ -6,12 +6,6 @@ */ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1) { let r = ``; - let sisterAge; - let minHeight; - let criminal; - let pronounsGenerated = false; - let pronoun; - let opinion; let slave; let SGProp = {}; @@ -466,72 +460,65 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 break; } case "neighbor": { - if ((numArcology < V.arcologies.length) && (numArcology > 0)) { - market = numArcology; - } else { - market = 1; - } - opinion = App.Neighbor.opinion(0, market); - opinion = Math.trunc(opinion/20); - opinion = Math.clamp(opinion, -10, 10); + const neighborID = (typeof V.arcologies[numArcology] === 'object') ? numArcology : 1; + const neighbor = V.arcologies[neighborID]; + const opinion = Math.clamp(Math.trunc(App.Neighbor.opinion(0, neighborID)/20), -10, 10); let genes = ""; - if (V.arcologies[market].FSSubjugationist > 20) { - SGProp.race = V.arcologies[market].FSSubjugationistRace; + if (neighbor.FSSubjugationist > 20) { + SGProp.race = neighbor.FSSubjugationistRace; } - if (V.arcologies[market].FSRepopulationFocus > 50) { + if (neighbor.FSRepopulationFocus > 50) { genes = "XX"; // "exclusively female" - does not respect $seeDicks SGProp.minAge = V.fertilityAge; } - if (V.arcologies[market].FSYouthPreferentialist > 20) { + if (neighbor.FSYouthPreferentialist > 20) { if (jsRandom(0, 100) > 50) { // usually on the younger side SGProp.maxAge = 30; } - } else if (V.arcologies[market].FSMaturityPreferentialist > 20) { + } else if (neighbor.FSMaturityPreferentialist > 20) { if (jsRandom(0, 100) > 50) { // usually on the more mature side SGProp.minAge = 36; } } slave = GenerateNewSlave(genes, SGProp); - generatePronouns(slave); - pronounsGenerated = true; - pronoun = getPronouns(slave); + const {his} = getPronouns(slave); slave.origin = "You bought $him from "; - slave.origin += V.arcologies[market].name; + slave.origin += neighbor.name; slave.origin += "."; - slave.devotion = -20 + Math.trunc(V.arcologies[market].prosperity/10) + jsRandom(0, 10); - slave.trust = -20 + Math.trunc(V.arcologies[market].prosperity/10) + jsRandom(0, 10); - setHealth(slave, -50 + Math.trunc(V.arcologies[market].prosperity/25) + jsRandom(0, 5), Math.max(15 - V.arcologies[market].prosperity/20 + normalRandInt(0, 2), 0), Math.max(15 - V.arcologies[market].prosperity/20 + normalRandInt(0, 2), 0), undefined, Math.max(jsRandom(10, 40) - V.arcologies[market].prosperity/15, 10)); - if (jsRandom(1, 100) < V.arcologies[market].prosperity / 10 + 50) { + slave.devotion = -20 + Math.trunc(neighbor.prosperity/10) + jsRandom(0, 10); + slave.trust = -20 + Math.trunc(neighbor.prosperity/10) + jsRandom(0, 10); + setHealth(slave, -50 + Math.trunc(neighbor.prosperity/25) + jsRandom(0, 5), Math.max(15 - neighbor.prosperity/20 + normalRandInt(0, 2), 0), Math.max(15 - neighbor.prosperity/20 + normalRandInt(0, 2), 0), undefined, Math.max(jsRandom(10, 40) - neighbor.prosperity/15, 10)); + if (jsRandom(1, 100) < neighbor.prosperity / 10 + 50) { slave.health.illness = 0; } if (slave.vagina > 0) { - slave.skill.vaginal += Math.clamp(V.arcologies[market].prosperity/2, 15, 100); + slave.skill.vaginal += Math.clamp(neighbor.prosperity/2, 15, 100); } if (slave.anus > 0) { - slave.skill.anal += Math.clamp(V.arcologies[market].prosperity/2, 15, 100); + slave.skill.anal += Math.clamp(neighbor.prosperity/2, 15, 100); } - slave.skill.oral += Math.clamp(V.arcologies[market].prosperity/2, 15, 100); + slave.skill.oral += Math.clamp(neighbor.prosperity/2, 15, 100); slave.attrKnown = 1; slave.fetishKnown = 1; if (slave.accent >= 3) { - if (V.arcologies[market].prosperity > jsRandom(0, 200)) { + if (neighbor.prosperity > jsRandom(0, 200)) { slave.accent -= 1; } } - if (V.arcologies[market].prosperity > jsRandom(0, 200)) { + if (neighbor.prosperity > jsRandom(0, 200)) { slave.sexualFlaw = "none"; } - if (V.arcologies[market].prosperity > jsRandom(0, 200)) { + if (neighbor.prosperity > jsRandom(0, 200)) { slave.behavioralFlaw = "none"; } - if (V.arcologies[market].FSSubjugationist > 20) { - r += `They're universally ${V.arcologies[market].FSSubjugationistRace}. `; + if (neighbor.FSSubjugationist > 20) { + r += `They're universally ${neighbor.FSSubjugationistRace}. `; } - if (V.arcologies[market].FSYouthPreferentialist > 20) { + if (neighbor.FSYouthPreferentialist > 20) { r += `They're usually on the younger side. `; if (slave.actualAge > 30) { - if (V.arcologies[market].FSYouthPreferentialistResearch === 1) { + if (neighbor.FSYouthPreferentialistResearch === 1) { r += `Well, all of them certainly look it. Always best to check their ages before buying. `; slave.visualAge = jsRandom(18, 25); slave.chem += jsRandom(10, 40); @@ -541,10 +528,10 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 applyAgeImplant(slave); } } - } else if (V.arcologies[market].FSMaturityPreferentialist > 20) { + } else if (neighbor.FSMaturityPreferentialist > 20) { r += `They're usually on the more mature side. `; } - if (V.arcologies[market].FSRepopulationFocus > 50) { + if (neighbor.FSRepopulationFocus > 50) { r += `They are exclusively female and all extremely pregnant. `; if (slave.ovaryAge >= 42) { /* corrects menopausal mothers */ @@ -569,7 +556,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.lactation > 0) { slave.lactationDuration = 2; } - } else if (V.arcologies[market].FSRestart > 50) { + } else if (neighbor.FSRestart > 50) { r += `They have all been rendered unable to reproduce. `; if (slave.ovaries === 1) { slave.preg = -2; @@ -579,7 +566,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.balls > 0) { slave.balls = 0; } - if (V.arcologies[market].FSRestartResearch === 1) { + if (neighbor.FSRestartResearch === 1) { r += `Smart and attractive slaves are beginning to be a rarity lately. `; if (slave.face >= 0) { slave.face -= 100; @@ -591,7 +578,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.addict = jsEither([0, 0, 0, 0, 0, 0, 0, 0, 5, 20, 20, 50, 100]); } } - if (V.arcologies[market].FSGenderRadicalist > 50) { + if (neighbor.FSGenderRadicalist > 50) { r += `They all show signs of intensive hormone therapy. `; slave.chem += jsRandom(10, 100); if (slave.dick > 0) { @@ -617,7 +604,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.balls > 2) { slave.balls -= jsRandom(0, 2); } - if (V.arcologies[market].FSGenderRadicalistResearch === 1 && jsRandom(1, 100) <= 20) { + if (neighbor.FSGenderRadicalistResearch === 1 && jsRandom(1, 100) <= 20) { r += `This one has a notably rounded belly for a slave with no vagina. `; slave.ovaries = 0; slave.vagina = -1; @@ -651,7 +638,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.muscles += jsRandom(0, 20); } } - } else if (V.arcologies[market].FSGenderFundamentalist > 50) { + } else if (neighbor.FSGenderFundamentalist > 50) { r += `Fertile slaves from there almost never appear without swollen bellies and sensitive nipples. `; if (slave.preg < 0) { slave.preg = 0; /* removing contraception of default slave generation so isFertile can work right*/ @@ -666,7 +653,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } } } - if (V.arcologies[market].FSPaternalist > 20) { + if (neighbor.FSPaternalist > 20) { r += `They're often gratifyingly devoted and trusting. `; if (slave.devotion < 10) { slave.devotion += jsRandom(0, 8); @@ -674,7 +661,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.trust < 50) { slave.trust += jsRandom(0, 8); } - } else if (V.arcologies[market].FSDegradationist > 20) { + } else if (neighbor.FSDegradationist > 20) { r += `They can be depended upon to be terrified into abject submission. `; DegradingName(slave); if (slave.trust > -10) { @@ -695,19 +682,18 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (jsRandom(1, 100) > 90) { slave.hears = -2; } - if (V.arcologies[market].FSRepopulationFocus === "unset" && V.arcologies[market].FSBodyPurist === "unset") { - if (isFertile(slave) && jsRandom(1, 10) === 9) { + if (neighbor.FSRepopulationFocus === "unset" && neighbor.FSBodyPurist === "unset") { + if (isFertile(slave) && slave.vagina > 0 && jsRandom(1, 10) === 9) { slave.abortionTat = jsRandom(1, (Math.min(slave.physicalAge-V.fertilityAge, slave.physicalAge-V.minimumSlaveAge))*2); } } let i = 0; if (jsRandom(1, 100) > 10) { // tat em up - let tattoos = ["boobsTat", "buttTat", "lipsTat", "vaginaTat", "dickTat", "anusTat", "shouldersTat", "armsTat", "legsTat", "backTat", "stampTat", "bellyTat", "abortionTat", "birthsTat"]; - let modPool = jsRandom(1, 10); + let tattoos = ["boobsTat", "buttTat", "lipsTat", "vaginaTat", "dickTat", "anusTat", "shouldersTat", "armsTat", "legsTat", "backTat", "stampTat", "bellyTat"]; + const modPool = jsRandom(1, 10); for (i = 0; i < modPool; i++) { - let tat = tattoos[Math.floor(Math.random() * tattoos.length)]; - slave[tat] = "degradation"; + slave[tattoos.random()] = "degradation"; } } if (jsRandom(1, 100) > 10) { @@ -722,10 +708,9 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if ((slave.vagina !== -1) || (slave.dick !== 0)) { piercings.push("clitPiercing"); } - let modPool = jsRandom(5, 15); - let pierce; + const modPool = jsRandom(5, 15); for (i = 0; i < modPool; i++) { - pierce = piercings[Math.floor(Math.random() * piercings.length)]; + const pierce = piercings.random(); if (slave[pierce] < 2) { slave[pierce]++; } @@ -738,10 +723,9 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 App.Medicine.Modification.addScourged(slave); } let scars = ["back", "lower back", "left thigh", "right thigh"]; - let modPool = jsRandom(1, 10); - let scar; + const modPool = jsRandom(1, 10); for (i = 0; i < modPool; i++) { - scar = scars[Math.floor(Math.random() * scars.length)]; + const scar = scars.random(); App.Medicine.Modification.addScar(slave, scar, "generic"); } } @@ -754,7 +738,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } } } - if (V.arcologies[market].FSIntellectualDependency > 20) { + if (neighbor.FSIntellectualDependency > 20) { r += `The only thing that rivals their idiocy is their uncontrollable libido. `; slave.slaveName = setup.bimboSlaveNames.random(); if (slave.intelligence > -50) { @@ -764,7 +748,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.energy < 80) { slave.energy = jsRandom(80, 100); } - } else if (V.arcologies[market].FSSlaveProfessionalism > 20) { + } else if (neighbor.FSSlaveProfessionalism > 20) { r += `They possess brilliant minds and expert training; a slave that truly knows their role in life. `; if (slave.intelligence <= 50) { slave.intelligence = Intelligence.random({limitIntelligence: [51, 100]}); @@ -774,25 +758,25 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.energy -= 30; } if (slave.vagina > 0) { - slave.skill.vaginal += Math.clamp(V.arcologies[market].prosperity/2, 20, 100); + slave.skill.vaginal += Math.clamp(neighbor.prosperity/2, 20, 100); slave.skill.vaginal = Math.clamp(slave.skill.vaginal, 50, 100); } if (slave.anus > 0) { - slave.skill.anal += Math.clamp(V.arcologies[market].prosperity/2, 20, 100); + slave.skill.anal += Math.clamp(neighbor.prosperity/2, 20, 100); slave.skill.anal = Math.clamp(slave.skill.anal, 50, 100); } - slave.skill.oral += Math.clamp(V.arcologies[market].prosperity/2, 20, 100); + slave.skill.oral += Math.clamp(neighbor.prosperity/2, 20, 100); slave.skill.oral = Math.clamp(slave.skill.oral, 50, 100); - slave.skill.entertainment += Math.clamp(V.arcologies[market].prosperity/2, 20, 100); + slave.skill.entertainment += Math.clamp(neighbor.prosperity/2, 20, 100); slave.skill.entertainment = Math.clamp(slave.skill.entertainment, 50, 100); - slave.skill.whoring += Math.clamp(V.arcologies[market].prosperity/2, 20, 100); + slave.skill.whoring += Math.clamp(neighbor.prosperity/2, 20, 100); slave.skill.whoring = Math.clamp(slave.skill.whoring, 50, 100); slave.sexualFlaw = "none"; slave.behavioralFlaw = "none"; slave.fetishKnown = 1; slave.attrKnown = 1; } - if (V.arcologies[market].FSBodyPurist > 80) { + if (neighbor.FSBodyPurist > 80) { r += `They're quite pristine, free of any genomic damage or addictions regardless of any transformations they've had. `; // clean out any changes those filthy impure degradationists may have made slave.brand = {}; @@ -822,7 +806,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.clitPiercing = 0; slave.dickPiercing = 0; slave.anusPiercing = 0; - } else if (V.arcologies[market].FSTransformationFetishist > 80) { + } else if (neighbor.FSTransformationFetishist > 80) { r += `They vary in terms of what size their implants are, not whether they have them. `; slave.chem += jsRandom(10, 100); slave.boobsImplant = 200*jsRandom(2, 20); @@ -845,8 +829,8 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.butt += slave.buttImplant; slave.lipsImplant = jsEither([10, 20]); slave.lips += slave.lipsImplant; - if (V.arcologies[market].FSTransformationFetishistResearch === 1 && jsRandom(1, 100) <= 20) { - r += `This one's implants are unusually large; a showcase of what ${pronoun.possessive} home arcology is capable of. `; + if (neighbor.FSTransformationFetishistResearch === 1 && jsRandom(1, 100) <= 20) { + r += `This one's implants are unusually large; a showcase of what ${his} home arcology is capable of. `; slave.boobsImplant += 200*jsRandom(100, 200); slave.boobs += slave.boobsImplant; slave.boobsImplantType = "hyper fillable"; @@ -855,7 +839,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.buttImplantType = "hyper fillable"; } } - if (V.arcologies[market].FSPetiteAdmiration > 20) { + if (neighbor.FSPetiteAdmiration > 20) { r += `They tend to be short, some far more than others. `; if (slave.height >= 160) { slave.height = Math.trunc(Height.random(slave, {limitMult: [-2, 0]})); @@ -867,7 +851,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } } } - } else if (V.arcologies[market].FSStatuesqueGlorification > 20) { + } else if (neighbor.FSStatuesqueGlorification > 20) { r += `They tend to be tall, if not unbelievably so. `; if (slave.height < 170) { slave.height = Math.trunc(Height.random(slave, {limitMult: [0, 2]})); @@ -880,7 +864,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } } } - if (V.arcologies[market].FSSlimnessEnthusiast > 20) { + if (neighbor.FSSlimnessEnthusiast > 20) { r += `They're never overweight, and are often quite lithe. `; if (slave.boobs > 400) { slave.boobs -= 100*jsRandom(0, 2); @@ -891,13 +875,13 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.weight > 10) { slave.weight = jsRandom(-30, 0); } - if (V.arcologies[market].FSSlimnessEnthusiastResearch === 1 && jsRandom(1, 100) <= 50) { - r += `This one is perfectly flat; an ideal showcase of ${pronoun.possessive} home arcology's tastes. `; + if (neighbor.FSSlimnessEnthusiastResearch === 1 && jsRandom(1, 100) <= 50) { + r += `This one is perfectly flat; an ideal showcase of ${his} home arcology's tastes. `; slave.boobs = 100; slave.butt = 0; slave.weight = jsRandom(-30, 0); } - } else if (V.arcologies[market].FSAssetExpansionist > 20) { + } else if (neighbor.FSAssetExpansionist > 20) { r += `Their butts are usually imposing, but their tits are what's often most impressive. `; slave.chem += jsRandom(10, 100); if (slave.boobs < 5000) { @@ -909,8 +893,8 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.weight < -10) { slave.weight += jsRandom(0, 20); } - if (V.arcologies[market].FSAssetExpansionistResearch === 1 && jsRandom(1, 100) <= 20) { - r += `This one is unusually large; a showcase of what ${pronoun.possessive} home arcology is capable of. `; + if (neighbor.FSAssetExpansionistResearch === 1 && jsRandom(1, 100) <= 20) { + r += `This one is unusually large; a showcase of what ${his} home arcology is capable of. `; slave.boobs = 200*jsRandom(100, 200); slave.butt = jsRandom(10, 20); if (slave.dick > 0 && V.seeDicks !== 0) { @@ -919,14 +903,14 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 } } } - if (V.arcologies[market].FSPhysicalIdealist > 20) { + if (neighbor.FSPhysicalIdealist > 20) { r += `They're usually quite muscular, some to a truly imposing degree, and they're almost never unhealthy. `; slave.muscles = jsRandom(10, 100); if (slave.health.condition < 20) { improveCondition(slave, jsRandom(0, 8)); } - } else if (V.arcologies[market].FSHedonisticDecadence > 20) { - if (V.arcologies[market].FSSlimnessEnthusiast > 20) { + } else if (neighbor.FSHedonisticDecadence > 20) { + if (neighbor.FSSlimnessEnthusiast > 20) { r += `They're quite soft, usually sporting a cute muffin top, and rather laid back. `; slave.weight = jsRandom(10, 25); } else { @@ -937,8 +921,8 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.muscles = jsRandom(-50, 0); slave.trust += jsRandom(5, 15); slave.energy += jsRandom(0, 10); - if (V.arcologies[market].FSHedonisticDecadenceResearch === 1) { - r += `They appear to have greatly enjoyed their stay at ${V.arcologies[market].name}. `; + if (neighbor.FSHedonisticDecadenceResearch === 1) { + r += `They appear to have greatly enjoyed their stay at ${neighbor.name}. `; slave.energy += jsRandom(0, 10); slave.trust += jsRandom(10, 20); slave.devotion += jsRandom(10, 20); @@ -982,7 +966,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.fetishStrength = 100; } } - if (V.arcologies[market].FSPastoralist > 20) { + if (neighbor.FSPastoralist > 20) { r += `Lactation is nearly universal among them, sometimes in ludicrous quantities. They tend to have huge udders, as well. `; slave.chem += jsRandom(10, 100); if (slave.boobs < 5000) { @@ -997,10 +981,10 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (slave.weight < -10) { slave.weight += jsRandom(0, 20); } - } else if (V.arcologies[market].FSCummunism > 20) { + } else if (neighbor.FSCummunism > 20) { r += `Big balls and huge loads are commonplace among them, even if they sometimes lack dicks. They tend to be hard workers, as well. `; slave.chem += jsRandom(10, 100); - if (V.arcologies[market].FSRestart > 50) { + if (neighbor.FSRestart > 50) { slave.dick = 0; slave.vagina = -1; } @@ -1013,7 +997,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.muscles += jsRandom(0, 20); } } - if (V.arcologies[market].FSChattelReligionist > 20) { + if (neighbor.FSChattelReligionist > 20) { r += `They're rarely anything but devoted, and sometimes present interesting peccadilloes. `; slave.slaveName = setup.chattelReligionistSlaveNames.random(); if (slave.devotion < 10) { @@ -1026,7 +1010,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.behavioralQuirk = "sinful"; } } - if (V.arcologies[market].FSRomanRevivalist > 20) { + if (neighbor.FSRomanRevivalist > 20) { r += `They've often `; if (!canSee(slave)) { r += `been party to`; @@ -1038,7 +1022,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (jsRandom(0, 1) === 0) { slave.sexualQuirk = "unflinching"; } - } else if (V.arcologies[market].FSAztecRevivalist > 20) { + } else if (neighbor.FSAztecRevivalist > 20) { r += `They've seen sights that will traumatize almost anyone`; if (!canSee(slave)) { r += ", so to speak. "; @@ -1049,36 +1033,36 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 if (jsRandom(0, 1) === 0) { slave.trust = -30; } - } else if (V.arcologies[market].FSNeoImperialist > 20) { + } else if (neighbor.FSNeoImperialist > 20) { r += `They've been through a strict Imperial education that has helpfully taught them the necessity of absolute, unquestioning obedience to one's social and physical superiors - meaning you.`; if (jsRandom(0, 1) === 0) { slave.trust = +20; } - } else if (V.arcologies[market].FSEgyptianRevivalist > 20) { + } else if (neighbor.FSEgyptianRevivalist > 20) { r += `They've often done things that give them a distinct appetite for perversion. `; slave.slaveName = setup.ancientEgyptianSlaveNames.random(); if (jsRandom(0, 1) === 0) { slave.sexualQuirk = "perverted"; } - } else if (V.arcologies[market].FSEdoRevivalist > 20) { + } else if (neighbor.FSEdoRevivalist > 20) { r += `They have frequently absorbed much culture there. `; slave.slaveName = setup.edoSlaveNames.random(); slave.skill.entertainment = Math.clamp(slave.skill.entertainment, 35, 100); - } else if (V.arcologies[market].FSArabianRevivalist > 20) { + } else if (neighbor.FSArabianRevivalist > 20) { r += `They've often been part of large harems in which selflessness is prized. `; if (jsRandom(0, 1) === 0) { slave.sexualQuirk = "caring"; } - } else if (V.arcologies[market].FSChineseRevivalist > 20) { + } else if (neighbor.FSChineseRevivalist > 20) { r += `They've all passed through a thorough and uncompromising educational system for slaves. `; slave.intelligenceImplant = 30; - if (V.arcologies[market].FSIntellectualDependency === "unset") { + if (neighbor.FSIntellectualDependency === "unset") { if (slave.intelligence < 60) { slave.intelligence += jsRandom(0, 20); } } } - if (V.arcologies[market].FSIncestFetishist > 20) { + if (neighbor.FSIncestFetishist > 20) { r += `Incest is acceptable, if not preferable to them. `; if (slave.sexualQuirk === "none" && slave.behavioralQuirk === "none") { if (jsRandom(0, 1) === 0) { @@ -1092,23 +1076,23 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.behavioralQuirk = "sinful"; } } - if ((V.arcologies[0].FSDegradationist !== "unset") && (V.arcologies[market].FSPaternalist !== "unset")) { + if ((V.arcologies[0].FSDegradationist !== "unset") && (neighbor.FSPaternalist !== "unset")) { slave.devotion = jsRandom(-90, -60); slave.trust = -20; - r += `<b>${V.arcologies[market].name}</b> is Paternalist, and your arcology is Degradationist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a literal Hell on Earth. `; - } else if ((V.arcologies[0].FSPaternalist !== "unset") && (V.arcologies[market].FSDegradationist !== "unset")) { + r += `<b>${neighbor.name}</b> is Paternalist, and your arcology is Degradationist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a literal Hell on Earth. `; + } else if ((V.arcologies[0].FSPaternalist !== "unset") && (neighbor.FSDegradationist !== "unset")) { slave.devotion = jsRandom(60, 90); slave.trust = 20; - r += `<b>${V.arcologies[market].name}</b> is Degradationist, and your arcology is Paternalist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a promised land. `; + r += `<b>${neighbor.name}</b> is Degradationist, and your arcology is Paternalist. To its slaves, other niceties of social alignment are trivial. They view your arcology as a promised land. `; } else if (opinion !== 0) { slave.devotion += opinion; slave.trust += opinion; slave.devotion = Math.clamp(slave.devotion, -100, 75); slave.trust = Math.clamp(slave.trust, -100, 75); if (opinion > 2) { - r += `Your arcology's close social alignment with <b>${V.arcologies[market].name}</b> makes its slaves more accepting of the prospect of life in your arcology, and willing to trust that they'll know how to survive there. `; + r += `Your arcology's close social alignment with <b>${neighbor.name}</b> makes its slaves more accepting of the prospect of life in your arcology, and willing to trust that they'll know how to survive there. `; } else if (opinion < -2) { - r += `Your arcology's very different culture from <b>${V.arcologies[market].name}</b>'s makes its slaves unhappy with the prospect of life in your arcology, and afraid of what will happen to them there. `; + r += `Your arcology's very different culture from <b>${neighbor.name}</b>'s makes its slaves unhappy with the prospect of life in your arcology, and afraid of what will happen to them there. `; } } break; @@ -1547,7 +1531,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.intelligenceImplant = 30; slave.accent = Math.min(slave.accent, 1); slave.skill.entertainment = 75; - slave.skill.combat = jsEither(0, 1, 1); + slave.skill.combat = jsEither([0, 1, 1]); } else { slave.face = random(10, 65); slave.intelligence = Intelligence.random({limitIntelligence: [35, 75]}); @@ -1575,9 +1559,9 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.lips = jsRandom(10, 40); slave.lipsImplant = 0; if (slave.physicalAge > 16) { - slave.boobs = jsEither(200, jsRandom(200, 400), jsRandom(200, 950)); + slave.boobs = jsEither([200, jsRandom(200, 400), jsRandom(200, 950)]); } else if (slave.physicalAge <= 16 && slave.physicalAge > 13) { - slave.boobs = jsEither(200, jsRandom(200, 400)); + slave.boobs = jsEither([200, jsRandom(200, 400)]); } else { slave.boobs = 200; } @@ -1990,7 +1974,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.career = "a Futanari Sister"; slave.faceShape = jsEither(["exotic", "sensual"]); slave.pubertyXY = 1; - sisterAge = jsRandom(1, 5); + const sisterAge = jsRandom(1, 5); if (sisterAge === 1) { slave.intelligence = -60; slave.hips = 0; @@ -2242,7 +2226,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave.devotion = jsRandom(60, 75); slave.trust = jsRandom(60, 75); setHealth(slave, jsRandom(60, 80), 0, Math.max(normalRandInt(0, 2), 0), 0, jsRandom(5, 20)); - minHeight = jsRandom(170, 180); + const minHeight = jsRandom(170, 180); if (V.HA.schoolUpgrade === 2) { slave.height = Math.trunc(Math.clamp(Height.random(slave, {limitMult: [2, 15], spread: 0.1}), minHeight, 274)); slave.muscles = jsRandom(40, 80); @@ -2358,7 +2342,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 slave = GenerateNewSlave("XY", SGProp); } - criminal = setup.gangCriminalPool.random(); + const criminal = setup.gangCriminalPool.random(); switch (criminal) { case "mule": { @@ -2606,16 +2590,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.disableDisability = 1; slave = GenerateNewSlave("", SGProp); - /* - if (slave.dick > 0) { - slave.chastityPenis = 1 - } - if (slave.vagina > -1) { - slave.chastityVagina = 1 - } - */ - - criminal = setup.militaryCriminalPool.random(); + const criminal = setup.militaryCriminalPool.random(); switch (criminal) { case "spy": { @@ -2806,7 +2781,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.disableDisability = 1; slave = GenerateNewSlave("", SGProp); - criminal = setup.whiteCollarCriminalPool.random(); + const criminal = setup.whiteCollarCriminalPool.random(); switch (criminal) { case "racketeering": { @@ -2922,16 +2897,7 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 SGProp.disableDisability = 1; slave = GenerateNewSlave("", SGProp); - /* - if (slave.dick > 0) { - slave.chastityPenis = 1; - } - if (slave.vagina > -1) { - slave.chastityVagina = 1; - } - */ - - criminal = setup.pettyCriminalPool.random(); + const criminal = setup.pettyCriminalPool.random(); switch (criminal) { case "robbery": { @@ -3232,8 +3198,5 @@ globalThis.generateMarketSlave = function(market = "kidnappers", numArcology = 1 break; } } - if (!pronounsGenerated) { - generatePronouns(slave); - } return {text: r, slave: slave}; };