From 236bdc7c1f4aa1e4f66aeca2dc6b2518b4d7f649 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Fri, 10 Sep 2021 17:29:58 -0700 Subject: [PATCH] Improve handling of breeder slave job eligibility 1. At the conclusion of the breeding exam, only approved slaves in newly-ineligible jobs are reassigned to rest. Nurses, slaves assigned to the Spa, Master Suite fucktoys, etc, can continue in their existing assignments. 2. At the conclusion of the breeding exam, approved slaves will be automatically removed from pit fights. 3. Changes made to assignments for approved slaves at the end of the breeding exam are now listed instead of silent. 4. If a slave is ineligible to be a bodyguard because of their breeding mark, the reason listed will be "may not participate in combat" instead of "is reserved for private use". 5. Slaves with strict indentures that restrict fighting are now ineligible to be bodyguards. --- src/facilities/armory/armoryFramework.js | 21 +++++++++++++++++++-- src/pregmod/eliteBreedingExam.js | 17 ++++++++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/facilities/armory/armoryFramework.js b/src/facilities/armory/armoryFramework.js index 9e8adb220d5..a1ed3c90559 100644 --- a/src/facilities/armory/armoryFramework.js +++ b/src/facilities/armory/armoryFramework.js @@ -9,7 +9,7 @@ App.Data.Facilities.armory = { assignment: Job.BODYGUARD, careers: App.Data.Careers.Leader.bodyguard, skill: "bodyguard", - publicSexUse: true, + publicSexUse: false, fuckdollAccepted: false, broodmotherAccepted: false, shouldWalk: true, @@ -23,4 +23,21 @@ App.Data.Facilities.armory = { decorated: false }; -App.Entity.facilities.armory = new App.Entity.Facilities.Facility(App.Data.Facilities.armory); +App.Entity.Facilities.BodyguardJob = class extends App.Entity.Facilities.ManagingJob { + /** + * @param {App.Entity.SlaveState} slave + * @returns {string[]} + */ + checkRequirements(slave) { + let r = super.checkRequirements(slave); + if (slave.breedingMark === 1 && V.propOutcome === 1 && V.eugenicsFullControl !== 1 && V.arcologies[0].FSRestart !== "unset") { + r.push(`${slave.slaveName} may not participate in combat.`); + } + if (slave.indentureRestrictions > 1) { + r.push(`${slave.slaveName}'s indenture forbids fighting.`); + } + return r; + } +}; + +App.Entity.facilities.armory = new App.Entity.Facilities.Facility(App.Data.Facilities.armory, {}, new App.Entity.Facilities.BodyguardJob()); diff --git a/src/pregmod/eliteBreedingExam.js b/src/pregmod/eliteBreedingExam.js index ae0ade2356a..88d6900f3df 100644 --- a/src/pregmod/eliteBreedingExam.js +++ b/src/pregmod/eliteBreedingExam.js @@ -243,7 +243,22 @@ globalThis.eliteBreedingExam = function(slave = null) { r.push(`They are not permitted for public use or anything that may harm their growing child. The child within them is considered a member of the Elite class and as such, any harm that comes to them will result in severe penalties to the breeder's owner. Development of the child will be closely monitored; should the fetus be identified as not of the owner's blood (or any other member of the Elite class), said owner shall face severe fines.`); slave.breedingMark = 1; slave.pregControl = "none"; - removeJob(slave, slave.assignment); + const job = App.Utils.jobForAssignment(slave.assignment); + const consequences = []; + if (slave.assignment === Job.BODYGUARD || (job && job.desc.publicSexUse)) { + removeJob(slave, slave.assignment); + consequences.push(`reassigned to <span class="green">rest</span>`); + } + if (V.pit && V.pit.fighterIDs.includes(slave.ID)) { + removeJob(slave, Job.PIT); + consequences.push(`<span class="yellow">removed</span> from ${V.pit.name}'s fighting roster`); + } + if (consequences.length > 0) { + App.Events.addNode(frag, r, "div"); + r = []; + const {He} = getPronouns(slave); + r.push(`${He} has been automatically ${toSentence(consequences)}.`); + } } cashX(-cost, "capEx"); } -- GitLab