diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 77854e982ad0a54bd4b81558fee78ffe1129e132..61394fb0521c19d3df7e7fc86a463d7e9b3fc54f 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -320,10 +320,17 @@ App.Data.resetOnNGPlus = { oralAppeal: 0, vaginalAppeal: 0, analAppeal: 0, - sexualOpeness: 0 + sexualOpeness: 0, + bestialityOpeness: 0 }, - FCTV: {}, + FCTV: { + receiver: -1, + channel: {}, + pcViewership: {}, + remote: 0, + weekEnabled: 0 + }, assistant: {}, targetArcology: {fs: "New"}, readySlaves: 0, @@ -768,10 +775,10 @@ App.Data.resetOnNGPlus = { masterSuiteNameCaps: "The Master Suite", // Nursery Subsection - nursery: 0, /* counts the number of children the nursery can support */ + nursery: 0, /* counts the number of children the nursery can support */ nurseryNannies: 0, /* counts the number of nannies the nursery can support */ nurseryBabies: 0, /* counts the number of children currently in the nursery */ - MatronInfluence: 0, /* check for whether the children are influenced by the Matron */ + MatronInfluence: 0, /* check for whether the children are influenced by the Matron */ nannyInfluence: 0, /* check for whether the children are influenced by the nannies */ nurseryDecoration: "standard", nurseryWeight: 0, @@ -790,25 +797,72 @@ App.Data.resetOnNGPlus = { sortNurseryList: "Unsorted", targetAgeNursery: 18, - // Farmyard Subsection %/ + // Farmyard Subsection farmyard: 0, farmyardShowgirls: [], /* array of farmhands putting on shows */ farmyardFarmers: [], /* array of farmhands farming */ farmMenials: 0, farmMenialsSpace: 0, farmyardDecoration: "standard", - farmyardUpgrade: { - pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0 + farmyardUpgrades: { + pump: 0, + fertilizer: 0, + hydroponics: 0, + machinery: 0, + seeds: 0, }, farmyardCrops: 0, - farmyardStable: 0, + farmyardStables: 0, farmyardKennels: 0, farmyardCages: 0, activeCanine: 0, activeHooved: 0, activeFeline: 0, animalsBought: { - canines: 0, hooved: 0, felines: 0, labradorRetrievers: 0, germanShepherds: 0, goldenRetrievers: 0, frenchBulldogs: 0, bulldogs: 0, beagles: 0, poodles: 0, rottweilers: 0, yorkshireTerriers: 0, siberianHuskies: 0, horses: 0, bulls: 0, pigs: 0, siameses: 0, persians: 0, maineCoons: 0, ragdolls: 0, bengals: 0, abbysinians: 0, birmans: 0, orientalShorthairs: 0, sphynxes: 0, russianBlues: 0, wolves: 0, foxes: 0, jackals: 0, dingos: 0, zebras: 0, cougars: 0, jaguars: 0, pumas: 0, lynx: 0, leopards: 0, lions: 0, tigers: 0 + canines: 0, + felines: 0, + hooved: 0, + + beagles: 0, + bulldogs: 0, + frenchBulldogs: 0, + germanShepherds: 0, + goldenRetrievers: 0, + labradorRetrievers: 0, + poodles: 0, + rottweilers: 0, + siberianHuskies: 0, + yorkshireTerriers: 0, + + bulls: 0, + horses: 0, + pigs: 0, + + abbysinians: 0, + bengals: 0, + birmans: 0, + maineCoons: 0, + orientalShorthairs: 0, + persians: 0, + ragdolls: 0, + russianBlues: 0, + siameses: 0, + sphynxes: 0, + + dingos: 0, + foxes: 0, + jackals: 0, + wolves: 0, + + zebras: 0, + + cougars: 0, + jaguars: 0, + leopards: 0, + lions: 0, + lynx: 0, + pumas: 0, + tigers: 0, }, canines: [], hooved: [], diff --git a/js/003-data/policiesData.js b/js/003-data/policiesData.js index 04cca0f71d266d53793c4c66e5be9a197c356739..36a63d97ba43d0e04c20b3073a257e7b672fb972 100644 --- a/js/003-data/policiesData.js +++ b/js/003-data/policiesData.js @@ -319,6 +319,14 @@ App.Data.Policies.Selection = { requirements: function() { return (V.arcologies[0].FSEgyptianRevivalist === "unset"); }, } ], + "policies.bestialityOpeness": [ + { + title: "Bestiality Acceptance", + text: "you will use your personal influence to spur acceptance of bestiality.", + activatedText: "you are using your personal influence to spur the acceptance of bestiality.", + requirements: function() { return (V.seeBestiality === 1); }, + } + ] }, PopulationPolicies: { "policies.proRefugees": [ diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index a7d01cebf0829551b4155a9cac50a67977923fd1..1f363899aad581df334ee92a38945035cb410b59 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -302,8 +302,8 @@ App.Update.globalVariables = function(node) { // Farmyard Subsection const animalsBought = ["abbysinians", "beagles", "bengals", "birmans", "bulldogs", "bulls", "canines", "cougars", "dingos", "felines", "foxes", "frenchBulldogs", "germanShepherds", "goldenRetrievers", "hooved", "horses", "jackals", "jaguars", "labradorRetrievers", "leopards", "lions", "lynx", "maineCoons", "orientalShorthairs", "persians", "pigs", "poodles", "pumas", "ragdolls", "rottweilers", "russianBlues", "siameses", "siberianHuskies", "sphynxes", "tigers", "wolves", "yorkshireTerriers", "zebras"]; animalsBought.forEach(function(species) { V.animalsBought[species] = V.animalsBought[species] || 0; }); - if (typeof V.farmyardUpgrade !== "object") { - V.farmyardUpgrade = { + if (typeof V.farmyardUpgrades !== "object") { + V.farmyardUpgrades = { pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0 }; } @@ -923,7 +923,7 @@ App.Update.globalVariables = function(node) { } else { assistant.object(); } - FCTV.manage(); + App.Update.FCTV(); if (jQuery.isEmptyObject(V.FSPromenade)) { V.FSPromenade = { Subjugationist: 0, diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js index 274cfd76de013a243bc21773a4a585672bae33dd..ff5d6f7a9ef6719cf484ea00e7a7fb2aad5c1b4f 100644 --- a/src/endWeek/saWorkTheFarm.js +++ b/src/endWeek/saWorkTheFarm.js @@ -1,566 +1,361 @@ +// FIXME: needs further review + /** * @param {App.Entity.SlaveState} slave * @returns {string} */ -App.SlaveAssignment.workTheFarm = function(slave) { - const arcology = V.arcologies[0]; - const { - he, him, his, He, His - } = getPronouns(slave), - incomeStats = getSlaveStatisticData(slave, V.facility.farmyard); - - let food = Math.trunc(App.Facilities.Farmyard.foodAmount(slave)); - let t = `works as a farmhand this week. `; - - - const foodTotal = (slave, food) => { - t += foodFarmer(); - t += foodDevotion(slave); - t += foodMuscles(slave); - t += foodWeight(slave); - t += foodHealth(slave); - t += foodSight(slave); - t += foodHearing(slave); - - t += V.foodMarket ? `As a result, ${he} produces <span class="chocolate">${massFormat(food)}</span> of food over the week. ` : ``; - }; - - const foodFarmer = () => { - if (V.Farmer) { - return `${V.Farmer.slaveName} watches over ${him}, making sure that ${he} doesn't slack off and works as hard as ${he} should. `; +App.SlaveAssignment.workTheFarm = function (slave) { + let frag = document.createDocumentFragment(); + + const + { he, him, his, He, His } = getPronouns(slave), + incomeStats = getSlaveStatisticData(slave, V.facility.farmyard), + + slaveApproves = () => sexualQuirks.includes(slave.sexualQuirk) || behavorialQuirks.includes(slave.behavioralQuirk) || fetishes.includes(slave.fetish), + + sexualQuirks = ["perverted", "unflinching"], + behavorialQuirks = ["sinful"], + fetishes = ["humiliation", "masochist"], + + foodAmount = Math.trunc(App.Facilities.Farmyard.foodAmount(slave)); + + function fullReport(slave) { + const report = App.UI.DOM.appendNewElement("div", frag); + + let r = []; + + r.push(intro()); + r.push(farmer(slave)); + r.push(devotion(slave)); + r.push(muscles(slave)); + r.push(weight(slave)); + r.push(health(slave)); + r.push(sight(slave)); + r.push(hearing(slave)); + r.push(food(slave)); + + r.push(slaveShows(slave)); + r.push(longTermEffects(slave)); + r.push(slaveVignettes()); + + $(report).append(r.join(' ')); + } + + const intro = () => `${He} works as a farmhand this week.`; + + function farmer(slave) { + const F = getPronouns(S.Farmer); + + if (S.Farmer) { + if (slave.devotion < V.FarmerDevotionThreshold) { + slave.devotion += V.FarmerDevotionBonus; + } + + if (slave.devotion < V.FarmerTrustThreshold) { + slave.trust += V.FarmerTrustBonus; + } + + if (slave.health.condition < 100) { + improveCondition(slave, V.FarmerHealthBonus); + } + + return `${S.Farmer.slaveName} watches over ${him}, making sure that ${he} doesn't slack off and works as hard as ${he} should. ${F.He}'s a tough boss, but a fair one. ${slave.slaveName} benefits from ${F.his} care while working in ${V.farmyardName}.`; } - return ``; - }; + } - const foodDevotion = slave => { + function devotion(slave) { if (slave.devotion > 50) { - return `${He}'s so devoted to you that ${he} works harder and produces more food. `; + return `${He}'s so devoted to you that ${he} works harder and produces more food.`; } else if (slave.devotion < -50) { - return `${He}'s so resistant that ${he} doesn't work as hard, and thus produces less food. `; + return `${He}'s so resistant that ${he} doesn't work as hard, and thus produces less food.`; } else { - return ``; // TODO: third case for neutral? + return `${He} doesn't feel particularly compelled to work hard or slack off and produces an average amount of food.`; } - }; + } + + function health(slave) { + let r = []; - const foodHealth = slave => { - return foodHealthCondition(slave) + foodHealthIllness(slave); - }; + r.push(healthCondition(slave)); + r.push(healthIllness(slave)); - const foodHealthCondition = slave => { + return r.join(' '); + } + + function healthCondition(slave) { if (slave.health.condition > 50) { - return `${His} shining health helps ${him} work harder and longer. `; + return `${His} shining health helps ${him} work harder and longer.`; } else if (slave.health.condition < -50) { - return `${His} poor health impedes ${his} ability to work efficiently. `; - } else { - return ``; // TODO: third case? + return `${His} poor health impedes ${his} ability to work efficiently.`; } - }; + } + + function healthIllness(slave) { + let + r = [], + health = ``, + exhaustion = ``; - const foodHealthIllness = slave => { - let t = ``; if (slave.health.illness > 0 || slave.health.tired > 60) { - t += ` ${He} performed worse this week due to<span class="red">`; if (slave.health.illness === 1) { - t += ` feeling under the weather`; + health = `feeling under the weather`; } else if (slave.health.illness === 2) { - t += ` a minor illness`; + health = `a minor illness`; } else if (slave.health.illness === 3) { - t += ` being sick`; + health = `being sick`; } else if (slave.health.illness === 4) { - t += ` being very sick`; + health = `being very sick`; } else if (slave.health.illness === 5) { - t += ` a terrible illness`; - } - if (slave.health.illness > 0 && slave.health.tired > 60) { - t += ` and`; - foodHealthTired(slave); + health = `a terrible illness`; } - t += `.</span> `; - t += foodTired(slave); - } - return t; - }; - - const foodHealthTired = slave => { - if (slave.health.tired > 90) { - return ` exhaustion`; - } else if (slave.health.tired > 60) { - return ` being tired`; - } - return ``; - }; - - const foodTired = slave => { - let t = ``; - if (!slave.fuckdoll) { - if (slaveResting(slave)) { - t = ` ${He} spends reduced hours working the soil in order to <span class="green">offset ${his} lack of rest.</span>`; - } else if (slave.health.tired + 20 >= 90 && !willWorkToDeath(slave)) { - t = ` ${He} attempts to refuse work due to ${his} exhaustion, but can do little to stop it or the resulting <span class="trust dec">severe punishment.</span> ${He} <span class="devotion dec">purposefully underperforms,</span> choosing ${his} overall well-being over the consequences, <span class="red">greatly reducing yields.</span>`; - slave.devotion -= 10; - slave.trust -= 5; - } else { - t = ` Hours of manual labor quickly add up, leaving ${him} <span class="red">physically drained</span> by the end of the day.`; + if (slave.health.tired > 90) { + exhaustion = `exhaustion`; + } else if (slave.health.tired > 60) { + exhaustion = `being tired`; } + + r.push(`${He} performed worse this week due to <span class="health dec">${health}${slave.health.illness > 0 && slave.health.tired > 60 ? ` and ` : ``}${exhaustion}.</span>`); + + r.push(tired(slave)); } - tired(slave); - return t; - }; + return r; + } - const foodMuscles = slave => { + function tired(slave) { + if (slaveResting(slave)) { + return `${He} spends reduced hours working the soil in order to <span class="health dec">offset ${his} lack of rest.</span>`; + } else if (slave.health.tired + 20 >= 90 && !willWorkToDeath(slave)) { + return `${He} attempts to refuse work due to ${his} exhaustion, but can do little to stop it or the resulting <span class="trust dec">severe punishment.</span> ${He} <span class="devotion dec">purposefully underperforms,</span> choosing ${his} overall well-being over the consequences, <span class="health dec">greatly reducing yields.</span>`; + } else { + return `Hours of manual labor quickly add up, leaving ${him} <span class="health dec">physically drained</span> by the end of the day.`; + } + } + + function muscles(slave) { if (slave.muscles > 50) { - return `${His} muscular form helps ${him} work better, increasing ${his} productivity. `; + return `${His} muscular form helps ${him} work better, increasing ${his} productivity.`; } else if (slave.muscles < -50) { - return `${He} is so weak that ${he} is not able to work effectively. `; - } else { - return ``; // TODO: third case? + return `${He} is so weak that ${he} is not able to work effectively.`; } - }; + } - const foodWeight = slave => { - return slave.weight > 95 ? `${He} is so overweight that ${he} has to stop every few minutes to catch ${his} breath, and so ${his} productivity suffers. ` : ``; - }; + function weight(slave) { + if (slave.weight > 95) { + return `${He} is so overweight that ${he} has to stop every few minutes to catch ${his} breath, and so ${his} productivity suffers. `; + } + } - const foodSight = slave => { + function sight(slave) { if (!canSee(slave)) { - return `${His} blindness makes it extremely difficult for ${him} to work, severely limiting ${his} production. `; + return `${His} blindness makes it extremely difficult for ${him} to work, severely limiting ${his} production.`; } else if (!canSeePerfectly(slave)) { - return `${His} nearsightedness makes it harder for ${him} to work as hard as ${he} otherwise would. `; - } else { - return ``; // TODO: third case? + return `${His} nearsightedness makes it harder for ${him} to work as hard as ${he} otherwise would.`; } - }; + } - const foodHearing = slave => { + function hearing(slave) { if (slave.hears === -1) { - return `${He} is hard-of-hearing, which gets in the way of ${his} work whenever ${he} misses directions${V.Farmer ? ` from ${V.Farmer.slaveName}` : ``}. `; + return `${He} is hard-of-hearing, which gets in the way of ${his} work whenever ${he} misses directions${S.Farmer ? ` from ${S.Farmer.slaveName}` : ``}.`; } else if (slave.hears < -1) { - return `${He} is deaf, which gets in the way of ${his} work whenever ${he} misses directions${V.Farmer ? ` from ${V.Farmer.slaveName}` : ``}. `; - } else { - return ``; // TODO: third case? + return `${He} is deaf, which gets in the way of ${his} work whenever ${he} misses directions${S.Farmer ? ` from ${S.Farmer.slaveName}` : ``}.`; } - }; + } + function food() { + const fsGain = 0.0001 * foodAmount; - if (V.Farmer) { - // TODO: keep oral check? replace with something else? - t += `While there, ${he} benefits from ${V.Farmer.slaveName}'s ${V.Farmer.physicalAge < 21 ? `youthful energy` : `care`} ${V.Farmer.skill.oral ? ` and talented tongue` : ``}.`; - if (slave.devotion < V.FarmerDevotionThreshold) { - slave.devotion += V.FarmerDevotionBonus; - } - if (slave.devotion < V.FarmerTrustThreshold) { - slave.trust += V.FarmerTrustBonus; - } - if (slave.health.condition < 100) { - improveCondition(slave, V.FarmerHealthBonus); + FutureSocieties.DecorationBonus(V.farmyardDecoration, fsGain); + + if (V.foodMarket) { + return `As a result, ${he} produces <span class="chocolate">${massFormat(foodAmount)}</span> of food over the week.`; } } // Open Food Production if (V.foodMarket) { - if (food < 1) { - food = 1; - } - V.food += food; - V.foodTotal += food; - incomeStats.food += food; - - foodTotal(slave, food); + V.food += foodAmount; + V.foodTotal += foodAmount; + incomeStats.food += foodAmount; } // Close Food Production // Open Shows - incomeStats.income += App.Facilities.Farmyard.farmShowsIncome(slave); + function slaveShows(slave) { + if (V.farmyardShows) { + return App.Facilities.Farmyard.putOnShows(slave); + } + } - if (V.farmyardShows) { - t += `${He} also puts on shows with animals this week. `; + // Close Shows - // Open FS Subsection + // Open Long-Term Effects - if (arcology.FSSupremacist !== "unset") { - if (slave.race === arcology.FSSupremacistRace) { - t += `Society <span class="red">disapproves</span> of your allowing a member of the elite race to be degraded in such a fashion, and thus ${he} didn't earn as much. `; - } - } - if (arcology.FSSubjugationist !== "unset") { - if (slave.race === arcology.FSSubjugationistRace) { - t += `Society <span class="green">approves</span> of the degradation you submit your ${arcology.FSSubjugationistRace} slaves to, and so ${he} earns you a bit more. `; - } else { - t += `Society doesn't disapprove of ${him} not being ${arcology.FSSubjugationistRace}, but ${he} doesn't earn as much as ${he} would if ${he} was. `; - } - } - if (arcology.FSRepopulationFocus !== "unset") { - if (slave.pregWeek > 16) { - if (slave.eggType !== "human") { - t += `Society is <span class="red">disgusted</span> by ${his} pregnancy when they realize that what it is in ${his} womb is not human. `; - } else { - t += `Society <span class="green">greatly approves</span> of your having pregnant slaves ${V.seeBestiality ? `have sex` : `put on shows`} with animals. `; - } - } - } - if (arcology.FSRestart !== "unset") { - if (slave.pregWeek > 16) { - if (slave.eggType !== "human") { - t += `Society is disgusted by ${his} pregnancy until they learn that what is in ${his} womb is not human. `; + function longTermEffects(slave) { + let r = []; + + if (slave.fetishKnown && slaveApproves || slave.energy > 95) { + if (V.farmyardShows) { + if (V.seeBestiality) { + r.push(`Getting fucked by animals is the perfect job for ${him}, as far as ${he} can tell. <span class="devotion inc">${He} is happy</span> to spend ${his} days being utterly degraded.`); + slave.devotion += 1; } else { - t += `Society is <span class="red">extremely disgusted</span> by ${his} pregnancy and the fact that you would have ${him} ${V.seeBestiality ? `have sex` : `put on shows`} with animals while sporting a baby bump. `; + r.push(`${He} loves putting on shows with animals, and as far as ${he} can tell, it's the perfect job for ${him}. It isn't as degrading as ${he} would like, but <span class="devotion inc">${he} is happy nonetheless.</span>`); + slave.devotion += 2; } } + + slave.need = 0; } - if (arcology.FSGenderRadicalist !== "unset") { - if (slave.dick > 0) { - t += `${His} patrons <span class="green">approve</span> of the fact that ${he} has a dick. `; - } else { - t += `${His} patrons <span class="red">are disappointed</span> that ${he} doesn't have a dick. `; - } - } - if (arcology.FSGenderFundamentalist !== "unset") { - if (slave.pregWeek > 16) { - t += `${His} viewers <span class="green">approve</span> of the fact that ${he} is sporting a baby bump. `; - } else { - t += `${His} viewers <span class="red">are disappointed</span> that ${he} isn't pregnant. `; - } - if (slave.dick > 0) { - // TODO: something here? - } - } - if (arcology.FSPaternalist !== "unset") { - if (V.seeBestiality && V.farmyardBreeding) { - t += `Your citizens are <span class="red">very disapproving</span> of the fact that you would allow something as degrading as having your slaves be knocked up by filthy beasts. `; - } else { - t += `Your citizens <span class="red">disapprove</span> of the fact that you would allow your slaves to be degraded in such a manner. `; - } - } - if (arcology.FSDegradationist !== "unset") { - if (V.seeBestiality && V.farmyardBreeding) { - t += `Your citizens are <span class="green">very approving</span> of the fact that you would allow something as degrading as having your slaves be knocked up by filthy beasts. `; - } else { - t += `Your citizens <span class="green">approve</span> of the fact that you would allow your slaves to be degraded in such a manner. `; - } - } - if (arcology.FSBodyPurist !== "unset") { - /* TODO: requirements for these might change */ - if (slave.boobsImplant > 0) { - // TODO: add stuff here - } - if (slave.buttImplant > 0) { - // TODO: add stuff here - } - if (slave.faceImplant > 0) { - // TODO: add stuff here - } - if (slave.lipsImplant > 0) { - // TODO: add stuff here + + return r; + } + + // Close Long-Term Effects + + // Open Vignettes + + function slaveVignettes() { + if (V.showVignettes) { + const + vignette = GetVignette(slave); + + let r = []; + + r.push(`<span class="story-label">This week</span> ${vignette.text}`); + + if (vignette.type === "cash") { + r.push(vignetteCash(vignette)); } - } - if (arcology.FSTransformationFetishist !== "unset") { - /* TODO: requirements for these might change */ - if (slave.boobsImplant > 0) { - // TODO: add stuff here + + if (vignette.type === "devotion") { + r.push(vignetteDevotion(vignette)); } - if (slave.buttImplant > 0) { - // TODO: add stuff here + + if (vignette.type === "trust") { + r.push(vignetteTrust(vignette)); } - if (slave.faceImplant > 0) { - // TODO: add stuff here + + if (vignette.type === "health") { + r.push(vignetteHealth(vignette)); } - if (slave.lipsImplant > 0) { - // TODO: add stuff here + + if (vignette.type === "rep") { + r.push(vignetteReputation(vignette)); } + + return r.join(' '); } - if (arcology.FSYouthPreferentialist !== "unset") { - if (slave.visualAge > 25) { // TODO: not sure about this age - t += `${arcology.name}'s citizens <span class="red">disapprove</span> of your using such old slaves to put on shows. `; - } else { - t += `${arcology.name}'s citizens <span class="green">approve</span> of your using young slaves to put on shows. `; - } + } + + function vignetteCash(vignette) { + const + FResultNumber = FResult(slave), + cash = Math.trunc(FResultNumber * vignette.effect); + + incomeStats.income += cash; + + if (vignette.effect > 0) { + cashX(cash, "slaveAssignmentFarmyardVign", slave); + + return `<span class="yellowgreen">making you an extra ${cashFormat(cash)}.</span>`; + } else if (vignette.effect < 0) { + cashX(forceNeg(cash), "slaveAssignmentFarmyardVign", slave); + + return `<span class="reputation dec">losing you ${cashFormat(Math.abs(cash))}.</span>`; + } else { + return `an incident without lasting effect.`; } - if (arcology.FSMaturityPreferentialist !== "unset") { - if (slave.visualAge > 25) { // TODO: not sure about this age - t += `${arcology.name}'s citizens <span class="green">approve</span> of your using mature slaves to put on shows. `; + } + + function vignetteDevotion(vignette) { + slave.devotion += 1 * vignette.effect; + + if (vignette.effect > 0) { + if (slave.devotion > 50) { + return `<span class="devotion inc">increasing ${his} devotion to you.</span>`; + } else if (slave.devotion >= 20) { + return `<span class="devotion inc">increasing ${his} acceptance of you.</span>`; + } else if (slave.devotion >= -20) { + return `<span class="devotion inc">reducing ${his} dislike of you.</span>`; } else { - t += `${arcology.name}'s citizens <span class="red">disapprove</span> of your using such young slaves to put on shows. `; - } - } - if (arcology.FSSlimnessEnthusiast !== "unset") { - if (slave.weight > 10) { - t += `Society finds your using a slave with such a flabby body <span class="red">absolutely disgusting.</span> `; - } - if (slave.boobs > 799) { - t += `Your citizens ${slave.weight > 10 ? `also ` : ``} don't approve of you using a slave with such large tits as a showgirl. `; - } - if (slave.butt > 3) { - // TODO: write this - } - } - if (arcology.FSAssetExpansionist !== "unset") { - if (slave.weight > 10) { - // TODO: should weight be in here? - } - if (slave.boobs > 799) { - // TODO: write this - } - if (slave.butt > 3) { - // TODO: write this - } - } - if (arcology.FSPastoralist !== "unset") { - if (slave.boobs > 799) { - // TODO: does this make sense? - } - if (slave.lactation > 0) { - // TODO: write this - } - } - if (arcology.FSPhysicalIdealist !== "unset") { - if (slave.height > 169) { - // TODO: write this + return `<span class="devotion inc">reducing ${his} hatred of you.</span>`; + } + } else if (vignette.effect < 0) { + if (slave.devotion > 50) { + return `<span class="devotion dec">reducing ${his} devotion to you.</span>`; + } else if (slave.devotion >= 20) { + return `<span class="devotion dec">reducing ${his} acceptance of you.</span>`; + } else if (slave.devotion >= -20) { + return `<span class="devotion dec">increasing ${his} dislike of you.</span>`; } else { - // TODO: write this + return `<span class="devotion dec">increasing ${his} hatred of you.</span>`; } + } else { + return `an incident without lasting effect.`; } - if (arcology.FSHedonisticDecadence !== "unset") { - if (slave.weight > 10) { - // TODO: write this + } + + function vignetteTrust(vignette) { + slave.trust += 1 * vignette.effect; + + if (vignette.effect > 0) { + if (slave.trust > 20) { + return `<span class="trust inc">increasing ${his} trust in you.</span>`; + } else if (slave.trust >= -20) { + return `<span class="trust inc">reducing ${his} fear of you.</span>`; } else { - // TODO: write this + return `<span class="trust inc">reducing ${his} terror of you.</span>`; } - } - if (arcology.FSChattelReligionist !== "unset") { - if (slave.devotion <= 20) { - // TODO: write this + } else if (vignette.effect < 0) { + if (slave.trust > 20) { + return `<span class="trust dec">reducing ${his} trust in you.</span>`; + } else if (slave.trust >= -20) { + return `<span class="trust dec">increasing ${his} fear of you.</span>`; } else { - // TODO: write this + return `<span class="trust dec">increasing ${his} terror of you.</span>`; } - } - - // Close FS Subsection - - if (setup.entertainmentCareers.includes(slave.career)) { - t += ` ${He} has experience with putting on shows from ${his} life before ${he} was a slave, making ${him} more effective at putting on shows. `; - } - if (setup.farmerCareers.includes(slave.career)) { // TODO: does this even make sense to include? - // TODO: write this - } - if (slave.prestige === 1) { - t += `Because some of your citizens already know of ${him}, ${he} earns more. `; - } else if (slave.prestige === 2) { - t += `Because a lot of your citizens already know of ${him}, ${he} earns quite a bit more. `; - } else if (slave.prestige === 3) { - t += `Because ${he} is so famous, ${he} earns a lot more then ${he} would otherwise. `; - } - if (slave.porn.prestige === 1) { // TODO: are prestige and pornPrestige mutually exclusive? - t += `${He} earns a bit more because some of your citizens already know ${him} from porn. `; - } else if (slave.porn.prestige === 2) { - t += `${He} earns quite a bit more because a lot of your citizens already know ${him} from porn. `; - } else if (slave.porn.prestige === 3) { - t += `${He} earns a lot more because ${he} is so famous from porn. `; - } - if (slave.health.condition > 20) { - t += `${He} is in such excellent health that ${he} is able to put on longer and more energetic shows, earning you more. `; - } else if (slave.health.condition < -20) { - t += `${His} poor health negatively affects ${his} ability to put on good shows, cutting into your profits. `; - } - if (slave.face > 40) { - t += `${He} is so ${slave.genes === "XY" ? `handsome` : `beautiful`} that ${his} audience is willing to pay more to watch ${him} put on shows. `; - } else if (slave.face > 10) { - t += `${He} is so ${slave.genes === "XY" ? `good-looking` : `pretty`} that ${his} audience is willing to pay more to watch ${him} put on shows. `; - } else if (slave.face < -10) { - t += `${His} audience isn't willing to pay as much because of how unattractive ${his} face is. `; - } else if (slave.face < -40) { - t += `${His} audience isn't willing to pay as much because of how hard ${his} face is to look at. `; - } - // TODO: write this block with different combinations of trust / devotion - if (slave.devotion > 50) { - // TODO: write this - } else if (slave.devotion < -50) { - // TODO: write this - } - if (slave.trust > 50) { - // TODO: write this - } else if (slave.trust < -50) { - // TODO: write this - } - if (slave.weight > 30 && arcology.FSHedonisticDecadence === "unset") { - t += `Your citizens are not willing to pay as much to see such a fat slave put on shows, so ${he} loses some income. `; - } else if (slave.weight < -30) { - t += `Your citizens don't like watching such a sickly-looking slaves put on shows, so ${he} loses some income. `; - } - if (slave.muscles > 30) { - // TODO: write this - do we want something for muscles? - } else if (slave.muscles < -30) { - // TODO: write this - maybe something about the slave's ability to handle the animal? - } - if (!canSeePerfectly(slave)) { - t += `${His} ${!canSee(slave) ? `blindness makes it impossible` : `nearsightedness makes it harder`}} for ${him} to see what ${he}'s doing, affecting ${his} ability to put on a good show. `; - } - if (slave.hears < 0) { - t += `${His} ${slave.hears < -1 ? `lack of` : `poor`} hearing makes it difficult for ${him} to do a good job of putting on a show. `; - } - if (slave.boobs > 800) { - // TODO: write this - } - if (slave.butt > 4) { - // TODO: write this - } - if (slave.preg > 10) { - // TODO: write this - } - if (slave.health.tired > 60) { - t += `${He} is so tired that the energy in ${his} shows is basically nonexistent, affecting ${his} profits. `; - } - if (slave.chem > 10) { - // TODO: write this - would this make sense to include? - } - if (slave.intelligence > 50) { - // TODO: write this - include something about .intelligenceImplant? - } else if (slave.intelligence < -50) { - // TODO: write this - } - if (slave.energy <= 20) { - // TODO: write this - } else if (slave.energy <= 40) { - // TODO: write this - } else if (slave.energy <= 60) { - // TODO: write this - } else if (slave.energy <= 80) { - // TODO: write this - } else if (slave.energy <= 95) { - // TODO: write this } else { - // TODO: write this + return `an incident without lasting effect.`; } - if (slave.fetish === "submissive") { - // TODO: write this - } else if (slave.fetish === "humiliation") { - // TODO: write this - } else if (slave.fetish === "masochist") { - // TODO: write this - } // TODO: incorporate quirks } - // Close Shows + function vignetteHealth(vignette) { + if (vignette.effect > 0) { + improveCondition(slave, 2 * vignette.effect); - // Open Long-Term Effects + return `<span class="reputation inc">improving ${his} health.</span>`; + } else if (vignette.effect < 0) { + healthDamage(slave, 2 * vignette.effect); - if (slave.fetishKnown && (slave.fetish === "submissive" || slave.fetish === "humiliation" || slave.fetish === "masochist") || slave.energy > 95) { - if (V.farmyardShows) { - if (V.seeBestiality) { - t += `Getting fucked by animals is the perfect job for ${him}, as far as ${he} can tell. <span class="devotion inc">${He} is happy</span> to spend ${his} days being utterly degraded. `; - } else { - t += `${He} loves putting on shows with animals, and as far as ${he} can tell, it's the perfect job for ${him}. <span class="devotion inc">${He} is happy</span> to spend ${his} days doing something so degrading. `; // TODO: not sure how degrading putting on shows is - } - } - slave.devotion += 1; - if (slave.need) { - slave.need = 0; + return `<span class="reputation dec">affecting ${his} health.</span>`; + } else { + return `an incident without lasting effect.`; } } - if (slave.behavioralQuirk === "fitness") { - t += `${slave.slaveName} <span class="devotion inc">privately enjoys</span> the exercise ${he} receives while working in ${V.farmyardName}. `; - slave.devotion += 1; - } - // Close Long-Term Effects + function vignetteReputation(vignette) { + const FResultNumber = FResult(slave); - // Open Vignettes + repX(Math.trunc(FResultNumber * vignette.effect * 0.1), "vignette", slave); + incomeStats.rep += Math.trunc(FResultNumber * vignette.effect * 0.1); - if (V.showVignettes) { - const vignette = GetVignette(slave); - t += `<span class="story-label">This week</span> ${vignette.text}`; - if (vignette.type === "cash") { - let FResultNumber = FResult(slave); - const cashVign = Math.trunc(FResultNumber * vignette.effect); - if (vignette.effect > 0) { - t += ` <span class="yellowgreen">making you an extra ${cashFormat(cashVign)}.</span> `; - cashX(cashVign, "slaveAssignmentFarmyardVign", slave); - } else if (vignette.effect < 0) { - t += ` <span class="red">losing you ${cashFormat(Math.abs(cashVign))}.</span> `; - cashX(forceNeg(cashVign), "slaveAssignmentFarmyardVign", slave); - } else { - t += ` an incident without lasting effect. `; - } - incomeStats.income += cashVign; - } else if (vignette.type === "devotion") { - if (vignette.effect > 0) { - if (slave.devotion > 50) { - t += ` <span class="devotion inc">increasing ${his} devotion to you.</span> `; - } else if (slave.devotion >= 20) { - t += ` <span class="devotion inc">increasing ${his} acceptance of you.</span> `; - } else if (slave.devotion >= -20) { - t += ` <span class="devotion inc">reducing ${his} dislike of you.</span> `; - } else { - t += ` <span class="devotion inc">reducing ${his} hatred of you.</span> `; - } - } else if (vignette.effect < 0) { - if (slave.devotion > 50) { - t += ` <span class="devotion dec">reducing ${his} devotion to you.</span> `; - } else if (slave.devotion >= 20) { - t += ` <span class="devotion dec">reducing ${his} acceptance of you.</span> `; - } else if (slave.devotion >= -20) { - t += ` <span class="devotion dec">increasing ${his} dislike of you.</span> `; - } else { - t += ` <span class="devotion dec">increasing ${his} hatred of you.</span> `; - } - } else { - t += ` an incident without lasting effect. `; - } - slave.devotion += 1 * vignette.effect; - } else if (vignette.type === "trust") { - if (vignette.effect > 0) { - if (slave.trust > 20) { - t += ` <span class="trust inc">increasing ${his} trust in you.</span> `; - } else if (slave.trust >= -20) { - t += ` <span class="trust inc">reducing ${his} fear of you.</span> `; - } else { - t += ` <span class="trust inc">reducing ${his} terror of you.</span> `; - } - } else if (vignette.effect < 0) { - if (slave.trust > 20) { - t += ` <span class="trust dec">reducing ${his} trust in you.</span> `; - } else if (slave.trust >= -20) { - t += ` <span class="trust dec">increasing ${his} fear of you.</span> `; - } else { - t += ` <span class="trust dec">increasing ${his} terror of you.</span> `; - } - } else { - t += ` an incident without lasting effect. `; - } - slave.trust += 1 * vignette.effect; - } else if (vignette.type === "health") { - if (vignette.effect > 0) { - t += ` <span class="green">improving ${his} health.</span> `; - improveCondition(slave, 2 * vignette.effect); - } else if (vignette.effect < 0) { - t += ` <span class="red">affecting ${his} health.</span> `; - healthDamage(slave, 2 * vignette.effect); - } else { - t += ` an incident without lasting effect. `; - } + if (vignette.effect > 0) { + return `<span class="reputation inc">gaining you a bit of reputation.</span>`; + } else if (vignette.effect < 0) { + return `<span class="reputation dec">losing you a bit of reputation.</span>`; } else { - let FResultNumber = FResult(slave); - if (vignette.effect > 0) { - t += ` <span class="green">gaining you a bit of reputation.</span> `; - } else if (vignette.effect < 0) { - t += ` <span class="red">losing you a bit of reputation.</span> `; - } else { - t += ` an incident without lasting effect. `; - } - repX(Math.trunc(FResultNumber * vignette.effect * 0.1), "vignette", slave); - incomeStats.rep += Math.trunc(FResultNumber * vignette.effect * 0.1); + return `an incident without lasting effect.`; } } // Close Vignettes - // Facility Decorations - const fsGain = 0.0001 * food; - FutureSocieties.DecorationBonus(V.farmyardDecoration, fsGain); + fullReport(slave); - return t; + return frag; }; diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js new file mode 100644 index 0000000000000000000000000000000000000000..787d3478c38e1f4fefc0fb54a7d4b6d838a5878c --- /dev/null +++ b/src/facilities/farmyard/farmyard.js @@ -0,0 +1,357 @@ +App.Facilities.Farmyard.clearAnimalsBought = function () { + for (const i in V.animalsBought) { + V.animalsBought[i] = 0; + } +}; + +App.Facilities.Farmyard.upgrades = function () { + const frag = new DocumentFragment(), + + farmyardUpgrades = V.farmyardUpgrades, + + pumpCost = Math.trunc(5000 * V.upgradeMultiplierArcology), + fertilizerCost = Math.trunc(10000 * V.upgradeMultiplierArcology), + hydroponicsCost = Math.trunc(20000 * V.upgradeMultiplierArcology), + seedsCost = Math.trunc(25000 * V.upgradeMultiplierArcology), + machineryCost = Math.trunc(50000 * V.upgradeMultiplierArcology); + + if (!farmyardUpgrades.pump) { + const + desc = document.createElement("div"), + upgrade = document.createElement("div"), + note = document.createElement("span"); + + upgrade.classList.add("indent"); + note.classList.add("note"); + + upgrade.append(App.UI.DOM.passageLink("Upgrade the water pump", "Farmyard", () => { + cashX(forceNeg(pumpCost)); + farmyardUpgrades.pump = 1; + })); + + note.append(` Costs ${cashFormat(pumpCost)} and slightly decreases upkeep costs.`); + + desc.append(`${V.farmyardNameCaps} is currently using the basic water pump that it came with.`); + + upgrade.append(note); + frag.append(desc, upgrade); + } else { + const desc = document.createElement("div"); + + desc.append(`The water pump in ${V.farmyardName} is a more efficient model, slightly improving the amount of crops it produces.`); + + frag.append(desc); + + if (!farmyardUpgrades.fertilizer) { + const + upgrade = document.createElement("div"), + note = document.createElement("span"); + + upgrade.classList.add("indent"); + note.classList.add("note"); + + upgrade.append(App.UI.DOM.passageLink("Use a higher-quality fertilizer", "Farmyard", () => { + cashX(forceNeg(fertilizerCost)); + farmyardUpgrades.fertilizer = 1; + })); + note.append(` Costs ${cashFormat(fertilizerCost)} and moderately increases crop yield and slightly increases upkeep costs.`); + + upgrade.append(note); + frag.append(upgrade); + } else { + const desc = document.createElement("div"); + + desc.append(`${V.farmyardNameCaps} is using a higher-quality fertilizer, moderately increasing the amount of crops it produces and raising slightly raising upkeep costs.`); + + frag.append(desc); + + if (!farmyardUpgrades.hydroponics) { + const + upgrade = document.createElement("div"), + note = document.createElement("span"); + + upgrade.classList.add("indent"); + note.classList.add("note"); + + upgrade.append(App.UI.DOM.passageLink("Purchase an advanced hydroponics system", "Farmyard", () => { + cashX(forceNeg(hydroponicsCost)); + farmyardUpgrades.hydroponics = 1; + })); + + note.append(` Costs ${cashFormat(hydroponicsCost)} and moderately decreases upkeep costs.`); + + upgrade.append(note); + frag.append(upgrade); + } else { + const desc = document.createElement("div"); + + desc.append(`${V.farmyardNameCaps} is outfitted with an advanced hydroponics system, reducing the amount of water your crops consume and thus moderately reducing upkeep costs.`); + + frag.append(desc); + + if (!farmyardUpgrades.seeds) { + const + upgrade = document.createElement("div"), + note = document.createElement("span"); + + upgrade.classList.add("indent"); + note.classList.add("note"); + + upgrade.append(App.UI.DOM.passageLink("Purchase genetically modified seeds", "Farmyard", () => { + cashX(forceNeg(seedsCost)); + farmyardUpgrades.seeds = 1; + })); + + note.append(` Costs ${cashFormat(seedsCost)} and moderately increases crop yield and slightly increases upkeep costs.`); + + upgrade.append(note); + frag.append(upgrade); + } else { + const desc = document.createElement("div"); + + desc.append(`${V.farmyardNameCaps} is using genetically modified seeds, significantly increasing the amount of crops it produces and moderately increasing upkeep costs.`); + + frag.append(desc); + + if (!farmyardUpgrades.machinery) { + const + upgrade = document.createElement("div"), + note = document.createElement("span"); + + upgrade.classList.add("indent"); + note.classList.add("note"); + + upgrade.append(App.UI.DOM.passageLink("Upgrade the machinery", "Farmyard", () => { + cashX(forceNeg(machineryCost)); + farmyardUpgrades.machinery = 1; + })); + + note.append(` Costs ${cashFormat(machineryCost)} and moderately increases crop yield and slightly increases upkeep costs.`); + + upgrade.append(note); + frag.append(upgrade); + } else { + const desc = document.createElement("div"); + + desc.append(`The machinery in ${V.farmyardName} has been upgraded, and is more efficient, significantly increasing crop yields and significantly decreasing upkeep costs.`); + + frag.append(desc); + } + } + } + } + } + + return frag; +}; + +App.Facilities.Farmyard.animalHousing = function () { + const frag = new DocumentFragment(), + + baseCost = Math.trunc(5000 * V.upgradeMultiplierArcology), + upgradedCost = Math.trunc(10000 * V.upgradeMultiplierArcology); + + let + farmyardKennels = V.farmyardKennels, + farmyardStables = V.farmyardStables, + farmyardCages = V.farmyardCages; + + + + // MARK: Kennels + + const + CL = V.canines.length, + + dogs = CL === 1 ? V.canines[0] : CL < 3 ? + `several different breeds of dogs` : + `all kinds of dogs`, + canines = CL === 1 ? V.canines[0].species === "dog" ? + V.canines[0].breed : V.canines[0].speciesPlural : CL < 3 ? + `several different ${V.canines.every( + c => c.species === "dog") ? + `breeds of dogs` : `species of canines`}` : + `all kinds of canines`, + + kennels = document.createElement("div"), + kennelsNote = document.createElement("span"), + kennelsUpgrade = document.createElement("div"); + + kennelsNote.classList.add("note"); + kennelsUpgrade.classList.add("indent"); + + if (farmyardKennels === 0) { + kennels.append(App.UI.DOM.passageLink("Add kennels", "Farmyard", + () => { + cashX(forceNeg(baseCost)); + V.farmyardKennels = 1; + })); + + kennelsNote.append(` Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic canines`); + + kennels.append(kennelsNote); + } else if (farmyardKennels === 1) { + kennels.append(App.UI.DOM.passageLink("Kennels", "Farmyard Animals")); + kennels.append(` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${dogs}.`}`); + + if (V.rep > 10000) { + kennelsUpgrade.append(App.UI.DOM.passageLink("Upgrade kennels", "Farmyard", + () => { + cashX(forceNeg(upgradedCost)); + V.farmyardKennels = 2; + })); + + kennelsNote.append(` Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic canines`); + + kennelsUpgrade.append(kennelsNote); + kennels.append(kennelsUpgrade); + } + } else if (farmyardKennels === 2) { + kennels.append(App.UI.DOM.passageLink("Large kennels", "Farmyard Animals")); + kennels.append(` have been built in one corner of ${V.farmyardName}, and are currently ${CL < 1 ? `empty` : `occupied by ${canines}`} `); + } + + + + // MARK: Stables + + const + HL = V.hooved.length, + + hooved = HL === 1 ? V.hooved[0] : HL < 3 ? + `several different types of hooved animals` : + `all kinds of hooved animals`, + + stables = document.createElement("div"), + stablesNote = document.createElement("span"), + stablesUpgrade = document.createElement("div"); + + stablesNote.classList.add("note"); + stablesUpgrade.classList.add("indent"); + + if (farmyardStables === 0) { + stables.append(App.UI.DOM.passageLink("Add stables", "Farmyard", + () => { + cashX(forceNeg(baseCost)); + V.farmyardStables = 1; + })); + + stablesNote.append(` Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic hooved animals`); + + stables.append(stablesNote); + } else if (farmyardStables === 1) { + stables.append(App.UI.DOM.passageLink("Stables", "Farmyard Animals")); + stables.append(` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}.`}`); + + if (V.rep > 10000) { + stablesUpgrade.append(App.UI.DOM.passageLink("Upgrade stables", "Farmyard", + () => { + cashX(forceNeg(upgradedCost)); + V.farmyardStables = 2; + })); + + stablesNote.append(` Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic hooved animals`); + + stablesUpgrade.append(stablesNote); + stables.append(stablesUpgrade); + } + } else if (farmyardStables === 2) { + stables.append(App.UI.DOM.passageLink("Large stables", "Farmyard Animals")); + stables.append(` have been built in one corner of ${V.farmyardName}, and are currently ${HL < 1 ? `empty` : `occupied by ${hooved}`} `); + } + + + + // MARK: Cages + + const + FL = V.felines.length, + + cats = FL === 1 ? V.felines[0] : FL < 3 ? + `several different breeds of cats` : + `all kinds of cats`, + felines = FL === 1 ? V.felines[0].species === "cat" ? + V.felines[0].breed : V.felines[0].speciesPlural : FL < 3 ? + `several different ${V.felines.every( + c => c.species === "cat") ? + `breeds of cats` : `species of felines`}` : + `all kinds of felines`, + + cages = document.createElement("div"), + cagesNote = document.createElement("span"), + cagesUpgrade = document.createElement("div"); + + cagesNote.classList.add("note"); + cagesUpgrade.classList.add("indent"); + + if (farmyardCages === 0) { + cages.append(App.UI.DOM.passageLink("Add cages", "Farmyard", + () => { + cashX(forceNeg(baseCost)); + V.farmyardCages = 1; + })); + + cagesNote.append(` Costs ${cashFormat(baseCost)}, will incur upkeep costs, and unlocks domestic felines`); + + cages.append(cagesNote); + } else if (farmyardCages === 1) { + cages.append(App.UI.DOM.passageLink("Cages", "Farmyard Animals")); + cages.append(` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${cats}.`}`); + + if (V.rep > 10000) { + cagesUpgrade.append(App.UI.DOM.passageLink("Upgrade cages", "Farmyard", + () => { + cashX(forceNeg(upgradedCost)); + V.farmyardCages = 2; + })); + + cagesNote.append(` Costs ${cashFormat(upgradedCost)}, will incur additional upkeep costs, and unlocks exotic felines`); + + cagesUpgrade.append(cagesNote); + cages.append(cagesUpgrade); + } + } else if (farmyardCages === 2) { + cages.append(App.UI.DOM.passageLink("Large cages", "Farmyard Animals")); + cages.append(` have been built in one corner of ${V.farmyardName}, and are currently ${FL < 1 ? `empty` : `occupied by ${felines}`} `); + } + + + + // MARK: Remove Housing + + const + removeHousing = document.createElement("div"), + removeCost = ((farmyardKennels + farmyardStables + farmyardCages) * 5000) * V.upgradeMultiplierArcology; + + if (farmyardKennels || farmyardStables || farmyardCages) { + removeHousing.append(document.createElement("br")); + + removeHousing.append(App.UI.DOM.passageLink("Remove the animal housing", "Farmyard", + () => { + V.farmyardKennels = 0; + V.farmyardStables = 0; + V.farmyardCages = 0; + + V.farmyardShows = 0; + V.farmyardBreeding = 0; + V.farmyardRestraints = 0; + + V.canines = []; + V.hooved = []; + V.felines = []; + + App.Facilities.Farmyard.clearAnimalsBought(); + })); + + removeHousing.append(` Will cost ${cashFormat(removeCost)}`); + } + + + + frag.append(" ", kennels); + frag.append(" ", stables); + frag.append(" ", cages); + frag.append(" ", removeHousing); + + return frag; +}; diff --git a/src/facilities/farmyard/farmyard.tw b/src/facilities/farmyard/farmyard.tw index 60d10497b5c54964ad83dc078deb82b11b090c34..b05f981da858a72dada11eb43bfb02d94d837f20 100644 --- a/src/facilities/farmyard/farmyard.tw +++ b/src/facilities/farmyard/farmyard.tw @@ -12,58 +12,58 @@ <<set _CL = $canines.length, _HL = $hooved.length, _FL = $felines.length, _FyL = App.Entity.facilities.farmyard.employeesIDs().size>> <p class="scene-intro"> - $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and concrete that is $arcologies[0].name. Animals are kept in pens, tended to by your slaves, while <<if $farmyardUpgrade.hydroponics == 1>>rows of hydroponics equipment<<else>>makeshift fields<</if>> grow crops. + $farmyardNameCaps is an oasis of growth in the midst of the jungle of steel and concrete that is $arcologies[0].name. Animals are kept in pens, tended to by your slaves, while <<if $farmyardUpgrades.hydroponics == 1>>rows of hydroponics equipment<<else>>makeshift fields<</if>> grow crops. <<switch $farmyardDecoration>> <<case "Roman Revivalist">> - Its red tiles and white stone walls are the very picture of a Roman farm villa's construction, as are the marble statues and reliefs. Saturn and Ceres look over the prosperity of the fields<<if $seeBestiality == 1>>, Mercury watches over the health of the animals, and Feronia ensures strong litters in your slaves.<<else>> and Mercury watches over the health of the animals.<</if>>. The slaves here are all looked after well, as they have one of the most important jobs in $arcologies[0].name. + Its red tiles and white stone walls are the very picture of a Roman farm villa's construction, as are the marble statues and reliefs. Saturn and Ceres look over the prosperity of the fields<<if $seeBestiality>>, Mercury watches over the health of the animals, and Feronia ensures strong litters in your slaves.<<else>> and Mercury watches over the health of the animals.<</if>>. The slaves here are all looked after well, as they have one of the most important jobs in $arcologies[0].name. <<case "Aztec Revivalist">> It can't completely recreate the floating farms in the ancient Aztec fashion, but it comes as close as it can, shallow pseudo-canals dividing each field into multiple sections. Smooth stone and colorful murals cover the walls, depicting bloody stories of gods and mortals alike. <<case "Egyptian Revivalist">> - It does its best to capture the wide open nature of ancient Egyptian farms, including mimicking the irrigation systems fed by the Nile. The stone walls are decorated with murals detailing its construction and your prowess in general, <<if $seeBestiality == 1>>with animal-bloated slaves featured prominently.<<else>>hieroglyphs spelling out a volumes of praise.<</if>> + It does its best to capture the wide open nature of ancient Egyptian farms, including mimicking the irrigation systems fed by the Nile. The stone walls are decorated with murals detailing its construction and your prowess in general, <<if $seeBestiality>>with animal-bloated slaves featured prominently.<<else>>hieroglyphs spelling out a volumes of praise.<</if>> <<case "Edo Revivalist">> It does its best to mimic the rice patties and thatch roofed buildings of the Edo period despite the wide variety of crops tended by various slaves. Not every crop can thrive in flooded fields, but the ones that can take advantage of your attention to detail. <<case "Arabian Revivalist">> - //This is a placeholder// + Large plots of olive trees and date palms line the outer edges of the main crop area, while a combination of wheat, flax, and barley occupies the interior space. Irrigation canals snake through the area, ensuring every inch of cropland is well-watered. <<case "Chinese Revivalist">> - It does its best to capture the terraces that covered the ancient Chinese hills and mountains, turning every floor into ribbons of fields following a slight incline. Slaves wade through crops that can handle flooding and splash through the irrigation of the others when they aren't tending <<if $seeBestiality == 1>>or breeding with<</if>> your animals. + It does its best to capture the terraces that covered the ancient Chinese hills and mountains, turning every floor into ribbons of fields following a slight incline. Slaves wade through crops that can handle flooding and splash through the irrigation of the others when they aren't tending <<if $seeBestiality>>or breeding with<</if>> your animals. <<case "Chattel Religionist">> - It runs like a well oiled machine, slaves bent in humble service as they tend crops grown on the Prophet's command, or see to the animals' needs. Their clothing is tucked up and out of the way as they see to their tasks, keeping them clean as they work <<if $seeBestiality == 1>>around animal bloated bellies<</if>> as divine will dictates. + It runs like a well oiled machine, slaves bent in humble service as they tend crops grown on the Prophet's command, or see to the animals' needs. Their clothing is tucked up and out of the way as they see to their tasks, keeping them clean as they work <<if $seeBestiality>>around animal bloated bellies<</if>> as divine will dictates. <<case "Degradationist">> - It is constructed less as a converted warehouse and more as something to visit, allowing guests to enjoy the spectacle of slaves <<if $seeBestiality == 1>>being pounded by eager animals<<else>>elbow deep in scrubbing animal waste<</if>> to their satisfaction. + It is constructed less as a converted warehouse and more as something to visit, allowing guests to enjoy the spectacle of slaves <<if $seeBestiality>>being pounded by eager animals<<else>>elbow deep in scrubbing animal waste<</if>> to their satisfaction. <<case "Repopulation Focus">> - It teems with life, both in the belly of every animal and the belly of every slave, though the latter makes tending the fields difficult. They're ordered to take care, as they carry the future <<if $seeBestiality == 1>>of this farm<<else>>of the arcology<</if>> in their bellies. + It teems with life, both in the belly of every animal and the belly of every slave, though the latter makes tending the fields difficult. They're ordered to take care, as they carry the future <<if $seeBestiality>>of this farm<<else>>of the arcology<</if>> in their bellies. <<case "Eugenics">> - It holds a wide variety of crops and animals, but the best of the best is easy to find. They're set apart from the others, given only the best care and supplies<<if $seeBestiality == 1>>and bred with only the highest quality slaves<</if>>, while the sub-par stock is neglected off to the side. + It holds a wide variety of crops and animals, but the best of the best is easy to find. They're set apart from the others, given only the best care and supplies<<if $seeBestiality>>and bred with only the highest quality slaves<</if>>, while the sub-par stock is neglected off to the side. <<case "Asset Expansionist">> It is not easy to look after animals and till fields with such enormous body parts, but your slaves are diligent regardless, working hard to provide food and livestock for the arcology. <<case "Transformation Fetishist">> - //This is a placeholder// + /* TODO: */ <<case "Gender Radicalist">> - //This is a placeholder// + /* TODO: */ <<case "Gender Fundamentalist">> - //This is a placeholder// + /* TODO: */ <<case "Physical Idealist">> - Its animals are in exceptional shape, their coats unable to hide how muscular they are, requiring your slaves to be equally toned to control them. There's plenty of space for their exercise as well<<if $seeBestiality == 1>> and an abundance of curatives for the slaves full of their fierce kicking offspring<</if>>. + Its animals are in exceptional shape, their coats unable to hide how muscular they are, requiring your slaves to be equally toned to control them. There's plenty of space for their exercise as well<<if $seeBestiality>> and an abundance of curatives for the slaves full of their fierce kicking offspring<</if>>. <<case "Supremacist">> It is a clean and orderly operation, stables and cages mucked by a multitude of inferior slaves, along with grooming your animals and harvesting your crops. <<case "Subjugationist">> It is a clean and orderly operation, stables and cages mucked by a multitude of $arcologies[0].FSSubjugationistRace slaves, while the others are tasked with grooming your animals and harvesting your crops. <<case "Paternalist">> - It's full of healthy animals, crops, and slaves, the former's every need diligently looked after by the latter. The fields flourish to capacity under such care, and the animals give the distinct impression of happiness. <<if $seeBestiality == 1>>Some more than others if the growing bellies of your slaves are anything to go by, the only indication that such rutting takes place.<</if>> /* TODO: this sentence seems weird */ + It's full of healthy animals, crops, and slaves, the former's every need diligently looked after by the latter. The fields flourish to capacity under such care, and the animals give the distinct impression of happiness<<if $seeBestiality>> — some more than others if the growing bellies of your slaves are anything to go by, the only indication that such rutting takes place<</if>>. <<case "Pastoralist">> - //This is a placeholder// + /* TODO: */ <<case "Maturity Preferentialist">> - //This is a placeholder// + /* TODO: */ <<case "Youth Preferentialist">> - //This is a placeholder// + /* TODO: */ <<case "Body Purist">> - //This is a placeholder// + /* TODO: */ <<case "Slimness Enthusiast">> It features trim animals and slaves alike, not a pound of excess among them. The feed for both livestock and crops are carefully maintained to ensure optimal growth without waste, letting them flourish without being weighed down. <<case "Hedonistic">> - It features wider gates and stalls, for both the humans visiting or tending the occupants, and the animals starting to mimic their handlers <<if $seeBestiality == 1>>and company<</if>>, with plenty of seats along the way. + It features wider gates and stalls, for both the humans visiting or tending the occupants, and the animals starting to mimic their handlers <<if $seeBestiality>>and company<</if>>, with plenty of seats along the way. <<default>> - It is very much a converted warehouse still, sectioned off in various 'departments'<<if $farmyardUpgrade.machinery == 1>> with machinery placed where it can be<<if $farmyardUpgrade.hydroponics > 0>> and plumbing for the hydroponics system running every which way<</if>><</if>>. + It is very much a converted warehouse still, sectioned off in various 'departments'<<if $farmyardUpgrades.machinery == 1>> with machinery placed where it can be<<if $farmyardUpgrades.hydroponics > 0>> and plumbing for the hydroponics system running every which way<</if>><</if>>. <</switch>> <<if _FyL > 2>> @@ -79,7 +79,8 @@ <<if $farmMenials > 0>> <<set $menials += $farmMenials>> <</if>> - <<set $farmyardName = "the Farmyard", $farmyard = 0, $farmyardDecoration = "standard", $farmMenials = 0, $farmMenialsSpace = 0, $farmyardShows = 0, $farmyardBreeding = 0, $farmyardUpgrade = {pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0}, $farmyardCrops = 0, $farmyardKennels = 0, $farmyardStable = 0, $farmyardCages = 0, $activeCanine = 0, $activeHooved = 0, $activeFeline = 0, $animalsBought = {canines: 0, hooved: 0, felines: 0, labradorRetrievers: 0, germanShepherds: 0, goldenRetrievers: 0, frenchBulldogs: 0, bulldogs: 0, beagles: 0, poodles: 0, rottweilers: 0, yorkshireTerriers: 0, siberianHuskies: 0, horses: 0, bulls: 0, pigs: 0, siameses: 0, persians: 0, maineCoons: 0, ragdolls: 0, bengals: 0, abbysinians: 0, birmans: 0, orientalShorthairs: 0, sphynxes: 0, russianBlues: 0, wolves: 0, foxes: 0, jackals: 0, dingos: 0, zebras: 0, cougars: 0, jaguars: 0, pumas: 0, lynx: 0, leopards: 0, lions: 0, tigers: 0}, $pitAnimal = 0, $pitAnimalType = 0, $canines = [], $hooved = [], $felines = []>> + <<set $farmyardName = "the Farmyard", $farmyard = 0, $farmyardDecoration = "standard", $farmMenials = 0, $farmMenialsSpace = 0, $farmyardShows = 0, $farmyardBreeding = 0, $farmyardUpgrade = {pump: 0, fertilizer: 0, hydroponics: 0, machinery: 0, seeds: 0}, $farmyardCrops = 0, $farmyardKennels = 0, $farmyardStables = 0, $farmyardCages = 0, $activeCanine = 0, $activeHooved = 0, $activeFeline = 0, $pitAnimal = 0, $pitAnimalType = 0, $canines = [], $hooved = [], $felines = []>> + <<run App.Facilities.Farmyard.clearAnimalsBought()>> <<run App.Arcology.cellUpgrade($building, App.Arcology.Cell.Manufacturing, "Farmyard", "Manufacturing")>> <</link>> </div> @@ -226,231 +227,12 @@ </span> <span id="upgrades"> -<<if $farmyardUpgrade.pump == 0>> - [[Upgrade the water pump|Farmyard][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.pump = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and slightly increases crop yield. - </span> - <br> -<<else>> - The water pump in $farmyardName is a more efficient model, slightly improving the amount of crops $farmyardName produces. - <br> - <<if $farmyardUpgrade.fertilizer == 0>> - [[Use a higher-quality fertilizer|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.fertilizer = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> moderately increases crop yield and slightly increases upkeep costs. - </span> - <br> - <<else>> - $farmyardNameCaps is using a higher-quality fertilizer, moderately increasing the amount of crops it produces and raising slightly raising upkeep costs. - <br> - <<if $farmyardUpgrade.hydroponics == 0>> - [[Purchase a hydroponics system|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.hydroponics = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and moderately decreases upkeep costs. - </span> - <br> - <<else>> - $farmyardNameCaps is outfitted with an advanced hydroponics system, reducing the amount of water your crops consume and thus moderately reducing upkeep costs. - <br> - <<if $farmyardUpgrade.seeds == 0>> - [[Purchase genetically modified seeds|Farmyard][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"),$farmyardUpgrade.seeds = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and significantly increases crop yield and moderately increases upkeep costs. - </span> - <br> - <<else>> - $farmyardNameCaps is using genetically modified seeds, significantly increasing the amount of crops it produces and moderately increasing upkeep costs. - <br> - <<if $farmyardUpgrade.machinery == 0>> - [[Upgrade the machinery|Farmyard][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "farmyard"), $farmyardUpgrade.machinery = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>> significantly increases crop yield and significantly decreases upkeep costs. - </span> - <br> - <<else>> - The machinery in $farmyardName has been upgraded, and is more efficient, significantly increasing crop yields and significantly decreasing upkeep costs. - <br> - <</if>> - <</if>> - <</if>> - <</if>> -<</if>> +<<includeDOM App.Facilities.Farmyard.upgrades()>> +<br> </span> <span id="animalhousing"> -<<if ($farmyardKennels == 0)>> - <br> - [[Add kennels|Farmyard][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "farmyard"), $farmyardKennels = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and allows you to keep dogs - </span> - <br> -<<elseif ($farmyardKennels == 1)>> - <br> - <<link "Kennels" "FarmyardAnimals">><</link>> have been built in one corner of $farmyardName, and are currently <<if _CL <= 0>>empty.<<else>>occupied by - <<if _CL == 1>> - <<print $canines>>. - <<elseif _CL <= 3>> - a couple different breeds of dogs. - <<else>> - all kinds of dogs. - <</if>> - <</if>> - - <<if $rep > 10000>> - <br> - [[Upgrade kennels|Farmyard][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $farmyardKennels = 2]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and allows you to keep exotic canines - </span> - <</if>> -<<elseif ($farmyardKennels == 2)>> - <br> - <<link "Large kennels" "FarmyardAnimals">><</link>> have been built in one corner of $farmyardName, and are currently <<if _CL <= 0>>empty.<<else>>occupied by - <<if _CL == 1>> - <<print $canines>>. - <<elseif _CL <= 3>> - a couple different - <<set $onlyDogs = $canines.every(c => c.species == "dog")>> - <<if $onlyDogs>> - breeds of dogs. - <<else>> - types of canines. - <</if>> - <<else>> - all kinds of canines. - <</if>> - <</if>> -<</if>> - -<<if ($farmyardStable == 0)>> - <br> - [[Add stables|Farmyard][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "farmyard"), $farmyardStable = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and allows you to keep hooved animals - </span> - <br> -<<elseif ($farmyardStable == 1)>> - <br> - <<link "Stables" "FarmyardAnimals">><</link>> have been built at the far end of $farmyardName, and are currently <<if _HL <= 0>>empty.<<else>>occupied by - <<if _HL == 1>> - <<print $hooved>>. - <<elseif _HL <= 3>> - a couple different types of hooved animals. - <<else>> - all kinds of hooved animals. - <</if>> - <</if>> - <<if $rep > 15000>> - <br> - [[Upgrade stables|Farmyard][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $farmyardStable = 2]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and allows you to keep exotic hooved animals - </span> - <</if>> -<<elseif $farmyardStable == 2>> - <br> - <<link "Large stables" "FarmyardAnimals">><</link>> have been build at the far end of $farmyardName, and are currently <<if _HL <= 0>>empty.<<else>>occupied by - <<if _HL == 1>> - <<print $hooved>>. - <<elseif _HL <= 3>> - a couple different types of hooved animals. - <<else>> - all kinds of hooved animals. - <</if>> - <</if>> -<</if>> - -<<if ($farmyardCages == 0)>> - <br> - [[Add cages|Farmyard][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "farmyard"), $farmyardCages = 1]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>> and allows you to keep cats - </span> - <br> -<<elseif ($farmyardCages == 1)>> - <br> - <<link "Cages" "FarmyardAnimals">><</link>> have been built in one corner of $farmyardName, and are currently <<if _FL <= 0>>empty.<<else>>occupied by - <<if _FL == 1>> - <<print $felines>>. - <<elseif _FL <= 3>> - a couple different breeds of cats. - <<else>> - all kinds of cats. - <</if>> - <</if>> - <<if $rep > 15000>> - <br> - [[Upgrade cages|Farmyard][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $farmyardCages = 2]] - <span class="note"> - Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>> and allows to keep exotic felines - </span> - <</if>> - <br> -<<elseif ($farmyardCages == 2)>> - <br> - <<link "Large cages" "FarmyardAnimals">><</link>> have been built in one corner of $farmyardName, and are currently <<if _FL <= 0>>empty.<<else>>occupied by - <<if _FL == 1>> - <<print $felines>>. - <<elseif _FL <= 3>> - a couple different - <<set $onlyCats = $felines.every(f => f.species == "cat")>> - <<if $onlyCats>> - breeds of cats. - <<else>> - types of felines. - <</if>> - <<else>> - all kinds of felines. - <</if>> - <</if>> - <br> -<</if>> -<br> - -<<if $farmyardKennels > 0 || $farmyardStable > 0 || $farmyardCages > 0>> - <<set _removeCost = Math.trunc(($farmyardKennels+$farmyardStable+$farmyardCages)*5000)*$upgradeMultiplierArcology>> - [[Remove the animal housing|Farmyard][cashX(forceNeg(_removeCost), "farmyard"), $farmyardKennels = 0, $farmyardStable = 0, $farmyardCages = 0, $activeCanine = 0, $activeHooved = 0, $activeFeline = 0, $farmyardShows = 0, $farmyardBreeding = 0, $farmyardRestraints = 0, $animalsBought = { - canines: 0, - hooved: 0, - felines: 0, - labradorRetrievers: 0, - germanShepherds: 0, - goldenRetrievers: 0, - frenchBulldogs: 0, - bulldogs: 0, - beagles: 0, - poodles: 0, - rottweilers: 0, - yorkshireTerriers: 0, - siberianHuskies: 0, - horses: 0, - siameses: 0, - persians: 0, - maineCoons: 0, - ragdolls: 0, - bengals: 0, - abbysinians: 0, - birmans: 0, - orientalShorthairs: 0, - sphynxes: 0, - russianBlues: 0, - wolves: 0, - foxes: 0, - jackals: 0, - dingos: 0, - zebras: 0, - cougars: 0, - jaguars: 0, - pumas: 0, - lynx: 0, - leopards: 0, - lions: 0, - tigers: 0 - }, $canines = [], $hooved = [], $felines = []]] - //Will cost @@.yellowgreen;<<print cashFormat(_removeCost)>>@@// -<</if>> +<<includeDOM App.Facilities.Farmyard.animalHousing()>> </span> <br><hr><br> diff --git a/src/facilities/farmyard/farmyardAnimals.tw b/src/facilities/farmyard/farmyardAnimals.tw index 9ab40b0e9d5b48597187d3fe392dbd5652ef551f..ede08720990317141f558c395a6802701d75547f 100644 --- a/src/facilities/farmyard/farmyardAnimals.tw +++ b/src/facilities/farmyard/farmyardAnimals.tw @@ -1,10 +1,10 @@ -:: FarmyardAnimals [nobr] +:: Farmyard Animals [nobr] -<<set $nextButton = "Back", $nextLink = "Farmyard", $returnTo = "FarmyardAnimals", $encyclopedia = "Farmyard">> +<<set $nextButton = "Back", $nextLink = "Farmyard", $returnTo = "Farmyard Animals", $encyclopedia = "Farmyard">> /* TODO: write some descriptions for the different animals in their cages */ -<<if $farmyardKennels > 0 || $farmyardStable > 0 || $farmyardCages > 0>> +<<if $farmyardKennels > 0 || $farmyardStables > 0 || $farmyardCages > 0>> <br> ''Domestic Animals'' <hr> @@ -15,12 +15,14 @@ <br>//Cost <<print cashFormat(20000)>> each// /* TODO: this number is mostly a placeholder, will need adjusting */ <br> <<if $animalsBought.labradorRetrievers <= 0>> - <<link "Purchase dogs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.labradorRetrievers = 1, $animalsBought.canines += 1, $canines.push("Labrador Retrievers")>><</link>> + <<link "Purchase dogs" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.labradorRetrievers = 1, $animalsBought.canines += 1, $canines.push({ + species: "dog", speciesPlural: "dogs", breed: "Labrador Retrievers", type: "canine", dickSize: "big", ballType: "dog" + })>><</link>> <br> <<else>> Dogs <<if $activeCanine.breed != "Labrador Retriever">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Labrador Retriever", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Labrador Retriever", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> @@ -28,42 +30,42 @@ <</if>> <</if>> -<<if $farmyardStable > 0>> +<<if $farmyardStables > 0>> <br> __Hooved Animals__ <br>//Cost <<print cashFormat(20000)>> each// /* TODO: this number is mostly a placeholder, will need adjusting */ <br> <<if $animalsBought.horses <= 0>> - <<link "Purchase horses" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.horses = 1, $animalsBought.hooved += 1, $hooved.push("horses")>><</link>> + <<link "Purchase horses" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.horses = 1, $animalsBought.hooved += 1, $hooved.push("horses")>><</link>> <br> <<else>> Horses <<if $activeHooved.species != "horse">> - [[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "horse", speciesCap: "Horse", speciesPlural: "horses", type: "hooved", dickSize: "huge", ballType: "horse"}]] + [[Set as active hooved|Farmyard Animals][$activeHooved = {species: "horse", speciesCap: "Horse", speciesPlural: "horses", type: "hooved", dickSize: "huge", ballType: "horse"}]] <<else>> //Set as active hooved// <</if>> <br> <</if>> <<if $animalsBought.bulls <= 0>> - <<link "Purchase bulls" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bulls = 1, $animalsBought.hooved += 1, $hooved.push("bulls")>><</link>> + <<link "Purchase bulls" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bulls = 1, $animalsBought.hooved += 1, $hooved.push("bulls")>><</link>> <br> <<else>> Bulls <<if $activeHooved.species != "bull">> - [[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "bull", speciesCap: "Bull", speciesPlural: "bulls", type: "hooved", dickSize: "huge", ballType: "horse"}]] + [[Set as active hooved|Farmyard Animals][$activeHooved = {species: "bull", speciesCap: "Bull", speciesPlural: "bulls", type: "hooved", dickSize: "huge", ballType: "horse"}]] <<else>> //Set as active hooved// <</if>> <br> <</if>> <<if $animalsBought.pigs <= 0>> - <<link "Purchase pigs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.pigs = 1, $animalsBought.hooved += 1, $hooved.push("pigs")>><</link>> + <<link "Purchase pigs" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.pigs = 1, $animalsBought.hooved += 1, $hooved.push("pigs")>><</link>> <br> <<else>> Pigs <<if $activeHooved.species != "pig">> - [[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "pig", speciesCap: "Pig", speciesPlural: "pigs", type: "hooved", dickSize: "large", ballType: "horse"}]] + [[Set as active hooved|Farmyard Animals][$activeHooved = {species: "pig", speciesCap: "Pig", speciesPlural: "pigs", type: "hooved", dickSize: "large", ballType: "horse"}]] <<else>> //Set as active hooved// <</if>> @@ -73,7 +75,7 @@ <</if>> <br> -<<if $farmyardKennels > 1 || $farmyardStable > 1 || $farmyardCages > 1>> +<<if $farmyardKennels > 1 || $farmyardStables > 1 || $farmyardCages > 1>> <br> ''Exotic Animals'' <hr> @@ -84,13 +86,15 @@ <br>//Cost <<print cashFormat(20000)>> each// <br> <<if $animalsBought.wolves <= 0>> - <<link "Purchase wolves" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.wolves = 1, $animalsBought.canines += 1, $canines.push("wolves")>><</link>> + <<link "Purchase wolves" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.wolves = 1, $animalsBought.canines += 1, $canines.push({ + species: "wolf", speciesPlural: "wolves", type: "canine", dickSize: "large", ballType: "wolf" + })>><</link>> <br> <<else>> /*A couple of adult wolves are lounging about in their kennels.(OLD)*/ Wolves <<if $activeCanine.species != "wolf">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "wolf", speciesCap: "Wolf", speciesPlural: "wolves", type: "canine", dickSize: "large", ballType: "wolf"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "wolf", speciesCap: "Wolf", speciesPlural: "wolves", type: "canine", dickSize: "large", ballType: "wolf"}]] <<else>> //Set as active canine// <</if>> @@ -104,13 +108,14 @@ <br>//Cost <<print cashFormat(30000)>> each// /* TODO: this number is mostly a placeholder, will need adjusting */ <br> <<if $animalsBought.lions <= 0>> - <<link "Purchase lions" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.lions = 1, $animalsBought.felines += 1, $felines.push("lions")>><</link>> + <<link "Purchase lions" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.lions = 1, $animalsBought.felines += 1, $felines.push({ + species: "lion", speciesPlural: "lions", type: "feline", dickSize: "large", ballType: "lion"})>><</link>> <br> <<else>> /*Most of the lions are sunning themselves. (OLD)*/ Lions <<if $activeFeline.species != "lion">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "lion", speciesCap: "Lion", speciesPlural: "lions", type: "feline", dickSize: "large", ballType: "lion"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "lion", speciesCap: "Lion", speciesPlural: "lions", type: "feline", dickSize: "large", ballType: "lion"}]] <<else>> //Set as active feline// <</if>> diff --git a/src/facilities/farmyard/farmyardReport.tw b/src/facilities/farmyard/farmyardReport.tw index 7d002ca8e0004040250904520b70ab5918708443..f1f3443c0b0576a383498b8498646cc3c34cac52 100644 --- a/src/facilities/farmyard/farmyardReport.tw +++ b/src/facilities/farmyard/farmyardReport.tw @@ -1,3 +1,3 @@ :: Farmyard Report [nobr] -<<print App.Facilities.Farmyard.farmyardReport()>> +<<includeDOM App.Facilities.Farmyard.farmyardReport()>> diff --git a/src/facilities/farmyard/food/foodAmount.js b/src/facilities/farmyard/food/foodAmount.js new file mode 100644 index 0000000000000000000000000000000000000000..6b7c0a78e255b6ded345ecb28d585ef77c2cf4cd --- /dev/null +++ b/src/facilities/farmyard/food/foodAmount.js @@ -0,0 +1,86 @@ +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ +App.Facilities.Farmyard.foodAmount = function (slave) { + let food = 150; + + if (!slave) { + throw `Current slave is not valid. Please report this`; + } + + if (V.farmyardUpgrades.pump) { + food += 15; + } + + if (V.farmyardUpgrades.fertilizer) { + food += 35; + } + + if (V.farmyardUpgrades.seeds) { + food += 65; + } + + if (V.farmyardUpgrades.machinery) { + food += 65; + } + + if (S.Farmer !== 0) { + food *= 1.1; + + if (S.Farmer.skill.farmer >= V.masteredXP) { + food *= 1.2; + } + + if (setup.farmerCareers.includes(S.Farmer.career)) { + food *= 1.2; + } + } + + if (slave.devotion > 50) { + food *= 1.1; + } else if (slave.devotion < -50) { + food *= 0.8; + } + + if (slaveResting(slave)) { + food *= 0.9; + } else if (slave.health.tired + 20 >= 90 && !willWorkToDeath(slave)) { + slave.devotion -= 10; + slave.trust -= 5; + food *= 0.9; + } + + if (slave.muscles > 30) { // slave is muscular or more + food *= 1.1; + } else if (slave.muscles <= -6) { // slave is weak or less + food *= 0.8; + } + + if (slave.weight > 95) { // slave is overweight or more + food *= 0.9; + } else if (slave.weight > 130) { // slave is fat or more + food *= 0.8; + } else if (slave.weight > 160) { // slave is obese or more + food *= 0.7; + } else if (slave.weight > 190) { // slave is very obese or more + food *= 0.6; + } + + if (!canSee(slave)) { // slave is blind + food *= 0.6; + } else if (!canSeePerfectly(slave)) { // slave is nearsighted + food *= 0.8; + } + + if (slave.hears === -1) { // slave is hard of hearing + food *= 0.8; + } else if (slave.hears < -1) { // slave is deaf + food *= 0.6; + } + + food *= restEffects(slave, 20); + food = Math.clamp(Math.max(food, 1)); + + return food; +}; diff --git a/src/facilities/farmyard/futureAnimals.tw b/src/facilities/farmyard/futureAnimals.tw index eda757aaee2bf7455bb3eafbf37d40d74b2229e2..f4d1ab464f04368977ba10d8a05b8df03935f976 100644 --- a/src/facilities/farmyard/futureAnimals.tw +++ b/src/facilities/farmyard/futureAnimals.tw @@ -1,108 +1,108 @@ /* Putting them here because commenting them out was breaking for some reason */ <<if $animalsBought.germanShepherds == 0>> - <<link "Purchase German Shepherds" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.germanShepherds = 1, $animalsBought.canines += 1, $canines.push("German Shepherds")>><</link>> + <<link "Purchase German Shepherds" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.germanShepherds = 1, $animalsBought.canines += 1, $canines.push("German Shepherds")>><</link>> <br> <<elseif $animalsBought.germanShepherds == 1>> German Shepherds <<if $activeCanine.breed != "German Shepherd">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "German Shepherd", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "German Shepherd", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.goldenRetrievers == 0>> - <<link "Purchase Golden Retrievers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.goldenRetrievers = 1, $animalsBought.canines += 1, $canines.push("Golden Retrievers")>><</link>> + <<link "Purchase Golden Retrievers" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.goldenRetrievers = 1, $animalsBought.canines += 1, $canines.push("Golden Retrievers")>><</link>> <br> <<elseif $animalsBought.goldenRetrievers == 1>> Golden Retrievers <<if $activeCanine.breed != "Golden Retriever">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Golden Retriever", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Golden Retriever", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.frenchBulldogs == 0>> - <<link "Purchase French Bulldogs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.frenchBulldogs = 1, $animalsBought.canines += 1, $canines.push("French Bulldogs")>><</link>> + <<link "Purchase French Bulldogs" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.frenchBulldogs = 1, $animalsBought.canines += 1, $canines.push("French Bulldogs")>><</link>> <br> <<elseif $animalsBought.frenchBulldogs == 1>> French Bulldogs <<if $activeCanine.breed != "French Bulldog">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "French Bulldog", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "French Bulldog", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.bulldogs == 0>> - <<link "Purchase Bulldogs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bulldogs = 1, $animalsBought.canines += 1, $canines.push("Bulldogs")>><</link>> + <<link "Purchase Bulldogs" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bulldogs = 1, $animalsBought.canines += 1, $canines.push("Bulldogs")>><</link>> <br> <<elseif $animalsBought.bulldogs == 1>> Bulldogs <<if $activeCanine.breed != "Bulldog">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Bulldog", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Bulldog", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.beagles == 0>> - <<link "Purchase Beagles" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.beagles = 1, $animalsBought.canines += 1, $canines.push("Beagles")>><</link>> + <<link "Purchase Beagles" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.beagles = 1, $animalsBought.canines += 1, $canines.push("Beagles")>><</link>> <br> <<elseif $animalsBought.beagles == 1>> Beagles <<if $activeCanine.breed != "Beagle">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Beagle", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Beagle", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.poodles == 0>> - <<link "Purchase Poodles" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.poodles = 1, $animalsBought.canines += 1, $canines.push("Poodles")>><</link>> + <<link "Purchase Poodles" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.poodles = 1, $animalsBought.canines += 1, $canines.push("Poodles")>><</link>> <br> <<elseif $animalsBought.poodles == 1>> Poodles <<if $activeCanine.breed != "Poodle">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Poodle", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Poodle", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.rottweilers == 0>> - <<link "Purchase Rottweilers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.rottweilers = 1, $animalsBought.canines += 1, $canines.push("Rottweilers")>><</link>> + <<link "Purchase Rottweilers" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.rottweilers = 1, $animalsBought.canines += 1, $canines.push("Rottweilers")>><</link>> <br> <<elseif $animalsBought.rottweilers == 1>> Rottweilers <<if $activeCanine.breed != "Rottweiler">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Rottweiler", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Rottweiler", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.yorkshireTerriers == 0>> - <<link "Purchase Yorkshire Terriers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.yorkshireTerriers = 1, $animalsBought.canines += 1, $canines.push("Yorkshire Terriers")>><</link>> + <<link "Purchase Yorkshire Terriers" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.yorkshireTerriers = 1, $animalsBought.canines += 1, $canines.push("Yorkshire Terriers")>><</link>> <br> <<elseif $animalsBought.yorkshireTerriers == 1>> Yorkshire Terriers <<if $activeCanine.breed != "Yorkshire Terrier">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Yorkshire Terrier", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Yorkshire Terrier", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.siberianHuskies == 0>> - <<link "Purchase Siberian Huskies" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.siberianHuskies = 1, $animalsBought.canines += 1, $canines.push("Siberian Huskies")>><</link>> + <<link "Purchase Siberian Huskies" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.siberianHuskies = 1, $animalsBought.canines += 1, $canines.push("Siberian Huskies")>><</link>> <br> <<elseif $animalsBought.siberianHuskies == 1>> Siberian Huskies <<if $activeCanine.breed != "Siberian Husky">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Siberian Husky", type: "canine", dickSize: "big", ballType: "dog"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dog", speciesCap: "Dog", speciesPlural: "dogs", breed: "Siberian Husky", type: "canine", dickSize: "big", ballType: "dog"}]] <<else>> //Set as active canine// <</if>> @@ -114,120 +114,120 @@ Cats: <br><br> <<if $animalsBought.siameses == 0>> - <<link "Purchase Siamese cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.siameses = 1, $animalsBought.felines += 1, $felines.push("Siamese cats")>><</link>> + <<link "Purchase Siamese cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.siameses = 1, $animalsBought.felines += 1, $felines.push("Siamese cats")>><</link>> <br> <<elseif $animalsBought.siameses == 1>> Siamese cats <<if $activeFeline.breed != "Siamese">> - [[Set as active canine|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Siamese", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active canine|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Siamese", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.persians == 0>> - <<link "Purchase Persian cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.persians = 1, $animalsBought.felines += 1, $felines.push("Persian cats")>><</link>> + <<link "Purchase Persian cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.persians = 1, $animalsBought.felines += 1, $felines.push("Persian cats")>><</link>> <br> <<elseif $animalsBought.persians == 1>> Persian cats <<if $activeFeline.breed != "Persian">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Persian", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Persian", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.maineCoons == 0>> - <<link "Purchase Maine Coon cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.maineCoons = 1, $animalsBought.felines += 1, $felines.push("Maine Coon cats")>><</link>> + <<link "Purchase Maine Coon cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.maineCoons = 1, $animalsBought.felines += 1, $felines.push("Maine Coon cats")>><</link>> <br> <<elseif $animalsBought.maineCoons == 1>> Maine Coon cats <<if $activeFeline.breed != "Maine Coon">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Maine Coon", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Maine Coon", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.ragdolls == 0>> - <<link "Purchase Ragdoll cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.ragdolls = 1, $animalsBought.felines += 1, $felines.push("Ragdoll cats")>><</link>> + <<link "Purchase Ragdoll cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.ragdolls = 1, $animalsBought.felines += 1, $felines.push("Ragdoll cats")>><</link>> <br> <<elseif $animalsBought.ragdolls == 1>> Ragdoll cats <<if $activeFeline.breed != "Ragdoll">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Ragdoll", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Ragdoll", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.bengals == 0>> - <<link "Purchase Bengal cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bengals = 1, $animalsBought.felines += 1, $felines.push("Bengal cats")>><</link>> + <<link "Purchase Bengal cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.bengals = 1, $animalsBought.felines += 1, $felines.push("Bengal cats")>><</link>> <br> <<elseif $animalsBought.bengals == 1>> Bengal cats <<if $activeFeline.breed != "Bengal">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Bengal", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Bengal", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.abbysinians == 0>> - <<link "Purchase Abbysinian cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.abbysinians = 1, $animalsBought.felines += 1, $felines.push("Abbysinian cats")>><</link>> + <<link "Purchase Abbysinian cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.abbysinians = 1, $animalsBought.felines += 1, $felines.push("Abbysinian cats")>><</link>> <br> <<elseif $animalsBought.abbysinians == 1>> Abbysinian cats <<if $activeFeline.breed != "Abbysinian">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Abbysinian", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Abbysinian", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.birmans == 0>> - <<link "Purchase Birman cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.birmans = 1, $animalsBought.felines += 1, $felines.push("Birman cats")>><</link>> + <<link "Purchase Birman cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.birmans = 1, $animalsBought.felines += 1, $felines.push("Birman cats")>><</link>> <br> <<elseif $animalsBought.birmans == 1>> Birman cats <<if $activeFeline.breed != "Birman">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Birman", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Birman", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.orientalShorthairs == 0>> - <<link "Purchase Oriental Shorthair cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.orientalShorthairs = 1, $animalsBought.felines += 1, $felines.push("Oriental Shorthair cats")>><</link>> + <<link "Purchase Oriental Shorthair cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.orientalShorthairs = 1, $animalsBought.felines += 1, $felines.push("Oriental Shorthair cats")>><</link>> <br> <<elseif $animalsBought.orientalShorthairs == 1>> Oriental Shorthair cats <<if $activeFeline.breed != "Oriental Shorthair">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Oriental Shorthair", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Oriental Shorthair", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.sphynxes == 0>> - <<link "Purchase Sphynx cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.sphynxes = 1, $animalsBought.felines += 1, $felines.push("Sphynx cats")>><</link>> + <<link "Purchase Sphynx cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.sphynxes = 1, $animalsBought.felines += 1, $felines.push("Sphynx cats")>><</link>> <br> <<elseif $animalsBought.sphynxes == 1>> Sphynx cats <<if $activeFeline.breed != "Sphynx">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Sphynx", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Sphynx", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.russianBlues == 0>> - <<link "Purchase Russian Blue cats" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.russianBlues = 1, $animalsBought.felines += 1, $felines.push("Russian Blue cats")>><</link>> + <<link "Purchase Russian Blue cats" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.russianBlues = 1, $animalsBought.felines += 1, $felines.push("Russian Blue cats")>><</link>> <br> <<elseif $animalsBought.russianBlues == 1>> Russian Blue cats <<if $activeFeline.breed != "Russian Blue">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Russian Blue", type: "feline", dickSize: "small", ballType: "cat"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cat", speciesCap: "Cat", speciesPlural: "cats", breed: "Russian Blue", type: "feline", dickSize: "small", ballType: "cat"}]] <<else>> //Set as active feline// <</if>> @@ -236,39 +236,39 @@ <</if>> <<if $animalsBought.foxes == 0>> - <<link "Purchase foxes" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.foxes = 1, $animalsBought.canines += 1, $canines.push("foxes")>><</link>> + <<link "Purchase foxes" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.foxes = 1, $animalsBought.canines += 1, $canines.push("foxes")>><</link>> <br> <<elseif $animalsBought.foxes == 1>> /*Red foxes play in one corner of their kennels, chasing one another.(OLD)*/ Foxes <<if $activeCanine.species != "fox">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "fox", speciesCap: "Fox", speciesPlural: "foxes", type: "canine", dickSize: "large", ballType: "fox"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "fox", speciesCap: "Fox", speciesPlural: "foxes", type: "canine", dickSize: "large", ballType: "fox"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.jackals == 0>> - <<link "Purchase jackals" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.jackals = 1, $animalsBought.canines += 1, $canines.push("jackals")>><</link>> + <<link "Purchase jackals" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.jackals = 1, $animalsBought.canines += 1, $canines.push("jackals")>><</link>> <br> <<elseif $animalsBought.jackals == 1>> /*A group of male jackals are fighting over a potential mate, causing quite a ruckus.(OLD)*/ Jackals <<if $activeCanine.species != "jackal">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "jackal", speciesCap: "Jackal", speciesPlural: "jackals", type: "canine", dickSize: "large", ballType: "jackal"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "jackal", speciesCap: "Jackal", speciesPlural: "jackals", type: "canine", dickSize: "large", ballType: "jackal"}]] <<else>> //Set as active canine// <</if>> <br> <</if>> <<if $animalsBought.dingos == 0>> - <<link "Purchase dingos" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.dingos = 1, $animalsBought.canines += 1, $canines.push("dingos")>><</link>> + <<link "Purchase dingos" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.dingos = 1, $animalsBought.canines += 1, $canines.push("dingos")>><</link>> <br> <<elseif $animalsBought.dingos == 1>> /*The dingos are eating their meal, growling at each other when one gets to close to another's food.(OLD)*/ Dingos <<if $activeCanine.species != "dingo">> - [[Set as active canine|FarmyardAnimals][$activeCanine = {species: "dingo", speciesCap: "Dingo", speciesPlural: "dingos", type: "canine", dickSize: "large", ballType: "dingo"}]] + [[Set as active canine|Farmyard Animals][$activeCanine = {species: "dingo", speciesCap: "Dingo", speciesPlural: "dingos", type: "canine", dickSize: "large", ballType: "dingo"}]] <<else>> //Set as active canine// <</if>> @@ -276,16 +276,16 @@ <</if>> -<<if $farmyardStable > 1>> +<<if $farmyardStables > 1>> <br> Hooved Animals: <br><br> <<if $animalsBought.zebras == 0>> - <<link "Purchase zebras" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.zebras = 1, $animalsBought.hooved += 1, $hooved.push("zebras")>><</link>> + <<link "Purchase zebras" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.zebras = 1, $animalsBought.hooved += 1, $hooved.push("zebras")>><</link>> <<elseif $animalsBought.zebras == 1>> Zebras <<if $activeHooved.species != "zebra">> - [[Set as active hooved|FarmyardAnimals][$activeHooved = {species: "zebra", speciesCap: "Zebra", speciesPlural: "zebras", type: "hooved", dickSize: "huge", ballType: "zebra"}]] + [[Set as active hooved|Farmyard Animals][$activeHooved = {species: "zebra", speciesCap: "Zebra", speciesPlural: "zebras", type: "hooved", dickSize: "huge", ballType: "zebra"}]] <<else>> //Set as active hooved// <</if>> @@ -294,65 +294,65 @@ <</if>> <<if $animalsBought.cougars == 0>> - <<link "Purchase cougars" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.cougars = 1, $animalsBought.felines += 1, $felines.push("cougars")>><</link>> + <<link "Purchase cougars" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.cougars = 1, $animalsBought.felines += 1, $felines.push("cougars")>><</link>> <br> <<elseif $animalsBought.cougars == 1>> /*The cougars are sleeping, their lean bodies scattered around under trees. (OLD)*/ Cougars <<if $activeFeline.species != "cougar">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "cougar", speciesCap: "Cougar", speciesPlural: "cougars", type: "feline", dickSize: "large", ballType: "cougar"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "cougar", speciesCap: "Cougar", speciesPlural: "cougars", type: "feline", dickSize: "large", ballType: "cougar"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.jaguars == 0>> - <<link "Purchase jaguars" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.jaguars = 1, $animalsBought.felines += 1, $felines.push("jaguars")>><</link>> + <<link "Purchase jaguars" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.jaguars = 1, $animalsBought.felines += 1, $felines.push("jaguars")>><</link>> <br> <<elseif $animalsBought.jaguars == 1>> /*You can see a few jaguars laying around in the trees in their enclosure. (OLD)*/ Jaguars <<if $activeFeline.species != "jaguar">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "jaguar", speciesCap: "Jaguar", speciesPlural: "jaguars", type: "feline", dickSize: "large", ballType: "jaguar"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "jaguar", speciesCap: "Jaguar", speciesPlural: "jaguars", type: "feline", dickSize: "large", ballType: "jaguar"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.lynx == 0>> - <<link "Purchase lynxs" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.lynx = 1, $animalsBought.felines += 1, $felines.push("lynx")>><</link>> + <<link "Purchase lynxs" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.lynx = 1, $animalsBought.felines += 1, $felines.push("lynx")>><</link>> <br> <<elseif $animalsBought.lynx == 1>> /*The lynxes are playfully running around their enclosure. (OLD)*/ Lynx <<if $activeFeline.species != "lynx">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "lynx", speciesCap: "Lynx", speciesPlural: "lynx", type: "feline", dickSize: "large", ballType: "lynx"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "lynx", speciesCap: "Lynx", speciesPlural: "lynx", type: "feline", dickSize: "large", ballType: "lynx"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.leopards == 0>> - <<link "Purchase leopards" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.leopards = 1, $animalsBought.felines += 1, $felines.push("leopards")>><</link>> + <<link "Purchase leopards" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.leopards = 1, $animalsBought.felines += 1, $felines.push("leopards")>><</link>> <br> <<elseif $animalsBought.leopards == 1>> /*The leopards are lazing about in the trees in their enclosure. (OLD)*/ Leopards <<if $activeFeline.species != "leopard">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "leopard", speciesCap: "Leopard", speciesPlural: "leopards", type: "feline", dickSize: "large", ballType: "leopard"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "leopard", speciesCap: "Leopard", speciesPlural: "leopards", type: "feline", dickSize: "large", ballType: "leopard"}]] <<else>> //Set as active feline// <</if>> <br> <</if>> <<if $animalsBought.tigers == 0>> - <<link "Purchase tigers" "FarmyardAnimals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.tigers = 1, $animalsBought.felines += 1, $felines.push("tigers")>><</link>> + <<link "Purchase tigers" "Farmyard Animals">><<set cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "farmyard"), $animalsBought.tigers = 1, $animalsBought.felines += 1, $felines.push("tigers")>><</link>> <br> <<elseif $animalsBought.tigers == 1>> /*Some of the tigers are swimming, and the ones that aren't are lazing about. (OLD)*/ Tigers <<if $activeFeline.species != "tiger">> - [[Set as active feline|FarmyardAnimals][$activeFeline = {species: "tiger", speciesCap: "Tiger", speciesPlural: "tigers", type: "feline", dickSize: "large", ballType: "tiger"}]] + [[Set as active feline|Farmyard Animals][$activeFeline = {species: "tiger", speciesCap: "Tiger", speciesPlural: "tigers", type: "feline", dickSize: "large", ballType: "tiger"}]] <<else>> //Set as active feline// <</if>> diff --git a/src/facilities/farmyard/reports/farmyardReport.js b/src/facilities/farmyard/reports/farmyardReport.js index e1905757b1b701bb909a612a68664c10dd0be6ce..05b0ae7a5b814ac304e302f0c80f5736a59f9a66 100644 --- a/src/facilities/farmyard/reports/farmyardReport.js +++ b/src/facilities/farmyard/reports/farmyardReport.js @@ -1,77 +1,57 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { - "use strict"; + let frag = document.createDocumentFragment(); const - Farmer = V.Farmer, - FL = App.Entity.facilities.farmyard.employeesIDs().size; + slaves = App.Utils.sortedEmployees(App.Entity.facilities.farmyard), + devBonus = (V.farmyardDecoration !== "standard") ? 1 : 0, + Farmer = S.Farmer; let - t = ``, profits = 0, - foodWeek = 0; - let he, him, his, hers, himself, girl, loli, He, His; // TODO: alternative method? + foodWeek = 0, + farmerBonus = 0; - // FARMER + // MARK: Farmer - const farmerHealth = slave => { + function farmerChanges() { + farmerHealth(Farmer); + farmerDevotion(Farmer); + farmerTrust(Farmer); + farmerLivingRules(Farmer); + farmerCashBonus(Farmer); + } + + function farmerHealth(slave) { if (slave.health.condition < -80) { - improveCondition(slave, 20); + improveCondition(Farmer, 20); } else if (slave.health.condition < -40) { - improveCondition(slave, 15); + improveCondition(Farmer, 15); } else if (slave.health.condition < 0) { - improveCondition(slave, 10); + improveCondition(Farmer, 10); } else if (slave.health.condition < 90) { - improveCondition(slave, 7); + improveCondition(Farmer, 7); } - }; + } - const farmerFetish = slave => { - if (slave.fetish !== 'dom') { - if (fetishChangeChance(slave) > jsRandom(0, 100)) { - slave.fetishKnown = 1; - slave.fetish = 'dom'; - return 1; - } - } else if (!slave.fetishKnown) { - slave.fetishKnown = 1; - return 1; - } else { - slave.fetishStrength += 4; - return 2; - } - }; + function farmerDevotion(slave) { + slave.devotion += devBonus; - const farmerFetishEffects = (fetish = 0) => { - if (fetish === 1) { - return `${He} isn't above sampling the merchandise ${himself}; before long it's obvious to ${his} workers that ${he} <span class="lightcoral">really likes fucking them.</span> `; - } else if (fetish === 2) { - return `${He}'s careful that all of the farmhands under ${his} supervision are all ready to work every morning, and ${he} <span class="lightsalmon">becomes more dominant.</span> `; + if (slave.devotion < 45) { + slave.devotion += 5; } - }; - - const farmerSkill = slave => { - let t = ``; + } - if (slave.skill.farmer <= 10) { - t += `Though ${slave.slaveName} does ${his} best to manage the farmyard, with ${his} lack of skill ${he} can do little. `; - } else if (slave.skill.farmer <= 30) { - t += `${slave.slaveName}'s basic skills marginally <span class="yellowgreen">improve</span> business at ${V.farmyardName}. `; - } else if (slave.skill.farmer <= 60) { - t += `${slave.slaveName}'s skills <span class="yellowgreen">improve</span> business at ${V.farmyardName}. `; - } else if (slave.skill.farmer < 100) { - t += `${slave.slaveName}'s skills greatly <span class="yellowgreen">improve</span> business at ${V.farmyardName}. `; - } else { - t += `${slave.slaveName}'s mastery immensely <span class="yellowgreen">improves</span> business at ${V.farmyardName}. `; + function farmerTrust(slave) { + if (slave.trust < 45) { + slave.trust += 5; } + } - t += slave.actualAge > 35 ?`${His} age and experience also contribute. ` : ``; - - return t; - }; + const farmerLivingRules = slave => slave.rules.living = 'luxurious'; - const farmerCashBonus = slave => { + function farmerCashBonus(slave) { let FarmerCashBonus = Math.min(0.2, slave.skill.farmer * 0.002); FarmerCashBonus += slave.intelligence + slave.intelligenceImplant > 15 ? 0.05 : 0; @@ -93,6 +73,7 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { FarmerCashBonus += 0.05; } + // TODO: keep this? if (Farmer.relationshipTarget === slave.ID) { FarmerCashBonus -= 0.05; } else if (areRelated(Farmer, slave)) { @@ -100,142 +81,209 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { } return FarmerCashBonus; - }; + } - const farmerExperience = slave => { - if (setup.farmerCareers.includes(slave.career)) { - return `${He} has experience from ${his} life before ${he} was a slave that helps ${him} in the difficult life of managing animals and property. `; - } else if (slave.skill.farmer >= V.masteredXP) { - return `${He} has experience from working for you that helps ${him} in the difficult life of managing animals and property. `; + + function farmerText() { + let r = []; + + r.push(farmerIntro(Farmer)); + r.push(farmerRelationshipPC(Farmer)); + r.push(farmerFetishEffects(Farmer, farmerFetish(Farmer))); + r.push(farmerSkill(Farmer)); + r.push(farmerAgeSkill(Farmer)); + r.push(farmerExperience(Farmer)); + r.push(farmerIntelligence(Farmer)); + r.push(farmerSmell(Farmer)); + r.push(farmerRelationshipSlaves(Farmer)); + r.push(farmerContracts(Farmer)); + + return r.join(' '); + } + + function farmerFetish(slave) { + if (slave.fetish !== 'dom') { + if (fetishChangeChance(slave) > jsRandom(0, 100)) { + slave.fetishKnown = 1; + slave.fetish = 'dom'; + return 1; + } + } else if (!slave.fetishKnown) { + slave.fetishKnown = 1; + return 1; } else { - slave.skill.farmer += jsRandom(1, Math.ceil((slave.intelligence + slave.intelligenceImplant) / 32)); + slave.fetishStrength += 4; + return 2; } - }; + } + + function farmerFetishEffects(slave, fetish = 0) { + const + { he, his, himself, He } = getPronouns(slave); + if (fetish === 1) { + return `${He} isn't above sampling the merchandise ${himself}; before long it's obvious to ${his} workers that ${he} <span class="lightcoral">really likes fucking them.</span> `; + } else if (fetish === 2) { + return `${He}'s careful that all of the farmhands under ${his} supervision are all ready to work every morning, and ${he} <span class="lightsalmon">becomes more dominant.</span> `; + } + } + + function farmerSkill(slave) { + const + { he, his, His } = getPronouns(slave); + + let r = []; + + if (slave.skill.farmer <= 10) { + r.push(`Though ${slave.slaveName} does ${his} best to manage the farmyard, with ${his} lack of skill ${he} can do little.`); + } else if (slave.skill.farmer <= 30) { + r.push(`${slave.slaveName}'s basic skills marginally <span class="yellowgreen">improve</span> business at ${V.farmyardName}.`); + } else if (slave.skill.farmer <= 60) { + r.push(`${slave.slaveName}'s skills <span class="yellowgreen">improve</span> business at ${V.farmyardName}.`); + } else if (slave.skill.farmer < 100) { + r.push(`${slave.slaveName}'s skills greatly <span class="yellowgreen">improve</span> business at ${V.farmyardName}.`); + } else { + r.push(`${slave.slaveName}'s mastery immensely <span class="yellowgreen">improves</span> business at ${V.farmyardName}.`); + } - const farmerDick = slave => { - if (slave.dick > 2 && canPenetrate(slave)) { - return `${His} turgid dick helps ${him} manage ${his} workers. `; + if (slave.actualAge > 35) { + r.push(`${His} age and experience also contribute.`); } - }; + return r.join(' '); + } + + function farmerExperience(slave) { + const { he, his, him, He } = getPronouns(slave); + + if (setup.farmerCareers.includes(slave.career)) { + return `${He} has experience from ${his} life before ${he} was a slave that helps ${him} in the difficult life of managing animals and property.`; + } else if (slave.skill.farmer >= V.masteredXP) { + return `${He} has experience from working for you that helps ${him} in the difficult life of managing animals and property.`; + } else { + slave.skill.farmer += jsRandom(1, Math.ceil((slave.intelligence + slave.intelligenceImplant) / 32)); + } + } - /** @param {App.Entity.SlaveState} Farmer */ function farmerRelationshipSlaves(Farmer) { - const p = getPronouns(Farmer); - for (const slave of App.Utils.sortedEmployees(App.Entity.facilities.farmyard)) { + const { he, his, He } = getPronouns(Farmer); - let t = ``; + for (const slave of slaves) { + let r = []; if (Farmer.rivalryTarget === slave.ID) { - t += `${p.He} forces ${p.his} ${rivalryTerm(Farmer)} to service all the slaves in ${V.farmyardName}. `; // TODO: not sure about this + r.push(`${He} leverages the fact that ${he} is ${slave.slaveName}'s superior to make ${his} ${rivalryTerm(Farmer)}'s life a living hell.`); slave.devotion -= 2; slave.trust -= 2; + if (canDoVaginal(slave)) { seX(slave, 'vaginal', 'public', 'penetrative', 10); } + if (canDoAnal(slave)) { seX(slave, 'anal', 'public', 'penetrative', 10); } + seX(slave, 'oral', 'public', 'penetrative', 10); if (jsRandom(1, 100) > 65) { Farmer.rivalry++; slave.rivalry++; } } else if (Farmer.relationshipTarget === slave.ID) { - t += `${p.He} dotes over ${p.his} ${relationshipTerm(Farmer)}, ${slave.slaveName}, making sure ${he} isn't worked too hard, but unfortunately manages to get in the way of ${his} work. `; + r.push(`${He} dotes over ${his} ${relationshipTerm(Farmer)}, ${slave.slaveName}, making sure ${he} isn't worked too hard, but unfortunately manages to get in the way of ${his} work.`); slave.devotion++; } else if (areRelated(Farmer, slave)) { - t += `${p.He} pays special attention to ${p.his} ${relativeTerm(Farmer, slave)}, ${slave.slaveName}, making sure ${he} is treated well and showing off ${his} skills. `; + r.push(`${He} pays special attention to ${his} ${relativeTerm(Farmer, slave)}, ${slave.slaveName}, making sure ${he} is treated well and showing off ${his} skills.`); slave.trust++; } - return t; + return r; } } - const farmerWorks = slave => { + function farmerContracts(slave) { + const { he, his, himself } = getPronouns(slave); + let - t = ``, - oldCash = V.cash, - seed, - beauty; + r = [], + seed = V.farmyardShowgirls ? App.Facilities.Farmyard.farmShowsIncome(slave) : jsRandom(1, 10) * (jsRandom(150, 170) + (farmerBonus * 10)); - if (V.showEWD) { - t += `<br> ${He} ${App.SlaveAssignment.workTheFarm(slave)}`; - } else { - App.SlaveAssignment.workTheFarm(slave); + if (V.farmyardShows && !V.farmyardShowgirls) { + r.push(`<p class="indent">Since ${he} doesn't have enough showgirls to entertain your arcology's citizens, ${he} puts on shows with your animals on ${his} own, earning <span class="yellowgreen">${cashFormat(seed)}.</span></p>`); + } else if (!V.farmyardFarmers) { + r.push(`<p class="indent">Since ${V.farmyardName} doesn't have anyone tending to the crops, ${he} looks after them ${himself}, earning <span class="yellowgreen">${cashFormat(seed)}.</span></p>`); } - seed = V.cash - oldCash; - cashX(Math.trunc(0.5 * seed), 'farmyard'); - seed = Math.trunc(1.5 * seed); - profits += seed; - beauty = Beauty(V.activeSlave); + return r; + } - t += `<br> Since ${he} doesn't have enough farmhands to manage to keep ${him} busy, ${he} sees ${beauty} customers ${himself} (${Math.trunc(beauty / 7)} a day), earning you <span class="yellowgreen">${cashFormat(seed)}</span> ${He} can charge more for ${his} time, since many citizens find it erotic to fuck the Farmer. `; + function farmerRelationshipPC(slave) { + const { he, his, wife } = getPronouns(slave); - return t; - }; + if (slave.relationship === -3 && slave.devotion > 50) { + return `As your loving ${wife}, ${he} does ${his} best to ensure ${V.farmyardName} runs smoothly.`; + } + } - const farmerEndWeek = slave => { - let t = ``; + function farmerAgeSkill(slave) { + const { His } = getPronouns(slave); - if (V.showEWD) { - t += `<br><br>`; - /* 000-250-006 */ // TODO: legacy - needed? - if (V.seeImages && V.seeReportImages) { - t += `<div class="imageRef tinyImg"> - ${SlaveArt(slave, 0, 0)} - </div>`; - } - /* 000-250-006 */ - t += `<span class="slave-name">${SlaveFullName(slave)}</span> is serving as the Farmer. `; - t += `<br> `; - t += App.SlaveAssignment.choosesOwnClothes(slave); - t += `<<include "SA rules">>`; - t += `<<include "SA diet">>`; - t += `<<include "SA long term effects">>`; - t += App.SlaveAssignment.drugs(slave); - t += `<<include "SA relationships">>`; - t += `<<include "SA rivalries">>`; - t += `<br><<include "SA devotion">>`; - } else { - App.SlaveAssignment.choosesOwnClothes(slave); - t += `<<silently>><<include "SA rules">><</silently>>`; - t += `<<silently>><<include "SA diet">><</silently>>`; - t += `<<silently>><<include "SA long term effects">><</silently>>`; - App.SlaveAssignment.drugs(slave); - t += `<<silently>><<include "SA relationships">><</silently>>`; - t += `<<silently>><<include "SA rivalries">><</silently>>`; - t += `<<silently>><br><<include "SA devotion">><</silently>>`; + if (slave.actualAge > 35) { + return `${His} age and experience also contribute.`; } + } - return t; - }; + function farmerIntelligence(slave) { + const { He } = getPronouns(slave); - const farmerRelationshipPC = slave => slave.relationship === -3 && slave.devotion > 50 ? `As your loving ${wife}, ${he} does ${his} best to ensure ${V.farmyardName} runs smoothly. ` : ``; + if (slave.intelligence + slave.intelligenceImplant > 15) { + return `${He} is a clever manager.`; + } + } - const farmerAgeSkill = slave => slave.actualAge > 35 ? `${His} age and experience also contribute. ` : ``; + function farmerSmell(slave) { + const { him, His } = getPronouns(slave); - const farmerIntelligence = slave => slave.intelligence + slave.intelligenceImplant > 15 ? `${He} is a clever manager. ` : ``; + if (!canSmell(slave)) { + return `${His} lack of a sense of smell protects ${him} from that omnipresent barnyard stench.`; + } + } - const farmerSmell = slave => !canSmell(slave) ? `${His} lack of a sense of smell protects ${him} from that omnipresent barnyard stench. ` : ``; + const farmerIntro = slave => `<span class="indent">${SlaveFullName(slave)} is serving as the Farmer</span>.`; - const farmerIntro = slave => ` ${SlaveFullName(slave)} is serving as the Farmer. `; + if (Farmer) { + const + farmerEffects = App.UI.DOM.appendNewElement("p", frag, '', "indent"); - const farmerDevotion = slave => slave.devotion < 45 ? slave.devotion += 5 : null; + V.i = V.slaveIndices[Farmer.ID]; + App.Utils.setLocalPronouns(Farmer); // needed for "include"s - const farmerTrust = slave => slave.trust < 45 ? slave.trust += 5 : null; + if (V.showEWD) { + const + farmerEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); - const farmerLivingRules = slave => slave.rules.living !== 'luxurious' ? slave.rules.living = 'luxurious' : null; + if (V.seeImages && V.seeReportImages) { + App.UI.DOM.appendNewElement("div", farmerEntry, App.Art.SlaveArtElement(Farmer, 0, 0), ["imageRef", "tinyImg"]); + } + $(farmerEntry).append(`<span class="slave-name">${SlaveFullName(Farmer)}</span> is serving as the Farmer.`); + $(farmerEntry).append(App.SlaveAssignment.standardSlaveReport(Farmer, false)); + } else { + App.SlaveAssignment.standardSlaveReport(Farmer, true); + } + + farmerChanges(); + $(farmerEffects).append(farmerText()); + } - // FARMHANDS - const farmhandCount = count => count > 0 ? ` There ${count !== 1 ? `are ${count} farmhands` : `is one farmhand`} working out of ${V.farmyardName}.` : ``; + // MARK: Farmhands - const farmhandLivingRules = slave => { + function farmhandCount(count) { + return `<strong>There ${count > 1 ? `are ${count} farmhands` : `is one farmhand`} working out of ${V.farmyardName}.</strong>`; + } + + function farmhandLivingRules(slave) { switch (V.farmyardDecoration) { case 'Degradation': case 'standard': @@ -246,11 +294,11 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { break; default: slave.rules.living = 'normal'; + break; } - // TODO: should FS with 'spare' living rules cause minor health damage and devotion / trust loss? - }; + } - const farmhandHealth = slave => { + function farmhandHealth(slave) { if (slave.health.condition < -80) { improveCondition(slave, 20); } else if (slave.health.condition < -40) { @@ -260,10 +308,9 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { } else if (slave.health.condition < 90) { improveCondition(slave, 7); } - }; + } - // TODO: check over all of these numbers, make sure they make sense - const farmhandDevotion = slave => { + function farmhandDevotion(slave) { if (slave.devotion <= 20 && slave.trust >= -20) { slave.devotion -= 5; slave.trust -= 5; } else if (slave.devotion < 45) { @@ -271,84 +318,109 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { } else if (slave.devotion > 50) { slave.devotion -= 4; } - }; - - const farmhandEndWeek = slave => { - let t = ``; - - if (V.showEWD) { - t += `<br><br>`; - /* 000-250-006 */ // TODO: legacy - needed? - if (V.seeImages && V.seeReportImages) { - t += `<div class="imageRef tinyImg"> - ${SlaveArt(slave, 0, 0)} - </div>`; - } - /* 000-250-006 */ - t += `<span class="slave-name">${SlaveFullName(slave)}</span> ${slave.choosesOwnAssignment === 2 ? `<<include "SA chooses own job">>` : `is working out of ${V.farmyardName}`}. `; - t += `<br> ${He} ${App.SlaveAssignment.workTheFarm(slave)}`; - t += `<br> `; - t += App.SlaveAssignment.choosesOwnClothes(slave); - t += `<<include "SA rules">>`; - t += `<<include "SA diet">>`; - t += `<<include "SA long term effects">>`; - t += App.SlaveAssignment.drugs(slave); - t += `<<include "SA relationships">>`; - t += `<<include "SA rivalries">>`; - t += `<br><<include "SA devotion">>`; - } else { - t += `<<silently>><<include "SA chooses own job">><</silently>>`; - App.SlaveAssignment.choosesOwnClothes(slave); - t += `<<silently>><<include "SA rules">><</silently>>`; - t += `<<silently>><<include "SA diet">><</silently>>`; - t += `<<silently>><<include "SA long term effects">><</silently>>`; - App.SlaveAssignment.drugs(slave); - t += `<<silently>><<include "SA relationships">><</silently>>`; - t += `<<silently>><<include "SA rivalries">><</silently>>`; - t += `<<silently>><br><<include "SA devotion">><</silently>>`; - } - - return t; - }; + } - const farmhandProfit = slave => { + function farmhandProfit(slave) { let incomeStats = getSlaveStatisticData(slave, slave.assignment === Job.FARMYARD ? V.facility.farmyard : undefined); return incomeStats.income; - }; + } - const farmhandFood = slave => { + function farmhandFood(slave) { let incomeStats = getSlaveStatisticData(slave, slave.assignment === Job.FARMYARD ? V.facility.farmyard : undefined), - foodWeek = 0; + foodWeek = incomeStats.food || 0; - foodWeek += incomeStats.food; if (V.farmMenials > 0) { foodWeek += (V.farmMenials * 350); } return foodWeek; - }; + } - const farmhandTrust = slave => slave.trust < 30 ? slave.trust += 5 : null; + function farmhandTrust(slave) { + if (slave.trust < 30) { + slave.trust += 5; + } + } - const farmhandEnergy = slave => slave.energy > 40 && slave.energy < 95 ? slave.energy++ : null; + function farmhandEnergy(slave) { + if (slave.energy > 40 && slave.energy < 95) { + slave.energy++; + } + } + if (slaves) { + const intro = App.UI.DOM.appendNewElement("p", frag, '', "indent"); - // MENIALS + let r = []; + + r.push(farmhandCount(slaves.length)); + + for (const slave of slaves) { + V.i = V.slaveIndices[slave.ID]; + + slave.devotion += devBonus; + + App.Utils.setLocalPronouns(slave); // needed for "include"s + + if (V.showEWD) { + const + slaveEntry = App.UI.DOM.appendNewElement("div", frag, '', "slave-report"); + + if (V.seeImages && V.seeReportImages) { + App.UI.DOM.appendNewElement("div", slaveEntry, App.Art.SlaveArtElement(slave, 0, 0), ["imageRef", "tinyImg"]); + } + + $(slaveEntry).append(`<span class="slave-name">${SlaveFullName(slave)}</span> `); + + if (slave.choosesOwnAssignment === 2) { + $(slaveEntry).append(App.UI.DOM.renderPassage("SA chooses own job")); + } else { + $(slaveEntry).append(`is working out of ${V.farmyardName}.`); + } - if (V.farmMenials > 0) { + farmhandLivingRules(slave); + farmhandHealth(slave); + farmhandDevotion(slave); + farmhandTrust(slave); + farmhandEnergy(slave); + farmhandFood(slave); + + profits += farmhandProfit(slave); + + const farmhandContent = App.UI.DOM.appendNewElement("div", slaveEntry, '', "indent"); + + $(farmhandContent).append(App.SlaveAssignment.workTheFarm(slave)); + $(slaveEntry).append(App.SlaveAssignment.standardSlaveReport(slave, false)); + } else { // silently discard return values + App.SlaveAssignment.workTheFarm(slave); + App.SlaveAssignment.standardSlaveReport(slave, true); + } + } + + $(intro).append(r); + } + + + + // MARK: Menials + + if (V.farmMenials) { let farmMenialProductivity = 9; - if (V.farmyardUpgrade.pump) { + if (V.farmyardUpgrades.pump) { farmMenialProductivity += 1; } - if (V.farmyardUpgrade.fertilizer) { + + if (V.farmyardUpgrades.fertilizer) { farmMenialProductivity += 2; } - if (V.farmyardUpgrade.seeds) { + + if (V.farmyardUpgrades.seeds) { farmMenialProductivity += 3; } - if (V.farmyardUpgrade.machinery) { + + if (V.farmyardUpgrades.machinery) { farmMenialProductivity += 3; } @@ -356,19 +428,20 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { } - // FARMYARD - const farmyardStatsRecords = () => { - // TODO: check over these setters and remove those we don't need + // MARK: Farmyard + + function farmyardStatsRecords() { const f = V.facility.farmyard; + if (typeof f === "undefined") { return; } + f.farmhandIncome = 0; f.customers = 0; f.farmhandCosts = 0; f.rep = 0; - f.adsCosts = V.farmyardAdsSpending; f.maintenance = V.farmyard * V.facilityCost; f.totalIncome = f.farmhandIncome + f.adsIncome; f.totalExpenses = f.farmhandCosts + f.maintenance; @@ -380,117 +453,72 @@ App.Facilities.Farmyard.farmyardReport = function farmyardReport() { f.farmhandCosts += i.cost; f.rep += i.rep; } - }; + } - const farmyardDecoration = () => { - let t = ``; + function farmyardDecoration() { + let r = []; // TODO: add checks for the different FSs if (V.farmyardDecoration !== 'standard') { - if (!profits && !foodWeek) { - t += `<br>`; - } - t += `<br>${V.farmyardNameCaps}'s customer's enjoyed `; - if (V.seeBestiality && V.farmyardBreeding > 0 && (V.canines.length || V.hooved.length || V.felines.length)) { - t += `<span class="green">watching farmhands fuck animals in ${V.farmyardDecoration} surroundings.</span>`; - } else if (V.farmyardShows) { - t += `<span class="green">watching farmhands put on shows in ${V.farmyardDecoration} surroundings.</span>`; - } else { - // TODO: not sure about this one - t += `<span class="green">partaking of ${V.farmyardName}'s fine produce in its ${V.farmyardDecoration} décor.</span>`; - } - } + const decorationEffects = App.UI.DOM.appendNewElement("p", frag, '', "indent"); - return t; - }; + $(decorationEffects).append(document.createElement("br")); - const farmyardProfit = (profit, foodWeek) => { - let t = ``; + r.push(`${V.farmyardNameCaps}'s customer's enjoyed`); - if (profit || foodWeek) { - t += `<br><br>${V.farmyardNameCaps} `; - if (profit) { - t += `makes you <span class="yellowgreen">${cashFormat(Math.trunc(profit))}</span>`; - } - if (profit && foodWeek && V.foodMarket) { - t += ` and `; - } - if (foodWeek && V.foodMarket) { - t += `produced <span class="chocolate"> ${massFormat(foodWeek)}</span> of food`; + if (V.seeBestiality && V.policies.bestialityOpeness && (V.canines || V.hooved || V.felines)) { + r.push(`<span class="green">watching farmhands fuck animals in ${V.farmyardDecoration} surroundings.</span>`); + } else if (V.farmyardShows) { + r.push(`<span class="green">watching farmhands put on shows in ${V.farmyardDecoration} surroundings.</span>`); + } else { + r.push(`<span class="green">partaking of ${V.farmyardName}'s fine produce in its ${V.farmyardDecoration} décor.</span>`); } - t += ` this week. `; - } - return t; - }; - - const farmyardStatsDisplay = () => `<<includeDOM App.Facilities.Farmyard.Stats(false)>><<timed 50ms>><<replace #farmyardstats>><<includeDOM App.Facilities.Farmyard.Stats(true)>><</replace>><</timed>>`; - - t += `<span id="farmyardstats"></span>`; - - // MAIN LOOP + $(decorationEffects).append(r.join(' ')); + } - if (Farmer) { - t += farmerHealth(Farmer); - t += farmerDevotion(Farmer); - t += farmerTrust(Farmer); - t += farmerLivingRules(Farmer); - - getSlaveStatisticData(Farmer, V.facility.farmyard); // make sure we have registered living expenses - - t += farmerIntro(Farmer); - t += farmerRelationshipPC(Farmer); - t += farmerFetishEffects(farmerFetish(Farmer)); - t += farmerSkill(Farmer); - t += farmerCashBonus(Farmer); - t += farmerAgeSkill(Farmer); - t += farmerExperience(Farmer); - t += farmerIntelligence(Farmer); - t += farmerDick(Farmer); - t += farmerSmell(Farmer); - t += farmerRelationshipSlaves(Farmer); - t += farmerWorks(Farmer); + return r; } - t += farmhandCount(FL); + function farmyardProfit(profit, food) { + const profitContent = App.UI.DOM.appendNewElement("p", frag, '', "indent"); - if (Farmer) { - t += farmerEndWeek(Farmer); - } - - if (FL > 0) { - let oldCash = V.cash, - oldFood = V.food; + let r = []; - for (const slave of App.Utils.sortedEmployees(App.Entity.facilities.farmyard)) { - V.i = V.slaveIndices[slave.ID]; + $(profitContent).append(document.createElement("br")); - ({ - he, him, his, hers, himself, girl, He, His, loli - } = getPronouns(slave)); + if (profit || food) { + r.push(V.farmyardNameCaps); - farmhandLivingRules(slave); - farmhandHealth(slave); - farmhandDevotion(slave); - farmhandTrust(slave); - farmhandEnergy(slave); - farmhandFood(slave); - profits += farmhandProfit(slave); + if (profit) { + r.push(`makes you <span class="yellowgreen">${cashFormat(Math.trunc(profit))}</span>`); + } - t += farmhandEndWeek(slave); + if (V.foodMarket) { + if (profit && food) { + r.push(`and`); + } + if (food) { + r.push(`produced <span class="chocolate"> ${massFormat(food)}</span> of food`); + } + } + r.push(`this week.`); } - profits += V.cash - oldCash; // FIXME: equal to 0 - what is this supposed to represent? - oldCash = V.cash; - foodWeek += V.food + oldFood; + return $(profitContent).append(r.join(' ')); } + // FIXME: no idea what I'm doing here + const statsSpan = document.createElement("span"); + farmyardStatsRecords(); - t += farmyardProfit(profits, foodWeek); - t += farmyardDecoration(); - t += farmyardStatsDisplay(); + farmyardProfit(profits, foodWeek); + farmyardDecoration(); V.food += foodWeek; - return t; + frag.append(App.Facilities.Farmyard.Stats(false)); + statsSpan.append(App.Facilities.Farmyard.Stats(true)); + + return frag; }; diff --git a/src/facilities/farmyard/shows/farmShowsIncome.js b/src/facilities/farmyard/shows/farmShowsIncome.js new file mode 100644 index 0000000000000000000000000000000000000000..57fb3be93b44d547687c34b1c86a7e8c7e2496ac --- /dev/null +++ b/src/facilities/farmyard/shows/farmShowsIncome.js @@ -0,0 +1,602 @@ +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ +App.Facilities.Farmyard.farmShowsIncome = function (slave) { + const + arcology = V.arcologies[0], + heavyMods = SlaveStatsChecker.modScore(slave) > 20, + + sexualQuirks = ["perverted", "unflinching"], + behavioralQuirks = ["sinful"], + fetishes = ["humiliation", "masochist"]; + + let cash = 7500; + + if (!slave) { + return null; + } else { + if (S.Farmer) { + cash *= 1.1; + if (S.Farmer.skill.farmer >= V.masteredXP) { + cash *= 1.1; + } + } + + // MARK: FS Effects + + if (arcology.FSSupremacist !== "unset") { + if (isSuperiorRace(slave)) { + if (V.seeBestiality) { + cash *= 0.8; + repX(-10, "shows"); + } else { + cash *= 1.2; + } + } else { + cash *= 0.9; + } + } + + if (arcology.FSSubjugationist !== "unset") { + if (isInferiorRace(slave)) { + if (V.seeBestiality) { + cash *= 1.2; + repX(10, "shows"); + } else { + cash *= 0.8; + } + } else { + cash *= 0.9; + } + } + + if (arcology.FSRepopulationFocus !== "unset") { + if (isPreg(slave)) { + if (slave.eggType === "human") { + cash *= 1.2; + repX(15, "shows"); + } else { + cash *= 0.8; + repX(-15, "shows"); + } + } + } + + if (arcology.FSRestart !== "unset") { + if (isPreg(slave)) { + if (isEliteBreeder(slave)) { + if (slave.eggType === "human") { + cash *= 0.7; + repX(-20, "shows"); + } else { + cash *= 0.6; + repX(-25, "shows"); + } + } else { + if (slave.eggType === "human") { + cash *= 0.8; + repX(-15, "shows"); + } else { + cash += 0.9; + repX(-10, "shows"); + } + } + } else { + if (V.seeBestiality && isEliteBreeder(slave)) { + cash *= 0.7; + repX(-10, "shows"); + } + } + } + + if (arcology.FSGenderRadicalist !== "unset") { + if (slave.genes === "XX") { + if (slave.dick > 0) { + cash *= 1.2; + repX(10, "shows"); + } else { + cash *= 0.9; + repX(-5, "shows"); + } + } + } + + if (arcology.FSGenderFundamentalist !== "unset") { + if (isPreg(slave) || setup.fakeBellies.includes(slave.bellyAccessory)) { + cash *= 1.1; + repX(10, "shows"); + } else { + cash *= 0.9; + repX(-5, "shows"); + } + + // FIXME: keep this? not sure it makes sense + if (slave.genes === "XX") { + if (slave.dick > 0) { + cash *= 0.8; + } else { + cash *= 1.1; + } + } + } + + if (arcology.FSPaternalist !== "unset") { + if (V.seeBestiality) { + if (V.farmyardBreeding) { + if (V.farmyardRestraints) { + cash *= 0.5; + } else { + cash *= 0.7; + } + } else { + if (V.farmyardRestraints) { + cash *= 0.8; + } else { + cash *= 0.9; + } + } + } else { + // TODO: something here? + } + } + + if (arcology.FSDegradationist !== "unset") { + if (V.seeBestiality) { + if (V.farmyardBreeding) { + if (V.farmyardRestraints) { + cash *= 1.5; + } else { + cash *= 1.3; + } + } else { + if (V.farmyardRestraints) { + cash *= 1.2; + } else { + cash *= 1.1; + } + } + } else { + // TODO: something here? + } + } + + if (arcology.FSBodyPurist !== "unset") { + if (SlaveStatsChecker.isModded(slave)) { + if (heavyMods) { + cash *= 0.7; + repX(-15, "shows"); + } else { + cash *= 0.8; + repX(-10, "shows"); + } + } + } + + if (arcology.FSTransformationFetishist !== "unset") { + if (SlaveStatsChecker.isModded(slave)) { + if (heavyMods) { + cash *= 1.3; + repX(15, "shows"); + } else { + cash *= 1.2; + repX(10, "shows"); + } + } + } + + if (arcology.FSYouthPreferentialist !== "unset") { + if (isYoung(slave)) { + cash *= 1.2; + repX(10, "shows"); + } else { + cash *= 0.8; + repX(-5, "shows"); + } + } + + if (arcology.FSMaturityPreferentialist !== "unset") { + if (!isYoung(slave)) { + cash *= 1.2; + repX(10, "shows"); + } else { + cash *= 0.8; + repX(-5, "shows"); + } + } + + if (arcology.FSSlimnessEnthusiast !== "unset") { + if (slimLawPass(slave)) { + cash *= 1.1; + repX(10, "shows"); + } else { + cash *= 0.9; + repX(-5, "shows"); + } + } + + // FIXME: marked for possible rewrite + if (arcology.FSAssetExpansionist !== "unset") { + if (isStacked(slave)) { + cash *= 1.1; + repX(10, "shows"); + } + } + + if (arcology.FSPastoralist !== "unset") { + if (slave.boobs >= 1000) { + cash *= 1.2; + repX(10, "shows"); + } + + if (slave.lactation > 0) { + cash *= 1.1; + repX(5, "shows"); + } + } + + // FIXME: marked for review + if (arcology.FSPhysicalIdealist !== "unset") { + if (genderLawPass(slave)) { + cash *= 1.1; + repX(10, "shows"); + } else { + cash *= 0.9; + repX(-5, "shows"); + } + + if (slave.muscles > 30) { // slave is muscular or more + cash *= 1.1; + } else { + cash *= 0.9; + } + } + + if (arcology.FSHedonisticDecadence !== "unset") { + if (slave.weight > 10) { // slave is curvy or more + cash *= 1.1; + } else { + cash *= 0.9; + } + } + + if (arcology.FSChattelReligionist !== "unset") { // TODO: I don't know what to put for this one + if (slave.devotion < 21) { // if slave is careful or less + cash *= 0.9; + } + } + + if (arcology.FSPetiteAdmiration !== "unset") { + if (heightPass(slave)) { + cash *= 1.1; + repX(10, "shows"); + } else { + cash *= 0.9; + repX(-5, "shows"); + } + } + + if (arcology.FSStatuesqueGlorification !== "unset") { + if (heightPass(slave)) { + cash *= 1.1; + repX(10, "shows"); + } else { + cash *= 0.9; + repX(-5, "shows"); + } + } + + if (arcology.FSRomanRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSAztecRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSEgyptianRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSEdoRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSArabianRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSChineseRevivalist !== "unset") { + // TODO: + } + + // Close FS Effects + + if (setup.entertainmentCareers.includes(slave.career)) { + cash *= 1.1; + } + + // FIXME: can slaves' careers overlap categories? + if (setup.farmerCareers.includes(slave.career)) { + cash *= 1.1; + } + + if (slave.prestige === 1) { // slave is prestigious + cash *= 1.1; + } else if (slave.prestige === 2) { // slave is very prestigious + cash *= 1.5; + } else if (slave.prestige === 3) { // slave is extremely prestigious + cash *= 1.9; + } + + if (slave.porn.prestige === 1) { // slave is prestigious from porn + cash *= 1.1; + } else if (slave.porn.prestige === 2) { // slave is very prestigious from porn + cash *= 1.4; + } else if (slave.porn.prestige === 3) { // slave is extremely prestigious from porn + cash *= 1.7; + } + + // FIXME: needed when using healthPenalty()? + if (slave.health.condition > 50) { // slave is very healthy or more + cash *= 1.2; + } else if (slave.health.condition < -20) { + cash *= 0.9; + } + + // TODO: add checks for family and relationships + + if (slave.face > 40) { // slave is beautiful or more + cash *= 1.4; + } else if (slave.face > 10) { // slave is very pretty or more + cash *= 1.1; + } else if (slave.face < -10) { // slave is less than unattractive + cash *= 0.9; + } else if (slave.face < -40) { // slave is less than ugly + cash *= 0.7; + } + + setSlaveDevotion(cash); + setSlaveTrust(cash); + + if (slave.weight > 30) { // slave is curvy or more + if (arcology.FSHedonisticDecadence !== "unset") { + cash *= 0.8; + } + } else if (slave.weight < -30) { // slave is very thin or less + cash *= 0.8; // TODO: put this on a scale + } + + // FIXME: marked for rewrite + if (slave.muscles > 30) { // slave is muscular or more + cash *= 0.9; + } else if (slave.muscles < -30) { // slave is very weak or less + cash *= 0.6; + } + + if (!canSeePerfectly(slave)) { + if (canSee(slave)) { + cash *= 0.8; + } else { + cash *= 0.6; + } + } + + if (!canHear(slave)) { + cash *= 0.8; + } + + if (isPreg(slave)) { + cash *= 0.8; // TODO: not sure how to incorporate pregnancy + } + // TODO: incorporate skills + cash *= healthPenalty(slave); + + if (slave.intelligence > 50) { // slave is very smart or better + cash *= 1.4; + } else if (slave.intelligence < -50) { // slave is very slow or less + cash *= 0.6; + } + + if (slave.energy > 95) { // slave is a nymphomaniac + cash *= 1.5; + } else if (slave.energy > 80) { // slave has powerful sex drive + cash *= 1.3; + } else if (slave.energy > 60) { // slave has good sex drive + cash *= 1.1; + } else if (slave.energy > 40) { // slave has average sex drive + cash *= 0.9; + } else if (slave.energy > 20) { // slave has poor sex drive + cash *= 0.8; + } else { // slave has no sex drive + cash *= 0.6; + } + + switch (slave.fetish) { + case "submissive": + case "humiliation": + if (V.seeBestiality) { + if (slave.fetishKnown) { + cash *= 1.1; + } else { + slave.fetishKnown = jsRandom(1, 100) > 80 ? 1 : 0; + } + } else { + if (slave.fetishKnown) { + cash *= 0.9; + } else { + slave.fetishKnown = jsRandom(1, 100) > 80 ? 1 : 0; + } + } + break; + + default: + break; + } + + switch (slave.behavioralFlaw) { + case "devout": + case "arrogant": + cash *= 0.9; + break; + + default: + break; + } + + switch (slave.behavioralQuirk) { + case "sinful": + cash *= 1.1; + break; + + default: + break; + } + + switch (slave.sexualFlaw) { + case "shamefast": + cash *= 1.1; + break; + + default: + break; + } + + switch (slave.sexualQuirk) { + case "perverted": + cash *= 1.1; + break; + + default: + break; + } + + return cash; + } + + function setSlaveDevotion(amount) { + const slaveApproves = () => + sexualQuirks.includes(slave.sexualQuirk) || + behavioralQuirks.includes(slave.behavioralQuirk) || + fetishes.includes(slave.fetish); + + if (slave.devotion > 50) { + amount *= 1.5; + + if (V.seeBestiality) { + if (slaveApproves) { + slave.devotion += 2; + } else { + slave.devotion--; + } + } + + if (V.farmyardBreeding) { + if (slaveApproves) { + slave.devotion += 2; + } else { + slave.devotion--; + } + } + + if (V.farmyardRestraints) { + if (slaveApproves) { + slave.devotion += 3; + } else { + slave.devotion -= 2; + } + } + } else if (slave.devotion < -50) { + amount *= 0.5; + + if (V.seeBestiality) { + if (slaveApproves) { + slave.devotion++; + } else { + slave.devotion -= 2; + } + } + + if (V.farmyardBreeding) { + if (slaveApproves) { + slave.devotion++; + } else { + slave.devotion -= 2; + } + } + + if (V.farmyardRestraints) { + if (slaveApproves) { + slave.devotion += 2; + } else { + slave.devotion -= 3; + } + } + } + + return amount; + } + + function setSlaveTrust(amount) { + const slaveApproves = () => + sexualQuirks.includes(slave.sexualQuirk) || + behavioralQuirks.includes(slave.behavioralQuirk) || + fetishes.includes(slave.fetish); + + if (slave.trust > 50) { + amount *= 1.2; + + if (V.seeBestiality) { + if (slaveApproves) { + slave.trust += 2; + } else { + slave.trust--; + } + } + + if (V.farmyardBreeding) { + if (slaveApproves) { + slave.trust += 2; + } else { + slave.trust--; + } + } + + if (V.farmyardRestraints) { + if (slaveApproves) { + slave.trust += 3; + } else { + slave.trust -= 2; + } + } + } else if (slave.trust < -50) { + amount *= slave.devotion > 50 ? 1.2 : 0.9; + + if (V.seeBestiality) { + if (slaveApproves) { + slave.trust++; + } else { + slave.trust -= 2; + } + } + + if (V.farmyardBreeding) { + if (slaveApproves) { + slave.trust++; + } else { + slave.trust -= 2; + } + } + + if (V.farmyardRestraints) { + if (slaveApproves) { + slave.trust += 2; + } else { + slave.trust -= 3; + } + } + } + + return amount; + } +}; diff --git a/src/facilities/farmyard/shows/saFarmyardShows.js b/src/facilities/farmyard/shows/saFarmyardShows.js new file mode 100644 index 0000000000000000000000000000000000000000..151ee6879f457c93af67dad050f3e6c5be9536da --- /dev/null +++ b/src/facilities/farmyard/shows/saFarmyardShows.js @@ -0,0 +1,441 @@ +/** + * Returns a string describing the effects of the slave putting on shows only + * To see full effects, see farmyardShows.js + * @param {App.Entity.SlaveState} slave + * @returns {string} + */ +App.Facilities.Farmyard.putOnShows = function (slave) { + const + { he, him, his, hers, He, His } = getPronouns(slave), + incomeStats = getSlaveStatisticData(slave, V.facility.farmyard), + arcology = V.arcologies[0], + _beautiful = beautiful(slave), + _pretty = pretty(slave), + + heavyMods = SlaveStatsChecker.modScore(slave) > 20; + + incomeStats.income += App.Facilities.Farmyard.farmShowsIncome(slave); + + r.push(`${He} also puts on shows with animals this week.`); + + // Open FS Subsection + + if (arcology.FSSupremacist !== "unset") { + if (isSuperiorRace(slave)) { + if (V.seeBestiality) { + r.push(`Society <span class="reputation dec">disapproves</span> of your allowing a member of the elite race to be degraded in such a fashion, and thus ${he} didn't earn as much.`); + } else { + r.push(`Since ${arcology.FSSupremacistRace} slaves are in fashion, ${he} attracts a little more attention than if ${he} wasn't ${arcology.FSSupremacistRace}.`); + } + } else { + r.push(`Society doesn't disapprove of ${him} not being ${arcology.FSSupremacistRace}, but ${he} doesn't earn as much as ${he} would if ${he} was.`); + } + } + + if (arcology.FSSubjugationist !== "unset") { + if (isInferiorRace(slave)) { + if (V.seeBestiality) { + r.push(`Society <span class="reputation inc">approves</span> of the degradation you submit your ${arcology.FSSubjugationistRace} slaves to, and so ${he} earns you a bit more.`); + } else { + r.push(`Fewer people want to go see a ${arcology.FSSubjugationistRace} slave put on a show, and so ${he} doesn't earn as much as ${he} otherwise could.`); + } + } else { + r.push(`Society doesn't disapprove of ${him} not being ${arcology.FSSubjugationistRace}, but ${he} doesn't earn as much as ${he} would if ${he} was.`); + } + } + + if (arcology.FSRepopulationFocus !== "unset") { + if (isPreg(slave)) { + if (slave.eggType === "human") { + r.push(`Society <span class="reputation inc">greatly approves</span> of your having pregnant slaves ${V.seeBestiality ? `have sex` : `put on shows`} with animals.`); + } else { + r.push(`Society is <span class="reputation dec">disgusted</span> by ${his} pregnancy when they realize that what it is in ${his} womb is not human.`); + } + } + } + + if (arcology.FSRestart !== "unset") { + if (isPreg(slave)) { + if (isEliteBreeder(slave)) { + if (slave.eggType === "human") { + r.push(`Society is <span class="reputation dec">horrified</span> by the fact that you would dare defile a slave deemed fit for humanity's revival in such a manner, especially one that is carrying the future of the planet.`); + } else { + r.push(`Society is <span class="reputation dec">absolutely repulsed</span> by the fact that you would dare defile a slave deemed fit for humanity's revival in such a manner, especially when they learn that what is in ${his} womb is not even human.`); + } + } else { + if (slave.eggType === "human") { + r.push(`Society is <span class="reputation dec">extremely disgusted</span> by ${his} pregnancy and the fact that you would have ${him} ${V.seeBestiality ? `have sex` : `put on shows`} with animals while sporting a baby bump.`); + } else { + r.push(`Society is disgusted by ${his} pregnancy until they learn that what is in ${his} womb is not human.`); + } + } + } else { + if (V.seeBestiality && isEliteBreeder(slave)) { + r.push(`Society is <span class="reputation dec">heavily disapproving</span> of the fact that you would dare defile a slave deemed fit for humanity's revival in such a manner.`); + } + } + } + + if (arcology.FSGenderRadicalist !== "unset") { + if (slave.dick > 0) { + r.push(`${His} patrons <span class="reputation inc">approve</span> of the fact that ${he} has a dick.`); + } else { + r.push(`${His} patrons <span class="reputation dec">are disappointed</span> that ${he} doesn't have a dick.`); + } + } + + if (arcology.FSGenderFundamentalist !== "unset") { + if (isPreg(slave) || setup.fakeBellies.includes(slave.bellyAccessory)) { + r.push(`${His} viewers <span class="reputation inc">approve</span> of the fact that ${he} is sporting a baby bump${setup.fakeBellies.includes(slave.bellyAccessory) ? `, even though ${hers} isn't real` : ``}.`); + } else { + r.push(`${His} viewers <span class="reputation dec">are disappointed</span> that ${he} isn't pregnant.`); + } + } + + if (arcology.FSPaternalist !== "unset") { + if (V.seeBestiality) { + if (V.farmyardBreeding) { + if (V.farmyardRestraints) { + r.push(`Your citizens are <span class="reputation dec">extremely disapproving</span> of the fact that you would allow your slaves to be treated as nothing more than a bound breeding toy for your animals.`); + } else { + r.push(`Your citizens are <span class="reputation dec">highly disapproving</span> of the fact that you would allow your slaves to be treated as nothing more than a breeding toy for your animals.`); + } + } else { + if (V.farmyardRestraints) { + r.push(`Your citizens are <span class="reputation dec">very disapproving</span> of the fact that you would allow your slaves to be treated as nothing more than a bound toy for your animals.`); + } else { + r.push(`Your citizens are <span class="reputation dec">disapproving</span> of the fact that you would allow your slaves to be treated as nothing more than a toy for your animals.`); + } + } + } else { + // TODO: + } + } + + if (arcology.FSDegradationist !== "unset") { + if (V.seeBestiality) { + if (V.farmyardBreeding) { + if (V.farmyardRestraints) { + r.push(`Your citizens are <span class="reputation dec">extremely approving</span> of the fact that you would allow your slaves to be treated as nothing more than a bound breeding toy for your animals.`); + } else { + r.push(`Your citizens are <span class="reputation dec">highly approving</span> of the fact that you would allow your slaves to be treated as nothing more than a breeding toy for your animals.`); + } + } else { + if (V.farmyardRestraints) { + r.push(`Your citizens are <span class="reputation dec">very approving</span> of the fact that you would allow your slaves to be treated as nothing more than a bound toy for your animals.`); + } else { + r.push(`Your citizens are <span class="reputation dec">approving</span> of the fact that you would allow your slaves to be treated as nothing more than a toy for your animals.`); + } + } + } else { + // TODO: + } + } + + if (arcology.FSBodyPurist !== "unset") { + if (SlaveStatsChecker.isModded(slave)) { + r.push(`The members of the audience <span class="reputation dec">disapprove</span> that you would use a slave with ${heavyMods ? `such heavy` : ``} modifications to put on shows.`); + } + } + + if (arcology.FSTransformationFetishist !== "unset") { + if (SlaveStatsChecker.isModded(slave)) { + r.push(`The members of the audience <span class="reputation inc">approve</span> that you would use a slave with ${heavyMods ? `such heavy` : ``} modifications to put on shows.`); + } + } + + if (arcology.FSYouthPreferentialist !== "unset") { + if (isYoung(slave)) { + r.push(`${arcology.name}'s citizens <span class="reputation dec">disapprove</span> of your using such old slaves to put on shows.`); + } else { + r.push(`${arcology.name}'s citizens <span class="reputation inc">approve</span> of your using young slaves to put on shows.`); + } + } + + if (arcology.FSMaturityPreferentialist !== "unset") { + if (isYoung(slave)) { + r.push(`${arcology.name}'s citizens <span class="reputation inc">approve</span> of your using mature slaves to put on shows.`); + } else { + r.push(`${arcology.name}'s citizens <span class="reputation dec">disapprove</span> of your using such young slaves to put on shows.`); + } + } + + if (arcology.FSSlimnessEnthusiast !== "unset") { + if (slimLawPass(slave)) { + r.push(`${His} slim body <span class="reputation inc">attracts a wider audience.</span>`); + } else { + r.push(`Society finds your using a slave with such a flabby body <span class="reputation dec">disgusting.</span>`); + } + } + + // FIXME: marked for possible rewrite + if (arcology.FSAssetExpansionist !== "unset") { + if (isStacked(slave)) { + r.push(`Society <span class="reputation inc">approves</span> of the fact that you respect their ideals in using a slave with larger assets.`); + } + } + + if (arcology.FSPastoralist !== "unset") { + if (slave.boobs >= 1000) { + r.push(`The fact that ${slave.slaveName} has such large udders <span class="reputation inc">pleases your citizens.</span>`); + } + + if (slave.lactation > 0) { + r.push(`Your citizens ${slave.boobs >= 1000 ? `also ` : ``}<span class="reputation inc">approve</span> of the fact that ${he} is visibly lactating.`); + } + } + + // FIXME: marked for review + if (arcology.FSPhysicalIdealist !== "unset") { + if (genderLawPass(slave)) { + r.push(`The fact that ${slave.slaveName} has what is considered the ideal form also <span class="reputation inc">helps ${him} attract attention</span>, and so ${he} earns a bit more.`); + } else { + r.push(`${His} form isn't exactly what ${arcology.name}'s citizens consider ideal, and so ${he} doesn't <span class="reputation dec">earn as much</span>.`); + } + } + + // FIXME: marked for rewrite + if (arcology.FSHedonisticDecadence !== "unset") { + if (slave.weight > 10) { + r.push(`Since ${slave.slaveName} is large enough for ${arcology.name}'s citizens, ${he} earns slightly more.`); + } else { + r.push(`${He} doesn't earn quite as much ${he} would have if ${he} was a bit larger in size.`); + } + } + + if (arcology.FSChattelReligionist !== "unset") { + if (slave.devotion <= 20) { + // TODO: write this + } else { + // TODO: write this + } + } + + if (arcology.FSPetiteAdmiration !== "unset") { + if (heightPass(slave)) { + r.push(`The fact that you are using such small slaves <span class="reputation inc">pleases your citizens.</span>`); + } else { + r.push(`The fact that you are using such small slaves <span class="reputation dec">displeases your citizens.</span>`); + } + } + + if (arcology.FSStatuesqueGlorification !== "unset") { + if (heightPass(slave)) { + r.push(`Your citizens <span class="reputation inc">approve</span> of your using such statuesque slaves for putting on shows.`); + } else { + r.push(`Your citizens <span class="reputation dec">disapprove</span> of your not using taller slaves for putting on shows.`); + } + } + + if (arcology.FSRomanRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSAztecRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSEgyptianRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSEdoRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSArabianRevivalist !== "unset") { + // TODO: + } + + if (arcology.FSChineseRevivalist !== "unset") { + // TODO: + } + + // Close FS Subsection + + if (setup.entertainmentCareers.includes(slave.career)) { + r.push(`${He} has experience with putting on shows from ${his} life before ${he} was a slave, making ${him} more effective at putting on shows.`); + } + + // FIXME: can slaves' careers overlap categories? + if (setup.farmerCareers.includes(slave.career)) { + r.push(`${He} ${setup.entertainmentCareers.includes(slave.career) ? `also` : ``} has experience in working with animals from ${his} life before ${he} was a slave, making ${him} more effective at putting on shows.`); + } + + if (slave.prestige === 1) { + r.push(`Because some of your citizens already know of ${him}, ${he} earns more.`); + } else if (slave.prestige === 2) { + r.push(`Because a lot of your citizens already know of ${him}, ${he} earns quite a bit more.`); + } else if (slave.prestige === 3) { + r.push(`Because ${he} is so famous, ${he} earns a lot more then ${he} would otherwise.`); + } + + if (slave.porn.prestige === 1) { + r.push(`${He} earns a bit more because some of your citizens already know ${him} from porn.`); + } else if (slave.porn.prestige === 2) { + r.push(`${He} earns quite a bit more because a lot of your citizens already know ${him} from porn.`); + } else if (slave.porn.prestige === 3) { + r.push(`${He} earns a lot more because ${he} is so famous from porn.`); + } + + if (slave.health.condition > 50) { + r.push(`${He} is in such excellent health that ${he} is able to put on longer and more energetic shows, earning you more.`); + } else if (slave.health.condition < -20) { + r.push(`${His} poor health negatively affects ${his} ability to put on good shows, cutting into your profits.`); + } + + // TODO: add checks for family and relationships + + if (slave.face > 40) { + r.push(`${He} is so ${_beautiful} that ${his} audience is willing to pay more to watch ${him} put on shows.`); + } else if (slave.face > 10) { + r.push(`${He} is so ${_pretty} that ${his} audience is willing to pay more to watch ${him} put on shows.`); + } else if (slave.face < -10) { + r.push(`${His} audience isn't willing to pay as much because of how unattractive ${his} face is.`); + } else if (slave.face < -40) { + r.push(`${His} audience isn't willing to pay as much because of how hard ${his} face is to look at.`); + } + + // TODO: incorporate seeBestiality, breeding, and restraints + if (slave.devotion > 50) { + if (slave.trust > 50) { + r.push(`${He} is so devoted that ${he} works ${his} hardest to make ${his} show a good one.`); + } else if (slave.trust < -50) { + r.push(`${He} is both devoted to you and terrified of you, so ${he} tries ${his} best to make ${his} show a good one.`); + } + } else if (slave.devotion < -50) { + if (slave.trust > 50) { + r.push(`${slave.slaveName} purposefully does the bare minimum ${he} can get away with to spite you.`); + } else if (slave.trust < -50) { + r.push(`${slave.slaveName} refuses to do anything without punishment, which is evident from ${his} meager earnings.`); + } + } + + // FIXME: marked for rewrite + if (slave.weight > 30) { + if (arcology.FSHedonisticDecadence === "unset") { + r.push(`Your citizens are not willing to pay as much to see such a fat slave put on shows, so ${he} loses some income.`); + } + } else if (slave.weight < -30) { + r.push(`Your citizens don't like watching such a sickly-looking slaves put on shows, so ${he} loses some income.`); + } + + if (slave.muscles > 30) { + // TODO: write this - do we want something for muscles? + } else if (slave.muscles < -30) { + r.push(`${slave.slaveName} is so weak that ${he} cannot even properly handle the animals ${he}'s assigned to ${V.seeBestiality ? `fuck` : `work with`}, and isn't able to put on any sort of meaningful show.`); + } + + if (!canSeePerfectly(slave)) { + r.push(`${His} ${!canSee(slave) ? `blindness makes it impossible` : `nearsightedness makes it harder`} for ${him} to see what ${he}'s doing, affecting ${his} ability to put on a good show.`); + } + + if (slave.hears < 0) { + r.push(`${His} ${slave.hears < -1 ? `lack of` : `poor`} hearing makes it difficult for ${him} to hear what ${his} audience wants from ${him}, which really affects ${his} earnings.`); + } + + // FIXME: marked for rewrite + if (isPreg(slave)) { + r.push(`${His}${slave.bellyPreg > 100000 ? ` advanced` : ``} pregnancy makes it more difficult for him to effectively put on a good show.`); + } + + if (slave.health.tired > 60) { + r.push(`${He} is so tired that the energy in ${his} shows is basically nonexistent, affecting ${his} profits.`); + } + + if (slave.intelligence > 50) { + r.push(`Because ${he} is so intelligent, ${he} is able to tailor ${his} shows to ${his} audience, helping ${him} bring in more in profits.`); + } else if (slave.intelligence < -50) { + r.push(`${He} is so slow that all ${he} can really do is just ${V.seeBestiality ? `lie there and take it` : `put on the most basic of moves`}, which your audience finds dull and uninteresting.`); + } + + if (slave.energy > 95) { + r.push(`The fact that ${he} is a nymphomaniac helps ${him} to go for longer, allowing ${him} to really put on an amazing show.`); + } else if (slave.energy > 80) { + r.push(`The fact that ${his} sex drive is so powerful helps ${him} to really put on good shows.`); + } else if (slave.energy > 60) { + r.push(`The fact that ${his} sex drive is so good helps ${him} to put on good shows.`); + } else if (slave.energy > 40) { + r.push(`${His} average sex drive allows ${him} to put on a decent show.`); + } else if (slave.energy > 20) { + r.push(`The fact that ${his} sex drive is so poor affects ${his} performance.`); + } else { + r.push(`The fact that ${his} sex drive is nonexistant really hinders ${his} ability to put on a decent show.`); + } + + // TODO: add more to the fetishes and flaws / quirks + switch (slave.fetish) { + case "submissive": + if (V.seeBestiality) { + if (slave.fetishKnown) { + r.push(`${He} is so submissive that ${he} willingly accepts ${his} position as an animal's fucktoy and <span class="reputation inc">is able to put on a decent show</span>.`); + } else { + r.push(`${V.Headgirl ? `${V.Headgirl.slaveName} notices` : `You notice`} that ${slave.slaveName} seems to have really taken to ${his} position as a fucktoy for animals. <span class="lightcoral">${He}'s a submissive!</span>`); + } + } else { + if (slave.fetishKnown) { + r.push(`Being a submissive, ${he} <span class="reputation dec">doesn't have the confidence required</span> to really put on a good show.`); + } else { + r.push(`${slave.slaveName} doesn't seem to have the type of fortitude needed to put on a show, and after some probing, you discover why - it turns out <span class="lightcoral">${he}'s a submissive!</span>`); + } + } + break; + + case "humiliation": + if (V.seeBestiality) { + if (slave.fetishKnown) { + r.push(`${slave.slaveName} uses the most of this humiliating experience to really put on a show, to <span class="reputation inc">the approval of ${his} audience</span>.`); + } else { + // TODO: + } + } else { + // TODO: not sure about this one + } + break; + + default: + break; + } + + switch (slave.behavioralFlaw) { + case "arrogant": + r.push(`Because ${he} is so arrogant, ${he} tries ${his} hardest to avoid ${V.seeBestiality ? `fucking animals` : `putting on shows`}, <span class="cash dec">which affects ${his} profits</span> and <span class="reputation dec">your reputation.</span>`); + break; + + case "devout": + r.push(`${He} often prays ${V.seeBestiality ? ` while getting fucked by animals` : ` during ${his} shows`}, which your citizens <span class="reputation dec">find off-putting.</span>`); + break; + + default: + break; + } + + switch (slave.behavioralQuirk) { + case "sinful": + r.push(`${He} relishes in ${his} ability to do something so sinful and depraved, and <span class="reputation inc">really puts on a show.</span>`); + break; + + default: + break; + } + + switch (slave.sexualFlaw) { + case "shamefast": + r.push(`${His} crippling shamefastness <span class="reputation dec">limits ${his} ability</span> to put on a decent show.`); + break; + + default: + break; + } + + switch (slave.sexualQuirk) { + case "perverted": + r.push(`${His} shows are a <span class="reputation inc">real spectacle,</span> since ${he} is so perverted that ${he} is willing to go far beyond the bare minimum.`); + break; + + default: + break; + } + + return r.join(' '); +}; diff --git a/src/facilities/nursery/childInteract.tw b/src/facilities/nursery/childInteract.tw index 6eb0fc885761a09a226ad4c9d354f84832cc3cff..76f18de06ba35e10122e1f6d252958317d3cf364 100644 --- a/src/facilities/nursery/childInteract.tw +++ b/src/facilities/nursery/childInteract.tw @@ -305,7 +305,7 @@ FIXME: <<replace "#miniscene">><<include "BeastFucked">><br> <</replace>> <</link>> | <</if>> - <<if $farmyardStable > 0 && $activeHooved.species != 0>> + <<if $farmyardStables > 0 && $activeHooved.species != 0>> <<link "Let a $activeHooved.species mount $him">> <<set $animalType = "hooved">> <<replace "#miniscene">><<include "BeastFucked">><br> <</replace>> diff --git a/src/facilities/statistics.js b/src/facilities/statistics.js index 4690d66e91ef59ebbc4d6f56cd9696a336838a46..448b0da00ff0648068614b0ab03032249c2f60de 100644 --- a/src/facilities/statistics.js +++ b/src/facilities/statistics.js @@ -507,7 +507,7 @@ App.Facilities.Farmyard.Stats = (function() { const H = new App.Facilities.StatsHelper(); const assureList = [ "farmhandIncome", "farmhandCosts", "maintenance", "totalIncome", "totalExpenses", "food", "profit" ]; - /** Generate the arcade statistics table + /** Generate the Farmyard statistics table * @param {boolean} showDetails * @returns {HTMLElement|DocumentFragment} */ diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 326153feebfb9de116e42e385fa908fcc02ddb89..c73026fe4263074d52d6341330cf7fa3143fc67a 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -40,7 +40,6 @@ You should have received a copy of the GNU General Public License along with thi <</for>> <<run assistant.object()>> -<<run FCTV.manage()>> <<run repX(1000, "event")>> <<run setup.prostheticIDs.forEach(function(id) { $prosthetics[id] = {amount: 0, research: 0}; diff --git a/src/interaction/slaveInteract.js b/src/interaction/slaveInteract.js index cd8b348989a78f6158a64ff0d45c6ac4c2c1d586..4ee745e80ab7b547b0ed90b79d94efb0ca58aa98 100644 --- a/src/interaction/slaveInteract.js +++ b/src/interaction/slaveInteract.js @@ -1103,14 +1103,14 @@ App.UI.SlaveInteract.useSlaveDisplay = function(slave) { } else if (slave.clit >= 4) { sexOptions.push({text: `Have another slave ride ${his} clit-dick`, scene: `FSlaveSlaveDick`}); } - if (V.seeBestiality && V.cheatMode === 1) { - if (V.farmyardKennels > 0 && V.activeCanine !== 0) { + if (V.seeBestiality) { + if (V.farmyardKennels > 0 && V.activeCanine) { sexOptions.push({text: `Have a ${V.activeCanine.species} mount ${him}`, scene: `BeastFucked`, update: {animalType: "canine"}}); } - if (V.farmyardStable > 0 && V.activeHooved !== 0) { + if (V.farmyardStables > 0 && V.activeHooved) { sexOptions.push({text: `Let a ${V.activeHooved.species} mount ${him}`, scene: `BeastFucked`, update: {animalType: "hooved"}}); } - if (V.farmyardCages > 0 && V.activeFeline !== 0) { + if (V.farmyardCages > 0 && V.activeFeline) { sexOptions.push({text: `Have a ${V.activeFeline.species} mount ${him}`, scene: `BeastFucked`, update: {animalType: "feline"}}); } } diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 26f7c2353139290ab72cd1415fc61dbd2c6b242c..f3627cce627dba083f81d4546cd29ed5ef60a6d0 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -608,10 +608,10 @@ globalThis.calculateCosts = (function() { return ( ( (facility) - +(0.1*V.farmyardUpgrade.fertilizer*facility) - -(0.2*V.farmyardUpgrade.hydroponics*facility) - +(0.2*V.farmyardUpgrade.seeds*facility) - -(0.4*V.farmyardUpgrade.machinery*facility) + +(0.1*V.farmyardUpgrades.fertilizer*facility) + -(0.2*V.farmyardUpgrades.hydroponics*facility) + +(0.2*V.farmyardUpgrades.seeds*facility) + -(0.4*V.farmyardUpgrades.machinery*facility) )*2 ); } diff --git a/src/js/food.js b/src/js/food.js deleted file mode 100644 index 6ff8ce76947e838f606b7ad3394e1b040a6d8ec8..0000000000000000000000000000000000000000 --- a/src/js/food.js +++ /dev/null @@ -1,332 +0,0 @@ -/** - * @param {App.Entity.SlaveState} slave - * @returns {number} - */ -App.Facilities.Farmyard.foodAmount = function(slave) { - if (!slave) { - return `Current slave is not valid. Please report this`; - } - let food = 150; // kg of food produced per week by slave, before upgrades - if (V.farmyardUpgrade.pump === 1) { - food += 15; // pump upgrade for farmyard - } - if (V.farmyardUpgrade.fertilizer === 1) { - food += 35; // fertilizer upgrade for farmyard - } - if (V.farmyardUpgrade.seeds === 1) { - food += 65; // seeds upgrade for farmyard - } - if (V.farmyardUpgrade.machinery === 1) { - food += 65; // machinery upgrade for farmyard - } - if (V.Farmer !== 0) { // if a farmer is assigned - food *= 1.1; // TODO: expand this to account for farmer XP and skill - if (V.Farmer.skill.farmer >= V.masteredXP) { // if farmer is master - food *= 1.1; - } - } - if (slave.devotion > 50) { - food *= 1.1; - } else if (slave.devotion < -50) { - food *= 0.8; - } - if (slave.muscles > 30) { // slave is muscular or more - food *= 1.1; - } else if (slave.muscles <= -6) { // slave is weak or less - food *= 0.8; - } - if (slave.weight > 95) { // slave is overweight or more - food *= 0.9; - } else if (slave.weight > 130) { // slave is fat or more - food *= 0.8; - } else if (slave.weight > 160) { // slave is obese or more - food *= 0.7; - } else if (slave.weight > 190) { // slave is very obese or more - food *= 0.6; - } - if (!canSee(slave)) { // slave is blind - food *= 0.6; - } else if (!canSeePerfectly(slave)) { // slave is nearsighted - food *= 0.8; - } - if (slave.hears === -1) { // slave is hard of hearing - food *= 0.8; - } else if (slave.hears < -1) { // slave is deaf - food *= 0.6; - } - food *= restEffects(slave, 20); - food = Math.trunc(food); - food = Math.clamp(food, 1, 1000000000000000000); - return food; -}; - -/** - * @param {App.Entity.SlaveState} slave - * @returns {number} - */ -App.Facilities.Farmyard.farmShowsIncome = function(slave) { - // TODO: incorporate farmyardRestraints - let arcology = V.arcologies[0]; - let cash = 100; // TODO: this is just a placeholder - if (!slave) { - return null; - } else { - if (V.Farmer !== 0) { // farmer is assigned - cash *= 1.1; - if (V.Farmer.skill.farmer >= V.masteredXP) { // farmer is master - cash *= 1.1; - } - } - /* OPEN FS EFFECTS */ - if (arcology.FSSupremacist !== "unset") { - if (slave.race === arcology.FSSupremacistRace) { // slave is of supreme race - cash *= 0.9; // TODO: should supreme race slaves receive a penalty? - repX(-10, "food"); // TODO: should this cause a rep loss - } - } - if (arcology.FSSubjugationist !== "unset") { - if (slave.race === arcology.FSSubjugationistRace) { // slave is of subjugated race - cash *= 1.1; - repX(10, "food"); // TODO: should this cause a rep gain? - } else { - cash *= 0.9; // TODO: should unsubjugated race slaves receive a penalty? - } - } - if (arcology.FSRepopulationFocus !== "unset") { - if (slave.pregWeek > 16) { // slave is visibly pregnant - if (slave.eggType !== "human") { // with a non-human - cash *= 1.1; - } - cash *= 1.2; - } else { // slave is not visibly pregnant - cash *= 0.8; // TODO: should non-pregnant slaves receive a penalty? - } - } - if (arcology.FSRestart !== "unset") { - if (slave.pregWeek > 16) { // slave is visibly pregnant - if (slave.eggType !== "human") { // with a non-human - cash *= 0.9; - repX(-15, "food"); - } - cash *= 0.6; - repX(-10, "food"); - } - } - if (arcology.FSGenderRadicalist !== "unset") { - if (slave.dick > 0) { // TODO: does this make sense? - cash *= 1.1; - } else { - cash *= 0.8; - } - } - if (arcology.FSGenderFundamentalist !== "unset") { - if (slave.dick > 0) { - cash *= 1.1; // TODO: does this make sense? - } else { - cash *= 0.8; - } - } - if (arcology.FSPaternalist !== "unset") { - if (V.seeBestiality) { - if (V.farmyardBreeding === 1) { // slaves are being bred - cash *= 0.8; - } else { // slaves are putting on shows - cash *= 0.9; - } - } - } - if (arcology.FSDegradationist !== "unset") { - if (V.seeBestiality) { - if (V.farmyardBreeding === 1) { // slaves are being bred - cash *= 1.2; - } else { // slaves are putting on shows - cash *= 1.1; - } - } - } - if (arcology.FSBodyPurist !== "unset") { - if (slave.boobsImplant > 0) { // slave has breast implants - cash *= 0.9; - } - if (slave.buttImplant > 0) { // slave has butt implants - cash *= 0.9; - } - if (slave.faceImplant > 0) { // slave has had facial surgery - cash *= 0.9; - } - if (slave.lipsImplant > 0) { // slave has lip implants - cash *= 0.9; - } - } - if (arcology.FSTransformationFetishist !== "unset") { - if (slave.boobsImplant > 0) { // slave has breast implants - cash *= 1.1; - } - if (slave.buttImplant > 0) { // slave has butt implants - cash *= 1.1; - } - if (slave.faceImplant > 0) { // slave has had facial surgery - cash *= 1.1; - } - if (slave.lipsImplant > 0) { // slave has lip implants - cash *= 1.1; - } - } - if (arcology.FSYouthPreferentialist !== "unset") { - if (slave.visualAge > 25) { // slave looks older than 25 - cash *= 0.8; // TODO: not sure what age this should be - } else { - cash *= 1.2; - } - } - if (arcology.FSMaturityPreferentialist !== "unset") { - if (slave.visualAge > 25) { // slave looks older than 25 - cash *= 1.2; // TODO: not sure what age this should be - } else { - cash *= 0.8; - } - } - if (arcology.FSSlimnessEnthusiast !== "unset") { - if (slave.weight > 10) { // slave is curvy or more - cash *= 0.9; // TODO: not sure what weight this should be - } // TODO: should implants affect income? - if (slave.boobs > 799) { // slave has larger than a D cup - cash *= 0.9; // TODO: should this be smaller? - } - if (slave.butt > 3) { // slave has bigger than a bubble butt - cash *= 0.9; - } - } - if (arcology.FSAssetExpansionist !== "unset") { - if (slave.weight > 10) { // slave is curvy or more - cash *= 1.1; // TODO: not sure what weight this should be - } // TODO: should implants affect income? - if (slave.boobs > 799) { // slave has larger than a D cup - cash *= 1.1; // TODO: should this be smaller? - } - if (slave.butt > 3) { // slave has bigger than a bubble butt - cash *= 1.1; - } - } - if (arcology.FSPastoralist !== "unset") { - if (slave.boobs > 799) { // slave has larger than a D cup - cash *= 1.2; - } - if (slave.lactation > 0) { // slave is lactating - cash *= 1.1; - } - } - if (arcology.FSPhysicalIdealist !== "unset") { - if (slave.height > 169) { // slave is tall or taller - cash *= 1.1; - } else if (slave.height < 160) { // slave is short or shorter - cash *= 0.9; - } - } - if (arcology.FSHedonisticDecadence !== "unset") { - if (slave.weight > 10) { // slave is curvy or fatter - cash *= 1.1; - } else if (slave.weight < -10) { // slave is thin or thinner - cash *= 0.9; - } - } - if (arcology.FSChattelReligionist !== "unset") { // TODO: I don't know what to put for this one - if (slave.devotion < 21) { // if slave is careful or less - cash *= 0.9; - } - } - // TODO: should I add the ancient cultures FS? - /* CLOSE FS EFFECTS */ - - if (setup.entertainmentCareers.includes(slave.career)) { - cash *= 1.1; - } else if (setup.farmerCareers.includes(slave.career)) { - cash *= 1.1; - } - if (slave.prestige === 1) { // slave is prestigious - cash *= 1.1; - } else if (slave.prestige === 2) { // slave is very prestigious - cash *= 1.2; - } else if (slave.prestige === 3) { // slave is extremely prestigious - cash *= 1.3; - } - if (slave.porn.prestige === 1) { // slave is prestigious from porn - cash *= 1.1; - } else if (slave.porn.prestige === 2) { // slave is very prestigious from porn - cash *= 1.2; - } else if (slave.porn.prestige === 3) { // slave is extremely prestigious from porn - cash *= 1.3; - } // TODO: add relationship checks - if (slave.face > 40) { // slave is beautiful or more - cash *= 1.3; - } else if (slave.face > 10) { // slave is very pretty or more - cash *= 1.1; - } else if (slave.face < -10) { // slave is less than unattractive - cash *= 0.9; - } else if (slave.face < -40) { // slave is less than ugly - cash *= 0.7; - } - if (slave.devotion > 50) { // slave is devoted or more - cash *= 1.1; - } else if (slave.devotion < -50) { // slave is reluctant or less - cash *= 0.8; - } - if (slave.trust > 50) { // slave is trusting or more - cash *= 1.1; - } else if (slave.trust < -50) { // slave is less than frightened - cash *= 0.8; // TODO: should trust be a factor? - } - if (slave.weight > 30) { // slave is curvy or more - cash *= 0.8; // TODO: tie in Hedonistic FS - } else if (slave.weight < -30) { // slave is very thin or less - cash *= 0.8; // TODO: put this on a scale - } - if (slave.muscles > 30) { // slave is muscular or more - cash *= 0.9; // TODO: tie in height eugenics policy - } else if (slave.muscles < -30) { // slave is very weak or less - cash *= 0.9; // TODO: should this be on a scale? - } - if (!canSeePerfectly(slave)) { // slaves eyesight is nearsighted or worse - cash *= 0.9; // TODO: should nearsighted and blind slaves receive a penalty? - } - if (slave.hears < 0) { // slave is hard of hearing or less - cash *= 0.9; // TODO: should hard of hearing slaves receive a penalty? - } - if (slave.boobs > 800) { // slave has a DD cup or bigger - cash *= 0.9; // TODO: would this make sense? - } - if (slave.butt > 4) { // slave has an enormous butt or bigger - cash *= 0.9; // TODO: would this make sense? - } - if (slave.preg > 10) { // slave is pregnant and showing - cash *= 0.8; // TODO: not sure how to incorporate pregnancy - } // TODO: incorporate skills - cash *= healthPenalty(slave); - if (slave.intelligence > 50) { // slave is very smart or better - cash *= 1.1; - } else if (slave.intelligence < -50) { // slave is very slow or less - cash *= 0.8; - } - if (slave.energy <= 20) { // slave has no sex drive - cash *= 0.7; - } else if (slave.energy <= 40) { // slave has poor sex drive - cash *= 0.8; - } else if (slave.energy <= 60) { // slave has average sex drive - cash *= 0.9; - } else if (slave.energy <= 80) { // slave has good sex drive - cash *= 1.1; - } else if (slave.energy <= 95) { // slave has powerful sex drive - cash *= 1.2; - } else { // slave is a nymphomaniac - cash *= 1.3; - } - if (slave.fetish === "submissive") { - cash *= 1.1; - } else if (slave.fetish === "humiliation") { - cash *= 1.1; - } else if (slave.fetish === "masochist") { - cash *= 1.1; - } // TODO: tie in quirks and flaws - return cash; - } -}; diff --git a/src/js/vignettes.js b/src/js/vignettes.js index bd54e61b5adf67012d2fdd163ac7526d00d4c5c1..5940f773f52d3e2321638a280114bbefba8ee42d 100644 --- a/src/js/vignettes.js +++ b/src/js/vignettes.js @@ -2,11 +2,11 @@ * @param {App.Entity.SlaveState} slave * @returns {{text: string, type: string, effect: number}} */ -globalThis.GetVignette = function(slave) { +globalThis.GetVignette = function (slave) { /** @type {{text: string, type: string, effect: number}[]} */ let vignettes = []; - const {he, him, his, hers, himself, boy, He/* , His */} = getPronouns(slave); + const { he, him, his, hers, himself, boy, He } = getPronouns(slave); if (slave.assignment === window.Job.WHORE || slave.assignment === window.Job.BROTHEL || slave.assignment === window.Job.MADAM) { let seed = jsRandom(1, 10); @@ -4234,73 +4234,7 @@ globalThis.GetVignette = function(slave) { effect: 0, }); } else if (slave.assignment === window.Job.FARMYARD || slave.assignment === window.Job.FARMER) { - if (canWalk(slave)) { - vignettes.push({ - text: `${he} rather comically injured ${himself} by stepping on a rake,`, - type: "health", - effect: -1, - }); - } - // TODO: add more vignettes - if ((V.farmyardBreeding) && (V.seeBestiality)) { - vignettes.push({ - text: `a citizen didn't realize how disgusting he found bestiality until he attended one of ${V.farmyardName}'s shows,`, - type: "rep", - effect: -1, - }); - vignettes.push({ - text: `a citizen attended one of ${V.farmyardName}'s shows and discovered he had a bestiality fetish,`, - type: "rep", - effect: 1, - }); - vignettes.push({ - text: `${he} dreamt that you decided to have ${him} do nothing but fuck animals for the rest of ${his} life,`, - type: "devotion", - effect: -1 - }); - vignettes.push({ - text: `${he} dreamt that you wouldn't come to ${his} aid when one of ${his} bestial partners became overeager,`, - type: "trust", - effect: -1 - }); - if ((V.canines.length > 0) && hasAnyNaturalLegs(slave)) { - vignettes.push({ - text: `an over-excited dog left scratch marks on ${his} leg,`, - type: "health", - effect: -1 - }); - } - if (V.hooved.length > 0) { - vignettes.push({ - text: `${he} was injured by a particularly well-endowed horse,`, - type: "health", - effect: -1 - }); - } - if (V.felines.length > 0) { - vignettes.push({ - text: `${he} managed to take two tigers at once, aweing the crowd,`, - type: "cash", - effect: 1 - }); - } - } else { - vignettes.push({ - text: `${he} worked extra hard, and managed to sell extra produce,`, - type: "cash", - effect: 1, - }); - } - vignettes.push({ - text: `${he} felt energized by the simulated outdoor environment`, - type: "health", - effect: 1, - }); - vignettes.push({ - text: `the pesticides ${he} accidentally inhaled made ${him} feel nauseous,`, - type: "health", - effect: -1, - }); + vignettes.push(farmyardVignettes(slave)); } else if (slave.assignment === window.Job.REST || slave.assignment === window.Job.SPA) { switch (slave.behavioralFlaw) { case "anorexic": @@ -4612,5 +4546,93 @@ globalThis.GetVignette = function(slave) { effect: 1, }); } + return jsEither(vignettes); + + + + // MARK: Farmyard + + function farmyardVignettes(slave) { + let r = []; + + if (canWalk(slave)) { + r.push({ + text: `${he} rather comically injured ${himself} by stepping on a rake,`, + type: "health", + effect: -1, + }); + } + + if ((V.farmyardBreeding) && (V.seeBestiality)) { + r.push({ + text: `a citizen didn't realize how disgusting he found bestiality until he attended one of ${V.farmyardName}'s shows,`, + type: "rep", + effect: -1, + }); + + r.push({ + text: `a citizen attended one of ${V.farmyardName}'s shows and discovered he had a bestiality fetish,`, + type: "rep", + effect: 1, + }); + + r.push({ + text: `${he} dreamt that you decided to have ${him} do nothing but fuck animals for the rest of ${his} life,`, + type: "devotion", + effect: -1 + }); + + r.push({ + text: `${he} dreamt that you wouldn't come to ${his} aid when one of ${his} bestial partners became overeager,`, + type: "trust", + effect: -1 + }); + + if ((V.canines.length > 0) && hasAnyNaturalLegs(slave)) { + r.push({ + text: `an over-excited dog left scratch marks on ${his} leg,`, + type: "health", + effect: -1 + }); + } + + if (V.hooved.length > 0) { + r.push({ + text: `${he} was injured by a particularly well-endowed horse,`, + type: "health", + effect: -1 + }); + } + + if (V.felines.length > 0) { + r.push({ + text: `${he} managed to take two tigers at once, aweing the crowd,`, + type: "cash", + effect: 1 + }); + + } + } else { + r.push({ + text: `${he} worked extra hard, and managed to sell extra produce,`, + type: "cash", + effect: 1, + }); + } + + r.push({ + text: `${he} felt energized by the simulated outdoor environment`, + type: "health", + effect: 1, + }); + + r.push({ + text: `the pesticides ${he} accidentally inhaled made ${him} feel nauseous,`, + type: "health", + effect: -1, + }); + + return jsEither(r); + } }; diff --git a/src/pregmod/FCTV/FCTV.js b/src/pregmod/FCTV/FCTV.js index 9522066b5ae09a4dcb500d177fa9f6498f12cad7..dddd2dd60bca9a4b1a6c5752bbd1aaf4f13ca7c2 100644 --- a/src/pregmod/FCTV/FCTV.js +++ b/src/pregmod/FCTV/FCTV.js @@ -17,7 +17,6 @@ weekEnabled - The week FCTV was installed. globalThis.FCTV = (function() { return { channels: channels, - manage: manage, showChannel: showChannel, incrementChannel: incrementChannel, incrementShow: incrementShow, @@ -30,38 +29,6 @@ globalThis.FCTV = (function() { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]; } - function manage() { - function convert(a, b) { - return V.FCTVreceiver ? a : b; - } - delete V.FCTVenable; - - V.FCTV.receiver = V.FCTV.receiver > -1 ? V.FCTV.receiver : -1; - if (convert && V.receiverAvailable) { - V.FCTV.receiver = V.FCTVreceiver > 0 ? V.FCTVreceiver : 0; - } - - if (V.FCTV.receiver > -1) { - V.FCTV.channel = V.FCTV.channel || {}; - V.FCTV.pcViewership = V.FCTV.pcViewership || {}; - - for (let i = 0; i < channels().length; i++) { - let channel = num(channels()[i], true); - let currentChannel = 'show' + capFirstChar(channel); - V.FCTV.channel[channel] = convert(V[currentChannel], V.FCTV.channel[channel]) || 0; - } - V.FCTV.channel.last = convert(V.lastShow, V.FCTV.channel.last) || -1; - - V.FCTV.pcViewership.count = convert(V.FCTVcount, V.FCTV.pcViewership.count) || 0; - V.FCTV.pcViewership.frequency = convert(V.FCTVrate, V.FCTV.pcViewership.frequency) || 4; - V.FCTV.remote = convert(V.FCTVremote, V.FCTV.remote) || 0; - - if (V.FCTVreceiver && !V.FCTV.weekEnabled) { - V.FCTV.weekEnabled = V.receiverAvailable > 1 ? V.receiverAvailable : 0; - } - } - } - function showChannel(i) { let x = { canSelect: 1, diff --git a/src/pregmod/FCTV/FCTVBC.js b/src/pregmod/FCTV/FCTVBC.js new file mode 100644 index 0000000000000000000000000000000000000000..6f0de99139ba891aec74e47efaa8a7098a6e5d8d --- /dev/null +++ b/src/pregmod/FCTV/FCTVBC.js @@ -0,0 +1,29 @@ + +App.Update.FCTV = function() { + function convert(a, b) { + return V.FCTVreceiver ? a : b; + } + V.FCTV = V.FCTV || {}; + V.FCTV.receiver = V.FCTV.receiver > -1 ? V.FCTV.receiver : -1; + if (convert && V.receiverAvailable) { + V.FCTV.receiver = V.FCTVreceiver > 0 ? V.FCTVreceiver : 0; + } + + V.FCTV.channel = V.FCTV.channel || {}; + V.FCTV.pcViewership = V.FCTV.pcViewership || {}; + const channelList = FCTV.channels(); + for (let i = 0; i < channelList.length; i++) { + const channel = num(channelList[i], true); + const currentChannel = 'show' + capFirstChar(channel); + V.FCTV.channel[channel] = convert(V[currentChannel], V.FCTV.channel[channel]) || 0; + } + V.FCTV.channel.last = convert(V.lastShow, V.FCTV.channel.last) || -1; + + V.FCTV.pcViewership.count = convert(V.FCTVcount, V.FCTV.pcViewership.count) || 0; + V.FCTV.pcViewership.frequency = convert(V.FCTVrate, V.FCTV.pcViewership.frequency) || 4; + V.FCTV.remote = convert(V.FCTVremote, V.FCTV.remote) || 0; + + if (V.FCTVreceiver && !V.FCTV.weekEnabled) { + V.FCTV.weekEnabled = V.receiverAvailable > 1 ? V.receiverAvailable : 0; + } +}; diff --git a/src/uncategorized/manageArcology.tw b/src/uncategorized/manageArcology.tw index 0b76b7221c2b427d8e8044ed7049d83adc368824..0815c66caadd79ee21370d5ba69f817359e4accd 100644 --- a/src/uncategorized/manageArcology.tw +++ b/src/uncategorized/manageArcology.tw @@ -107,7 +107,6 @@ </div> <div> - <<run FCTV.manage()>> <<if $FCTV.receiver > -1 && !$FCTV.weekEnabled>> You have not installed an FCTV receiver. Installing this receiver yourself will cost <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology*$HackingSkillMultiplier))>>.