diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js index 86812f78b17471ac2046414a78de2258329a31a8..40396a30a9910eb1306ad6a7d49992099d2e182a 100644 --- a/src/endWeek/saWorkTheFarm.js +++ b/src/endWeek/saWorkTheFarm.js @@ -60,38 +60,36 @@ App.SlaveAssignment.workTheFarm = function(slave) { 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? } }; const healthIllness = slave => { - let r = []; + let + r = [], + health = ``, + exhaustion = ``; if (slave.health.illness > 0 || slave.health.tired > 60) { - r.push(`${He} performed worse this week due to<span class="reputation dec">`); if (slave.health.illness === 1) { - r.push(`feeling under the weather`); + health = `feeling under the weather`; } else if (slave.health.illness === 2) { - r.push(`a minor illness`); + health = `a minor illness`; } else if (slave.health.illness === 3) { - r.push(`being sick`); + health = `being sick`; } else if (slave.health.illness === 4) { - r.push(`being very sick`); + health = `being very sick`; } else if (slave.health.illness === 5) { - r.push(`a terrible illness`); + health = `a terrible illness`; } - if (slave.health.illness > 0 && slave.health.tired > 60) { - r.push(`and`); - if (slave.health.tired > 90) { - r.push(`exhaustion`); - } else if (slave.health.tired > 60) { - r.push(`being tired`); - } + if (slave.health.tired > 90) { + exhaustion = `exhaustion`; + } else if (slave.health.tired > 60) { + exhaustion = `being tired`; } - r.push(`.</span> `); // FIXME: figure out better way to do this + 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)); } @@ -99,17 +97,12 @@ App.SlaveAssignment.workTheFarm = function(slave) { }; const tired = slave => { - if (!slave.fuckdoll) { - if (slaveResting(slave)) { - return `${He} spends reduced hours working the soil in order to <span class="reputation inc">offset ${his} lack of rest.</span>`; - } else if (slave.health.tired + 20 >= 90 && !willWorkToDeath(slave)) { - slave.devotion -= 10; // FIXME: move this - slave.trust -= 5; // FIXME: move this - - 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="reputation dec">greatly reducing yields.</span>`; - } else { - return `Hours of manual labor quickly add up, leaving ${him} <span class="reputation dec">physically drained</span> by the end of the day.`; - } + 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.`; } }; @@ -132,8 +125,6 @@ App.SlaveAssignment.workTheFarm = function(slave) { 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? } }; @@ -142,8 +133,6 @@ App.SlaveAssignment.workTheFarm = function(slave) { return `${He} is hard-of-hearing, which gets in the way of ${his} work whenever ${he} misses directions${V.Farmer ? ` from ${V.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? } }; @@ -263,20 +252,14 @@ App.SlaveAssignment.workTheFarm = function(slave) { } if (arcology.FSBodyPurist !== "unset") { - /* TODO: requirements for these might change */ if (SlaveStatsChecker.isModded(slave)) { - // TODO: add stuff here - } else { - // TODO: add stuff here + r.push(`The members of the audience <span class="reputation dec">disapprove</span> that you would use a slave with such heavy modifications to put on shows.`); //TODO: add checks for amount of modification (piercings, tats, etc) } } if (arcology.FSTransformationFetishist !== "unset") { - /* TODO: requirements for these might change */ if (SlaveStatsChecker.isModded(slave)) { - // TODO: add stuff here - } else { - // TODO: add stuff here + r.push(`The members of the audience <span class="reputation inc">approve</span> that you would use a slave with such heavy modifications to put on shows.`); //TODO: add checks for amount of modification (piercings, tats, etc) } } @@ -303,17 +286,18 @@ App.SlaveAssignment.workTheFarm = function(slave) { } if (arcology.FSAssetExpansionist !== "unset") { - if (isSlim(slave)) { + if (!isSlim && genderLawPass(slave)) { r.push(`Society <span class="reputation inc">approves</span> of the fact that you respect their ideals in using a larger slave.`); } } if (arcology.FSPastoralist !== "unset") { - if (slave.boobs > 799) { - // TODO: does this make sense? + if (slave.boobs >= 1000) { + r.push(`The fact that ${slave.slaveName} has such large udders pleases your citizens.`); } + if (slave.lactation > 0) { - // TODO: write this + r.push(`Your citizens ${slave.boobs >= 1000 ? `also ` : ``}approve of the fact that ${he} is visibly lactating.`); } } @@ -361,7 +345,7 @@ App.SlaveAssignment.workTheFarm = function(slave) { 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.`); } - if (setup.farmerCareers.includes(slave.career)) { // TODO: does this even make sense to include? + if (setup.farmerCareers.includes(slave.career)) { // TODO: write this } @@ -373,7 +357,7 @@ App.SlaveAssignment.workTheFarm = function(slave) { r.push(`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? + 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.`); @@ -410,7 +394,6 @@ App.SlaveAssignment.workTheFarm = function(slave) { // TODO: write this } - // FIXME: probably don't need this block if (slave.weight > 30 && 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) { @@ -472,27 +455,37 @@ App.SlaveAssignment.workTheFarm = function(slave) { } // TODO: add more to the fetishes and flaws / quirks - if (slave.fetishKnown) { - switch (slave.fetish) { - case "submissive": - if (V.seeBestiality) { + 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 { + // TODO: + } + } 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 { + // TODO: } - break; + } + break; - case "humiliation": - if (V.seeBestiality) { + 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: not sure about this one + // TODO: } - break; + } else { + // TODO: not sure about this one + } + break; - default: - break; - } + default: + break; } switch (slave.behavioralFlaw) { diff --git a/src/facilities/farmyard/farmyardShows.js b/src/facilities/farmyard/farmyardShows.js index adc0fcb6833a74819f5739acc62eda17843247db..9780ef20c371efdee9b577f6e83bfda76fdbeff9 100644 --- a/src/facilities/farmyard/farmyardShows.js +++ b/src/facilities/farmyard/farmyardShows.js @@ -284,15 +284,65 @@ App.Facilities.Farmyard.farmShowsIncome = function(slave) { cash *= 1.3; } - // TODO: use these? change? add? - if (slave.fetish === "submissive") { - cash *= 1.1; - } else if (slave.fetish === "humiliation") { - cash *= 1.1; - } else if (slave.fetish === "masochist") { - cash *= 1.1; + if (slave.fetishKnown) { + switch (slave.fetish) { + case "submissive": + if (V.seeBestiality) { + cash *= 1.1; + } else { + cash *= 0.9; + } + break; + + case "humiliation": + if (V.seeBestiality) { + cash *= 1.1; + } else { + cash *= 0.9; + } + break; + + default: + break; + } } - // TODO: tie in quirks and flaws + + switch (slave.behavioralFlaw) { + case "devout": + cash *= 1.1; + 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; } }; diff --git a/src/facilities/farmyard/food/food.js b/src/facilities/farmyard/food/food.js index c80c30a145d9671b9f9c47ca666d8401857661df..03deab685919b581bbbbe660db1ca15be713b2f7 100644 --- a/src/facilities/farmyard/food/food.js +++ b/src/facilities/farmyard/food/food.js @@ -7,55 +7,75 @@ App.Facilities.Farmyard.foodAmount = function(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 + + 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 + + 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 + } else if (slave.muscles <= -6) { // slave is weak or less food *= 0.8; } - if (slave.weight > 95) { // slave is overweight or more + + if (slave.weight > 95) { // slave is overweight or more food *= 0.9; - } else if (slave.weight > 130) { // slave is fat or more + } else if (slave.weight > 130) { // slave is fat or more food *= 0.8; - } else if (slave.weight > 160) { // slave is obese or more + } else if (slave.weight > 160) { // slave is obese or more food *= 0.7; - } else if (slave.weight > 190) { // slave is very obese or more + } else if (slave.weight > 190) { // slave is very obese or more food *= 0.6; } - if (!canSee(slave)) { // slave is blind + + if (!canSee(slave)) { // slave is blind food *= 0.6; - } else if (!canSeePerfectly(slave)) { // slave is nearsighted + } else if (!canSeePerfectly(slave)) { // slave is nearsighted food *= 0.8; } - if (slave.hears === -1) { // slave is hard of hearing + + if (slave.hears === -1) { // slave is hard of hearing food *= 0.8; - } else if (slave.hears < -1) { // slave is deaf + } 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); + food = Math.clamp(food, 1, 999999999999999); // FIXME: needed? + return food; };