Skip to content
Snippets Groups Projects
Commit 55a7f277 authored by svornost's avatar svornost
Browse files

Move mindbroken Wardeness rape override from saRules into flSex, since it...

Move mindbroken Wardeness rape override from saRules into flSex, since it needs to be tracked at both ends anyway.
parent 3be21d4e
No related branches found
No related tags found
No related merge requests found
......@@ -38,18 +38,27 @@ App.EndWeek.getFLSex = function(facility) {
const employeeSex = new Set();
const fl = facility.manager ? facility.manager.currentEmployee : null;
if (fl && App.Data.misc.sexFromDevelopmentLeaders.includes[fl.assignment]) {
const hornyEmployees = facility.employees().filter((s) => s.devotion >= -50 /* not unhappy */ && s.energy > 20 /* not frigid */);
for (const emp of hornyEmployees) {
if (fl.assignment === Job.NURSE && App.EndWeek.getClinicPartner(emp).type !== "nurse") {
continue; // nurse is busy, will not have sex with patients who are satisfied by someone else
}
if (fl.assignment === Job.WARDEN && emp.relationship === -3) {
continue; // wardeness will never molest the PC's spouse
}
facility.employees().filter(s => flWillFuck(s)).forEach(s => employeeSex.add(s.ID));
}
return employeeSex;
/** @param {App.Entity.SlaveState} emp */
function flWillFuck(emp) {
const horny = (s) => s.devotion >= -50 /* not unhappy */ && s.energy > 20 /* not frigid */;
if (fl.assignment === Job.WARDEN && fl.fetish === "mindbroken") {
return true; // mindbroken warden ignores rules, rapes everyone
}
if (fl.assignment === Job.NURSE && App.EndWeek.getClinicPartner(emp).type !== "nurse") {
return false; // nurse is busy, will not have sex with patients who are satisfied by someone else
}
if (fl.assignment === Job.WARDEN && emp.relationship === -3) {
return false; // wardeness will never molest the PC's spouse
}
if (horny(emp) || fl.assignment === Job.WARDEN) { // only the warden will routinely rape frigid/unhappy slaves
if (App.Utils.sexAllowed(emp, fl)) { // no sex with a slave you've forbidden them to fuck
employeeSex.add(emp.ID);
return true;
}
}
return false;
}
return employeeSex;
};
......@@ -875,11 +875,7 @@
<<= App.SlaveAssignment.rewardAndPunishment($slaves[$i])>>
<<case "be the Wardeness">>
<<if _S.Wardeness.fetish == "mindbroken">>
<<set $slaves[$i].need -= (_L.cellblock*5)>>
<<else>>
<<set $slaves[$i].need -= ($flSex.size*5)>>
<</if>>
<<set $slaves[$i].need -= ($flSex.size*5)>>
<<if $slaves[$i].energy <= 20>>
is frigid and has little interest in getting off<<if App.Utils.releaseRestricted($slaves[$i])>>, making the rule restricting $his sexual outlets superfluous<</if>>.
<<set $slaves[$i].need = 0>>
......@@ -926,7 +922,7 @@
<<= App.SlaveAssignment.rewardAndPunishment($slaves[$i])>>
<<case "be confined in the cellblock">>
<<set _wardenFunTimes = 0>>
<<if $flSex.has($slaves[$i].ID) || _S.Wardeness.fetish == "mindbroken">>
<<if $flSex.has($slaves[$i].ID)>>
<<set _wardenFunTimes = random(0,5)>>
<<set $slaves[$i].need -= (10*_wardenFunTimes)>>
<</if>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment