diff --git a/src/SpecialForce/SpecialForce.js b/src/SpecialForce/SpecialForce.js index 9907c33ee6f9c7415fd3d9a8b01ef7f8d07ecae6..5a92fff03dd00e20743e83fe0f07394bc2f8e104 100644 --- a/src/SpecialForce/SpecialForce.js +++ b/src/SpecialForce/SpecialForce.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ //V=SugarCube.State.variables, T=SugarCube.State.temporary; window.Main = function() { const V=State.variables; @@ -135,9 +136,9 @@ window.SFBC = function() { if (V.SFUC > 0) V.SF.UC.num=V.SFUC; delete V.SFUC; if (V.SF.Active === -1) SFInit(); if (V.SF.MWU) delete V.SF.MWU; - if (V.SpecOpsLock != undefined) V.SF.SpecOpsLock=V.SpecOpsLock; delete V.SpecOpsLock; + if (V.SpecOpsLock !== undefined) V.SF.SpecOpsLock=V.SpecOpsLock; delete V.SpecOpsLock; if (V.SF.UC === undefined) { - if (V.SF.SpecOps != undefined && V.SF.SpecOpsLock != undefined) { + if (V.SF.SpecOps !== undefined && V.SF.SpecOpsLock !== undefined) { V.SF.UC={Assign:V.SF.SpecOps, Lock:V.SF.SpecOpsLock}; jsDel([V.SF.SpecOps,V.SF.SpecOpsLock]); } else if (V.SF.UC === {}) { @@ -148,11 +149,11 @@ window.SFBC = function() { if (V.SF.WG !== undefined) V.SF.Gift=V.SF.WG; delete V.SF.WG; if (V.SF.MercCon === undefined) MercCon(); - if (V.SF.MercCon.Helots != undefined) { + if (V.SF.MercCon.Helots !== undefined) { V.SF.MercCon.Menials=V.SF.MercCon.Helots; delete V.SF.MercCon.Helots; } else { V.SF.MercCon.Menials=0; } - if (V.SF.MercCon.TotalHelots != undefined) { + if (V.SF.MercCon.TotalHelots !== undefined) { V.SF.MercCon.TotalMenials=V.SF.MercCon.TotalHelots; delete V.SF.MercCon.TotalHelots; } else { V.SF.MercCon.TotalMenials=0; } @@ -324,7 +325,7 @@ window.SFReport = function() { r += `<br>A ${V.SF.UC.Assign < 2 ? 'small':'large'} portion of the force was assigned as ${V.SF.UC.Assign < 2 ? 'part':'full'} time undercover officers.`; } if (deaths > 0) { - r += ` <span class='red'>${deaths} soldiers fatally overdosed on the drug cocktail</span>`; + r += ` <span class='red'>${deaths} soldiers fatally overdosed on the drug cocktail</span>`; if (V.SF.MercCon.CanAttend === -1) r += `, The Colonel's much heavier than average drug use saves her from this side effect.`; } r += `<br>These activities have, overall, <span class='green'>improved your arcology's prosperity</span>.`; @@ -339,7 +340,7 @@ window.SFReport = function() { r += ` ${V.SF.Caps} managed to recruit ${Math.round(FNG/2)} new soldiers this week, and your reputation has <span class='green'>increased through the improvement of trade security</span>.`; r += `<br>//Your instructions to ${SFC()}://`; r += `<br> Deployment focus: `; - r += `<span id="focus"> <<if $SF.Target == "recruit">>''Recruiting and Training''<<elseif $SF.Target == "secure">>''Securing Trade Routes''<<else>>''Raiding and Slaving''<</if>></span>. `; + r += `<span id="focus"> <<if $SF.Target === "recruit">>''Recruiting and Training''<<elseif $SF.Target === "secure">>''Securing Trade Routes''<<else>>''Raiding and Slaving''<</if>></span>. `; r += `<<link "Recruit and Train">> <<set $SF.Target="recruit">> <<replace "#focus">>''Recruiting and Training''<</replace>> <</link>> | <<link "Secure Trade Routes">> <<set $SF.Target="secure">> <<replace "#focus">>''Securing Trade Routes''<</replace>> <</link>> | <<link "Raiding and Slaving">> <<set $SF.Target="raiding">> <<replace "#focus">>''Raiding and Slaving''<</replace>> <</link>>`; r += `<br> Rules of Engagement: `; r += `<span id="roe"> <<if $SF.ROE === "hold">>''Hold Fire''<<elseif $SF.ROE === "limited">>''Limited Fire''<<else>>''Free Fire''<</if>></span>. `; @@ -407,7 +408,7 @@ window.Count = function() { window.SFNameCapsCheck = function() { const V=State.variables; - if (V.SF.Lower != "the special force") V.SF.Caps=V.SF.Lower.replace("the ", "The "); + if (V.SF.Lower !== "the special force") V.SF.Caps=V.SF.Lower.replace("the ", "The "); }; window.SFUpgradeCost = function(cost,unit) { @@ -424,18 +425,18 @@ window.progress = function(x,max) { if (State.variables.SF.Size < 30) { z = 5 - x; for (i=0;i<x;i++) out += `â–ˆâ`; - for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`; + for (i=0;i<z;i++) out += `<span style="opacity: 0;">â–ˆ</span>â`; for (i=0;i<5;i++) out += `â–‘â`;} else { z = 10 - x; for (i=0;i<x;i++) out += `â–ˆâ`; - for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;}} + for (i=0;i<z;i++) out += `<span style="opacity: 0;">â–ˆ</span>â`;}} else { Math.clamp(x,0,max); x=Math.floor(10*x/max); z=10 - x; for (i=0;i<x;i++) out += `â–ˆâ`; - for (i=0;i<z;i++) out += `<span style=\"opacity: 0;\">â–ˆ</span>â`;} + for (i=0;i<z;i++) out += `<span style="opacity: 0;">â–ˆ</span>â`;} return `${out}`; }; @@ -458,19 +459,19 @@ window.Interactions = function() { "use strict"; let choice=``, time=``; const V=State.variables, C=V.SF.Colonel; if (V.SF.Gift > 0) { - if (V.choice == 1) { + if (V.choice === 1) { choice +=`${V.SF.Caps} is turning over spare capital in tribute this week. `; if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { - choice += `"I think I can find <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> for you, boss."`; + choice += `"I think I can find <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> for you, boss."`; } else { - choice += `"We can spare <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> in tribute this week, boss".`; } - } else if (V.choice == 2) { + choice += `"We can spare <span class='yellowgreen'>${cashFormat(Math.ceil(V.CashGift))}</span> in tribute this week, boss".`; } + } else if (V.choice === 2) { choice += `${V.SF.Caps} will be throwing a military parade this week. `; if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { choice += `"I expect the <span class='green'>public to enjoy</span> the parade, boss."`; } else { choice += `"I'll have plans for an <span class='green'>popular parade</span> on your desk, boss".`; } - } else if (V.choice == 3) { + } else if (V.choice === 3) { choice += `${V.SF.Caps} will be conducting corporate sabotage on rival arcologies' businesses. `; if (V.SF.MercCon.CanAttend === -1 && (C.Talk + C.Fun !== 1)) { choice += `"Our interests should see a <span class='yellowgreen'>big boost,</span> boss."`; @@ -554,6 +555,14 @@ window.UnitText = function(input) { else if (S.Troops < 1500) {return `${r} well-occupied, and ${Quantity} residing within have started to form small cliques based on section and row`;} else {return `${r} near capacity, and ${Quantity} often barter their personal loot, whether it be monetary or human, for the choicest bunks`;} break; + case 'troop': r += `<br> The large dormitories are`; + const Quantity=`the ${num(S.Troops)} members of ${V.SF.Lower}`; + if (S.Troops < 100) {return `${r} sparsely occupied, ${Quantity} residing within them concentrating together in a corner. The hundreds of empty beds and lockers visibly herald the future`;} + else if (S.Troops < 400) {return `${r} lightly occupied, with ${Quantity} starting to spread out across them`;} + else if (S.Troops < 800) {return `${r} moderately occupied, though ${Quantity} residing within have a considerable amount of extra room`;} + else if (S.Troops < 1500) {return `${r} well-occupied, and ${Quantity} residing within have started to form small cliques based on section and row`;} + else {return `${r} near capacity, and ${Quantity} often barter their personal loot, whether it be monetary or human, for the choicest bunks`;} + break; case 'armoury': let weapons=`The weapons are mostly worn rifles that have already seen years of service before ${V.SF.Lower} acquired them.`, armor1=`The body armor is enough to stop smaller calibers, but nothing serious.`, radio=``, helmets=``, ammo0=``, uniforms=``, special=``, exo=``; if (S.Armoury >= 0) {r += `<br><br>''Armory:''<br>`; radio=`Radios have been wired into the soldiers helmets`; helmets=`.`; @@ -706,7 +715,7 @@ window.UnitText = function(input) { if (S.Satellite.lv >= 8) reactor=`A small, efficient nuclear reactor has been installed to continue generating energy while in the Earth's shadow.`; if (S.Satellite.lv >= 9) lens=`A higher quality and adjustable lens has been installed on the laser, allowing scalpel precision on armor or wide-area blasts on unarmored targets.`; if (S.Satellite.lv >= 10) kin=`A magazine of directable tungsten rods have been mounted to the exterior of the satellite, allowing for kinetic bombardment roughly equal to a series of nuclear blasts.`; - return `${r} ${loc1} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser1}${heat} ${lens} ${kin}`; + return `${r} ${loc1} ${gyro} ${thrusters} ${telemetry} ${solar} ${reactor} ${surviv} ${laser1}${heat} ${lens} ${kin}`; } break; case 'GR': let loc=`has been purchased from a crumbling Old World nation. It`, power=`Large batteries mounted in oversized shoulders power the robot for up to ten minutes of use, though they make for large targets.`, knife=`simply a 8.5 meter long knife, though additional weapons are under development.`, armor8=``, actuator=``, cannon1=``, heatsink=``, ammo2=``, missile=``; diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 78828d789378216eb62bf4bfb40872a100623970..816f14396b0f2ac0c5e0dac8d740f8ff380bdc89 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ /** * Encapsulates the full description of a slave state. Serializable by the SugarCube state * management. diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 179b94b9f2b70ac81514b6df6d471d3dcc1b89a2..3a6aa964364ab9a395a585bfee669e868712cb82 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -271,21 +271,21 @@ window.getSecurityExpansionCost = function() { } if (State.variables.militiaUnits !== null) { for (var i = 0; i < State.variables.militiaUnits.length; i++) { - if(State.variables.militiaUnits[i] !== null) { + if (State.variables.militiaUnits[i] !== null) { secExpCost += State.variables.militiaUnits[i].troops * State.variables.soldierUpkeep * soldierMod; } } } if (State.variables.slaveUnits !== null) { for (var i = 0; i < State.variables.slaveUnits.length; i++) { - if(State.variables.slaveUnits[i] !== null) { + if (State.variables.slaveUnits[i] !== null) { secExpCost += State.variables.slaveUnits[i].troops * State.variables.soldierUpkeep * 0.5 * soldierMod; } } } if (State.variables.mercUnits !== null) { for (var i = 0; i < State.variables.mercUnits.length; i++) { - if(State.variables.mercUnits[i] !== null) { + if (State.variables.mercUnits[i] !== null) { secExpCost += State.variables.mercUnits[i].troops * State.variables.soldierUpkeep * 1.5 * soldierMod; } } @@ -1184,7 +1184,7 @@ window.repX = function(rep, what, who) { } //record the action - if (what === "cheating" || passage() == "init" || passage() == "init Nationalities") { + if (what === "cheating" || passage() === "init" || passage() === "init Nationalities") { /*we don't want to curve startup or cheating.*/ V.lastWeeksRepIncome[what] += rep; } else if (typeof V.lastWeeksRepIncome[what] !== 'undefined') { diff --git a/src/js/itemAvailability.js b/src/js/itemAvailability.js index eeac0fb007d7a35cf66753a39943814cfb1eb814..6414d22eaeb38e6c236750de9869d78d69e2485e 100644 --- a/src/js/itemAvailability.js +++ b/src/js/itemAvailability.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ /* intended to condense the clothing/toy/etc availability checks into something less asinine */ window.isItemAccessible = function(string) { const V = State.variables; diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index a3caa9529ccbe59fb7768c55025e2ba5768d6cb4..8e2a0a10399ceafd8884ac1986013e4fc2fc41e7 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ // rewrite of the rules assistant options page in javascript // uses an object-oriented widget pattern // wrapped in a closure so as not to pollute the global namespace diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index 37176fbb3d31d33e7ffee9dcfb12cc9374e9ab40..0f59ff34d790c32072a27e4facbf1c5911b1e6e4 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -4732,82 +4732,82 @@ App.UI.PassageSlaveFilers = { "Main": s => (s.assignmentVisible === 1), "Personal Attention Select": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0), "Agent Select": s => (s.fuckdoll === 0 && s.devotion > 20 && s.intelligence + s.intelligenceImplant > 15 && s.intelligenceImplant >= 15 && canWalk(s) && canSee(s) && canHear(s) && canTalk(s) && s.broodmother < 2 && (s.breedingMark !== 1 || State.variables.propOutcome === 0)), - "BG Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment != "guard you" && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark != 1 || State.variables.propOutcome == 0)), - "Recruiter Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && s.assignment != "recruit girls" && canWalk(s) && canSee(s) && canTalk(s)), - "HG Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && s.assignment != "be your Head Girl" && canWalk(s) && canHear(s) && canSee(s) && canTalk(s)), - "Head Girl Suite": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "be your Head Girl" && s.indentureRestrictions <= 0 && (s.breedingMark != 1 || State.variables.propOutcome == 0)) || - (State.variables.Flag != 0 && s.assignment == "live with your Head Girl"))), - "Subordinate Targeting": s => (s.devotion >= -20 && s.fuckdoll == 0 && State.variables.activeSlave.ID != s.ID && (State.variables.activeSlave.amp != 1 || s.amp != 1)), - "Spa": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "rest in the spa") || - (State.variables.Flag == 1 && s.assignment == "rest in the spa") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Attendant.ID))), - "Attendant Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && canWalk(s) && canHear(s)), - "Nursery": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && (s.devotion > 20 || s.trust > 20) && ( - (State.variables.Flag == 0 && s.assignment != "work as a nanny") || - (State.variables.Flag == 1 && s.assignment == "work as a nanny") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Matron.ID))), - "Matron Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && canWalk(s) && canHear(s)), - "Brothel": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "work in the brothel") || - (State.variables.Flag == 1 && s.assignment == "work in the brothel") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Madam.ID))), - "Madam Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark != 1 || State.variables.propOutcome == 0)), - "Club": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "serve in the club") || - (State.variables.Flag == 1 && s.assignment == "serve in the club") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.DJ.ID))), - "DJ Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canTalk(s) && canHear(s) && canWalk(s) && (s.breedingMark != 1 || State.variables.propOutcome == 0)), - "Clinic": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "get treatment in the clinic") || - (State.variables.Flag == 1 && s.assignment == "get treatment in the clinic") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Nurse.ID))), - "Nurse Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && canWalk(s) && canSee(s)), - "Schoolroom": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.fetish != "mindbroken" && s.assignment != "learn in the schoolroom") || - (State.variables.Flag == 1 && s.assignment == "learn in the schoolroom") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Schoolteacher.ID))), - "Schoolteacher Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && canTalk(s) && canHear(s) && canSee(s)), - "Dairy": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "work in the dairy") || - (State.variables.Flag == 1 && s.assignment == "work in the dairy") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Milkmaid.ID))), - "Milkmaid Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 20 && canWalk(s) && canSee(s) && canHear(s)), - "Farmyard": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && canWalk(s) && ( - (State.variables.Flag == 0 && s.assignment != "work as a farmhand") || - (State.variables.Flag == 1 && s.assignment == "work as a farmhand") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Farmer.ID))), - "Farmer Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)), - "Servants' Quarters": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "work as a servant") || - (State.variables.Flag == 1 && s.assignment == "work as a servant") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Stewardess.ID))), - "Stewardess Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s)), - "Master Suite": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && ( - (State.variables.Flag == 0 && s.assignment != "serve in the master suite") || - (State.variables.Flag == 1 && s.assignment == "serve in the master suite") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Concubine.ID))), - "Concubine Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && s.amp != 1), - "Cellblock": s => (s.assignmentVisible == 1 && s.fuckdoll <= 0 && s.fetish != "mindbroken" && ( - (State.variables.Flag == 0 && s.assignment != "be confined in the cellblock") || - (State.variables.Flag == 1 && s.assignment == "be confined in the cellblock") || - (State.variables.Flag != 0 && State.variables.Flag != 1 && s.ID == State.variables.Wardeness.ID))), - "Wardeness Select": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)), - "Arcade": s => (s.assignmentVisible == 1 && (State.variables.arcade >= State.variables.arcadeSlaves || State.variables.arcadeUpgradeFuckdolls == 1) && ( - (State.variables.Flag == 0 && s.assignment != "be confined in the arcade") || - (State.variables.Flag != 0 && s.assignment == "be confined in the arcade"))), - "Pit": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && ( - (State.variables.Flag == 0 && !State.variables.fighterIDs.includes(s.ID) && canWalk(s) && (s.assignment != "guard you") && (s.assignment != "work in the dairy" || State.variables.dairyRestraintsSetting < 2)) || - (State.variables.Flag != 0 && State.variables.fighterIDs.includes(s.ID)))), - "Coursing Association": s => (s.assignmentVisible == 1 && s.fuckdoll == 0 && ( - (State.variables.Flag == 0 && canWalk(s) && State.variables.Lurcher.ID != s.ID) || - (State.variables.Flag != 0 && State.variables.Lurcher.ID == s.ID))), - "New Game Plus": s => ((State.variables.Flag == 0 && s.assignment != "be imported") || (State.variables.Flag != 0 && s.assignment == "be imported")), - "Rules Slave Select": s => ((State.variables.Flag == 0 && !ruleSlaveSelected(s, State.variables.currentRule)) || (State.variables.Flag != 0 && ruleSlaveSelected(s, State.variables.currentRule))), - "Rules Slave Exclude": s => ((State.variables.Flag == 0 && !ruleSlaveExcluded(s, State.variables.currentRule)) || (State.variables.Flag != 0 && ruleSlaveExcluded(s, State.variables.currentRule))), - "Matchmaking": s => (s.devotion >= 100 && s.relationship == State.variables.activeSlave.relationship && s.ID != State.variables.activeSlave.ID), - "Dinner Party Preparations": s => (s.assignmentVisible == 1 && s.fuckdoll == 0), + "BG Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "guard you" && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)), + "Recruiter Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "recruit girls" && canWalk(s) && canSee(s) && canTalk(s)), + "HG Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.assignment !== "be your Head Girl" && canWalk(s) && canHear(s) && canSee(s) && canTalk(s)), + "Head Girl Suite": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "be your Head Girl" && s.indentureRestrictions <= 0 && (s.breedingMark !== 1 || State.variables.propOutcome === 0)) || + (State.variables.Flag !== 0 && s.assignment === "live with your Head Girl"))), + "Subordinate Targeting": s => (s.devotion >= -20 && s.fuckdoll === 0 && State.variables.activeSlave.ID !== s.ID && (State.variables.activeSlave.amp !== 1 || s.amp !== 1)), + "Spa": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "rest in the spa") || + (State.variables.Flag === 1 && s.assignment === "rest in the spa") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Attendant.ID))), + "Attendant Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canHear(s)), + "Nursery": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && (s.devotion > 20 || s.trust > 20) && ( + (State.variables.Flag === 0 && s.assignment !== "work as a nanny") || + (State.variables.Flag === 1 && s.assignment === "work as a nanny") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Matron.ID))), + "Matron Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canHear(s)), + "Brothel": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "work in the brothel") || + (State.variables.Flag === 1 && s.assignment === "work in the brothel") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Madam.ID))), + "Madam Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)), + "Club": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "serve in the club") || + (State.variables.Flag === 1 && s.assignment === "serve in the club") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.DJ.ID))), + "DJ Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canTalk(s) && canHear(s) && canWalk(s) && (s.breedingMark !== 1 || State.variables.propOutcome === 0)), + "Clinic": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "get treatment in the clinic") || + (State.variables.Flag === 1 && s.assignment === "get treatment in the clinic") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Nurse.ID))), + "Nurse Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s)), + "Schoolroom": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.fetish !== "mindbroken" && s.assignment !== "learn in the schoolroom") || + (State.variables.Flag === 1 && s.assignment === "learn in the schoolroom") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Schoolteacher.ID))), + "Schoolteacher Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canTalk(s) && canHear(s) && canSee(s)), + "Dairy": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "work in the dairy") || + (State.variables.Flag === 1 && s.assignment === "work in the dairy") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Milkmaid.ID))), + "Milkmaid Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 20 && canWalk(s) && canSee(s) && canHear(s)), + "Farmyard": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && canWalk(s) && ( + (State.variables.Flag === 0 && s.assignment !== "work as a farmhand") || + (State.variables.Flag === 1 && s.assignment === "work as a farmhand") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Farmer.ID))), + "Farmer Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)), + "Servants' Quarters": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "work as a servant") || + (State.variables.Flag === 1 && s.assignment === "work as a servant") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Stewardess.ID))), + "Stewardess Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.intelligence + s.intelligenceImplant >= -50 && canWalk(s) && canSee(s) && canHear(s)), + "Master Suite": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && ( + (State.variables.Flag === 0 && s.assignment !== "serve in the master suite") || + (State.variables.Flag === 1 && s.assignment === "serve in the master suite") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Concubine.ID))), + "Concubine Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && s.amp !== 1), + "Cellblock": s => (s.assignmentVisible === 1 && s.fuckdoll <= 0 && s.fetish !== "mindbroken" && ( + (State.variables.Flag === 0 && s.assignment !== "be confined in the cellblock") || + (State.variables.Flag === 1 && s.assignment === "be confined in the cellblock") || + (State.variables.Flag !== 0 && State.variables.Flag !== 1 && s.ID === State.variables.Wardeness.ID))), + "Wardeness Select": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && s.devotion > 50 && canWalk(s) && canSee(s) && canHear(s)), + "Arcade": s => (s.assignmentVisible === 1 && (State.variables.arcade >= State.variables.arcadeSlaves || State.variables.arcadeUpgradeFuckdolls === 1) && ( + (State.variables.Flag === 0 && s.assignment !== "be confined in the arcade") || + (State.variables.Flag !== 0 && s.assignment === "be confined in the arcade"))), + "Pit": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && ( + (State.variables.Flag === 0 && !State.variables.fighterIDs.includes(s.ID) && canWalk(s) && (s.assignment !== "guard you") && (s.assignment !== "work in the dairy" || State.variables.dairyRestraintsSetting < 2)) || + (State.variables.Flag !== 0 && State.variables.fighterIDs.includes(s.ID)))), + "Coursing Association": s => (s.assignmentVisible === 1 && s.fuckdoll === 0 && ( + (State.variables.Flag === 0 && canWalk(s) && State.variables.Lurcher.ID !== s.ID) || + (State.variables.Flag !== 0 && State.variables.Lurcher.ID === s.ID))), + "New Game Plus": s => ((State.variables.Flag === 0 && s.assignment !== "be imported") || (State.variables.Flag !== 0 && s.assignment === "be imported")), + "Rules Slave Select": s => ((State.variables.Flag === 0 && !ruleSlaveSelected(s, State.variables.currentRule)) || (State.variables.Flag !== 0 && ruleSlaveSelected(s, State.variables.currentRule))), + "Rules Slave Exclude": s => ((State.variables.Flag === 0 && !ruleSlaveExcluded(s, State.variables.currentRule)) || (State.variables.Flag !== 0 && ruleSlaveExcluded(s, State.variables.currentRule))), + "Matchmaking": s => (s.devotion >= 100 && s.relationship === State.variables.activeSlave.relationship && s.ID !== State.variables.activeSlave.ID), + "Dinner Party Preparations": s => (s.assignmentVisible === 1 && s.fuckdoll === 0), }; /** @@ -4860,7 +4860,7 @@ App.UI.slaveSummaryList = function (passageName) { if ("object" === typeof attributes) attributes = $.map(attributes, (val, key) => key + '="' + val + '"').join(" "); else - attributes = 'id="' + String(this.args[0]).trim() + '"'; + attributes = 'id="' + String(this.args[0]).trim() + '"'; /** FIXME: If a strict mode function is executed using function invocation, its 'this' value will be undefined. jshint(W040) */ return '<' + htag + ' ' + attributes + '>' + payload + '</' + htag + '>'; } @@ -4875,8 +4875,8 @@ App.UI.slaveSummaryList = function (passageName) { function dividerAndImage(s, showImage) { showImage = showImage || true; - let r = [V.lineSeparations == 0 ? '<br>' : '<hr style="margin:0">']; - if (showImage && (V.seeImages == 1) && (V.seeSummaryImages == 1)) { + let r = [V.lineSeparations === 0 ? '<br>' : '<hr style="margin:0">']; + if (showImage && (V.seeImages === 1) && (V.seeSummaryImages === 1)) { r.push(slaveImage(s)); } return r.join(""); @@ -4898,7 +4898,7 @@ App.UI.slaveSummaryList = function (passageName) { const tabName = V.slaveAssignmentTab; let _tableCount = 0; - if (V.useSlaveListInPageJSNavigation == 1) { + if (V.useSlaveListInPageJSNavigation === 1) { const _Count = _indexSlavesIdxs.length; /* Useful for finding weird combinations — usages of this passage that don't yet generate the quick index. * <<print 'pass/count/indexed/flag::[' + passageName + '/' + _Count + '/' + _indexed + '/' + $Flag + ']'>> @@ -5032,7 +5032,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|HG Workaround][$i = ${_ssi}]]`); break; case "Head Girl Suite": - if (V.Flag == 0) { + if (V.Flag === 0) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5045,10 +5045,10 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Subordinate Targeting][$activeSlave.subTarget = $slaves[${_ssi}].ID]]`); break; case "Spa": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.spa <= V.spaSlaves) { res.pop(); continue; } - if ((_Slave.health < 20) || (_Slave.trust < 60) || (_Slave.devotion <= 60) || (_Slave.fetish == "mindbroken") || _Slave.sexualFlaw !== "none" || _Slave.behavioralFlaw !== "none") { - if (_Slave.devotion >= -20 || _Slave.fetish == "mindbroken") { + if ((_Slave.health < 20) || (_Slave.trust < 60) || (_Slave.devotion <= 60) || (_Slave.fetish === "mindbroken") || _Slave.sexualFlaw !== "none" || _Slave.behavioralFlaw !== "none") { + if (_Slave.devotion >= -20 || _Slave.fetish === "mindbroken") { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5059,11 +5059,11 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`<i>${_Slave.slaveName} cannot benefit from the spa</i></div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { - if ((V.seeImages == 1) && (V.seeSummaryImages == 1)) res.push(slaveImage(_Slave)); + if ((V.seeImages === 1) && (V.seeSummaryImages === 1)) res.push(slaveImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } break; @@ -5072,7 +5072,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Attendant Workaround][$i = ${_ssi}]]`); break; case "Nursery": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.nurseryNannies <= V.nurserySlaves) { res.pop(); continue; } if ((_Slave.devotion >= -20) || ((_Slave.devotion >= -50) && (_Slave.trust <= 20)) || (_Slave.trust < -20)) { res.push(dividerAndImage(_Slave)); @@ -5081,11 +5081,11 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`<i>${_Slave.slaveName} must be either more fearful of you or devoted to you</i></div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { - if ((V.seeImages == 1) && (V.seeSummaryImages == 1)) { + if ((V.seeImages === 1) && (V.seeSummaryImages === 1)) { res.push(slaveImage(_Slave)); } res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); @@ -5096,9 +5096,9 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Matron Workaround][$i = ${_ssi}]]`); break; case "Brothel": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.brothel <= V.brothelSlaves) { res.pop(); continue; } - if (_Slave.breedingMark != 1 || V.propOutcome == 0) { + if (_Slave.breedingMark !== 1 || V.propOutcome === 0) { if ((_Slave.devotion > 50) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.trust > 50)) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); @@ -5110,11 +5110,11 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`<i>${_Slave.slaveName} is for private use only</i></div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { - if ((V.seeImages == 1) && (V.seeSummaryImages == 1)) { + if ((V.seeImages === 1) && (V.seeSummaryImages === 1)) { res.push(slaveImage(_Slave)); } res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); @@ -5125,9 +5125,9 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Madam Workaround][$i = ${_ssi}]]`); break; case "Club": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.club <= V.clubSlaves) { res.pop(); continue; } - if (_Slave.breedingMark != 1 || V.propOutcome == 0) { + if (_Slave.breedingMark !== 1 || V.propOutcome === 0) { if ((_Slave.devotion > 50) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.trust > 50)) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); @@ -5139,7 +5139,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`//${_Slave.slaveName} is for private use only//</div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5152,16 +5152,16 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|DJ Workaround][$i = ${_ssi}]]`); break; case "Clinic": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.clinic <= V.clinicSlaves) { res.pop(); continue; } - if ((_Slave.health < 20) || (V.Nurse != 0 && ((_Slave.chem > 15 && V.clinicUpgradeFilters == 1) || (V.bellyImplants == 1 && _Slave.bellyImplant > -1) || (_Slave.pregKnown == 1 && (V.clinicSpeedGestation >= 0 || _Slave.pregControl == "speed up")) || (_Slave.pregAdaptation * 1000 < _Slave.bellyPreg || _Slave.preg > _Slave.pregData.normalBirth / 1.33)))) { + if ((_Slave.health < 20) || (V.Nurse !== 0 && ((_Slave.chem > 15 && V.clinicUpgradeFilters === 1) || (V.bellyImplants === 1 && _Slave.bellyImplant > -1) || (_Slave.pregKnown === 1 && (V.clinicSpeedGestation >= 0 || _Slave.pregControl === "speed up")) || (_Slave.pregAdaptation * 1000 < _Slave.bellyPreg || _Slave.preg > _Slave.pregData.normalBirth / 1.33)))) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { res.push(`//${_Slave.slaveName} cannot benefit from the clinic//</div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5174,10 +5174,10 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Nurse Workaround][$i = ${_ssi}]]`); break; case "Schoolroom": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.schoolroom <= V.schoolroomSlaves) { res.pop(); continue; } if ((_Slave.devotion >= -20) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50)) { - if ((_Slave.intelligenceImplant < 30) || (_Slave.voice != 0 && _Slave.accent + V.schoolroomUpgradeLanguage > 2) || (_Slave.oralSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.whoreSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.entertainSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.analSkill < 10 + V.schoolroomUpgradeSkills * 20) || ((_Slave.vagina >= 0) && (_Slave.vaginalSkill < 10 + V.schoolroomUpgradeSkills * 20))) { + if ((_Slave.intelligenceImplant < 30) || (_Slave.voice !== 0 && _Slave.accent + V.schoolroomUpgradeLanguage > 2) || (_Slave.oralSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.whoreSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.entertainSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.analSkill < 10 + V.schoolroomUpgradeSkills * 20) || ((_Slave.vagina >= 0) && (_Slave.vaginalSkill < 10 + V.schoolroomUpgradeSkills * 20))) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5188,7 +5188,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`//${_Slave.slaveName} is too resistant to learn//</div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5201,9 +5201,9 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Schoolteacher Workaround][$i = ${_ssi}]]`); break; case "Dairy": - if (V.Flag == 0) { + if (V.Flag === 0) { const _dairySeed = V.bioreactorsXY + V.bioreactorsXX + V.bioreactorsHerm + V.bioreactorsBarren; - if (_Slave.assignment == "work in the dairy") { res.pop(); continue; } + if (_Slave.assignment === "work in the dairy") { res.pop(); continue; } if (V.dairy <= V.dairySlaves + _dairySeed) { res.pop(); continue; } if ((_Slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) { res.push(`//${_Slave.slaveName}'s indenture forbids extractive Dairy service.//</div>`); @@ -5211,17 +5211,17 @@ App.UI.slaveSummaryList = function (passageName) { } else if ((_Slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) { res.push(`//${_Slave.slaveName}'s indenture allows only free range milking.//</div>`); continue; - } else if (_Slave.breedingMark == 1 && V.propOutcome == 1 && V.dairyRestraintsSetting > 0) { + } else if (_Slave.breedingMark === 1 && V.propOutcome === 1 && V.dairyRestraintsSetting > 0) { res.push(`//${_Slave.slaveName} may only be a free range cow//</div>`); continue; - } else if ((V.dairyPregSetting > 0) && ((_Slave.bellyImplant != -1) || (_Slave.broodmother != 0))) { + } else if ((V.dairyPregSetting > 0) && ((_Slave.bellyImplant !== -1) || (_Slave.broodmother !== 0))) { res.push(`//${_Slave.slaveName}'s womb cannot accommodate current machine settings//</div>`); continue; } else { - if ((_Slave.lactation > 0) || (_Slave.balls > 0) || ((V.dairySlimMaintainUpgrade == 0 || V.dairySlimMaintain == 0) && (_Slave.boobs > 300 || _Slave.balls == 0 || V.dairyImplantsSetting == 1) && V.dairyImplantsSetting != 2)) { - if ((_Slave.devotion > 20) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.amp == 1) || (V.dairyRestraintsUpgrade == 1)) { - if ((V.dairyStimulatorsSetting < 2) || (_Slave.anus > 2) || (V.dairyPrepUpgrade == 1)) { - if ((V.dairyPregSetting < 2) || (_Slave.vagina > 2) || (_Slave.ovaries == 0) || (V.dairyPrepUpgrade == 1)) { + if ((_Slave.lactation > 0) || (_Slave.balls > 0) || ((V.dairySlimMaintainUpgrade === 0 || V.dairySlimMaintain === 0) && (_Slave.boobs > 300 || _Slave.balls === 0 || V.dairyImplantsSetting === 1) && V.dairyImplantsSetting !== 2)) { + if ((_Slave.devotion > 20) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.amp === 1) || (V.dairyRestraintsUpgrade === 1)) { + if ((V.dairyStimulatorsSetting < 2) || (_Slave.anus > 2) || (V.dairyPrepUpgrade === 1)) { + if ((V.dairyPregSetting < 2) || (_Slave.vagina > 2) || (_Slave.ovaries === 0) || (V.dairyPrepUpgrade === 1)) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5236,7 +5236,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`//${_Slave.slaveName} must be obedient in order to be milked here//</div>`); continue; } - } else if ((V.dairySlimMaintainUpgrade == 1 && V.dairySlimMaintain == 1) || (V.dairyImplantsSetting == 2) || (_Slave.boobs <= 300 && _Slave.balls > 0 && (V.dairyImplantsSetting == 0 || V.dairyImplantsSetting == 3))) { + } else if ((V.dairySlimMaintainUpgrade === 1 && V.dairySlimMaintain === 1) || (V.dairyImplantsSetting === 2) || (_Slave.boobs <= 300 && _Slave.balls > 0 && (V.dairyImplantsSetting === 0 || V.dairyImplantsSetting === 3))) { res.push(`//${_Slave.slaveName} is not lactating ${(V.seeDicks > 0) ? 'or producing semen' : ''} and ${V.dairyName}'s current settings forbid the automatic implantation of lactation inducing drugs or manual stimulation to induce it, so she cannot be a cow//</div>`); continue; } else { @@ -5244,7 +5244,7 @@ App.UI.slaveSummaryList = function (passageName) { continue; } } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5257,12 +5257,12 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Milkmaid Workaround][$i = ${_ssi}]]`); break; case "Farmyard": - if (V.Flag == 0) { - if (_Slave.assignment == "work as a farmhand") { res.pop(); continue; } + if (V.Flag === 0) { + if (_Slave.assignment === "work as a farmhand") { res.pop(); continue; } if (V.farmyard <= V.farmyardSlaves){ res.pop(); continue; } res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5275,7 +5275,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Farmer Workaround][$i = ${_ssi}]]`); break; case "Servants' Quarters": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.servantsQuarters <= V.servantsQuartersSlaves) { res.pop(); continue; } if ((_Slave.devotion >= -20) || ((_Slave.devotion >= -50) && (_Slave.trust <= 20)) || (_Slave.trust < -20)) { res.push(dividerAndImage(_Slave)); @@ -5284,7 +5284,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`//${_Slave.slaveName} must be either more fearful of you or devoted to you//</div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5297,7 +5297,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Stewardess Workaround][$i = ${_ssi}]]`); break; case "Master Suite": - if (V.Flag == 0) { + if (V.Flag === 0) { if (V.masterSuite <= V.masterSuiteSlaves) { res.pop(); continue; } if ((_Slave.devotion > 20) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50)) { res.push(dividerAndImage(_Slave)); @@ -5306,7 +5306,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`//${_Slave.slaveName} is not sufficiently broken for the master suite//</div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5319,8 +5319,8 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Concubine Workaround][$i = ${_ssi}]]`); break; case "Cellblock": - if (_Slave.assignmentVisible != 1) { res.pop(); continue; } - if (V.Flag == 0) { + if (_Slave.assignmentVisible !== 1) { res.pop(); continue; } + if (V.Flag === 0) { if (V.cellblock <= V.cellblockSlaves) { res.pop(); continue; } if ((_Slave.devotion < -20 && _Slave.trust >= -20) || (_Slave.devotion < -50 && _Slave.trust >= -50)) { res.push(dividerAndImage(_Slave)); @@ -5329,7 +5329,7 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`//${_Slave.slaveName} is sufficiently broken in so that the cellblock would have no effect//</div>`); continue; } - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); } else { @@ -5342,10 +5342,10 @@ App.UI.slaveSummaryList = function (passageName) { res.push(`[[${_slaveName}|Wardeness Workaround][$i = ${_ssi}]]`); break; case "Arcade": - if (V.Flag == 0) { - if (_Slave.assignment == "be confined in the arcade") { res.pop(); continue; } - if (V.arcade <= V.arcadeSlaves && V.arcadeUpgradeFuckdolls != 1) { res.pop(); continue; } - if ((_Slave.breedingMark != 1 || V.propOutcome == 0)) { + if (V.Flag === 0) { + if (_Slave.assignment === "be confined in the arcade") { res.pop(); continue; } + if (V.arcade <= V.arcadeSlaves && V.arcadeUpgradeFuckdolls !== 1) { res.pop(); continue; } + if ((_Slave.breedingMark !== 1 || V.propOutcome === 0)) { if (_Slave.indentureRestrictions <= 0) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Slave Interact][$activeSlave = $slaves[${_ssi}]]]`); @@ -5363,14 +5363,14 @@ App.UI.slaveSummaryList = function (passageName) { } break; case "Pit": - if (V.Flag == 0) { - if ((_Slave.indentureRestrictions > 0) && (V.pitLethal == 1)) { + if (V.Flag === 0) { + if ((_Slave.indentureRestrictions > 0) && (V.pitLethal === 1)) { res.push(`//${_Slave.slaveName}'s indenture forbids lethal fights.//</div>`); continue; } else if (_Slave.indentureRestrictions > 1) { res.push(`//${_Slave.slaveName}'s indenture forbids fighting.//</div>`); continue; - } else if (_Slave.breedingMark == 1 && V.propOutcome == 1) { + } else if (_Slave.breedingMark === 1 && V.propOutcome === 1) { res.push(`//${_Slave.slaveName} may not participate in combat//</div>`); continue; } else { @@ -5383,7 +5383,7 @@ App.UI.slaveSummaryList = function (passageName) { } break; case "Coursing Association": - if (V.Flag == 0) { + if (V.Flag === 0) { res.push(dividerAndImage(_Slave)); res.push(`[[${_slaveName}|Assign][$i = ${_ssi}]]`); } else { @@ -5393,7 +5393,7 @@ App.UI.slaveSummaryList = function (passageName) { break; case "New Game Plus": res.push(dividerAndImage(_Slave)); - if (V.Flag == 0) { + if (V.Flag === 0) { res.push(`__''@@.pink;${_Slave.slaveName}@@''__`); } else { res.push(`__''@@.pink;${_Slave.slaveName}@@''__`); @@ -5401,7 +5401,7 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Rules Slave Select": slaveImagePrinted = false; - if (V.Flag == 0) { + if (V.Flag === 0) { res.push(`__''[[${_slaveName}|Rules Slave Select Workaround][$activeSlave = $slaves[${_ssi}]]]''__`); } else { res.push(`__''[[${_slaveName}|Rules Slave Deselect Workaround][$activeSlave = $slaves[${_ssi}]]]''__`); @@ -5409,7 +5409,7 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Rules Slave Exclude": slaveImagePrinted = false; - if (V.Flag == 0) { + if (V.Flag === 0) { res.push(`__''[[${_slaveName}|Rules Slave Exclude Workaround][$activeSlave = $slaves[${_ssi}]]]''__`); } else { res.push(`__''[[${_slaveName}|Rules Slave NoExclude Workaround][$activeSlave = $slaves[${_ssi}]]]''__`); @@ -5430,14 +5430,14 @@ App.UI.slaveSummaryList = function (passageName) { V.slaves[_ssi] = _Slave; res.push(' will '); - if ((_Slave.assignment == "rest") && (_Slave.health >= -20)) { + if ((_Slave.assignment === "rest") && (_Slave.health >= -20)) { res.push("''__@@.lawngreen;rest@@__''"); - } else if ((_Slave.assignment == "stay confined") && ((_Slave.devotion > 20) || ((_Slave.trust < -20) && (_Slave.devotion >= -20)) || ((_Slave.trust < -50) && (_Slave.devotion >= -50)))) { + } else if ((_Slave.assignment === "stay confined") && ((_Slave.devotion > 20) || ((_Slave.trust < -20) && (_Slave.devotion >= -20)) || ((_Slave.trust < -50) && (_Slave.devotion >= -50)))) { res.push("''__@@.lawngreen;stay confined.@@__''"); if (_Slave.sentence > 0) { res.push(`(${_Slave.sentence} weeks)`); } - } else if (_Slave.choosesOwnAssignment == 1) { + } else if (_Slave.choosesOwnAssignment === 1) { res.push('choose her own job'); } else { res.push(_Slave.assignment); @@ -5447,62 +5447,62 @@ App.UI.slaveSummaryList = function (passageName) { /** @type {string[]} */ let assignments = []; - if ((V.displayAssignments == 1) && (passageName == "Main") && (_Slave.ID != V.HeadGirl.ID) && (_Slave.ID != V.Recruiter.ID) && (_Slave.ID != V.Bodyguard.ID)) { - if (_Slave.assignment != "rest") { + if ((V.displayAssignments === 1) && (passageName === "Main") && (_Slave.ID !== V.HeadGirl.ID) && (_Slave.ID !== V.Recruiter.ID) && (_Slave.ID !== V.Bodyguard.ID)) { + if (_Slave.assignment !== "rest") { assignments.push(`<<link "Rest" "Main">><<= removeJob($slaves[${_ssi}], $slaves[${_ssi}].assignment)>><</link>>`); } else { assignments.push('Rest'); } - if (_Slave.assignment != "please you") { + if (_Slave.assignment !== "please you") { assignments.push(`<<link "Fucktoy" "Main">><<= assignJob($slaves[${_ssi}], "please you")>><</link>>`); } else { assignments.push('Fucktoy'); } - if (_Slave.indentureRestrictions <= 0 && (_Slave.breedingMark != 1 || V.propOutcome == 0)) { - if (_Slave.assignment != "work a glory hole") { + if (_Slave.indentureRestrictions <= 0 && (_Slave.breedingMark !== 1 || V.propOutcome === 0)) { + if (_Slave.assignment !== "work a glory hole") { assignments.push(`<<link "Gloryhole" "Main">><<= assignJob($slaves[${_ssi}], "work a glory hole")>><</link>>`); } else { assignments.push('Hole'); } } - if (_Slave.fuckdoll == 0) { /* NON-FUCKDOLL ASSIGNMENTS */ - if (_Slave.assignment != "take classes") { - if ((_Slave.intelligenceImplant < 15) && ((_Slave.devotion >= -20) || ((_Slave.trust < -20) && (_Slave.devotion >= -50)) || (_Slave.trust < -50)) && (_Slave.fetish != "mindbroken")) { + if (_Slave.fuckdoll === 0) { /* NON-FUCKDOLL ASSIGNMENTS */ + if (_Slave.assignment !== "take classes") { + if ((_Slave.intelligenceImplant < 15) && ((_Slave.devotion >= -20) || ((_Slave.trust < -20) && (_Slave.devotion >= -50)) || (_Slave.trust < -50)) && (_Slave.fetish !== "mindbroken")) { assignments.push(`<<link "Classes" "Main">><<= assignJob($slaves[${_ssi}], "take classes")>><</link>>`); } } else { assignments.push(`Classes`); } - if (_Slave.assignment != "be a servant") { + if (_Slave.assignment !== "be a servant") { if (((_Slave.devotion >= -20) || ((_Slave.trust < -20) && (_Slave.devotion >= -50)) || (_Slave.trust < -50)) && canWalk(_Slave) && canSee(_Slave)) { assignments.push(`<<link "House Servant" "Main">><<= assignJob($slaves[${_ssi}], "be a servant")>><</link>>`); } } else { assignments.push('House Servant'); } - if ((_Slave.assignment != "whore") && (_Slave.breedingMark != 1 || V.propOutcome == 0)) { + if ((_Slave.assignment !== "whore") && (_Slave.breedingMark !== 1 || V.propOutcome === 0)) { assignments.push(`<<link "Whore" "Main">><<= assignJob($slaves[${_ssi}], "whore")>><</link>>`); } else { assignments.push('Whore'); } - if ((_Slave.assignment != "serve the public") && (_Slave.breedingMark != 1 || V.propOutcome == 0)) { + if ((_Slave.assignment !== "serve the public") && (_Slave.breedingMark !== 1 || V.propOutcome === 0)) { assignments.push(`<<link "Public Servant" "Main">><<= assignJob($slaves[${_ssi}], "serve the public")>><</link>>`); } else { assignments.push('Public Servant'); } if ((_Slave.lactation > 0) || (_Slave.balls > 0)) { - if (_Slave.assignment != "get milked") { + if (_Slave.assignment !== "get milked") { assignments.push(`<<link "Milked" "Main">><<= assignJob($slaves[${_ssi}], "get milked")>><</link>>`); } else { assignments.push('Milked'); } } - if (_Slave.assignment != "stay confined") { + if (_Slave.assignment !== "stay confined") { assignments.push(`<<link "Confinement" "Main">><<= assignJob($slaves[${_ssi}], "stay confined")>><</link>>`); } else { assignments.push('Confinement'); } - if (_Slave.assignment != "choose her own job") { + if (_Slave.assignment !== "choose her own job") { assignments.push(`<<link "Let ${_Slave.object} choose" "Main">><<= assignJob($slaves[${_ssi}], "choose her own job")>><</link>>`); } else { assignments.push(`Let ${_Slave.object} choose`); @@ -5515,36 +5515,36 @@ App.UI.slaveSummaryList = function (passageName) { let _numFacilities = V.brothel + V.club + V.dairy + V.farmyard + V.servantsQuarters + V.masterSuite + V.spa + V.clinic + V.schoolroom + V.cellblock + V.arcade + V.HGSuite; if (_numFacilities > 0) { - if (passageName == "Main" || passageName == "Head Girl Suite" || passageName == "Spa" || passageName == "Brothel" || passageName == "Club" || passageName == "Arcade" || passageName == "Clinic" || passageName == "Schoolroom" || passageName == "Dairy" || passageName == "Farmyard" || passageName == "Servants' Quarters" || passageName == "Master Suite" || passageName == "Cellblock") { + if (passageName === "Main" || passageName === "Head Girl Suite" || passageName === "Spa" || passageName === "Brothel" || passageName === "Club" || passageName === "Arcade" || passageName === "Clinic" || passageName === "Schoolroom" || passageName === "Dairy" || passageName === "Farmyard" || passageName === "Servants' Quarters" || passageName === "Master Suite" || passageName === "Cellblock") { V.returnTo = passageName; res.push('<br>Transfer to: '); /** @type {string[]} */ let transfers = [] - if (_Slave.assignment !== "rest" && _Slave.assignment !== "please you" && _Slave.assignment !== "take classes" && _Slave.assignment !== "be a servant" && _Slave.assignment !== "whore" && _Slave.assignment !== "serve the public" && _Slave.assignment !== "get milked" && _Slave.assignment !== "stay confined") { + if (_Slave.assignment != "rest" && _Slave.assignment != "please you" && _Slave.assignment != "take classes" && _Slave.assignment != "be a servant" && _Slave.assignment != "whore" && _Slave.assignment != "serve the public" && _Slave.assignment != "get milked" && _Slave.assignment != "stay confined") { transfers.push(`<<link "Penthouse" "Main">><<= removeJob($slaves[${_ssi}], $slaves[${_ssi}].assignment)>><</link>>`); } else { transfers.push('Penthouse'); } - if (V.arcade != 0) { - if (V.arcade > V.arcadeSlaves && (_Slave.indentureRestrictions <= 0) && (_Slave.breedingMark != 1 || V.propOutcome == 0)) { + if (V.arcade !== 0) { + if (V.arcade > V.arcadeSlaves && (_Slave.indentureRestrictions <= 0) && (_Slave.breedingMark !== 1 || V.propOutcome === 0)) { transfers.push(`[[Arcade|Assign][$assignTo = "Arcade", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Arcade'); } } - if (_Slave.fuckdoll == 0) { /* NON-FUCKDOLL FACILITIES */ - if (V.clinic != 0) { - if (V.clinic > V.clinicSlaves && (_Slave.health < 20 || (V.Nurse != 0 && ((_Slave.chem > 15 && V.clinicUpgradeFilters == 1) || (V.bellyImplants == 1 && _Slave.bellyImplant > -1) || (_Slave.pregKnown == 1 && (V.clinicSpeedGestation >= 0 || _Slave.pregControl == "speed up")) || (_Slave.pregAdaptation * 1000 < _Slave.bellyPreg || _Slave.preg > _Slave.pregData.normalBirth / 1.33))))) { + if (_Slave.fuckdoll === 0) { /* NON-FUCKDOLL FACILITIES */ + if (V.clinic !== 0) { + if (V.clinic > V.clinicSlaves && (_Slave.health < 20 || (V.Nurse !== 0 && ((_Slave.chem > 15 && V.clinicUpgradeFilters === 1) || (V.bellyImplants === 1 && _Slave.bellyImplant > -1) || (_Slave.pregKnown === 1 && (V.clinicSpeedGestation >= 0 || _Slave.pregControl === "speed up")) || (_Slave.pregAdaptation * 1000 < _Slave.bellyPreg || _Slave.preg > _Slave.pregData.normalBirth / 1.33))))) { transfers.push(`[[Clinic|Assign][$assignTo = "Clinic", $i =${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Clinic'); } } - if (V.masterSuite != 0) { + if (V.masterSuite !== 0) { if (V.masterSuite > V.masterSuiteSlaves && ((_Slave.devotion > 20) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50))) { transfers.push(`[[Master Suite|Assign][$assignTo = "Master Suite", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { @@ -5552,7 +5552,7 @@ App.UI.slaveSummaryList = function (passageName) { } } - if (V.cellblock != 0) { + if (V.cellblock !== 0) { if (V.cellblock > V.cellblockSlaves && ((_Slave.devotion < -20 && _Slave.trust >= -20) || (_Slave.devotion < -50 && _Slave.trust >= -50))) { transfers.push(`[[Cellblock|Assign][$assignTo = "Cellblock", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { @@ -5560,15 +5560,15 @@ App.UI.slaveSummaryList = function (passageName) { } } - if (V.schoolroom != 0) { - if (V.schoolroom > V.schoolroomSlaves && (_Slave.fetish != "mindbroken" && (_Slave.devotion >= -20 || (_Slave.devotion >= -50 && _Slave.trust < -20) || _Slave.trust < -50) && ((_Slave.intelligenceImplant < 30) || (_Slave.voice != 0 && _Slave.accent + V.schoolroomUpgradeLanguage > 2) || (_Slave.oralSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.whoreSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.entertainSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.analSkill < 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.vagina >= 0 && _Slave.vaginalSkill < 10 + V.schoolroomUpgradeSkills * 20)))) { + if (V.schoolroom !== 0) { + if (V.schoolroom > V.schoolroomSlaves && (_Slave.fetish !== "mindbroken" && (_Slave.devotion >= -20 || (_Slave.devotion >= -50 && _Slave.trust < -20) || _Slave.trust < -50) && ((_Slave.intelligenceImplant < 30) || (_Slave.voice !== 0 && _Slave.accent + V.schoolroomUpgradeLanguage > 2) || (_Slave.oralSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.whoreSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.entertainSkill <= 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.analSkill < 10 + V.schoolroomUpgradeSkills * 20) || (_Slave.vagina >= 0 && _Slave.vaginalSkill < 10 + V.schoolroomUpgradeSkills * 20)))) { transfers.push(`[[Schoolroom|Assign][$assignTo = "Schoolroom", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Schoolroom') } } - if (V.servantsQuarters != 0) { + if (V.servantsQuarters !== 0) { if (V.servantsQuarters > V.servantsQuartersSlaves && (canWalk(_Slave) && canSee(_Slave) && (_Slave.devotion >= -20 || (_Slave.devotion >= -50 && _Slave.trust <= 20) || _Slave.trust < -20))) { transfers.push(`[[Servants' Quarters|Assign][$assignTo = "Servants' Quarters", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { @@ -5576,36 +5576,36 @@ App.UI.slaveSummaryList = function (passageName) { } } - if (V.brothel != 0) { - if (V.brothel > V.brothelSlaves && (((_Slave.devotion > 50) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.trust > 50)) && (_Slave.breedingMark != 1 || V.propOutcome == 0))) { + if (V.brothel !== 0) { + if (V.brothel > V.brothelSlaves && (((_Slave.devotion > 50) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.trust > 50)) && (_Slave.breedingMark !== 1 || V.propOutcome === 0))) { transfers.push(`[[Brothel|Assign][$assignTo = "Brothel", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Brothel') } } - if (V.club != 0) { - if (V.club > V.clubSlaves && (((_Slave.devotion > 50) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.trust > 50)) && (_Slave.breedingMark != 1 || V.propOutcome == 0))) { + if (V.club !== 0) { + if (V.club > V.clubSlaves && (((_Slave.devotion > 50) || ((_Slave.devotion >= -50) && (_Slave.trust < -20)) || (_Slave.trust < -50) || (_Slave.trust > 50)) && (_Slave.breedingMark !== 1 || V.propOutcome === 0))) { transfers.push(`[[Club|Assign][$assignTo = "Club", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Club') } } - if (V.dairy != 0) { + if (V.dairy !== 0) { let _dairySeed = V.bioreactorsXY + V.bioreactorsXX + V.bioreactorsHerm + V.bioreactorsBarren; if (V.dairy <= V.dairySlaves + _dairySeed) { transfers.push('Dairy'); - } else if (((_Slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) || ((_Slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) || (_Slave.breedingMark == 1 && V.propOutcome == 1 && V.dairyRestraintsSetting > 0) || ((V.dairyPregSetting > 0) && ((_Slave.bellyImplant != -1) || (_Slave.broodmother > 0)))) { + } else if (((_Slave.indentureRestrictions > 0) && (V.dairyRestraintsSetting > 1)) || ((_Slave.indentureRestrictions > 1) && (V.dairyRestraintsSetting > 0)) || (_Slave.breedingMark === 1 && V.propOutcome === 1 && V.dairyRestraintsSetting > 0) || ((V.dairyPregSetting > 0) && ((_Slave.bellyImplant !== -1) || (_Slave.broodmother > 0)))) { transfers.push('Dairy'); - } else if (((_Slave.lactation > 0) || (_Slave.balls > 0)) || ((V.dairyFeedersUpgrade == 1) && (V.dairyFeedersSetting > 0) && (V.dairySlimMaintainUpgrade == 0))) { + } else if (((_Slave.lactation > 0) || (_Slave.balls > 0)) || ((V.dairyFeedersUpgrade === 1) && (V.dairyFeedersSetting > 0) && (V.dairySlimMaintainUpgrade === 0))) { transfers.push(`[[Dairy|Assign][$assignTo = "Dairy", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Dairy') } } - if (V.farmyard != 0) { + if (V.farmyard !== 0) { if (V.farmyard > V.farmyardSlaves) { transfers.push(`[[Farmyard|Assign][$assignTo = "Farmyard", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { @@ -5613,16 +5613,16 @@ App.UI.slaveSummaryList = function (passageName) { } } - if (V.spa != 0) { - if (V.spa > V.spaSlaves && ((_Slave.devotion >= -20 || _Slave.fetish == "mindbroken") && (_Slave.health < 20 || _Slave.trust <= 60 || _Slave.devotion <= 60 || _Slave.fetish == "mindbroken" || _Slave.sexualFlaw !== "none" || _Slave.behavioralFlaw !== "none"))) { + if (V.spa !== 0) { + if (V.spa > V.spaSlaves && ((_Slave.devotion >= -20 || _Slave.fetish === "mindbroken") && (_Slave.health < 20 || _Slave.trust <= 60 || _Slave.devotion <= 60 || _Slave.fetish === "mindbroken" || _Slave.sexualFlaw !== "none" || _Slave.behavioralFlaw !== "none"))) { transfers.push(`[[Spa|Assign][$assignTo = "Spa", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Spa'); } } - if (V.nursery != 0) { - if (V.nurseryNannies > V.nurserySlaves && (_Slave.devotion > 20 || _Slave.trust > 20 || _Slave.fetish == "mindbroken")) { + if (V.nursery !== 0) { + if (V.nurseryNannies > V.nurserySlaves && (_Slave.devotion > 20 || _Slave.trust > 20 || _Slave.fetish === "mindbroken")) { transfers.push(`[[Nursery|Assign][$assignTo = "Nursery", $i = ${_ssi}]]`); /* $i = -1 tells Assign to use _Slave as-is */ } else { transfers.push('Nursery'); @@ -5634,7 +5634,7 @@ App.UI.slaveSummaryList = function (passageName) { } }/* closes _numFacilities */ - if ((passageName != 'Main') || (V.Flag !== undefined) || (V.useSlaveSummaryTabs == 0) || (tabName == "all")) { + if ((passageName !== 'Main') || (V.Flag !== undefined) || (V.useSlaveSummaryTabs === 0) || (tabName === "all")) { res.push(`<span id="slave-${slaves[_ssi].ID}"> </span>`); } res.push('<br/>'); @@ -5654,13 +5654,13 @@ App.UI.slaveSummaryList = function (passageName) { continue; case "HG Select": if (setup.HGCareers.includes(_Slave.career) || (_Slave.skillHG >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Head Girl Suite": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`[[Send her to live with your Head Girl|Assign][$i = ${_ssi}]]`); } else { res.push(`[[Bring her out of the Head Girl's suite|Retrieve][$i = ${_ssi}]]`); @@ -5668,21 +5668,21 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Recruiter Select": if (setup.recruiterCareers.includes(_Slave.career) || (_Slave.skillRC >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "BG Select": if (setup.bodyguardCareers.includes(_Slave.career) || (_Slave.skillBG >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Spa": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $spaName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Remove ${_Slave.object} from ${V.spaName}" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Attendant|Attendant Select]]'); @@ -5690,15 +5690,15 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Attendant Select": if (setup.attendantCareers.includes(_Slave.career) || (_Slave.skillAT >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Nursery": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $nurseryName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Remove ${_Slave.object} from $nurseryName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Matron|Matron Select]]'); @@ -5706,15 +5706,15 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Matron Select": if (setup.matronCareers.includes(_Slave.career) || (_Slave.skillMT >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Brothel": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $brothelName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Release ${_Slave.object} from $brothelName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Madam|Madam Select]]'); @@ -5722,23 +5722,23 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Madam Select": if (setup.madamCareers.includes(_Slave.career) || (_Slave.skillMD >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Club": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $clubName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Remove ${_Slave.object} from $clubName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove DJ|DJ Select]]'); } break; case "Arcade": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Confine ${_Slave.object} in $arcadeName" "Assign">><<set $i = ${_ssi}>><</link>>`); } else { res.push(`<<link "Release ${_Slave.object} from $arcadeName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); @@ -5746,18 +5746,18 @@ App.UI.slaveSummaryList = function (passageName) { break; case "DJ Select": if (setup.DJCareers.includes(_Slave.career) || (_Slave.skillDJ >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Clinic": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.clinicUpgradeScanner == 1) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.clinicUpgradeScanner === 1) { res.push(`@@.cyan;Estimated DNA error value: ${Math.ceil(_Slave.chem / 10)}@@`); } - if (V.Flag == 0) { + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $clinicName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Take ${_Slave.object} out of $clinicName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Nurse|Nurse Select]]'); @@ -5765,15 +5765,15 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Nurse Select": if (setup.nurseCareers.includes(_Slave.career) || (_Slave.skillNU >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Schoolroom": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Assign ${_Slave.object} to $schoolroomName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Release ${_Slave.object} from $schoolroomName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Schoolteacher|Schoolteacher Select]]'); @@ -5781,15 +5781,15 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Schoolteacher Select": if (setup.schoolteacherCareers.includes(_Slave.career) || (_Slave.skillTE >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Dairy": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $dairyName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Release ${_Slave.object} from $dairyName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Milkmaid|Milkmaid Select]]'); @@ -5797,15 +5797,15 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Milkmaid Select": if (setup.milkmaidCareers.includes(_Slave.career) || (_Slave.skillMM >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Farmyard": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Send ${_Slave.object} to $farmyardName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Release ${_Slave.object} from $farmyardName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Farmer|Farmer Select]]'); @@ -5813,15 +5813,15 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Farmer Select": if (setup.farmerCareers.includes(_Slave.career) || (_Slave.skillFA >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Servants' Quarters": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Assign ${_Slave.object} to $servantsQuartersName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Release ${_Slave.object} from $servantsQuartersName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Stewardess|Stewardess Select]]'); @@ -5829,25 +5829,25 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Stewardess Select": if (setup.stewardessCareers.includes(_Slave.career) || (_Slave.skillST >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "Master Suite": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Add ${_Slave.object} to $masterSuiteName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Send ${_Slave.object} out of $masterSuiteName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Concubine|Concubine Select]]'); } break; case "Cellblock": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); - if (V.Flag == 0) { + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); + if (V.Flag === 0) { res.push(`<<link "Confine ${_Slave.object} in $cellblockName" "Assign">><<set $i = ${_ssi}>><</link>>`); - } else if (V.Flag == 1) { + } else if (V.Flag === 1) { res.push(`<<link "Release ${_Slave.object} from $cellblockName" "Retrieve">><<set $i = ${_ssi}>><</link>>`); } else { res.push('[[Change or remove Wardeness|Wardeness Select]]'); @@ -5855,12 +5855,12 @@ App.UI.slaveSummaryList = function (passageName) { break; case "Wardeness Select": if (setup.wardenessCareers.includes(_Slave.career) || (_Slave.skillWA >= V.masteredXP)) { - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push('@@.lime;Has applicable career experience.@@'); } break; case "New Game Plus": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); if (V.Flag === 0) { res.push(`<<link "Add to import list" "New Game Plus">> <<set $slavesToImport += 1,$Flag = 1>> @@ -5874,11 +5874,11 @@ App.UI.slaveSummaryList = function (passageName) { } break; case "Matchmaking": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push(`[[Match them|Matchmaking][$subSlave = $slaves[${_ssi}]]]`); break; case "Dinner Party Preparations": - res.push('<br>' + (V.seeImages != 1 || V.seeSummaryImages != 1 || V.imageChoice == 1) ? ' ' : ''); + res.push('<br>' + (V.seeImages !== 1 || V.seeSummaryImages !== 1 || V.imageChoice === 1) ? ' ' : ''); res.push(`[[Make her the main course|Dinner Party Execution][$activeSlave = $slaves[${_ssi}]]]`); break; }