diff --git a/.eslintrc.json b/.eslintrc.json index 947fee28b9ef24511c5af5bf9d6294fd8a02f21e..fd889e0a70f535af9add62fd261fd87dd7158446 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -83,6 +83,7 @@ "no-undef": "off", "indent": ["error", "tab", { "SwitchCase": 1 }], "no-unused-vars": ["error", {"args": "none"}], + "no-unused-expressions": "error", "block-scoped-var": "error", "dot-notation": "warn", "eol-last": "warn", diff --git a/Changelog.txt b/Changelog.txt index 6343c1f2f461234d1142bc836ee345c22dedae09..5bc5bf9727e76800123dc326611c9f2849b84e28 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -2,6 +2,12 @@ Pregmod 0.10.7.1-3.8.x + 6 + -new clothing vectors for revamped art set + -new shoe vectors for revamped art set + -added support for tracking partners + -your usual fixes and code improvements + 12/29/2020 5 diff --git a/css/general/formatting.css b/css/general/formatting.css index b0a408d0c50b27bd40e337e754731380ccefb372..3d54f5dd67d866204ad9dfcce691da23516d2fa3 100644 --- a/css/general/formatting.css +++ b/css/general/formatting.css @@ -45,6 +45,10 @@ font-weight: bold; } +.strikethrough { + text-decoration: line-through +} + .clear-formatting { color: white; font-weight: normal; diff --git a/devTools/types/FC/data.d.ts b/devTools/types/FC/data.d.ts index c6efdfe4f8217a064dbdd580d08b11e422b5de85..48e6a8e94a673b25ced0e5a153d3eb5d24006772 100644 --- a/devTools/types/FC/data.d.ts +++ b/devTools/types/FC/data.d.ts @@ -62,15 +62,6 @@ declare namespace FC { manager: ManagerJobDesc | null; } - interface ProstheticDefinition { - name: string; - adjust: number; - craft: number; - research: number; - level: number; - costs: number; - } - namespace SlaveSummary { interface SmartPiercing { setting: { diff --git a/devTools/types/FC/medicine.d.ts b/devTools/types/FC/medicine.d.ts index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e3972630faf3f4c8f9ca3cce2698ba6879b485e9 100644 --- a/devTools/types/FC/medicine.d.ts +++ b/devTools/types/FC/medicine.d.ts @@ -0,0 +1,4 @@ +declare namespace FC { + type prostheticID = "interfaceP1" | "interfaceP2" | "basicL" | "sexL" | "beautyL" | "combatL" | "cyberneticL" | + "ocular" | "cochlear" | "electrolarynx" | "interfaceTail" | "modT" | "sexT" | "combatT" | "erectile"; +} diff --git a/devTools/types/SugarCubeExtensions.d.ts b/devTools/types/SugarCubeExtensions.d.ts index 571c21cc390dc5a4c454f388b7114b043b622cbb..c26ed89e0664e6f849bec9fe226bc18c5ad614d9 100644 --- a/devTools/types/SugarCubeExtensions.d.ts +++ b/devTools/types/SugarCubeExtensions.d.ts @@ -43,7 +43,6 @@ declare module "twine-sugarcube" { baseNationalities: string[]; paraphiliaList: string[]; // actually FC.SexualFlaw[] - prosthetics: Record<string, FC.Data.ProstheticDefinition>; } // These are SugarCube private APIs used in the project diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js index 115fde838b2bcd7d4644101628380081f33d1681..e47f9f1b2aa6c509f7d77e359f31fbfa5e6f6189 100644 --- a/js/003-data/miscData.js +++ b/js/003-data/miscData.js @@ -1,133 +1,4 @@ App.Data.misc = { - /* prosthetic stuff */ - /* do not change order, order = display order */ - prostheticIDs: ["interfaceP1", "interfaceP2", "basicL", "sexL", "beautyL", "combatL", "cyberneticL", "ocular", "cochlear", "electrolarynx", "interfaceTail", "modT", "sexT", "combatT", "erectile"], - - /* .name is expected to be singular and uncapitalized; 10 = 1 week without upgrades */ - prosthetics: { - interfaceP1: { - name: "basic prosthetic interface", - adjust: 40, - craft: 50, - research: 100, - level: 1, - costs: 5000 - }, - interfaceP2: { - name: "advanced prosthetic interface", - adjust: 80, - craft: 80, - research: 160, - level: 2, - costs: 10000 - }, - basicL: { - name: "set of basic prosthetic limbs", - adjust: 40, - craft: 40, - research: 80, - level: 1, - costs: 7000 - }, - sexL: { - name: "set of advanced sex limbs", - adjust: 60, - craft: 70, - research: 140, - level: 2, - costs: 15000 - }, - beautyL: { - name: "set of advanced beauty limbs", - adjust: 60, - craft: 70, - research: 140, - level: 2, - costs: 15000 - }, - combatL: { - name: "set of advanced combat limbs", - adjust: 60, - craft: 70, - research: 140, - level: 2, - costs: 15000 - }, - cyberneticL: { - name: "set of cybernetic limbs", - adjust: 80, - craft: 150, - research: 250, - level: 3, - costs: 25000 - }, - ocular: { - name: "ocular implant", - adjust: 60, - craft: 80, - research: 150, - level: 2, - costs: 20000 - }, - cochlear: { - name: "cochlear implant", - adjust: 40, - craft: 40, - research: 80, - level: 1, - costs: 5000 - }, - electrolarynx: { - name: "electrolarynx", - adjust: 40, - craft: 40, - research: 40, - level: 1, - costs: 5000 - }, - interfaceTail: { - name: "prosthetic tail interface", - adjust: 50, - craft: 60, - research: 120, - level: 1, - costs: 5000 - }, - modT: { - name: "modular tail", - adjust: 40, - craft: 40, - research: 80, - level: 1, - costs: 5000 - }, - combatT: { - name: "combat tail", - adjust: 70, - craft: 70, - research: 140, - level: 2, - costs: 15000 - }, - sexT: { - name: "pleasure tail", - adjust: 60, - craft: 60, - research: 120, - level: 2, - costs: 10000 - }, - erectile: { - name: "erectile implant", - adjust: 40, - craft: 50, - research: 100, - level: 1, - costs: 7000 - } - }, - /* prosthetic stuff end */ - /** * pregmod exclusive start ***/ /* Double 20 week point for human data — not a bug. Do not change! (It's transfer point in data source, from data without CTR to with CTR) */ diff --git a/js/003-data/slaveProstheticsData.js b/js/003-data/slaveProstheticsData.js new file mode 100644 index 0000000000000000000000000000000000000000..80b89c1a22a502648eaed8ba15b60c75a3faf90c --- /dev/null +++ b/js/003-data/slaveProstheticsData.js @@ -0,0 +1,199 @@ +/** + * do not change order, order = display order + * + * @type {FC.prostheticID[]} + */ +App.Data.prostheticIDs = + ["interfaceP1", "interfaceP2", "basicL", "sexL", "beautyL", "combatL", "cyberneticL", "ocular", "cochlear", + "electrolarynx", "interfaceTail", "modT", "sexT", "combatT", "erectile"]; + +/** + * @typedef {object} prosthetics + * @property {string} name expected to singular and lowercase + * @property {number} adjust time required to adjust an existing prosthetic to a slave + * @property {number} craft time required to create a new, not to a specific slave fitted prosthetic + * @property {number} research time required to research the prosthetic + * @property {number} level minimum level the prosthetics lab needs to research/craft the prosthetic + * @property {number} costs cash required to buy the prosthetic + * + * For all time values: 10 = 1 week without upgrades + */ + +/** + * @type {Object<FC.prostheticID, prosthetics>} + */ +App.Data.prosthetics = { + interfaceP1: { + name: "basic prosthetic interface", + adjust: 40, + craft: 50, + research: 100, + level: 1, + costs: 5000 + }, + interfaceP2: { + name: "advanced prosthetic interface", + adjust: 80, + craft: 80, + research: 160, + level: 2, + costs: 10000 + }, + basicL: { + name: "set of basic prosthetic limbs", + adjust: 40, + craft: 40, + research: 80, + level: 1, + costs: 7000 + }, + sexL: { + name: "set of advanced sex limbs", + adjust: 60, + craft: 70, + research: 140, + level: 2, + costs: 15000 + }, + beautyL: { + name: "set of advanced beauty limbs", + adjust: 60, + craft: 70, + research: 140, + level: 2, + costs: 15000 + }, + combatL: { + name: "set of advanced combat limbs", + adjust: 60, + craft: 70, + research: 140, + level: 2, + costs: 15000 + }, + cyberneticL: { + name: "set of cybernetic limbs", + adjust: 80, + craft: 150, + research: 250, + level: 3, + costs: 25000 + }, + ocular: { + name: "ocular implant", + adjust: 60, + craft: 80, + research: 150, + level: 2, + costs: 20000 + }, + cochlear: { + name: "cochlear implant", + adjust: 40, + craft: 40, + research: 80, + level: 1, + costs: 5000 + }, + electrolarynx: { + name: "electrolarynx", + adjust: 40, + craft: 40, + research: 40, + level: 1, + costs: 5000 + }, + interfaceTail: { + name: "prosthetic tail interface", + adjust: 50, + craft: 60, + research: 120, + level: 1, + costs: 5000 + }, + modT: { + name: "modular tail", + adjust: 40, + craft: 40, + research: 80, + level: 1, + costs: 5000 + }, + combatT: { + name: "combat tail", + adjust: 70, + craft: 70, + research: 140, + level: 2, + costs: 15000 + }, + sexT: { + name: "pleasure tail", + adjust: 60, + craft: 60, + research: 120, + level: 2, + costs: 10000 + }, + erectile: { + name: "erectile implant", + adjust: 40, + craft: 50, + research: 100, + level: 1, + costs: 7000 + } +}; + +/** + * @type {Map<FC.TailShape, {animal: string, desc: string}>} + */ +App.Data.modTails = new Map([ + ["neko", {animal: "Cat", desc: "a long, slender cat tail"}], + ["inu", {animal: "Dog", desc: "a bushy dog tail"}], + ["kit", {animal: "Fox", desc: "a soft, fluffy fox tail"}], + ["kitsune", {animal: "Kitsune", desc: "three incredibly soft, fluffy fox tails"}], + ["tanuki", {animal: "Tanuki", desc: "a long, fluffy tanuki tail"}], + ["ushi", {animal: "Cow", desc: "a long cow tail"}], + ["usagi", {animal: "Rabbit", desc: "a short rabbit tail"}], + ["risu", {animal: "Squirrel", desc: "a large squirrel tail"}], + ["uma", {animal: "Horse", desc: "a long horse tail"}] +]); + +/** + * @typedef {object} prostheticLimb + * @property {string} short + * @property {FC.prostheticID} prostheticKey + * @property {number} minimumInterface + */ + +/** + * @type {Map<number, prostheticLimb>} + */ +App.Data.prostheticLimbs = new Map([ + [2, { + short: "basic prosthetic", + prostheticKey: "basicL", + minimumInterface: 1, + }], + [3, { + short: "advanced sex", + prostheticKey: "sexL", + minimumInterface: 1, + }], + [4, { + short: "advanced beauty", + prostheticKey: "beautyL", + minimumInterface: 1, + }], + [5, { + short: "advanced combat", + prostheticKey: "combatL", + minimumInterface: 1, + }], + [6, { + short: "cybernetic", + prostheticKey: "cyberneticL", + minimumInterface: 2, + }], +]); diff --git a/js/artInfrastructure.js b/js/artInfrastructure.js index 5d0feeecfaaa99fbd825869c8d66f88446954cf7..23ed5bea12df4c2f27e169e776ac162e2da982f3 100644 --- a/js/artInfrastructure.js +++ b/js/artInfrastructure.js @@ -37,6 +37,7 @@ App.Art.cacheArtData = function() { App.Data.Art.VectorRevamp = makeCache(document.querySelectorAll('[tags="Twine.image"][name^="Art_Vector_Revamp"]')); }; +App.Art.URLIDMatcher = /url\(#(.*)\)/; App.Art.SvgQueue = class { /** * @param {{trigger:string, action:string, value:string}[]} transformRules - when a 'data-transform' attribute with value "trigger" is seen on an element, perform 'action' with 'value' @@ -49,6 +50,7 @@ App.Art.SvgQueue = class { this._container = []; this._cache = cache; this._displayClass = displayClass; + this._rndID = Math.floor(Math.random() * 9007199254740991); } /** transform a node via the transform rules @@ -78,74 +80,63 @@ App.Art.SvgQueue = class { const rule = this._transformRules.find((r) => r.trigger === trigger); if (rule && rule.value) { // by default, set attribute (usually 'clip-path') - node.setAttribute(rule.action, rule.value); + node.setAttribute(rule.action, this._replaceURLRefs(rule.value)); } } } - /** add an SVG from the cache to the render queue + /** Turn a single fixed ID into a unique one * @param {string} id */ - add(id) { - const res = this._cache.get(id); - let clones = []; - if (!res) { - console.error(`Missing art resource: ${id}`); - return; + _makeUniqueID(id) { + return `${id}_rndID_${this._rndID}`; + } + + /** Turn any ID URL references in the target attribute string into unique ones + * @param {string} attr + * @returns {string} + */ + _replaceURLRefs(attr) { + return attr.replace(App.Art.URLIDMatcher, (a, b) => `url(#${this._makeUniqueID(b)})`); + } + + /** Append unique IDs to clip-path and filter references + * @param {Element} node + */ + _replaceIDs(node) { + const cp = node.getAttribute('clip-path'); + if (cp) { + node.setAttribute('clip-path', this._replaceURLRefs(cp)); } - for (const srcNode of res.children) { - const node = /** @type {Element} */ (srcNode.cloneNode(true)); - this._transform(node); - this._setclip(node); - let transformNodes = node.querySelectorAll('g[data-transform]'); - for (const child of transformNodes) { - this._transform(child); - } - let clipNodes = node.querySelectorAll('g[select_clip]'); - for (const child of clipNodes) { - this._setclip(child); - } - clones.push(node); + const style = node.getAttribute('style'); + if (style && style.search("filter") > -1) { + node.setAttribute('style', this._replaceURLRefs(style)); + } + for (const nodeChild of node.children) { + this._replaceIDs(nodeChild); } - this._container.push({attrs: res.attributes, nodes: clones}); } - - /** add an revamped SVG from the cache to the render queue + + /** add an SVG from the cache to the render queue * @param {string} id - * @param {int} rndID + * @param {number} [rndID] - optional unique ID which identifies this specific art instance to make internal defs link correctly */ - addRevamped(id,rndID) { + add(id, rndID) { const res = this._cache.get(id); - let defIDs = []; let clones = []; if (!res) { console.error(`Missing art resource: ${id}`); return; } for (const srcNode of res.children) { - // Extract all clip-path and filter IDs const node = /** @type {Element} */ (srcNode.cloneNode(true)); - if (node.nodeName == "defs") { - for (const defChild of node.children) { - if (defChild.nodeName == "clipPath" || defChild.nodeName == "filter") { - defIDs.push(defChild.id); - } + if (node.nodeName === "defs") { + for (const defNode of node.children) { + defNode.setAttribute("id", this._makeUniqueID(defNode.id)); } - } - } - for (const defID of defIDs) { - // Loop through all clip-path IDs and append the randum number to it - // Remove if another number is already in the ID - var n = defID.search("_rndID_"); - if (n == -1) { - res.innerHTML = res.innerHTML.replaceAll(defID, `${defID}_rndID_${rndID}`); } else { - let origID = defID.split("_rndID_", 1); - res.innerHTML = res.innerHTML.replaceAll(defID, `${origID}_rndID_${rndID}`); + this._replaceIDs(node); } - } - for (const srcNode of res.children) { - const node = /** @type {Element} */ (srcNode.cloneNode(true)); this._transform(node); this._setclip(node); let transformNodes = node.querySelectorAll('g[data-transform]'); diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 94fb7ad7313463bfb0b1e96a6eaca2ef2f7a1676..97eba33f28e4cf77011e7304c718ae0e2b3f1811 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "3.8.5", commitHash: null, - release: 1115 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1116 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/Corporation/manageCorporation.js b/src/Corporation/manageCorporation.js new file mode 100644 index 0000000000000000000000000000000000000000..fb4f7ba0e72091ccff835ef59984d3b6fa39ec2f --- /dev/null +++ b/src/Corporation/manageCorporation.js @@ -0,0 +1,57 @@ +App.Corporate.corpRaces = function() { + const el = new DocumentFragment(); + App.UI.DOM.appendNewElement("div", el, `The corporation enslaves people of the following race${V.corp.SpecRaces.length === 1 ? ``:`s`}:`); + for (const race of App.Data.misc.filterRacesLowercase) { + const capRace = App.Data.misc.filterRaces[App.Data.misc.filterRacesLowercase.indexOf(race)]; + const r = []; + if (V.corp.SpecRaces.includes(race)) { + r.push(capRace); + if (!(V.arcologies[0].FSSubjugationist !== "unset" && V.arcologies[0].FSSubjugationistRace !== race)) { + if (V.corp.SpecRaces.length > 1 && V.corp.SpecTimer === 0) { + if ((V.corp.SpecRaces.length === 4 || V.corp.SpecRaces.length === 8) && V.corp.SpecToken > 0) { + r.push( + App.UI.DOM.link( + "Blacklist", + () => { + V.corp.SpecRaces = corpBlacklistRace(race, 1); + V.corp.SpecToken -= 1; + V.corp.SpecTimer = 1; + App.UI.reload(); + }, + ) + ); + } else if ((V.corp.SpecRaces.length !== 4 || V.corp.SpecRaces.length !== 8)) { + r.push( + App.UI.DOM.link( + "Blacklist", + () => { + V.corp.SpecRaces = corpBlacklistRace(race, 1); + App.UI.reload(); + }, + ) + ); + } + } + } + } else { + r.push(App.UI.DOM.makeElement("span", capFirstChar(capRace), "strikethrough")); + if (V.corp.SpecTimer === 0) { + r.push( + App.UI.DOM.link( + "Whitelist", + () => { + V.corp.SpecRaces = corpBlacklistRace(race, 0); + if (V.corp.SpecRaces.length === 3 || V.corp.SpecRaces.length === 7 || V.corp.SpecRaces.length === 11) { + V.corp.SpecToken += 1; + V.corp.SpecTimer = 1; + } + App.UI.reload(); + }, + ) + ); + } + } + App.Events.addNode(el, r, "div"); + } + return el; +}; diff --git a/src/Corporation/manageCorporation.tw b/src/Corporation/manageCorporation.tw index 520da9d04267177bc8e6998f55992c31819bc899..4b285e19ec3b4cc0ed9d96457c4690f132ce4a69 100644 --- a/src/Corporation/manageCorporation.tw +++ b/src/Corporation/manageCorporation.tw @@ -490,285 +490,7 @@ You own <<print num($personalShares)>> shares while another <<print num($publicS <<set $corp.SpecRaces = []>> <</if>> <<if $corp.SpecRaces.length > 0>> - <div> - The corporation enslaves people of the following race(s); - </div> - <div> - <<if $corp.SpecRaces.includes("amerindian")>> - Amerindian - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "amerindian")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - <br>==Amerindian== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("amerindian",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("asian")>> - Asian - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "asian")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Asian== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("asian",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("black")>> - Black - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "black")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Black== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("black",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("indo-aryan")>> - Indo-Aryan - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "indo-aryan")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Indo-Aryan== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("indo-aryan",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("latina")>> - Latina - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "latina")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Latina== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("latina",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("malay")>> - Malay - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "malay")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Malay== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("malay",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("middle eastern")>> - Middle Eastern - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "middle eastern")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Middle Eastern== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("middle eastern",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("mixed race")>> - Mixed Race - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "mixed race")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Mixed Race== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("mixed race",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("pacific islander")>> - Pacific Islander - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "pacific islander")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Pacific Islander== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("pacific islander",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("semitic")>> - Semitic - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "semitic")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Semitic== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("semitic",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("southern european")>> - Southern European - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace != "southern european")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==Southern European== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("southern european",0)]] - <</if>> - <</if>> - <</if>> - </div> - <div> - <<if $corp.SpecRaces.includes("white")>> - White - <<if !($arcologies[0].FSSubjugationist != "unset" && $arcologies[0].FSSubjugationistRace == "white")>> - <<if $corp.SpecRaces.length > 1 && $corp.SpecTimer == 0>> - <<if ($corp.SpecRaces.length == 4 || $corp.SpecRaces.length == 8) && $corp.SpecToken > 0>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",1), $corp.SpecToken -= 1, $corp.SpecTimer = 1]] - <<elseif ($corp.SpecRaces.length != 4 || $corp.SpecRaces.length != 8)>> - [[Blacklist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",1)]] - <</if>> - <</if>> - <</if>> - <<else>> - ==White== - <<if $corp.SpecTimer == 0>> - <<if $corp.SpecRaces.length == 3 || $corp.SpecRaces.length == 7 || $corp.SpecRaces.length == 11>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",0), $corp.SpecToken += 1, $corp.SpecTimer = 1]] - <<else>> - [[Whitelist|Manage Corporation][$corp.SpecRaces = corpBlacklistRace("white",0)]] - <</if>> - <</if>> - <</if>> - </div> + <<includeDOM App.Corporate.corpRaces()>> <</if>> <div> <<if $corp.SpecNationality>> diff --git a/src/Mods/SecExp/js/Unit.js b/src/Mods/SecExp/js/Unit.js index d98249b95d1dd4a71e78061a3187e36597104f47..2c472db10e8596803435a1efd5a9714a3b463245 100644 --- a/src/Mods/SecExp/js/Unit.js +++ b/src/Mods/SecExp/js/Unit.js @@ -30,8 +30,13 @@ App.SecExp.unit = (function() { function upgradeUnit(x) { Object.assign(x, { maxTroops: 50, equip: 3, commissars: 2, - cyber: 1, medics: 1, SF: 1 + cyber: 1, medics: 1 }); + if (V.SF.Active >= 1) { + x.SF = 1; + } else { + x.SF = 0; + } } function getCost(x) { @@ -159,6 +164,9 @@ App.SecExp.unit = (function() { squad.commissars = squad.commissars || 0; squad.maxTroops = squad.maxTroops || 30; squad.troops = Math.clamp(squad.troops, 0, squad.maxTroops); + if (V.SF.Active < 1) { + squad.SF = 0; + } if (squad.platoonName.contains('undefined')) { if (unit === 'slaves') { squad.platoonName = squad.platoonName.replace('undefined', 'slave platoon'); diff --git a/src/Mods/SpecialForce/SpecialForce.js b/src/Mods/SpecialForce/SpecialForce.js index 3f9f03d9c73076c4fb414dfdcaac478e5e9d8b97..b17a2401da445627aa6fb00ceffbc1b6603fb7f9 100644 --- a/src/Mods/SpecialForce/SpecialForce.js +++ b/src/Mods/SpecialForce/SpecialForce.js @@ -2199,7 +2199,7 @@ App.SF.UnitText = function(input) { engines01 = ``; engines0 = `The tiltrotors have been replaced with tiltjets, allowing for much greater airspeed and acceleration.`; } - return `${text9} A ${Num} of transport ${type} VTOL have been recommissioned for use by ${V.SF.Lower}. The VTOLs are resting on large pads near the base to load either a ${capacity} tons of material. ${engines0} ${engines01} ${Armor} ${landing} ${counter} ${Radar} ${miniguns}`; + return `${text9} A ${Num} of transport ${type} VTOL have been recommissioned for use by ${V.SF.Lower}. The VTOLs are resting on large pads near the base, ready to load either a ${capacity} tons of material. ${engines0} ${engines01} ${Armor} ${landing} ${counter} ${Radar} ${miniguns}`; } break; case 'SP': diff --git a/src/art/vector_revamp/vectorRevampedArtControl.js b/src/art/vector_revamp/vectorRevampedArtControl.js index d7de12d323670d9959d41ed0c4001638441ca877..58cc49a150f873f0c8768794b3a545e074e17b8f 100644 --- a/src/art/vector_revamp/vectorRevampedArtControl.js +++ b/src/art/vector_revamp/vectorRevampedArtControl.js @@ -42,11 +42,10 @@ App.Art.revampedVectorArtElement = function(slave, displayClass) { style.innerHTML = styleCSS; res.appendChild(style); } - const randomID = Math.floor(Math.random() * 9007199254740991); - const revampedVectorArtControl = new RevampedArtControl(displayClass, slave, V.seeVectorArtHighlights, V.showBodyMods, randomID); + const revampedVectorArtControl = new RevampedArtControl(displayClass, slave, V.seeVectorArtHighlights, V.showBodyMods); const layers = revampedVectorArtControl.Layers; // side effects are important, must fetch layers before getting transformRules (FIXME?) const svgQueue = new App.Art.SvgQueue(revampedVectorArtControl.transformRules, App.Data.Art.VectorRevamp, displayClass); - layers.forEach((l) => svgQueue.addRevamped(l,randomID)); + layers.forEach((l) => svgQueue.add(l)); res.appendChild(svgQueue.output()); return res; @@ -2403,10 +2402,9 @@ class ClothingControl { } class RevampedArtControl { - constructor(artDisplayClass, artSlave, globalShowHighlights, globalShowBodyMods, randomID) { + constructor(artDisplayClass, artSlave, globalShowHighlights, globalShowBodyMods) { this.artDisplayClass = artDisplayClass; this.artSlave = artSlave; - this.randomID = randomID; this.boobRightArtTransform = ""; this.boobLeftArtTransform = ""; this.boobOutfitArtTransform = ""; @@ -3698,11 +3696,11 @@ class RevampedArtControl { } else if (this.artSlave.boobs <= 1000) { // Medium 800 coorA = [[232.141, 722.456], [232.141, 722.456], [254.074, 686.660], [254.074, 686.660], [0, 0], [0, 0]]; - if (strap == 0) { coorA[0] = [238.961, 733.245]; } - if (strap == 2) { coorA[0] = [228.272, 716.336]; } + if (strap === 0) { coorA[0] = [238.961, 733.245]; } + if (strap === 2) { coorA[0] = [228.272, 716.336]; } coorB = [[355.529, 842.501], [355.529, 842.501], [334.522, 761.607], [334.522, 761.607], [0, 0], [0, 0]]; - if (strap == 0) { coorB[2] = [330.234, 767.086]; } - if (strap == 2) { coorB[2] = [336.955, 758.499]; } + if (strap === 0) { coorB[2] = [330.234, 767.086]; } + if (strap === 2) { coorB[2] = [336.955, 758.499]; } } else if (this.artSlave.boobs <= 2500) { // Medium 1500 } else if (this.artSlave.boobs < 15000) { @@ -4185,10 +4183,10 @@ class RevampedArtControl { get transformRules() { let cpBelly = ``; - if (this.bellyLevel == 0) { - cpBelly = `url(#clipPathTorso${this.torsoSize}_rndID_${this.randomID})`; + if (this.bellyLevel === 0) { + cpBelly = `url(#clipPathTorso${this.torsoSize})`; } else { - cpBelly = `url(#clipPathBelly_${this.bellyLevel}_${this.torsoSize}_rndID_${this.randomID})`; + cpBelly = `url(#clipPathBelly_${this.bellyLevel}_${this.torsoSize})`; } return [ {trigger: "boob_left", action: "transform", value: this.boobLeftArtTransform}, @@ -4197,9 +4195,9 @@ class RevampedArtControl { {trigger: "bra_trans_a", action: "transform", value: this.braA_ArtTransform}, {trigger: "bra_trans_b", action: "transform", value: this.braB_ArtTransform}, {trigger: "pussy_tattoo_text", action: "text-content", value: this.pubicTattooText}, - {trigger: "torso", action: "clip-path", value: `url(#clipPathTorso${this.torsoSize}_rndID_${this.randomID})`}, + {trigger: "torso", action: "clip-path", value: `url(#clipPathTorso${this.torsoSize})`}, {trigger: "torso_outfit_belly", action: "clip-path", value: cpBelly}, - {trigger: "leg_size", action: "clip-path", value: `url(#clipPathLeg_${this.legSize}_rndID_${this.randomID})`} + {trigger: "leg_size", action: "clip-path", value: `url(#clipPathLeg_${this.legSize})`} ]; } } diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index 1cdba489fbce084ca2980e514f5525f9e7424090..b8e42ecfc65d4ae5f120bba50c34373df6c20bf3 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -1777,7 +1777,7 @@ App.Update.oldVersions = function(node) { if (jQuery.isEmptyObject(V.prosthetics)) { if (jQuery.isEmptyObject(V.stockpile)) { V.prosthetics = {}; - setup.prostheticIDs.forEach(function(id) { + App.Data.prostheticIDs.forEach(function(id) { V.prosthetics[id] = {amount: 0, research: 0}; }); } else { @@ -2121,6 +2121,7 @@ App.Update.oldVersions = function(node) { } newPC.counter.slavesFathered = V.PC.slavesFathered; newPC.counter.slavesKnockedUp = V.PC.slavesKnockedUp; + newPC.counter.storedCum = V.PC.storedCum; newPC.sexualEnergy = V.PC.sexualEnergy; newPC.staminaPills = V.PC.staminaPills; newPC.preg = V.PC.preg; @@ -2295,6 +2296,9 @@ App.Update.oldVersions = function(node) { V.limitFamilies = 1; V.relationLinks = {}; // init temp structure for mapping relationships from legacy to extended family mode } + if (V.releaseID <= 1116 && V.pregnancyMonitoringUpgrade === 3) { + V.pregnancyMonitoringUpgrade = 1; + } node.append(`Done!`); }; diff --git a/src/data/backwardsCompatibility/datatypeCleanup.js b/src/data/backwardsCompatibility/datatypeCleanup.js index 47ceb643ef272744699d05cd2e83541c18ad8b92..6408d96f4d4140f167b0ce940a8ec83e69b9a6d9 100644 --- a/src/data/backwardsCompatibility/datatypeCleanup.js +++ b/src/data/backwardsCompatibility/datatypeCleanup.js @@ -752,8 +752,16 @@ globalThis.SlaveDatatypeCleanup = (function SlaveDatatypeCleanup() { slave.boobsImplant = Math.max(+slave.boobsImplant, 0) || 0; if (slave.boobsImplant === 0) { slave.boobsImplantType = "none"; - } else if (slave.boobsImplant > 0) { - slave.boobsImplantType = "normal"; + } else if (slave.boobsImplant > 0 && slave.boobsImplantType === "none") { + if (slave.boobsImplant > 10000) { + slave.boobsImplantType = "hyper fillable"; + } else if (slave.boobsImplant > 2200) { + slave.boobsImplantType = "advanced fillable"; + } else if (slave.boobsImplant > 1000) { + slave.boobsImplantType = "fillable"; + } else { + slave.boobsImplantType = "normal"; + } } slave.breastMesh = Math.clamp(+slave.breastMesh, 0, 1) || 0; slave.buttImplant = Math.clamp(+slave.buttImplant, 0, 20) || 0; @@ -1257,6 +1265,7 @@ globalThis.PCDatatypeCleanup = function() { PC.counter.birthFutaSis = Math.max(+PC.counter.birthFutaSis, 0) || 0; PC.counter.slavesFathered = Math.max(+PC.counter.slavesFathered, 0) || 0; PC.counter.slavesKnockedUp = Math.max(+PC.counter.slavesKnockedUp, 0) || 0; + PC.counter.storedCum = Math.max(+PC.counter.storedCum, 0) || 0; PC.intelligence = 100; PC.face = 100; PC.actualAge = Math.clamp(+PC.actualAge, 14, 80) || 35; @@ -1270,7 +1279,6 @@ globalThis.PCDatatypeCleanup = function() { PC.fertDrugs = Math.clamp(+PC.fertDrugs, 0, 1) || 0; PC.forcedFertDrugs = Math.max(+PC.forcedFertDrugs, 0) || 0; PC.staminaPills = Math.clamp(+PC.staminaPills, 0, 1) || 0; - PC.storedCum = Math.max(+PC.storedCum, 0) || 0; PC.mpreg = 0; /* So knockMeUp() may be used with the PC */ PC.lactation = Math.max(+PC.lactation, 0) || 0; PC.lactationDuration = Math.max(+PC.lactationDuration, 0) || 0; @@ -1319,6 +1327,7 @@ globalThis.PCDatatypeCleanup = function() { delete PC.indentureRestrictions; } if (PC.boobsImplant > 0) { + // update with 4.0.0 PC.boobsImplantType = "normal"; } else { PC.boobsImplantType = "none"; diff --git a/src/endWeek/labReport.js b/src/endWeek/labReport.js index f32bf642cc28a4131be1ab6f82623e80de1a9084..dfbeed085d39e2a8504febc7d51d1c47e3271dee 100644 --- a/src/endWeek/labReport.js +++ b/src/endWeek/labReport.js @@ -18,24 +18,24 @@ App.EndWeek.labReport = function() { } else if (work < task.workLeft) { task.workLeft -= work; work = 0; - r.push(`The lab continues ${task.type === "research" ? "research" : "work"} on <span class="yellow">${addA(setup.prosthetics[task.id].name)}.</span> It will take approximately ${numberWithPluralNonZero(Math.floor(task.workLeft / V.researchLab.speed) + 1, "week")} to complete.`); + r.push(`The lab continues ${task.type === "research" ? "research" : "work"} on <span class="yellow">${addA(App.Data.prosthetics[task.id].name)}.</span> It will take approximately ${numberWithPluralNonZero(Math.floor(task.workLeft / V.researchLab.speed) + 1, "week")} to complete.`); } else { work -= task.workLeft; r.push(`Your lab staff have <span class="green">completed</span> their`); switch (task.type) { case "research": V.prosthetics[task.id].research = 1; - r.push(`${setup.prosthetics[task.id].name} research project.`); + r.push(`${App.Data.prosthetics[task.id].name} research project.`); break; case "craft": V.prosthetics[task.id].amount += 1; - r.push(`${setup.prosthetics[task.id].name} construction project.`); + r.push(`${App.Data.prosthetics[task.id].name} construction project.`); break; case "craftFit": task.workLeft = 0; V.adjustProsthetics.push(task); V.adjustProstheticsCompleted++; - r.push(`project to construct ${addA(setup.prosthetics[task.id].name)} for ${SlaveFullName(getSlave(task.slaveID))}.`); + r.push(`project to construct ${addA(App.Data.prosthetics[task.id].name)} for ${SlaveFullName(getSlave(task.slaveID))}.`); break; } V.researchLab.tasks.shift(); diff --git a/src/endWeek/reports/cellblockReport.js b/src/endWeek/reports/cellblockReport.js index b5148073f9d34ae950f32210667defea8748b5f2..8e05369dcb767fa36245f2372c09cc31097fb17c 100644 --- a/src/endWeek/reports/cellblockReport.js +++ b/src/endWeek/reports/cellblockReport.js @@ -306,16 +306,21 @@ App.EndWeek.cellblockReport = function() { confinedResults = App.SlaveAssignment.stayConfined(slave); App.Events.addNode(slaveEntry, [He, confinedResults.text], "div", "indent"); + if (confinedResults.broken) { + brokenSlaves++; + continue; // slave has been reassigned; remaining report will run at her new assignment + } slaveEntry.append(App.SlaveAssignment.standardSlaveReport(slave, false)); } else { // discard return values silently App.SlaveAssignment.choosesOwnJob(slave); confinedResults = App.SlaveAssignment.stayConfined(slave); + if (confinedResults.broken) { + brokenSlaves++; + continue; // slave has been reassigned; remaining report will run at her new assignment + } App.SlaveAssignment.standardSlaveReport(slave, true); } - if (confinedResults.broken) { - brokenSlaves++; - } } if (softenedQuirks || brokenSlaves) { r = []; diff --git a/src/endWeek/reports/masterSuiteReport.js b/src/endWeek/reports/masterSuiteReport.js index f1ef6f8130ea8d5fccbf18e80b2669b383f89899..af4e6a5407e7c767e172b1ccfc0bcb6b0eb4ab8b 100644 --- a/src/endWeek/reports/masterSuiteReport.js +++ b/src/endWeek/reports/masterSuiteReport.js @@ -366,7 +366,9 @@ App.EndWeek.masterSuiteReport = function() { if (slaves.length > 0) { const intro = App.UI.DOM.appendNewElement("p", frag, '', "indent"); let r = []; - if (slaves.length > 1) { + if (S.Concubine) { + r.push(`<strong>${SlaveFullName(S.Concubine)} and ${numberWithPluralOne(slaves.length, "other slave")} are`); + } else if (slaves.length > 1) { r.push(`<strong>There are ${slaves.length} slaves`); } else { r.push(`<strong>There is one slave`); diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index ed577c319816af8cb8fe9b8e4c468a3c4c5b5103..f3b59e330962360e84a64d8432855ff24b445698 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -695,7 +695,7 @@ App.SlaveAssignment.choosesOwnClothes = (function() { /* Chooses clothes according to fetishes, quirks, etc.*/ if (slave.attrXY > 70) { if (slave.attrKnown === 1) { - wardrobeTastes.push({text: `and wears a schoolgirl outfit to show off a some T&A to attract boys.`, clothes: "a schoolgirl outfit"}); + wardrobeTastes.push({text: `and wears a schoolgirl outfit to show off some T&A to attract boys.`, clothes: "a schoolgirl outfit"}); wardrobeTastes.push({text: `and wears nothing but pretty lingerie to attract boys.`, clothes: "attractive lingerie"}); wardrobeTastes.push({text: `and selects a slutty outfit that's sure to have men drooling.`, clothes: "a slutty outfit"}); if (slave.butt > 3) { diff --git a/src/endWeek/saLongTermPhysicalEffects.js b/src/endWeek/saLongTermPhysicalEffects.js index f4a8327855d952dd7fe6acaf883701ca17d0eb3f..3bee3b9ac99ec17600f7d227ffb604549ef545ee 100644 --- a/src/endWeek/saLongTermPhysicalEffects.js +++ b/src/endWeek/saLongTermPhysicalEffects.js @@ -550,8 +550,14 @@ App.SlaveAssignment.longTermPhysicalEffects = (function() { if (slave.need) { if (slave.need > slave.energy / 2) { const decay = 1 + Math.trunc(slave.need / 20); + if (App.Utils.releaseRestricted(slave)) { + r.push(`${He} is not allowed to get`); + } else { + r.push(`${He} is incapable of getting`); + } + r.push(`off as frequently as ${his}`); if (slave.aphrodisiacs > 0 || slave.inflationType === "aphrodisiac") { - r.push(`${He} is not allowed to get off as frequently as ${his} aphrodisiac fueled sex drive demands, and the constant frustration`); + r.push(`aphrodisiac fueled sex drive demands, and the constant frustration`); if (slave.fuckdoll !== 0 || slave.fetish === "mindbroken") { r.push(`<span class="health dec">stresses ${his} body considerably.</span>`); healthDamage(slave, decay); @@ -561,7 +567,7 @@ App.SlaveAssignment.longTermPhysicalEffects = (function() { slave.trust -= decay; } } else if (slave.need > slave.energy && slave.energy >= 70) { - r.push(`${He} is not allowed to get off as frequently as ${his} powerful sex drive demands, and the constant frustration`); + r.push(`powerful sex drive demands, and the constant frustration`); if (slave.fuckdoll !== 0 || slave.fetish === "mindbroken") { r.push(`<span class="health dec">stresses ${his} body considerably.</span>`); healthDamage(slave, decay); @@ -573,7 +579,7 @@ App.SlaveAssignment.longTermPhysicalEffects = (function() { r.push(`Unable to achieve the release ${he} needs, ${his} <span class="libido dec">runaway libido is damaged.</span>`); slave.energy -= decay; } else { - r.push(`${He} is not allowed to get off as frequently as ${his} healthy sex drive demands, and the constant frustration <span class="libido dec">wears away at ${his} libido.</span>`); + r.push(`healthy sex drive demands, and the constant frustration <span class="libido dec">wears away at ${his} libido.</span>`); slave.energy -= decay; } } diff --git a/src/endWeek/saRecruitGirls.js b/src/endWeek/saRecruitGirls.js index 5dd158c0dcb84eaeb06bd3ae542d2b3c16a50403..4aa5a059cf6479e31f45d41dd2d46e7c2ed5b658 100644 --- a/src/endWeek/saRecruitGirls.js +++ b/src/endWeek/saRecruitGirls.js @@ -14,7 +14,7 @@ App.SlaveAssignment.recruitGirls = (function() { return recruitGirls; /** - * @param {App.Entity.SlaveState} slave + * @param {FC.ReportSlave} slave * @returns {string} */ function recruitGirls(slave) { @@ -119,8 +119,7 @@ App.SlaveAssignment.recruitGirls = (function() { } /** - * @param {App.Entity.SlaveState} slave - * + * @param {FC.ReportSlave} slave */ function physicalAdjustments(slave) { if (slave.lactation && arcology.FSPastoralist !== "unset") { diff --git a/src/endWeek/saRules.js b/src/endWeek/saRules.js index a18f98a2a3fb1de60846422cee39361858290d02..52788f784983cd2b3966ad1f622fcb3c0f36fa0a 100644 --- a/src/endWeek/saRules.js +++ b/src/endWeek/saRules.js @@ -225,7 +225,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`${He}'s permitted to rest whenever ${he} feels even the slightest bit tired; <span class="mediumaquamarine">a privilege not lost on ${him}.</span>`); slave.trust += 2; } else { - r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let him rest when he gets tired.`); + r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let ${him} rest when ${he} gets tired.`); slave.devotion += 1; slave.trust += 1; } @@ -418,7 +418,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`${He}'s permitted to rest whenever ${he} feels even the slightest bit tired; <span class="mediumaquamarine">a privilege not lost on ${him}.</span>`); slave.trust += 2; } else { - r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let him rest when he gets tired.`); + r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let ${him} rest when ${he} gets tired.`); slave.devotion += 1; slave.trust += 1; } @@ -759,7 +759,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`Under the rules, ${he} is free game for other slaves to molest, and lives ${his} life constantly <span class="gold">afraid</span> of the day ${he} is released from ${V.clinicName}.`); slave.trust -= 2; } else { - r.push(`Under the rules, ${he} will find ${himself} constantly molested by other slaves once ${he} leaves ${V.clinicName}, but ${he}'s already in such constant terror it that it doesn't cross ${his} mind.`); + r.push(`Under the rules, ${he} will find ${himself} constantly molested by other slaves once ${he} leaves ${V.clinicName}, but ${he}'s already in such constant terror that it doesn't cross ${his} mind.`); } } else if ((release.slaves === 1)) { if (slave.energy > 95) { @@ -1510,7 +1510,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`is so unhappy that ${he} has little interest in getting off, making the rule restricting ${his} sexual outlets superfluous.`); slave.need = 0; } else if (slave.energy <= 20) { - r.push(`is frigid and has little interest in getting off, making the rule restricting ${his} sexual outlets superfluous.`); + r.push(`is frigid and has little interest in getting off${(App.Utils.releaseRestricted(slave)) ? `, making the rule restricting ${his} sexual outlets superfluous` : ``}.`); slave.need = 0; } else if (slave.need < slave.needCap * 0.5) { if (slave.devotion <= 20) { @@ -1770,7 +1770,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`${He}'s permitted to rest whenever ${he} feels even the slightest bit tired; <span class="mediumaquamarine">a privilege not lost on ${him}.</span>`); slave.trust += 2; } else { - r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let him rest when he gets tired.`); + r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let ${him} rest when ${he} gets tired.`); slave.devotion += 1; slave.trust += 1; } @@ -2080,7 +2080,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`${He}'s permitted to rest whenever ${he} feels even the slightest bit tired; <span class="mediumaquamarine">a privilege not lost on ${him}.</span>`); slave.trust += 2; } else { - r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let him rest when he gets tired.`); + r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let ${him} rest when ${he} gets tired.`); slave.devotion += 1; slave.trust += 1; } @@ -2702,7 +2702,7 @@ App.SlaveAssignment.rules = function(slave) { r.push(`${He}'s permitted to rest whenever ${he} feels even the slightest bit tired; <span class="mediumaquamarine">a privilege not lost on ${him}.</span>`); slave.trust += 2; } else { - r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let him rest when he gets tired.`); + r.push(`${He} <span class="hotpink">likes</span> that you <span class="mediumaquamarine">care enough</span> to let ${him} rest when ${he} gets tired.`); slave.devotion += 1; slave.trust += 1; } diff --git a/src/endWeek/saRulesFunctions.js b/src/endWeek/saRulesFunctions.js index 9669e3a08174895ef75d9a4b45ff6bb765ccd8f9..8b442b12dbf89a7464964161d5bd3959737a7134 100644 --- a/src/endWeek/saRulesFunctions.js +++ b/src/endWeek/saRulesFunctions.js @@ -1636,7 +1636,7 @@ App.EndWeek.Rules.consentRules = function(slave) { if (jt.peers.length > 2 || jt.manager) { r.push(`Under the rules${jobMolestation}, ${he} finds ${himself} constantly molested by other slaves, but ${he}'s already in such constant terror it doesn't seriously affect ${him}.`); } else { - r.push(`Under the rules${jobMolestation}, ${he} will someday find ${himself} constantly molested by other slaves, but ${he}'s already in such constant terror it that it doesn't cross ${his} mind.`); + r.push(`Under the rules${jobMolestation}, ${he} will someday find ${himself} constantly molested by other slaves, but ${he}'s already in such constant terror that it doesn't cross ${his} mind.`); } } } else if (slave.rules.release.slaves === 1 || slave.rules.release.family === 1) { diff --git a/src/events/PE/concubineInterview.js b/src/events/PE/concubineInterview.js index 85cfcb42e6f45ae36de2eb82cebac75db225804a..e356177791939d4e7580a3344b5b75ed1ab49b5e 100644 --- a/src/events/PE/concubineInterview.js +++ b/src/events/PE/concubineInterview.js @@ -26,10 +26,6 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. const belly = bellyAdjective(eventSlave); const fluid = eventSlave.inflationType; const arcology = V.arcologies[0]; - const oldRep = V.rep; - - const rep = val => repX(val, "concubine", eventSlave); - const speak = string => Spoken(eventSlave, string); V.nextLink = "RIE Eligibility Check"; @@ -47,11 +43,16 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. ]); function accept() { + const frag = document.createDocumentFragment(); + let repSum = 0; // just tally here...we'll run the whole sum through repX in one go to avoid rep-scaling problems + const rep = val => repSum += val; + const speak = string => Spoken(eventSlave, string); + t = []; t.push(`The show is broadcast live; you head out onto a balcony to watch it on a big screen. It's been impossible to hide, and many of your citizens have taken a proprietary attitude towards your fame: they see your success as their success, too, and want to see ${eventSlave.slaveName} do well. The show introduction plays, introducing the host, a swishy, rail-thin gentleman with impeccable sartorial style and a close-cropped salt-and-pepper beard. He reviews who you are, giving equal time to your accomplishments and the inevitable criticisms from old world antislavery activists, and then calls ${eventSlave.slaveName} out.`); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -121,7 +122,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. } t.push(`They seat themselves in comfortable leather chairs and the interview begins in earnest.`); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -138,13 +139,13 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. t.push(`${He} recovers quickly and responds that ${he} loves you.`); } - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; t.push(`The host glances at the camera. "Wow." He presses on. "But you're ${hisP} slave, ${eventSlave.slaveName}. ${HeP} owns you. Isn't that hard for you?"`); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -326,7 +327,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. } } - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -414,7 +415,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. t.push(`in a matter-of-fact tone of voice.`); } - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); if (eventSlave.intelligence + eventSlave.intelligenceImplant > 50) { t = []; @@ -527,7 +528,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. rep(1500); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); if (PC.title === 0) { t = []; @@ -541,25 +542,26 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. rep(500); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); } } t = []; t.push(`At the conclusion, the host`); - if (V.rep - oldRep > 200) { + if (repSum > 200) { t.push(`seems <span class="green">impressed</span> and says sincerely,`); - } else if (V.rep - oldRep < 0) { + } else if (repSum < 0) { t.push(`seems <span class="red">unimpressed</span> and says mockingly,`); } else { t.push(`says jokingly,`); } t.push(`"My dear it's been a pleasure. If all Free Cities ${girl}s are like you I might have to look into immigrating. Ladies and gentlemen, good night!"`); + repX(repSum, "concubine", eventSlave); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); - return t; + return frag; } function decline() { diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js index f64ff943196bd1123ce01d88c7993d3425b7c0ab..2598ed7939d85d05d21523e07b77bbca8ad17da0 100644 --- a/src/facilities/bodyModification/bodyModification.js +++ b/src/facilities/bodyModification/bodyModification.js @@ -518,7 +518,7 @@ App.UI.bodyModification = function(slave, cheat = false) { function applyTat(location) { tattooChoice = (location === "lips" && tattooChoice === "scenes") ? "permanent makeup" : tattooChoice; - modReaction += App.Medicine.Modification.setTattoo(slave, tattooLocations.get(location), tattooChoice); + modReaction += App.Medicine.Modification.setTattoo(slave, tattooLocations.get(location), tattooChoice, cheat); if (!["flowers", "paternalist", "tribal patterns", 0].includes(tattooChoice)) { degradation += 1; } @@ -537,7 +537,7 @@ App.UI.bodyModification = function(slave, cheat = false) { "Remove tattoos", () => { tattooChoice = 0; - modReaction += App.Medicine.Modification.setTattoo(slave, "belly", tattooChoice); + modReaction += App.Medicine.Modification.setTattoo(slave, "belly", tattooChoice, cheat); refresh(); } ) @@ -558,7 +558,7 @@ App.UI.bodyModification = function(slave, cheat = false) { title, () => { tattooChoice = value; - modReaction += App.Medicine.Modification.setTattoo(slave, "belly", tattooChoice); + modReaction += App.Medicine.Modification.setTattoo(slave, "belly", tattooChoice, cheat); refresh(); } ) @@ -588,18 +588,16 @@ App.UI.bodyModification = function(slave, cheat = false) { } else { r.push(`${He} has a single baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one temporary one,` : ``} adorning ${his} stomach.`); } - if (slave.bellyTat !== 0) { - linkArray.push( - App.UI.DOM.link( - "Remove tattoos", - () => { - slave.birthsTat = -1; - billMod(); - refresh(); - } - ) - ); - } + linkArray.push( + App.UI.DOM.link( + "Remove tattoos", + () => { + slave.birthsTat = -1; + billMod(); + refresh(); + } + ) + ); } else if (slave.birthsTat === 0) { if (slave.pregKnown === 1) { r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); @@ -716,7 +714,7 @@ App.UI.bodyModification = function(slave, cheat = false) { App.UI.DOM.makeTextBox( slave[`${varName}Tat`], (v) => { - modReaction += App.Medicine.Modification.setTattoo(slave, varName, v); + modReaction += App.Medicine.Modification.setTattoo(slave, varName, v, cheat); refresh(); } ) diff --git a/src/facilities/penthouse/penthousePassage.js b/src/facilities/penthouse/penthousePassage.js index ca5a5666e87c9c11d1c7d0225b3f0416a88bb870..93661633bf7c7c6fb584a0619224e5bb52640d0d 100644 --- a/src/facilities/penthouse/penthousePassage.js +++ b/src/facilities/penthouse/penthousePassage.js @@ -307,7 +307,7 @@ App.UI.managePenthouse = function() { if (V.researchLab.level > 0) { r.push(`Your penthouse is equipped with an advanced prosthetic lab.`); } else { - r.push(makeLink("Clear out one of the floors and install equipment to construct prosthetics yourself|Manage Penthouse", () => { + r.push(makeLink("Clear out one of the floors and install equipment to construct prosthetics yourself", () => { V.researchLab.level = 1; V.researchLab.maxSpace = 5; }, 150000)); @@ -320,7 +320,7 @@ App.UI.managePenthouse = function() { if (V.seePreg === 1) { if (V.pregnancyMonitoringUpgrade === 0) { if (V.rep > 10000) { - r.push(makeLink("Upgrade the pregnancy monitoring systems", () => { V.pregnancyMonitoringUpgrade = 3; }, 30000)); + r.push(makeLink("Upgrade the pregnancy monitoring systems", () => { V.pregnancyMonitoringUpgrade = 1; }, 30000)); } else { r.push(App.UI.DOM.makeElement("span", "You lack the reputation to purchase improved pregnancy monitoring systems.", "note")); } diff --git a/src/facilities/salon/salonPassage.js b/src/facilities/salon/salonPassage.js index c90dfe69178d12bd83bc68f6370ec60366b08b0d..7981b8ebb573f3f845334f757ad80df094729897 100644 --- a/src/facilities/salon/salonPassage.js +++ b/src/facilities/salon/salonPassage.js @@ -374,28 +374,24 @@ App.UI.salon = function(slave, cheat = false) { option.pulldown(); if (slave.markings === "beauty mark") { - r = []; - r.push(`${He} has a prominent mole on ${his} face, which`); + option = options.addOption(`${He} has a prominent mole on ${his} face`, "markings", slave) + .addValue("Remove it", "none", billMod); if (slave.face > 40) { - r.push(`qualifies as a beauty mark and enhances ${his} attractiveness due to ${his} facial beauty.`); + option.addComment(`The mole qualifies as a beauty mark and enhances ${his} attractiveness due to ${his} facial beauty.`); } else if (slave.face < -10) { - r.push(`makes ${him} even less attractive.`); + option.addComment(`The mole makes ${him} even less attractive.`); } else { - r.push(`qualifies as a beauty mark since ${he}'s pretty, having no significant impact on ${his} beauty.`); + option.addComment(`The mole qualifies as a beauty mark since ${he}'s pretty, having no significant impact on ${his} beauty.`); } - options.addOption(r.join(" "), "markings", slave) - .addValue("Remove it", "none", billMod); } if (slave.markings === "birthmark") { - r = []; - r.push(`${He} has a large birthmark, which`); + option = options.addOption(`${He} has a large birthmark`, "markings", slave) + .addValue("Bleach it", "none", billMod); if (slave.prestige > 0 || slave.porn.prestige > 1) { - r.push(`enhances ${his} attractiveness due to ${his} prestige.`); + option.addComment(`The birthmark enhances ${his} attractiveness due to ${his} prestige.`); } else { - r.push(`detracts from ${his} attractiveness.`); + option.addComment(`The birthmark detracts from ${his} attractiveness.`); } - options.addOption(r.join(" "), "markings", slave) - .addValue("Bleach it", "none", billMod); } el.append(options.render()); diff --git a/src/facilities/surgery/remoteSurgery.tw b/src/facilities/surgery/remoteSurgery.tw index f4627e8e7a2c70b0f11367e2faafb6c8b6367dc3..f42f7006b456e47196a99a437d8c2e80802757d0 100644 --- a/src/facilities/surgery/remoteSurgery.tw +++ b/src/facilities/surgery/remoteSurgery.tw @@ -897,7 +897,7 @@ <<link "Amputate limb(s)">> <<set _atleastOne = 0>> /* temporary story variable */ - <<set $oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS))>> + <<set $oldLimbs = App.Medicine.Limbs.currentLimbs(getSlave($AS))>> <<if _LA === 1>> <<run removeLimbs(getSlave($AS), "left arm")>> <<set _atleastOne++>> @@ -931,13 +931,13 @@ <div> <<if !hasAllNaturalLimbs(getSlave($AS)) && getSlave($AS).PLimb == 0>> <<if isProstheticAvailable(getSlave($AS), "interfaceP1")>> - [[Install basic prosthetic interface|Surgery Degradation][$oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "PLimb interface"]] + [[Install basic prosthetic interface|Surgery Degradation][$oldLimbs = App.Medicine.Limbs.currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "PLimb interface"]] <</if>> <<if isProstheticAvailable(getSlave($AS), "interfaceP2")>> | - [[Install advanced prosthetic interface|Surgery Degradation][$oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "PLimb interface"]] + [[Install advanced prosthetic interface|Surgery Degradation][$oldLimbs = App.Medicine.Limbs.currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20), $surgeryType = "PLimb interface"]] <</if>> <<elseif getSlave($AS).PLimb == 1 && isProstheticAvailable(getSlave($AS), "interfaceP2")>> - [[Upgrade to advanced prosthetic interface|Surgery Degradation][$oldLimbs = App.Desc.limbChange().currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "PLimb interface"]] + [[Upgrade to advanced prosthetic interface|Surgery Degradation][$oldLimbs = App.Medicine.Limbs.currentLimbs(getSlave($AS)), getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "PLimb interface"]] <</if>> </div> diff --git a/src/facilities/surgery/surgeryPassageUpper.js b/src/facilities/surgery/surgeryPassageUpper.js index 815ed6de5cedac73392f783b795ccf44f1676c38..9119b4e5f95552a73bf6256b322de2beb71205d2 100644 --- a/src/facilities/surgery/surgeryPassageUpper.js +++ b/src/facilities/surgery/surgeryPassageUpper.js @@ -199,7 +199,7 @@ App.UI.surgeryPassageUpper = function(slave, cheat = false) { } )); } - if (slave.boobShape !== "saggy" && slave.boobShape !== "downward-facing" && slave.boobs >= 2000 && slave.boobsImplant === 0 && V.meshImplants === 1 && V.surgeryUpgrade === 1) { + if (slave.boobs >= 2000 && slave.boobsImplant === 0 && V.meshImplants === 1 && V.surgeryUpgrade === 1) { linkArray.push(makeLink( "Implant a supportive mesh to preserve their shape", "breastShapePreservation", diff --git a/src/gui/options/optionsGroup.js b/src/gui/options/optionsGroup.js index a6ffd81760751d90cabb3ebeff05929bc7c4e08f..aa504c97e5689f27beb2fd0f9ce34c130488011d 100644 --- a/src/gui/options/optionsGroup.js +++ b/src/gui/options/optionsGroup.js @@ -92,10 +92,11 @@ App.UI.OptionsGroup = (function() { * @param {Object} [params] * @param {string} [params.unit] * @param {boolean} [params.large=false] + * @param {boolean} [params.forceString=false] * @returns {Option} */ - showTextBox({unit, large = false} = {}) { - this.textbox = {unit: unit, large: large}; + showTextBox({unit, large = false, forceString = false} = {}) { + this.textbox = {unit: unit, large: large, forceString: forceString}; return this; } @@ -303,12 +304,12 @@ App.UI.OptionsGroup = (function() { } if (this.textbox) { - const isNumber = typeof currentValue === "number"; + const onlyNumber = !this.textbox.forceString && typeof currentValue === "number"; const textbox = App.UI.DOM.makeTextBox(currentValue, input => { this.object[this.property] = input; App.UI.reload(); - }, isNumber); - if (isNumber) { + }, onlyNumber); + if (onlyNumber) { textbox.classList.add("number"); } if (this.textbox.large) { @@ -387,7 +388,7 @@ App.UI.OptionsGroup = (function() { } } - return class { + return class OptionsGroup { constructor() { /** * @type {Array<Row>} @@ -397,7 +398,7 @@ App.UI.OptionsGroup = (function() { } /** - * @returns {App.UI.OptionsGroup} + * @returns {OptionsGroup} */ enableDoubleColumn() { this.doubleColumn = true; @@ -456,7 +457,7 @@ App.UI.OptionsGroup = (function() { } for (/** @type {Row} */ const row of this.rows) { - row.render(container, this.doubleColumn); + row.render(container); } return container; diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 2aad4145719a1fd06fff7c34499655d220ee14c2..c11306c4ec50e275ba67daff4711b3d1cbd5e0a8 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -41,7 +41,7 @@ You should have received a copy of the GNU General Public License along with thi <<run assistant.object()>> <<run repX(1000, "event")>> -<<run setup.prostheticIDs.forEach(function(id) { +<<run App.Data.prostheticIDs.forEach(function(id) { $prosthetics[id] = {amount: 0, research: 0}; })>> <<set $JobIDMap = makeJobIdMap()>> diff --git a/src/interaction/main/mainLinks.js b/src/interaction/main/mainLinks.js index dfab76fb1dda51647360d6904af8d7f5e6465cea..2c025b2bae3059510aba92ae98b74c37f660bc0b 100644 --- a/src/interaction/main/mainLinks.js +++ b/src/interaction/main/mainLinks.js @@ -189,7 +189,7 @@ App.UI.View.mainLinks = function() { if (V.adjustProsthetics[j].workLeft <= 0) { const div = document.createElement("div"); div.classList.add("yellow"); - div.append(`The lab has completed ${addA(setup.prosthetics[V.adjustProsthetics[j].id].name)} for `, + div.append(`The lab has completed ${addA(App.Data.prosthetics[V.adjustProsthetics[j].id].name)} for `, App.UI.DOM.makeElement("span", App.UI.DOM.link(SlaveFullName(slave), () => { V.AS = slave.ID; }, [], "Slave Interact"), "clear-formatting"), " which is ready to be attached."); fragment.append(div); diff --git a/src/interaction/prostheticConfig.js b/src/interaction/prostheticConfig.js new file mode 100644 index 0000000000000000000000000000000000000000..c7cdf6bbd3cb80d1700740e1b95d56eaf826044f --- /dev/null +++ b/src/interaction/prostheticConfig.js @@ -0,0 +1,478 @@ +/** + * @param {App.Entity.SlaveState} slave + */ +App.UI.prostheticsConfig = function(slave) { + /* get all prosthetics that are ready for this slave */ + if (V.adjustProstheticsCompleted > 0) { + V.adjustProsthetics = V.adjustProsthetics.filter(function(p) { + if (p.workLeft <= 0 && p.slaveID === slave.ID) { + addProsthetic(slave, p.id); + V.adjustProstheticsCompleted--; + return false; + } + return true; + }); + } + + const {He, his, him} = getPronouns(slave); + + const fragment = document.createDocumentFragment(); + + App.UI.DOM.appendNewElement("h1", fragment, "Prosthetic Configuration"); + const introP = App.UI.DOM.makeElement("p", "This room is lined with shelves and cabinets; it could be easily mistaken for a storage room if it were not for the examination table in its center.", "scene-intro"); + + if (hasBothLegs(slave)) { + App.UI.DOM.appendNewElement("div", introP, `${slave.slaveName} is obediently waiting for your instructions.`); + } else { + App.UI.DOM.appendNewElement("div", introP, `${slave.slaveName} is lying on the table, waiting for your instructions.`); + } + + fragment.append(introP); + + fragment.append(eyes()); + fragment.append(ears()); + fragment.append(voice()); + fragment.append(limbs()); + fragment.append(tail()); + + fragment.append(buyScreen()); + + return fragment; + + /** + * @returns {DocumentFragment} + */ + function eyes() { + const f = document.createDocumentFragment(); + + if (hasAnyCyberneticEyes(slave)) { + App.UI.DOM.appendNewElement("h2", f, "Eyes"); + const p = document.createElement("p"); + + p.append(`${He} has ${hasBothCyberneticEyes(slave) ? "ocular implants" : "an ocular implant"} installed. You can change ${hasBothCyberneticEyes(slave) ? "their" : "its"} settings:`); + + const eyeContainer = document.createElement("div"); + eyeContainer.classList.add("eyeContainer", "choices"); + + let _on = 0, _blur = 0, _off = 0; + if (getLeftEyeType(slave) === 3) { + App.UI.DOM.appendNewElement("div", eyeContainer, "Left:"); + let div = document.createElement("div"); + if (getLeftEyeVision(slave) !== 2) { + _on++; + div.append(App.UI.DOM.passageLink("[ON]", "Prosthetics Configuration", () => eyeSurgery(slave, "left", "fix"))); + } else { + div.append("[ON]"); + } + eyeContainer.append(div); + div = document.createElement("div"); + + if (getLeftEyeVision(slave) !== 1) { + _blur++; + div.append(App.UI.DOM.passageLink("[BLUR]", "Prosthetics Configuration", () => eyeSurgery(slave, "left", "blur"))); + } else { + div.append("[BLUR]"); + } + eyeContainer.append(div); + div = document.createElement("div"); + if (getLeftEyeVision(slave) !== 0) { + _off++; + div.append(App.UI.DOM.passageLink("[OFF]", "Prosthetics Configuration", () => eyeSurgery(slave, "left", "blind"))); + } else { + div.append("[OFF]"); + } + eyeContainer.append(div); + } + if (getRightEyeType(slave) === 3) { + App.UI.DOM.appendNewElement("div", eyeContainer, "Right:"); + let div = document.createElement("div"); + if (getRightEyeVision(slave) !== 2) { + _on++; + div.append(App.UI.DOM.passageLink("[ON]", "Prosthetics Configuration", () => eyeSurgery(slave, "right", "fix"))); + } else { + div.append("[ON]"); + } + eyeContainer.append(div); + div = document.createElement("div"); + + if (getRightEyeVision(slave) !== 1) { + _blur++; + div.append(App.UI.DOM.passageLink("[BLUR]", "Prosthetics Configuration", () => eyeSurgery(slave, "right", "blur"))); + } else { + div.append("[BLUR]"); + } + eyeContainer.append(div); + div = document.createElement("div"); + if (getRightEyeVision(slave) !== 0) { + _off++; + div.append(App.UI.DOM.passageLink("[OFF]", "Prosthetics Configuration", () => eyeSurgery(slave, "right", "blind"))); + } else { + div.append("[OFF]"); + } + eyeContainer.append(div); + } + if (hasBothCyberneticEyes(slave)) { + App.UI.DOM.appendNewElement("div", eyeContainer, "Both:"); + let div = document.createElement("div"); + if (_on > 0) { + div.append(App.UI.DOM.passageLink("[ON]", "Prosthetics Configuration", () => eyeSurgery(slave, "both", "fix"))); + } else { + div.append("[ON]"); + } + eyeContainer.append(div); + div = document.createElement("div"); + + if (_blur > 0) { + div.append(App.UI.DOM.passageLink("[BLUR]", "Prosthetics Configuration", () => eyeSurgery(slave, "both", "blur"))); + } else { + div.append("[BLUR]"); + } + eyeContainer.append(div); + div = document.createElement("div"); + if (_off > 0) { + div.append(App.UI.DOM.passageLink("[OFF]", "Prosthetics Configuration", () => eyeSurgery(slave, "both", "blind"))); + } else { + div.append("[OFF]"); + } + eyeContainer.append(div); + } + p.append(eyeContainer); + + const colorDiv = document.createElement("div"); + colorDiv.append(`${He} has ${App.Desc.eyesColor(slave)}. To change ${his} eye color visit the `, App.UI.DOM.passageLink("auto salon", "Salon"), "."); + p.append(colorDiv); + + f.append(p); + } + return f; + } + + /** + * @returns {DocumentFragment} + */ + function ears() { + const f = document.createDocumentFragment(); + if (slave.earImplant === 1) { + App.UI.DOM.appendNewElement("h2", f, "Ears"); + + const p = document.createElement("p"); + p.append(`${He} has cochlear implants installed.`); + if (slave.hears === 0) { + p.append("They are operating normally."); + } else if (slave.hears === -1) { + p.append(`They are set to muffle ${his} hearing.`); + } else { + p.append("They are turned off."); + } + + const links = []; + if (slave.hears !== 0) { + links.push(App.UI.DOM.passageLink("Restore hearing", "Prosthetics Configuration", () => { + slave.hears = 0; + V.prostheticsConfig = "hearing"; + })); + } + if (slave.hears !== -1) { + links.push(App.UI.DOM.passageLink("Muffle hearing", "Prosthetics Configuration", () => { + slave.hears = -1; + V.prostheticsConfig = "hearing"; + })); + } + if (slave.hears !== -2) { + links.push(App.UI.DOM.passageLink("Disable", "Prosthetics Configuration", () => { + slave.hears = -2; + V.prostheticsConfig = "hearing"; + })); + } + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + + f.append(p); + } + return f; + } + + /** + * @returns {DocumentFragment} + */ + function voice() { + const f = document.createDocumentFragment(); + + if (slave.electrolarynx === 1) { + App.UI.DOM.appendNewElement("h2", f, "Voice"); + const p = document.createElement("p"); + p.append(`${He} has an electrolarynx installed.`); + if (slave.voice === 0) { + p.append("It is turned off."); + } else if (slave.voice === 1) { + p.append(`It is set to its "deep voice" setting.`); + } else if (slave.voice === 2) { + p.append(`It is set to its "normal voice" setting.`); + } else if (slave.voice === 3) { + p.append(`It is set to its "high voice" setting.`); + } + + const links = []; + if (slave.voice !== 0) { + links.push(App.UI.DOM.passageLink("Disable", "Prosthetics Configuration", () => { + slave.voice = 0; + V.prostheticsConfig = "voice"; + })); + } + if (slave.voice !== 1) { + links.push(App.UI.DOM.passageLink("Deep voice setting", "Prosthetics Configuration", () => { + slave.voice = 1; + V.prostheticsConfig = "voice"; + })); + } + if (slave.voice !== 2) { + links.push(App.UI.DOM.passageLink("Standard voice setting", "Prosthetics Configuration", () => { + slave.voice = 2; + V.prostheticsConfig = "voice"; + })); + } + if (slave.voice !== 3) { + links.push(App.UI.DOM.passageLink("High voice setting", "Prosthetics Configuration", () => { + slave.voice = 3; + V.prostheticsConfig = "voice"; + })); + } + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + + f.append(p); + } + return f; + } + + /** + * @returns {DocumentFragment} + */ + function limbs() { + const f = document.createDocumentFragment(); + App.UI.DOM.appendNewElement("h2", f, "Limbs"); + + App.UI.DOM.appendNewElement("p", f, App.Medicine.Limbs.selector(slave, App.Medicine.Limbs.currentLimbs(slave))); + + return f; + } + + /** + * @returns {DocumentFragment} + */ + function tail() { + const f = document.createDocumentFragment(); + App.UI.DOM.appendNewElement("h2", f, "Tail"); + + const p = document.createElement("p"); + + if (slave.PTail === 1) { + App.UI.DOM.appendNewElement("div", p, `${He} has a neural tail interface installed. You can assign and adjust ${his} tail here.`); + + if (slave.tail !== "none") { + App.UI.DOM.appendNewElement("div", p, `${He} currently has a tail attached, if you wish to change it you first need to detach it.`); + App.UI.DOM.appendNewElement("div", p, + App.UI.DOM.passageLink("Detach", "Prosthetics Configuration", () => { + V.prostheticsConfig = "detachTail"; + V.nextButton = "Continue"; + V.nextLink = "Prosthetics Configuration"; + }), "choices"); + } else { + if (isProstheticAvailable(slave, "modT")) { + App.UI.DOM.appendNewElement("div", p, "Attach a modular tail designed to look like a:"); + + const links = []; + App.Data.modTails.forEach((value, key) => { + links.push(App.UI.DOM.passageLink(`${value.animal}'s Tail`, "Prosthetics Configuration", + () => { + V.prostheticsConfig = "attachTail"; + slave.tail = "mod"; + slave.tailShape = key; + slave.tailColor = slave.hColor; + } + )); + }); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + } + const links = []; + if (isProstheticAvailable(slave, "combatT")) { + links.push(App.UI.DOM.passageLink("Attach Combat Tail", "Prosthetics Configuration", () => { + V.prostheticsConfig = "attachTail"; + slave.tail = "combat"; + slave.tailColor = "jet black"; + })); + } + if (isProstheticAvailable(slave, "sexT")) { + links.push(App.UI.DOM.passageLink("Attach Pleasure Tail", "Prosthetics Configuration", () => { + V.prostheticsConfig = "attachTail"; + slave.tail = "sex"; + slave.tailColor = "pink"; + })); + } + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + } + + if (slave.tail === "mod") { + App.UI.DOM.appendNewElement("div", p, + `${He} currently has a modular tail, styled to look like ${App.Data.modTails.get(slave.tailShape).desc}. Modify ${his} tail's appearance:`); + + const links = []; + App.Data.modTails.forEach((value, key) => { + links.push(App.UI.DOM.passageLink(value.animal, "Prosthetics Configuration", () => { + slave.tailShape = key; + cashX(forceNeg(V.modCost), "slaveMod", slave); + })); + }); + App.UI.DOM.appendNewElement("div", p, linkStrip(links), "choices"); + } + } else { + App.UI.DOM.appendNewElement("span", p, `${He} does not have a neural tail interface installed so you cannot attach a tail.`, "note"); + } + f.append(p); + return f; + } + + /** + * @returns {DocumentFragment} + */ + function buyScreen() { + const f = document.createDocumentFragment(); + App.UI.DOM.appendNewElement("h2", f, "Prosthetics"); + + const p = document.createElement("p"); + App.UI.DOM.appendNewElement("span", p, `Fit prosthetics to ${him}:`, "note"); + + const gridDiv = document.createElement("div"); + gridDiv.classList.add("buy-prosthetics"); + + gridDiv.append(document.createElement("div")); + + App.UI.DOM.appendNewElement("div", gridDiv, "Buy and fit"); + + let tooltip; + if (V.researchLab.level > 0) { + tooltip = [`Depending on lab speed, it might be faster than fitting an existing prosthetic but should almost always be faster than first building and then fitting it to ${him}.`]; + } else { + tooltip = ["With a lab you could both increase speed and decrease cost."]; + } + App.UI.DOM.appendNewElement("div", gridDiv, App.UI.DOM.disabledLink("Construct in lab", tooltip)); + + tooltip = []; + if (V.researchLab.speed >= 300) { /* max speed */ + tooltip = ["Your lab is so fast that fitting prosthetics to your slave can done instantly though you will sacrifice some efficiency."]; + } else if (V.researchLab.level > 0) { + tooltip = ["Your lab is not fast enough to fit prosthetics instantly."]; + } + + const fastDiv = document.createElement("div"); + if (tooltip.length > 0) { + fastDiv.append(App.UI.DOM.disabledLink("Fast assembly", tooltip)); + fastDiv.style.textAlign = "right"; + } + gridDiv.append(fastDiv); + + for (const prostheticID of App.Data.prostheticIDs) { + // TODO comment erectile out in data directly + if (prostheticID !== "erectile") { /* exclude erectile implant */ + addBuyRow(prostheticID, gridDiv); + } + } + p.append(gridDiv); + f.append(p); + + return f; + } + + /** + * @param {string} prosthetic + * @param {HTMLDivElement} container + */ + function addBuyRow(prosthetic, container) { + App.UI.DOM.appendNewElement("div", container, capFirstChar(App.Data.prosthetics[prosthetic].name)); + + if (V.adjustProsthetics.findIndex(function(p) { return p.id === prosthetic && p.slaveID === slave.ID; }) !== -1 + || V.researchLab.tasks.findIndex(function(p) { return p.type === "craftFit" && p.id === prosthetic && p.slaveID === slave.ID; }) !== -1) { + App.UI.DOM.appendNewElement("div", container, `Currently being fitted to ${him}.`, ["full", "note"]); + } else if (App.Data.prosthetics[prosthetic].level > V.prostheticsUpgrade) { + App.UI.DOM.appendNewElement("div", container, `Better contracts are needed to buy these.`, ["full", "note"]); + } else if (isProstheticAvailable(slave, prosthetic)) { + App.UI.DOM.appendNewElement("div", container, `Completed.`, ["full", "note"]); + } else { + if (V.prosthetics[prosthetic].amount > 0) { + App.UI.DOM.appendNewElement("div", container, + App.UI.DOM.passageLink("From storage", "Prosthetics Configuration", () => { + V.adjustProsthetics.push({ + id: prosthetic, + workLeft: App.Data.prosthetics[prosthetic].adjust, + slaveID: slave.ID + }); + V.prosthetics[prosthetic].amount -= 1; + })); + } else { + App.UI.DOM.appendNewElement("div", container, + App.UI.DOM.passageLink(cashFormat(App.Data.prosthetics[prosthetic].costs), "Prosthetics Configuration", () => { + V.adjustProsthetics.push({ + id: prosthetic, + workLeft: App.Data.prosthetics[prosthetic].adjust, + slaveID: slave.ID + }); + cashX(forceNeg(App.Data.prosthetics[prosthetic].costs), "slaveMod", slave); + })); + } + + if (V.prosthetics[prosthetic].research > 0) { + const craftDiv = document.createElement("div"); + craftDiv.style.textAlign = "center"; + if (V.researchLab.level > 0 && V.prosthetics[prosthetic].research > 0) { + craftDiv.append(App.UI.DOM.passageLink("Construct", "Prosthetics Configuration", () => { + V.researchLab.tasks.push({ + type: "craftFit", + id: prosthetic, + /* 1.5: longer than adjust, but faster than adjust+craft. */ + workLeft: (App.Data.prosthetics[prosthetic].adjust + App.Data.prosthetics[prosthetic].craft) / 1.5, + slaveID: slave.ID + }); + })); + } + container.append(craftDiv); + + const instantDiv = document.createElement("div"); + instantDiv.style.textAlign = "right"; + if (V.researchLab.speed >= 300 && V.prosthetics[prosthetic].research > 0) { /* max speed */ + if (V.prosthetics[prosthetic].amount > 0) { + const cost = App.Data.prosthetics[prosthetic].adjust * 50; + instantDiv.append(App.UI.DOM.passageLink(`From storage: ${cashFormat(cost)}`, + "Prosthetics Configuration", () => { + cashX(-cost, "slaveMod", slave); + addProsthetic(slave, prosthetic); + })); + } else { + const cost = App.Data.prosthetics[prosthetic].costs * 2 + App.Data.prosthetics[prosthetic].adjust * 50; + instantDiv.append(App.UI.DOM.passageLink(cashFormat(cost), "Prosthetics Configuration", () => { + cashX(-cost, "slaveMod", slave); + addProsthetic(slave, prosthetic); + })); + } + } + container.append(instantDiv); + } else if (V.researchLab.level > 0) { + App.UI.DOM.appendNewElement("div", container, "Not researched.", ["research", "note"]); + } else { + App.UI.DOM.appendNewElement("div", container, "You need to construct a lab first.", ["research", "note"]); + } + } + } + + /** + * @param {Array<Element>} links + * @returns {DocumentFragment} + */ + function linkStrip(links) { + const f = document.createDocumentFragment(); + if (links.length > 0) { + f.append(links[0]); + for (let i = 1; i < links.length; i++) { + f.append(" | ", links[i]); + } + } + return f; + } +}; diff --git a/src/interaction/prostheticConfig.tw b/src/interaction/prostheticConfig.tw index 12d06a338c6179b92aff4d51c59c66a7d9000f0f..5dd8cb5d9410fc400efc9bc239c70496f666ef77 100644 --- a/src/interaction/prostheticConfig.tw +++ b/src/interaction/prostheticConfig.tw @@ -5,360 +5,9 @@ <<switch $prostheticsConfig>> <<case "main">> - <<set $nextButton = "Confirm changes", $nextLink = "Slave Interact">> - /* get all prosthetics that are ready for this slave */ - <<if $adjustProstheticsCompleted > 0>> - <<set $adjustProsthetics = $adjustProsthetics.filter(function(p) { - if (p.workLeft <= 0 && p.slaveID == getSlave($AS).ID) { - addProsthetic(getSlave($AS), p.id); - $adjustProstheticsCompleted--; - return false; - } - return true; - })>> - <</if>> - -/* base screen START */ -<h1>Prosthetic Configuration</h1> - -<p class="scene-intro"> -This room is lined with shelves and cabinets; it could be easily mistaken for a storage room if it were not for the examination table in its center. -<div> -<<if hasBothLegs(getSlave($AS))>> - <<= getSlave($AS).slaveName>> is obediently waiting for your instructions. -<<else>> - <<= getSlave($AS).slaveName>> is lying on the table, waiting for your instructions. -<</if>> -</div> -</p> - -<<if hasAnyCyberneticEyes(getSlave($AS))>> - <h2>Eyes</h2> - <p class="choices"> /* tab works better with links */ - $He has <<if hasBothCyberneticEyes(getSlave($AS))>> ocular implants <<else>> an ocular implant <</if>> installed. You can change <<if hasBothCyberneticEyes(getSlave($AS))>>their<<else>>its<</if>> settings: - - <div class="eyeContainer"> - <<set _on = 0, _blur = 0, _off = 0>> - <<if getLeftEyeType(getSlave($AS)) === 3>> - <div>Left:</div> - <div> - <<if getLeftEyeVision(getSlave($AS)) !== 2>> - <<set _on++>> - [["[ON]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "left", "fix")]] - <<else>> - <<print "[ON]">> - <</if>> - </div><div> - <<if getLeftEyeVision(getSlave($AS)) !== 1>> - <<set _blur++>> - [["[BLUR]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "left", "blur")]] - <<else>> - <<print "[BLUR]">> - <</if>> - </div><div> - <<if getLeftEyeVision(getSlave($AS)) !== 0>> - <<set _off++>> - [["[OFF]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "left", "blind")]] - <<else>> - <<print "[OFF]">> - <</if>> - </div> - <</if>> - <<if getRightEyeType(getSlave($AS)) === 3>> - <div>Right:</div> - <div> - <<if getRightEyeVision(getSlave($AS)) !== 2>> - <<set _on++>> - [["[ON]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "right", "fix")]] - <<else>> - <<print "[ON]">> - <</if>> - </div><div> - <<if getRightEyeVision(getSlave($AS)) !== 1>> - <<set _blur++>> - [["[BLUR]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "right", "blur")]] - <<else>> - <<print "[BLUR]">> - <</if>> - </div><div> - <<if getRightEyeVision(getSlave($AS)) !== 0>> - <<set _off++>> - [["[OFF]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "right", "blind")]] - <<else>> - <<print "[OFF]">> - <</if>> - </div> - <</if>> - <<if hasBothCyberneticEyes(getSlave($AS))>> - <div>Both:</div> - <div> - <<if _on > 0>> - [["[ON]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "both", "fix")]] - <<else>> - <<print "[ON]">> - <</if>> - </div><div> - <<if _blur > 0>> - [["[BLUR]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "both", "blur")]] - <<else>> - <<print "[BLUR]">> - <</if>> - </div><div> - <<if _off > 0>> - [["[OFF]"|Prosthetics Configuration][eyeSurgery(getSlave($AS), "both", "blind")]] - <<else>> - <<print "[OFF]">> - <</if>> - </div> - <</if>> - </div> - </p> - - <p class="indent"> - $He has <<print App.Desc.eyesColor(getSlave($AS))>>. To change $his eye color visit the [[auto salon|Salon]]. - </p> -<</if>> - -<<if getSlave($AS).earImplant == 1>> - <h2>Ears</h2> - <p class="indent"> - $He has cochlear implants installed. - <<if getSlave($AS).hears == 0>> - They are operating normally. - <<elseif getSlave($AS).hears == -1>> - They are set to muffle $his hearing. - <<else>> - They are turned off. - <</if>> - </p> - <p class="indent"> - <<if getSlave($AS).hears != 0>> - [[Restore hearing|Prosthetics Configuration][getSlave($AS).hears = 0, $prostheticsConfig = "hearing"]] | - <</if>> - <<if getSlave($AS).hears != -1>> - [[Muffle|Prosthetics Configuration][getSlave($AS).hears = -1, $prostheticsConfig = "hearing"]] - <<if getSlave($AS).hears != -2>> - | - <</if>> - <</if>> - <<if getSlave($AS).hears != -2>> - [[Disable|Prosthetics Configuration][getSlave($AS).hears = -2, $prostheticsConfig = "hearing"]] - <</if>> - </p> -<</if>> - -<<if getSlave($AS).electrolarynx == 1>> - <h2>Voice</h2> - <p class="indent"> - $He has an electrolarynx installed. - <<if getSlave($AS).voice == 0>> - It is turned off. - <<elseif getSlave($AS).voice == 1>> - It is set to its "deep voice" setting. - <<elseif getSlave($AS).voice == 2>> - It is set to its "normal voice" setting. - <<elseif getSlave($AS).voice == 3>> - It is set to its "high voice" setting. - <</if>> - </p> - <p class="indent"> - <<if getSlave($AS).voice != 0>> - [[Disable|Prosthetics Configuration][getSlave($AS).voice = 0, $prostheticsConfig = "voice"]] | - <</if>> - <<if getSlave($AS).voice != 1>> - [[Deep voice setting|Prosthetics Configuration][getSlave($AS).voice = 1, $prostheticsConfig = "voice"]] | - <</if>> - <<if getSlave($AS).voice != 2>> - [[Standard voice setting|Prosthetics Configuration][getSlave($AS).voice = 2, $prostheticsConfig = "voice"]] - <<if getSlave($AS).voice != 3>> - | - <</if>> - <</if>> - <<if getSlave($AS).voice != 3>> - [[High voice setting|Prosthetics Configuration][getSlave($AS).voice = 3, $prostheticsConfig = "voice"]] - <</if>> - </p> -<</if>> - -<h2>Limbs</h2> -<p class="choices"> - <<= App.Desc.limbChange().selector(getSlave($AS), App.Desc.limbChange().currentLimbs(getSlave($AS)))>> -</p> - -<h2>Tail</h2> -<p class="indent"> -<<if getSlave($AS).PTail == 1>> - <div> - $He has a neural tail interface installed. You can assign and adjust $his tail here. - </div> - <div class="double-indent"> - <<if getSlave($AS).tail != "none">> - $He currently has a tail attached, if you wish to change it you will first need to detach it. - <div> - [[Detach|Prosthetics Configuration][$prostheticsConfig = "detachTail",$nextButton = "Continue", $nextLink = "Prosthetics Configuration"]] - </div> - <<else>> - <<if isProstheticAvailable(getSlave($AS), "modT")>> - <div> - Attach a modular tail designed to look like a: - </div> - <div> - [[Cat's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "neko", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Dog's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "inu", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Fox's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "kit", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Kitsune's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "kitsune", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Tanuki's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "tanuki", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Cow's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "ushi", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Rabbit's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "usagi", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Squirrel's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "risu", getSlave($AS).tailColor = getSlave($AS).hColor]] - | [[Horse's Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "mod", getSlave($AS).tailShape = "uma", getSlave($AS).tailColor = getSlave($AS).hColor]] - </div> - <</if>> - <div> - <<if isProstheticAvailable(getSlave($AS), "combatT")>> - [[Attach Combat Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "combat", getSlave($AS).tailColor = "jet black"]] - <<if isProstheticAvailable(getSlave($AS), "sexT")>> - | - <</if>> - <</if>> - <<if isProstheticAvailable(getSlave($AS), "sexT")>> - [[Attach Pleasure Tail|Prosthetics Configuration][$prostheticsConfig = "attachTail", getSlave($AS).tail = "sex", getSlave($AS).tailColor = "pink"]] - <</if>> - </div> - <</if>> - </div> -<<else>> - //$He does not have a neural tail interface installed so you cannot attach a tail.// -<</if>> -<<if getSlave($AS).tail == "mod">> - <div> - $He currently has a modular tail, styled to look like - <<if getSlave($AS).tailShape == "neko">> - a long, slender cat tail. - <<elseif getSlave($AS).tailShape == "inu">> - a bushy dog tail. - <<elseif getSlave($AS).tailShape == "kit">> - a soft, fluffy fox tail. - <<elseif getSlave($AS).tailShape == "kitsune">> - three incredibly soft, fluffy fox tails. - <<elseif getSlave($AS).tailShape == "tanuki">> - a long, fluffy tanuki tail. - <<elseif getSlave($AS).tailShape == "ushi">> - a long cow tail. - <<elseif getSlave($AS).tailShape == "usagi">> - a short rabbit tail. - <<elseif getSlave($AS).tailShape == "risu">> - a large squirrel tail. - <<elseif getSlave($AS).tailShape == "uma">> - a long horse tail. - <</if>> - </div> - - <div class="double-indent"> - Modify $his tail's appearance: - <div> - [[Cat|Prosthetics Configuration][getSlave($AS).tailShape = "neko", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Dog|Prosthetics Configuration][getSlave($AS).tailShape = "inu", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Fox|Prosthetics Configuration][getSlave($AS).tailShape = "kit", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Kitsune|Prosthetics Configuration][getSlave($AS).tailShape = "kitsune", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Tanuki|Prosthetics Configuration][getSlave($AS).tailShape = "tanuki", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Bovine|Prosthetics Configuration][getSlave($AS).tailShape = "ushi", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Rabbit|Prosthetics Configuration][getSlave($AS).tailShape = "usagi", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Squirrel|Prosthetics Configuration][getSlave($AS).tailShape = "risu", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - | [[Horse|Prosthetics Configuration][getSlave($AS).tailShape = "uma", cashX(forceNeg($modCost), "slaveMod", getSlave($AS))]] - </div> - </div> -<</if>> -</p> - -<h2>Prosthetics</h2> -<p class="choices"> -//Fit prosthetics to $him:// - -<div class="buy-prosthetics"> - <div></div> - <div>''Buy and fit''</div> - <div> - <<if $researchLab.level > 0>> - <<= App.UI.disabledLink(`''Construct in lab''`, ["Depending on lab speed, it might be faster than fitting an existing prosthetic but should almost always be faster than first building and then fitting it to $him."])>> - <<else>> - <<= App.UI.disabledLink(`''Construct in lab''`, ["With a lab you could both increase speed and decrease cost."])>> - <</if>> - </div> - <div style="text-align:right"> - <<if $researchLab.speed >= 300>> /* max speed */ - <<= App.UI.disabledLink(`''Fast assembly''`, ["Your lab is so fast that fitting prosthetics to your slave can done instantly though you will sacrifice some efficiency."])>> - <<elseif $researchLab.level > 0>> - <<= App.UI.disabledLink(`''Fast assembly''`, ["Your lab is not fast enough to fit prosthetics instantly."])>> - <</if>> - </div> - -<<for _p range setup.prostheticIDs>> - <<if _p != "erectile">> /* exclude erectile implant */ - <div><<= capFirstChar(setup.prosthetics[_p].name)>></div> - <<if $adjustProsthetics.findIndex(function(p) {return p.id == _p && p.slaveID == getSlave($AS).ID}) != -1 || $researchLab.tasks.findIndex(function(p) {return p.type == "craftFit" && p.id == _p && p.slaveID == getSlave($AS).ID}) != -1>> - <div class="full">//Currently being fitted to $him.//</div> - <<elseif setup.prosthetics[_p].level > $prostheticsUpgrade>> - <div class="full">//Better contracts are needed to buy these.//</div> - <<elseif isProstheticAvailable(getSlave($AS), _p)>> - <div class="full">//Completed.//</div> - <<else>> - <<capture _p>> - <div> - <<if $prosthetics[_p].amount > 0>> - <<link "From storage" "Prosthetics Configuration">> - <<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: getSlave($AS).ID}), $prosthetics[_p].amount -= 1>> - <</link>> - <<else>> - <<link "<<= cashFormat(setup.prosthetics[_p].costs)>>" "Prosthetics Configuration">> - <<set $adjustProsthetics.push({id: _p, workLeft: setup.prosthetics[_p].adjust, slaveID: getSlave($AS).ID}), cashX(forceNeg(setup.prosthetics[_p].costs), "slaveMod", getSlave($AS))>> - <</link>> - <</if>> - </div> - <<if $prosthetics[_p].research > 0>> - <div style="text-align:center"> - <<if $researchLab.level > 0 && $prosthetics[_p].research > 0>> - <<link "Construct" "Prosthetics Configuration">> - <<set $researchLab.tasks.push({ - type: "craftFit", - id: _p, - workLeft: (setup.prosthetics[_p].adjust + setup.prosthetics[_p].craft) / 1.5, - slaveID: $AS})>> - /* 1.5: longer than adjust, but faster than adjust+craft. */ - <</link>> - <</if>> - </div> - <div style="text-align:right"> - <<if $researchLab.speed >= 300 && $prosthetics[_p].research > 0>> /* max speed */ - <<if $prosthetics[_p].amount > 0>> - <<link "From storage: <<= cashFormat(setup.prosthetics[_p].adjust * 50)>>" "Prosthetics Configuration">> - <<set cashX(forceNeg(setup.prosthetics[_p].costs * 1.5), "slaveMod", getSlave($AS)), addProsthetic(getSlave($AS), _p)>> - <</link>> - <<else>> - <<link "<<= cashFormat(setup.prosthetics[_p].costs + setup.prosthetics[_p].adjust * 100)>>" "Prosthetics Configuration">> - <<set cashX(forceNeg(setup.prosthetics[_p].costs + setup.prosthetics[_p].adjust * 100), "slaveMod", getSlave($AS)), addProsthetic(getSlave($AS), _p)>> - <</link>> - <</if>> - <</if>> - </div> - <<elseif $researchLab.level > 0>> - <div class="research"> - //Not researched.// - </div> - <<else>> - <div class="research"> - //You need to construct a lab first.// - </div> - <</if>> - <</capture>> - <</if>> - <</if>> -<</for>> -</div> - -</p> - -/* base screen END */ + <<set $nextButton = "Confirm changes">> + <<set $nextLink = "Slave Interact">> + <<includeDOM App.UI.prostheticsConfig(getSlave($AS))>> /* <<case "eyes">> @@ -374,7 +23,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <<case "limbs">> <<set $prostheticsConfig = "main", $nextButton = "Continue", $nextLink = "Prosthetics Configuration">> - <<= App.Desc.limbChange().reaction(getSlave($AS), $oldLimbs)>> + <<includeDOM App.Medicine.Limbs.reaction(getSlave($AS), $oldLimbs)>> <<unset $oldLimbs>> /* @@ -509,7 +158,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br> <<set _first = 0>> <</if>> - <<link "Attach <<= addA(setup.prosthetics.basicL.name)>>">> + <<link "Attach <<= addA(App.Data.prosthetics.basicL.name)>>">> <<set removeLimbs(getSlave($AS), "all"), attachLimbs(getSlave($AS), "all", 2), $prostheticsConfig = "basicPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> @@ -520,7 +169,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br> <<set _first = 0>> <</if>> - <<link "Attach <<= addA(setup.prosthetics.sexL.name)>>">> + <<link "Attach <<= addA(App.Data.prosthetics.sexL.name)>>">> <<set removeLimbs(getSlave($AS), "all"), attachLimbs(getSlave($AS), "all", 3), $prostheticsConfig = "sexPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> @@ -531,7 +180,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br> <<set _first = 0>> <</if>> - <<link "Attach <<= addA(setup.prosthetics.beautyL.name)>>">> + <<link "Attach <<= addA(App.Data.prosthetics.beautyL.name)>>">> <<set removeLimbs(getSlave($AS), "all"), attachLimbs(getSlave($AS), "all", 4), $prostheticsConfig = "beautyPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> @@ -542,7 +191,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br> <<set _first = 0>> <</if>> - <<link "Attach <<= addA(setup.prosthetics.combatL.name)>>">> + <<link "Attach <<= addA(App.Data.prosthetics.combatL.name)>>">> <<set removeLimbs(getSlave($AS), "all"), attachLimbs(getSlave($AS), "all", 5), $prostheticsConfig = "combatPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> @@ -554,7 +203,7 @@ This room is lined with shelves and cabinets; it could be easily mistaken for a <br><br>Since you already have prepared limbs for $him you might as well attach them while you are working on $him:<br> <<set _first = 0>> <</if>> - <<link "Attach <<= addA(setup.prosthetics.cyberneticL.name)>>" "Prosthetics Configuration">> + <<link "Attach <<= addA(App.Data.prosthetics.cyberneticL.name)>>" "Prosthetics Configuration">> <<set removeLimbs(getSlave($AS), "all"), attachLimbs(getSlave($AS), "all", 6), $prostheticsConfig = "cyberPLimbs">> <<replace #attach>><br><br><<include "Prosthetics Configuration">><<set $nextLink = "Remote Surgery">><</replace>> <</link>> diff --git a/src/interaction/prostheticLab.tw b/src/interaction/prostheticLab.tw index d79406219171cdbe75c9cb7732cc43e0a8073730..2335fd2f8a1ed2f2937cfde19f31bf17da4c2c6b 100644 --- a/src/interaction/prostheticLab.tw +++ b/src/interaction/prostheticLab.tw @@ -13,7 +13,7 @@ <<for _p range $adjustProsthetics>> <<if _p.workLeft > 0>> <div class="indent"> - <<= capFirstChar(setup.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>> + <<= capFirstChar(App.Data.prosthetics[_p.id].name)>> for <<= SlaveFullName($slaves[$slaveIndices[_p.slaveID]])>> </div> <</if>> <</for>> @@ -161,7 +161,7 @@ @@.error;Error: Unknown $researchLab.tasks[].type: $researchLab.tasks[_i].type@@ <</switch>> <<set _j += $researchLab.tasks[_i].workLeft>> - @@.noteworthy;<<= capFirstChar(setup.prosthetics[$researchLab.tasks[_i].id].name)>>@@. + @@.noteworthy;<<= capFirstChar(App.Data.prosthetics[$researchLab.tasks[_i].id].name)>>@@. <<if $researchLab.speed > 0>> Finished in approximately <<= (Math.floor(_j / $researchLab.speed) + 1)>> week(s). <</if>> @@ -188,19 +188,19 @@ <h3>Research</h3> Available research projects: - <<for _p range setup.prostheticIDs>> + <<for _p range App.Data.prostheticIDs>> <<if $prosthetics[_p].research == 0>> <<if _p != "erectile">> /*excludes erectile*/ <div class="indent"> - <<if setup.prosthetics[_p].level <= $prostheticsUpgrade>> + <<if App.Data.prosthetics[_p].level <= $prostheticsUpgrade>> <<capture _p>> - <<link "Reverse engineer <<= addA(setup.prosthetics[_p].name)>>" "Prosthetic Lab">> - <<set cashX(forceNeg(setup.prosthetics[_p].costs), "labResearch"), $prosthetics[_p].research = -1, $researchLab.tasks.push({type: "research", id: _p, workLeft: setup.prosthetics[_p].research})>> + <<link "Reverse engineer <<= addA(App.Data.prosthetics[_p].name)>>" "Prosthetic Lab">> + <<set cashX(forceNeg(App.Data.prosthetics[_p].costs), "labResearch"), $prosthetics[_p].research = -1, $researchLab.tasks.push({type: "research", id: _p, workLeft: App.Data.prosthetics[_p].research})>> <</link>> <</capture>> - //Costs <<= cashFormat(setup.prosthetics[_p].costs)>> of initial investment.// + //Costs <<= cashFormat(App.Data.prosthetics[_p].costs)>> of initial investment.// <<else>> - //You need better contracts to get the required research material for reverse engineering <<= addA(setup.prosthetics[_p].name)>>.// + //You need better contracts to get the required research material for reverse engineering <<= addA(App.Data.prosthetics[_p].name)>>.// <</if>> </div> <</if>> @@ -210,13 +210,13 @@ <h3>Manufacture</h3> Available building projects: - <<for _p range setup.prostheticIDs>> + <<for _p range App.Data.prostheticIDs>> <<if $prosthetics[_p].research == 1>> <<if _p != "erectile">> /*excludes erectile*/ <div class="indent"> <<capture _p>> - <<link "Build <<= addA(setup.prosthetics[_p].name)>>" "Prosthetic Lab">> - <<set $researchLab.tasks.push({type: "craft", id: _p, workLeft: setup.prosthetics[_p].craft})>> + <<link "Build <<= addA(App.Data.prosthetics[_p].name)>>" "Prosthetic Lab">> + <<set $researchLab.tasks.push({type: "craft", id: _p, workLeft: App.Data.prosthetics[_p].craft})>> <</link>> <</capture>> </div> diff --git a/src/js/SlaveState.js b/src/js/SlaveState.js index 879e7b183a43f00e64cc41cb84f82cd8048677e5..a17231211b49c87fe7148ca4e46c2a79127a8755 100644 --- a/src/js/SlaveState.js +++ b/src/js/SlaveState.js @@ -2488,7 +2488,7 @@ App.Entity.SlaveState = class SlaveState { * Array that holds a slaves fitted prosthetics. Objects are used to ensure easier expansion later (tattoos for limbs and similar). * * Elements of the array should be objects. - * * .id: ID of the prosthetic, see setup.prostheticIDs + * * .id: ID of the prosthetic, see App.Data.prostheticIDs * @type {Array.<{id:string}>} */ this.readyProsthetics = []; /** */ diff --git a/src/js/birth/birth.js b/src/js/birth/birth.js index e0b021eb6f29e31095bf7d1e109be37aaa024a7e..0d2a1df2db6f6b0a9519fa1ba7bbe9b4f576362b 100644 --- a/src/js/birth/birth.js +++ b/src/js/birth/birth.js @@ -3684,7 +3684,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) case Job.NURSE: if (random(1, 20) > suddenBirth) { - r.push(`${He} waddles to ${his} maternity ward and strips before settling into an open bed. ${He} makes ${himself} comfortable and begins working on birthing ${firstText} baby${UH}as ${his} assistants watch. ${His} child is promptly taken and ${he} is helped to the recovery ward until ${he} recovers enough to take over ${V.clinicName} again.`); + r.push(`${He} waddles to ${his} maternity ward and strips before settling into an open bed. ${He} makes ${himself} comfortable and begins working on birthing ${firstText} baby${UH} as ${his} assistants watch. ${His} child is promptly taken and ${he} is helped to the recovery ward until ${he} recovers enough to take over ${V.clinicName} again.`); } else { r.push(`While tending to your unwell slaves, ${slave.slaveName}'s water breaks. Counting the time between contractions, ${he} knows ${he} has no time to get to ${his} prepared birthing chamber. ${He} waddles into the nearest empty room and hoists ${his} gravid body into the examination chair, placing ${his} feet in the stirrups.`); r.push(clothingBirth()); @@ -5493,7 +5493,7 @@ globalThis.birth = function(slave, {birthStorm = false, cSection = false} = {}) break; case Job.NURSE: - r.push(`${He} waddles to ${his} maternity ward and strips before laying on an open bed. ${He} makes ${himself} comfortable and begins working on birthing ${his} ${babies}${UH}as ${his} assistants watch. ${His} ${childrenAre} promptly taken and ${he} is helped to the recovery ward until ${he} recovers enough to take over ${V.clinicName} again.`); + r.push(`${He} waddles to ${his} maternity ward and strips before laying on an open bed. ${He} makes ${himself} comfortable and begins working on birthing ${his} ${babies}${UH} as ${his} assistants watch. ${His} ${childrenAre} promptly taken and ${he} is helped to the recovery ward until ${he} recovers enough to take over ${V.clinicName} again.`); break; case Job.HEADGIRL: diff --git a/src/js/modification.js b/src/js/modification.js index ea240fbf91036a28ecd7694cc92d5ae128d55643..13658f94fa69cdf82209530720ac59a669313a6e 100644 --- a/src/js/modification.js +++ b/src/js/modification.js @@ -325,10 +325,13 @@ App.Medicine.Modification.setPiercing = function(slave, location, weight) { * @param {App.Entity.SlaveState} slave * @param {string} location * @param {string|number} design (0 removes) + * @param {boolean} cheat * @returns {string} slave reaction */ -App.Medicine.Modification.setTattoo = function(slave, location, design) { - cashX(forceNeg(V.modCost), "slaveMod", slave); +App.Medicine.Modification.setTattoo = function(slave, location, design, cheat) { + if (!cheat) { + cashX(forceNeg(V.modCost), "slaveMod", slave); + } // reaction const {He, he, His, his, him} = getPronouns(slave); diff --git a/src/js/releaseRules.js b/src/js/releaseRules.js index ab0a354a055fc0872a7cdb3c9b2a458c13652cc9..44d1224ee3e1f9e9c8006e732b11e2b3f5fb47ce 100644 --- a/src/js/releaseRules.js +++ b/src/js/releaseRules.js @@ -23,6 +23,20 @@ App.Utils.sexAllowed = function sexAllowed(slaveA, slaveB) { } }; +/** + * Returns true if the second slave ID resolves to a real slave that the first slave can fuck. + * @param {FC.HumanState} slave + * @param {number} id - slave ID (player not allowed) + * @returns {boolean} + */ +App.Utils.sexAllowedByID = function sexAllowedByID(slave, id) { + if (id > 0) { + const target = getSlave(id); + return target && this.sexAllowed(slave, target); + } + return false; +}; + /** * Returns true if a slave has a romantic partner other than the PC who is both willing and allowed to have sex with her. * @param {App.Entity.SlaveState} slave @@ -30,7 +44,7 @@ App.Utils.sexAllowed = function sexAllowed(slaveA, slaveB) { */ App.Utils.hasPartnerSex = function hasPartnerSex(slave) { const hasWillingSlavePartner = (slave.rules.relationship === "permissive") && (slave.relationship >= 3) && (slave.relationshipTarget > 0); - return hasWillingSlavePartner && this.sexAllowed(slave, getSlave(slave.relationshipTarget)); + return hasWillingSlavePartner && this.sexAllowedByID(slave, slave.relationshipTarget); }; /** @@ -43,10 +57,10 @@ App.Utils.hasFamilySex = function hasFamilySex(slave) { return false; } // check fast cases first - if (slave.mother > 0 && this.sexAllowed(slave, getSlave(slave.mother))) { + if (this.sexAllowedByID(slave, slave.mother)) { return true; } - if (slave.father > 0 && this.sexAllowed(slave, getSlave(slave.father))) { + if (this.sexAllowedByID(slave, slave.father)) { return true; } // search exhaustively for sisters/daughters only if necessary @@ -71,7 +85,7 @@ App.Utils.hasNonassignmentSex = function hasNonassignmentSex(slave) { * @returns {boolean} */ App.Utils.releaseRestricted = function releaseRestricted(slave) { - return (slave.rules.release.slaves === 0) || (slave.rules.release.family === 0) || (slave.rules.release.masturbation === 0) || (slave.rules.release.partner === 0); + return (slave.rules.release.slaves === 0) || (V.seeIncest && slave.rules.release.family === 0) || (slave.rules.release.masturbation === 0) || (slave.rules.release.partner === 0); }; /** diff --git a/src/markets/specificMarkets/schoolFutanari.js b/src/markets/specificMarkets/schoolFutanari.js index e5643fba810534ea45974fb56ca8b2779edc4bc6..dc200b7c0297e3991bffe0c05bff37f9954053ad 100644 --- a/src/markets/specificMarkets/schoolFutanari.js +++ b/src/markets/specificMarkets/schoolFutanari.js @@ -5,7 +5,18 @@ App.Markets.TFS = function() { if (V.TFS.schoolPresent === 1) { App.UI.DOM.appendNewElement("p", el, `You pay a visit to the Futanari Sisters. They occupy a suite remodeled for their very special needs; it's surprisingly small, to house so many girls, since they live communally and do not believe in privacy. You are the only outsider permitted to enter the outer door. As you move towards the center of the suite, you pass through the outer ring of sleeping areas, kitchens, medical rooms, and workout stations that surround the inner sanctum.`); - App.UI.DOM.appendNewElement("p", el, `This is a large, circular room with a shallow depression in the floor, filled with pillows and naked, fucking futas. Every possible interaction between mouths, nipples, breasts, penises, vaginas, and anuses is taking place, with most participants managing several at once. They are all very, very pretty, and it's easier to distinguish the older ones by their bigger tits, asses and cocks than by their apparent age. The older futas tend to be on top, but this is by no means the rule, and they like to switch around often.`); + r.push(`This is a large, circular room with a shallow depression in the floor, filled with pillows and naked, fucking futas. Every possible interaction between mouths, nipples, breasts, penises, vaginas, and anuses is taking place, with most participants managing several at once. They are all very, very pretty, and it's easier to distinguish the older ones by their bigger tits, asses and cocks than by their apparent age. The older futas tend to be on top, but this is by no means the rule, and they like to switch around often.`); + if (V.TFS.schoolUpgrade !== 0) { + if (V.TFS.schoolUpgrade === 1) { + r.push(`As they move, their lack of apparent testes catches your eye; the end result of your gracious endowment.`); + } else if (V.TFS.schoolUpgrade === 2) { + r.push(`As they move about, their swollen balls catch your eye; the end result of your gracious endowment.`); + } else if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek + 15 <= V.week) { + r.push(`You beam over the variety of futas splayed out before you, proud that your endowment made this possible.`); + } + } + App.UI.DOM.appendNewElement("p", el, r.join(" ")); + if (V.TFS.farmUpgrade === 2) { if (V.TFS.farmUpgradeAsked < V.week - 10) { App.UI.DOM.appendNewElement("p", el, `It's been long enough since you allowed them to use your organ farm to add ovaries to themselves and instructed them not to use contraceptives that most of them are visibly pregnant. This hasn't slowed their sexual congress at all, though. They've become much more focused on vaginal, and there's an obvious eagerness to cum inside Sisters who aren't obviously pregnant.`); @@ -23,6 +34,7 @@ App.Markets.TFS = function() { } App.UI.DOM.appendNewElement("p", el, `Visitors are not common: in fact, visitors are only as frequent as you feel like visiting. It takes a while before they notice you. When a dreamy-eyed young futa finally does, she reaches a lazy hand over to alert the eldest one present by tugging on one of her nipples and pointing in your direction. The elder looks over at you and gives you a friendly wave followed by a wait-one-moment gesture. She's curled up on her back with her cockhead in her own mouth, using both hands to give her own shaft a boob job while a younger futa is eats her ass and fingers her pussy. The futa matron orgasms promptly, sucking down her own cum. She gets up languidly, her plush body, softening forearm-sized dick, and enormous natural boobs making it a wonderful sight.`); + r = []; if (V.PC.title === 1) { r.push(`"Protector,`); } else { diff --git a/src/markets/specificMarkets/schools.js b/src/markets/specificMarkets/schools.js index e68521ac77ac7311b634bcd520bc313a31506300..b099636b494405be2ed6ad3f11addbc5b98ef042 100644 --- a/src/markets/specificMarkets/schools.js +++ b/src/markets/specificMarkets/schools.js @@ -1,6 +1,7 @@ App.Markets.GRI = function() { const el = new DocumentFragment(); let r = []; + r.push(`The Growth Research Institute (GRI) is not primarily a slave school at all, but rather the world leader in female growth hormone development. It operates research centers in the Free Cities to avoid traditional medical research laws. GRI runs several slave schools to raise healthy, unmodified subjects for use in trials. After a year of experimental hormone treatment they are sold.`); if (V.GRI.schoolUpgrade !== 0) { r.push(`You have endowed`); if (V.GRI.schoolUpgrade === 1) { @@ -210,6 +211,9 @@ App.Markets.HA = function() { } else if (V.HA.schoolUpgrade === 3) { r.push(`Recently the school redirected its focus to better align with the strongfat ideal, as of your suggestion. Their slaves are physically impressive yet maintain a soft and feminine aspect.`); } + if (V.HA.schoolUpgrade !== 0) { + r.push(`As a major financial supporter of the institution, you also receive a discount on them.`); + } App.UI.DOM.appendNewElement("p", el, r.join(" "), "scene-intro"); @@ -265,7 +269,19 @@ App.Markets.TSS = function() { App.Markets.TUO = function() { const el = new DocumentFragment(); - App.UI.DOM.appendNewElement("p", el, `The Utopian Orphanage is where all slaves dream of being raised. Its business model is to offer intelligent, well educated girls just past their majority. The girls are treated exceptionally well and have no sexual education or experience.`, "scene-intro"); + let r = []; + r.push(`The Utopian Orphanage is where all slaves dream of being raised. Its business model is to offer intelligent, well educated girls just past their majority. The girls are treated exceptionally well and have no sexual ${(V.TUO.schoolUpgrade !== 2) ? "education or " : ""}experience.`); + if (V.TUO.schoolUpgrade !== 0) { + r.push(`You have endowed`); + if (V.TUO.schoolUpgrade === 1) { + r.push(`stricter admissions proceedings at the school, meaning only the finest children will get accepted in.`); + } else { + r.push(`the school with sexual education materials; the girls now have a better understanding of what sex is.`); + } + r.push(`As a major ${(V.PC.title === 0) ? `benefactrix` : `benefactor`} of the institution, you also receive a discount on them.`); + } + + App.UI.DOM.appendNewElement("p", el, r.join(" "), "scene-intro"); App.UI.DOM.appendNewElement("p", el, `The Utopian Orphanage offers a fresh graduate for inspection. The interview takes place in the girl's private room, where she showcases her education and wits.`); let costMod = 1; diff --git a/src/npc/children/ChildState.js b/src/npc/children/ChildState.js index 3451fbc14378d62a84630ab428ceb4f5c49a8f6a..8694e2f4ae32de76817984da7aa489f580f354a8 100644 --- a/src/npc/children/ChildState.js +++ b/src/npc/children/ChildState.js @@ -1810,7 +1810,7 @@ App.Facilities.Nursery.ChildState = class ChildState { * Array that holds a slaves fitted prosthetics. Objects are used to ensure easier expansion later (tattoos for limbs and similar). * * Elements of the array should be objects. - * * .id: ID of the prosthetic, see setup.prostheticIDs + * * .id: ID of the prosthetic, see App.Data.prostheticIDs * @type {Array.<{id:string}>} */ this.readyProsthetics = []; /** */ diff --git a/src/npc/descriptions/belly/belly.js b/src/npc/descriptions/belly/belly.js index 8ea0a15798923260b653f7980f68af9e214f4e08..fb39da53ae6a876113304158c3f745fff2699d2c 100644 --- a/src/npc/descriptions/belly/belly.js +++ b/src/npc/descriptions/belly/belly.js @@ -2019,7 +2019,7 @@ App.Desc.belly = function(slave, {market, eventDescription} = {}) { } else { r.push(`and ${his} huge, drum-taut belly dominates ${his} frame.`); } - if (slave.preg < 36) { + if (slave.preg < 40) { r.push(`Given how far along ${he} is, ${he} is clearly having more than two.`); } else if (slave.preg < 42) { if (slave.pregType === 1) { diff --git a/src/npc/descriptions/limbs.js b/src/npc/descriptions/limbs.js index 8cc98f12efed0c9870497f79b8f3ac257e6f2a2a..47814db3b52f2f988f2495591f964f1886123f40 100644 --- a/src/npc/descriptions/limbs.js +++ b/src/npc/descriptions/limbs.js @@ -1,199 +1,221 @@ -App.Desc.limbChange = function() { - return { - currentLimbs: currentLimbs, - amputate: amputate, - prosthetic: prosthetic, - selector: selector, - applySelector: applySelector, - reaction: reaction - }; +App.Medicine.Limbs = {}; - /** - * Generates an object usable with the standard limb check functions. - * @param {App.Entity.SlaveState} slave - * @returns {{}} - */ - function currentLimbs(slave) { - let s = {arm: {left: {type: 1}, right: {type: 1}}, leg: {left: {type: 1}, right: {type: 1}}, PLimb: 0}; - if (hasLeftArm(slave)) { - s.arm.left.type = getLeftArmID(slave); - } else { - s.arm.left = null; - } - if (hasRightArm(slave)) { - s.arm.right.type = getRightArmID(slave); - } else { - s.arm.right = null; - } - if (hasLeftLeg(slave)) { - s.leg.left.type = getLeftLegID(slave); - } else { - s.leg.left = null; - } - if (hasRightLeg(slave)) { - s.leg.right.type = getRightLegID(slave); - } else { - s.leg.right = null; - } - s.PLimb = slave.PLimb; - return s; +/** + * Generates an object usable with the standard limb check functions. + * @param {App.Entity.SlaveState} slave + * @returns {FC.LimbsState} + */ +App.Medicine.Limbs.currentLimbs = function(slave) { + let s = {arm: {left: {type: 1}, right: {type: 1}}, leg: {left: {type: 1}, right: {type: 1}}, PLimb: 0}; + if (hasLeftArm(slave)) { + s.arm.left.type = getLeftArmID(slave); + } else { + s.arm.left = null; + } + if (hasRightArm(slave)) { + s.arm.right.type = getRightArmID(slave); + } else { + s.arm.right = null; + } + if (hasLeftLeg(slave)) { + s.leg.left.type = getLeftLegID(slave); + } else { + s.leg.left = null; + } + if (hasRightLeg(slave)) { + s.leg.right.type = getRightLegID(slave); + } else { + s.leg.right = null; + } + s.PLimb = slave.PLimb; + return s; +}; + +/** + * @param {App.Entity.SlaveState} slave + * @param {FC.LimbsState} oldLimbs + * @param {string} returnTo + * @returns {Element|DocumentFragment} + */ +App.Medicine.Limbs.amputate = function(slave, oldLimbs, returnTo) { + const {his} = getPronouns(slave); + + const r = []; + + let implant = false; + if (slave.PLimb < 1 && isProstheticAvailable(slave, "interfaceP1")) { + implant = true; + r.push(App.UI.DOM.makeElement("div", App.UI.DOM.link("Install basic interface", () => install(1)))); + } + if (slave.PLimb < 2 && isProstheticAvailable(slave, "interfaceP2")) { + implant = true; + r.push(App.UI.DOM.makeElement("div", App.UI.DOM.link("Install advanced interface", () => install(2)))); + } + + // check if we can install a limb interface and if yes, give player the option to do so. + if (implant) { + const outerDiv = document.createElement("div"); + outerDiv.id = "amputate"; + outerDiv.append( + App.UI.DOM.makeElement("div", `Since you already have a prosthetic interface prepared for this slave, you can install it during the operation. The procedure will put additional strain on ${his} health but less so than if you were to perform the procedures separately.`), + ...r, + App.UI.DOM.makeElement("div", App.UI.DOM.link("Do not install", noInstall))); + return outerDiv; } /** - * @param {App.Entity.SlaveState} slave - * @param {FC.LimbsState} oldLimbs - * @param {string} returnTo - * @returns {string} + * @param {number} id */ - function amputate(slave, oldLimbs, returnTo) { - const {his} = getPronouns(slave); - - /** - * @param {number} id - */ - function install(id) { - slave.PLimb = id; - surgeryDamage(slave, 10); - App.UI.replace("#amputate", App.Desc.limbChange().prosthetic(slave, oldLimbs, returnTo)); - } + function install(id) { + slave.PLimb = id; + surgeryDamage(slave, 10); + App.UI.DOM.replace("#amputate", App.Medicine.Limbs.prosthetic(slave, oldLimbs, returnTo)); + } - function noInstall() { - App.UI.replace("#amputate", App.Desc.limbChange().reaction(slave, oldLimbs, returnTo)); - } + function noInstall() { + App.UI.DOM.replace("#amputate", App.Medicine.Limbs.reaction(slave, oldLimbs, returnTo)); + } - let implant = false; - let r = ""; + // check if there is a limb interface installed already, if there is show limb selection screen + if (slave.PLimb > 0) { + return App.Medicine.Limbs.prosthetic(slave, oldLimbs, returnTo); + } + return App.Medicine.Limbs.reaction(slave, oldLimbs, returnTo); +}; - if (slave.PLimb < 1 && isProstheticAvailable(slave, "interfaceP1")) { - implant = true; - r += `<div>${App.UI.link("Install basic interface", install, [1])}</div>`; - } - if (slave.PLimb < 2 && isProstheticAvailable(slave, "interfaceP2")) { - implant = true; - r += `<div>${App.UI.link("Install advanced interface", install, [2])}</div>`; - } +/** + * @param {App.Entity.SlaveState} slave + * @param {FC.LimbsState} oldLimbs + * @param {string} returnTo + * @returns {DocumentFragment|HTMLDivElement} + */ +App.Medicine.Limbs.prosthetic = function(slave, oldLimbs, returnTo) { + if (!(isProstheticAvailable(slave, "basicL") || isProstheticAvailable(slave, "sexL") + || isProstheticAvailable(slave, "beautyL") || isProstheticAvailable(slave, "combatL") + || (isProstheticAvailable(slave, "cyberneticL") && slave.PLimb > 1))) { + return App.Medicine.Limbs.reaction(slave, oldLimbs, returnTo); + } + const {him} = getPronouns(slave); - if (implant) { - return "<span id='amputate'>" + - `<div>Since you already have a prosthetic interface prepared for this slave, you can install it during the operation. The procedure will put additional strain on ${his} health but less so than if you were to perform the procedures separately.</div>` + - `${r}<div>${App.UI.link("Do not install", noInstall)}</div></span>`; - } + const div = document.createElement("div"); + div.id = "selector"; - if (slave.PLimb > 0) { - return prosthetic(slave, oldLimbs, returnTo); - } - return reaction(slave, oldLimbs, returnTo); + App.UI.DOM.appendNewElement("div", div, `Since you already have limbs prepared for ${him} you might as well attach them while you are working on ${him}:`); + div.append(App.Medicine.Limbs.selector(slave, oldLimbs, returnTo)); + + return div; +}; + +/** + * Displays a selector for prosthetic limbs of getSlave(V.AS) + * @param {App.Entity.SlaveState} slave + * @param {FC.LimbsState} oldLimbs + * @param {string} [returnTo=""] + * @returns {HTMLSpanElement|DocumentFragment} + */ +App.Medicine.Limbs.selector = function(slave, oldLimbs, returnTo = "") { + const {her} = getPronouns(slave); + if (hasAllNaturalLimbs(slave)) { + return App.UI.DOM.makeElement("span", `You must amputate ${her} limbs before you can attach prosthetics.`, "detail"); + } + if (slave.PLimb < 1) { + return App.UI.DOM.makeElement("span", `You must install a prosthetic interface before you can attach prosthetics.`, "detail"); } - /** - * @param {App.Entity.SlaveState} slave - * @param {FC.LimbsState} oldLimbs - * @param {string} returnTo - * @returns {string} - */ - function prosthetic(slave, oldLimbs, returnTo) { - if (!(isProstheticAvailable(slave, "basicL") || isProstheticAvailable(slave, "sexL") - || isProstheticAvailable(slave, "beautyL") || isProstheticAvailable(slave, "combatL") - || (isProstheticAvailable(slave, "cyberneticL") && slave.PLimb > 1))) { - return reaction(slave, oldLimbs, returnTo); - } - const {him} = getPronouns(slave); + const {his} = getPronouns(slave); + const newState = currentState(slave); - let r = `<div>Since you already have limbs prepared for ${him} you might as well attach them while you are working on ${him}:</div>` + - selector(slave, oldLimbs, returnTo); + const f = document.createDocumentFragment(); - return `<span id="selector">${r}</span>`; - } + const limbSelector = document.createElement("div"); + limbSelector.classList.add("limb-selector"); - /** - * Displays a selector for prosthetic limbs of getSlave(V.AS) - * @param {App.Entity.SlaveState} slave - * @param {{}} oldLimbs - * @param {string} [returnTo] - * @returns {string} - */ - function selector(slave, oldLimbs, returnTo = "") { - const {her} = getPronouns(slave); - if (hasAllNaturalLimbs(slave)) { - return `<span class='detail'>You must amputate ${her} limbs before you can attach prosthetics.</span>`; - } - if (slave.PLimb < 1) { - return "<span class='detail'>You must install a prosthetic interface before you can attach prosthetics.</span>"; - } - const state = currentState(slave); - - /** - * Generates an array with the current limbs of a slave. - * @param {App.Entity.SlaveState} slave - * @returns {number[]} - */ - function currentState(slave) { - let a = []; - a[0] = getLeftArmID(slave); - a[1] = getRightArmID(slave); - a[2] = getLeftLegID(slave); - a[3] = getRightLegID(slave); - return a; - } + App.UI.DOM.appendNewElement("div", limbSelector, ""); + App.UI.DOM.appendNewElement("div", limbSelector, "Left Arm"); + App.UI.DOM.appendNewElement("div", limbSelector, "Right Arm"); + App.UI.DOM.appendNewElement("div", limbSelector, "Left Leg"); + App.UI.DOM.appendNewElement("div", limbSelector, "Right Leg"); - /** - * @param {number} pos - * @param {number} id - * @returns {string} - */ - function entry(pos, id) { - if (state[pos] === 1) { - return "<div></div>"; + limbSelector.append(row("None", 0)); + App.Data.prostheticLimbs.forEach((limb, key) => { + if (isProstheticAvailable(slave, limb.prostheticKey)) { + if (limb.minimumInterface <= slave.PLimb) { + limbSelector.append(row(capFirstChar(limb.short), key)); + } else { + App.UI.DOM.appendNewElement("div", limbSelector, + `You need to upgrade ${his} prosthetic interface to attach ${limb.short} limbs.`, ["full", "detail"]); } - return `<div><<radiobutton "_newState[${pos}]" ${id}${state[pos] === id ? " checked" : ""}>></div>`; } + }); - /** - * @param {string} title - * @param {number} id - * @returns {string} - */ - function row(title, id) { - return `<div>${title}</div>${entry(0, id)}${entry(1, id)}${entry(2, id)}${entry(3, id)}`; - } + f.append(limbSelector); + f.append(apply()); - let r = "<div></div><div>Left Arm</div><div>Right Arm</div><div>Left Leg</div><div>Right Leg</div>"; + return f; - r += row("None", 0); - if (isProstheticAvailable(slave, "basicL")) { - r += row("Basic prosthetic", 2); - } - if (isProstheticAvailable(slave, "sexL")) { - r += row("Advanced sex limb", 3); - } - if (isProstheticAvailable(slave, "beautyL")) { - r += row("Advanced beauty limb", 4); - } - if (isProstheticAvailable(slave, "combatL")) { - r += row("Advanced combat limb", 5); - } - if (isProstheticAvailable(slave, "cyberneticL")) { - if (slave.PLimb > 1) { - r += row("Cybernetic limb", 6); + function apply() { + V.AS = slave.ID; + + return App.UI.DOM.link("Apply", () => { + applySelector(slave, newState); + if (returnTo) { + App.UI.DOM.replace("#selector", App.Medicine.Limbs.reaction(slave, oldLimbs, returnTo)); } else { - r += "<div class='full'><span class='detail'>Install an advanced interface to attach cybernetic limbs.</span></div>"; + V.prostheticsConfig = "limbs"; + V.oldLimbs = oldLimbs; + Engine.play("Prosthetics Configuration"); } - } + }); + } + + /** + * Generates an array with the current limbs of a slave. + * @param {App.Entity.SlaveState} slave + * @returns {number[]} + */ + function currentState(slave) { + return [getLeftArmID(slave), getRightArmID(slave), getLeftLegID(slave), getRightLegID(slave)]; + } - return `<<set _newState = [${state}]>><div class='limb-selector'>${r}</div>${apply()}`; + /** + * @param {number} limb + * @param {number} id + * @returns {HTMLDivElement} + */ + function radio(limb, id) { + const div = document.createElement("div"); - function apply() { - let s; - V.AS = slave.ID; - if (!returnTo) { - s = `<<set $prostheticsConfig = "limbs", $oldLimbs = ${JSON.stringify(oldLimbs)}>>` + - '<<goto "Prosthetics Configuration">>'; - } else { - s = `<<replace "#selector">><<= App.Desc.limbChange().reaction(getSlave(${slave.ID}), ${JSON.stringify(oldLimbs)}, "${returnTo}")>><</replace>>`; + if (newState[limb] !== 1) { + const radio = document.createElement("input"); + radio.type = "radio"; + radio.name = "limb" + limb; + if (newState[limb] === id) { + radio.checked = true; } + radio.onclick = () => { + newState[limb] = id; + }; + div.append(radio); + } - return `<<link "Apply">><<run App.Desc.limbChange().applySelector(getSlave(${slave.ID}), _newState)>>${s}<</link>>`; + return div; + } + + /** + * @param {string} title + * @param {number} id + * @returns {DocumentFragment} + */ + function row(title, id) { + const f = document.createDocumentFragment(); + + App.UI.DOM.appendNewElement("div", f, title); + + for (let i = 0; i < newState.length; i++) { + f.append(radio(i, id)); } + + return f; } /** @@ -235,39 +257,40 @@ App.Desc.limbChange = function() { } } } +}; - /** - * @param {App.Entity.SlaveState} slave - * @param {FC.LimbsState} oldLimbs - * @param {string} returnTo - * @returns {string} - */ - function reaction(slave, oldLimbs, returnTo = "") { - let r = ""; - if (oldLimbs.PLimb !== slave.PLimb) { - r += `Prosthetic interface was ${oldLimbs.PLimb === 0 ? "none" : "basic"} and is now ${slave.PLimb === 1 ? "basic" : "advanced"}. `; - } - if (getLeftArmID(oldLimbs) !== getLeftArmID(slave)) { - r += `Left arm was ${idToDescription(getLeftArmID(oldLimbs))} and is now ${idToDescription(getLeftArmID(slave))}. `; - } - if (getRightArmID(oldLimbs) !== getRightArmID(slave)) { - r += `Right arm was ${idToDescription(getRightArmID(oldLimbs))} and is now ${idToDescription(getRightArmID(slave))}. `; - } - if (getLeftLegID(oldLimbs) !== getLeftLegID(slave)) { - r += `Left leg was ${idToDescription(getLeftLegID(oldLimbs))} and is now ${idToDescription(getLeftLegID(slave))}. `; - } - if (getRightLegID(oldLimbs) !== getRightLegID(slave)) { - r += `Right leg was ${idToDescription(getRightLegID(oldLimbs))} and is now ${idToDescription(getRightLegID(slave))}. `; - } +/** + * @param {App.Entity.SlaveState} slave + * @param {FC.LimbsState} oldLimbs + * @param {string} returnTo + * @returns {DocumentFragment} + */ +App.Medicine.Limbs.reaction = function(slave, oldLimbs, returnTo = "") { + let r = ""; + if (oldLimbs.PLimb !== slave.PLimb) { + r += `Prosthetic interface was ${oldLimbs.PLimb === 0 ? "none" : "basic"} and is now ${slave.PLimb === 1 ? "basic" : "advanced"}. `; + } + if (getLeftArmID(oldLimbs) !== getLeftArmID(slave)) { + r += `Left arm was ${idToDescription(getLeftArmID(oldLimbs))} and is now ${idToDescription(getLeftArmID(slave))}. `; + } + if (getRightArmID(oldLimbs) !== getRightArmID(slave)) { + r += `Right arm was ${idToDescription(getRightArmID(oldLimbs))} and is now ${idToDescription(getRightArmID(slave))}. `; + } + if (getLeftLegID(oldLimbs) !== getLeftLegID(slave)) { + r += `Left leg was ${idToDescription(getLeftLegID(oldLimbs))} and is now ${idToDescription(getLeftLegID(slave))}. `; + } + if (getRightLegID(oldLimbs) !== getRightLegID(slave)) { + r += `Right leg was ${idToDescription(getRightLegID(oldLimbs))} and is now ${idToDescription(getRightLegID(slave))}. `; + } - r += "<br>"; + const f = document.createDocumentFragment(); - r += "<span style='font-style: italic'>Slave's reaction</span>"; - // TODO - // reaction based on limb change & devotion/trust - if (returnTo) { - r = `<br><br>${r}<br>[[Continue|${returnTo}]]`; - } - return r; + App.UI.DOM.appendNewElement("p", f, r,); + App.UI.DOM.appendNewElement("p", f, "Slave's reaction", "note"); + + if (returnTo) { + f.append(App.UI.DOM.passageLink("Continue", returnTo)); } + + return f; }; diff --git a/src/npc/descriptions/style/clothing.js b/src/npc/descriptions/style/clothing.js index 97e5712d6fa652c5374dc7578b7412b84a6e4679..d31aeca2c45707d7da5398df39359c056e77b5e6 100644 --- a/src/npc/descriptions/style/clothing.js +++ b/src/npc/descriptions/style/clothing.js @@ -128,7 +128,7 @@ App.Desc.clothing = function(slave, {market, eventDescription} = {}) { } break; case "attractive lingerie": - r.push(`including a lovely bra with holes to ${his} nipples poke through, a pretty g-string,`); + r.push(`including a lovely bra with holes for ${his} nipples to poke through, a pretty g-string,`); if (hasAnyLegs(slave)) { r.push(`sheer stockings, and a garter belt.`); if (slave.vagina === 0) { diff --git a/src/npc/generate/newSlaveIntro.js b/src/npc/generate/newSlaveIntro.js index b6cdc50e2dfd925cf9195037a5aab60c0cdbd176..5812e32fb3ecdfa97b7bf951a52500fc28d6e7d8 100644 --- a/src/npc/generate/newSlaveIntro.js +++ b/src/npc/generate/newSlaveIntro.js @@ -2004,10 +2004,9 @@ App.UI.newSlaveIntro = function(slave, slave2, {tankBorn = false, momInterest = choice({ linkName: `Give ${him} a smart clitoral piercing`, result: function(slave) { - const r = []; cashX(forceNeg(V.SPcost), "slaveMod", slave); - r.push(`You take ${him} to the body modification studio, strap ${him} down, pierce ${his} clit, and insert what appears to be a large stainless steel barbell piercing. It actually contains a device that can vibrate to give ${him} sexual stimulation or create subtle pain to suppress pleasure. It is connected wirelessly to the arcology, which can be given instructions to encourage or discourage sexual pleasure in specific situations. You run a quick test. On the oral setting, as soon as ${he} kneels in front of your crotch, ${he} gasps as the stimulation starts. On the anal setting, ${he} whimpers when you run a finger across ${his} asshole.`); - return r.join(" "); + slave.clitPiercing = 3; + return `You take ${him} to the body modification studio, strap ${him} down, pierce ${his} clit, and insert what appears to be a large stainless steel barbell piercing. It actually contains a device that can vibrate to give ${him} sexual stimulation or create subtle pain to suppress pleasure. It is connected wirelessly to the arcology, which can be given instructions to encourage or discourage sexual pleasure in specific situations. You run a quick test. On the oral setting, as soon as ${he} kneels in front of your crotch, ${he} gasps as the stimulation starts. On the anal setting, ${he} whimpers when you run a finger across ${his} asshole.`; }, note: `This option costs ${cashFormat(V.SPcost)}` }); diff --git a/src/npc/interaction/FSuckle.tw b/src/npc/interaction/FSuckle.tw index 2aee8aac679ddf7db8c1fb9a40b9993b6b7b34c2..a0e0a55cdfd3627b7cdcb2356486cad0d711ab7e 100644 --- a/src/npc/interaction/FSuckle.tw +++ b/src/npc/interaction/FSuckle.tw @@ -405,7 +405,7 @@ $his other breast<<if $PC.dick != 0>><<if $PC.balls >= 10>> and backflowing hard $He freezes in fear, unsure of what to do other than let you rest. <<elseif getSlave($AS).devotion < -20>> $He groans at the weight leaning against $him and begrudgingly rests $his arm atop your pregnant bulge. - <<if $PC.pregSource == getSlave($AS).ID>> + <<if $PC.pregSource == $AS>> $He takes a moment to appreciate the size of your belly, knowing $he was the one that seeded you. $He admires $his work with pride. <<else>> $He knows $he has little choice but to put up with it. diff --git a/src/npc/interaction/fAbuse.tw b/src/npc/interaction/fAbuse.tw index 266ac82a3d89fda3428ec704e5af1ec552912de9..abe601fedf816d28f4e40c93ee0cb185f19668d7 100644 --- a/src/npc/interaction/fAbuse.tw +++ b/src/npc/interaction/fAbuse.tw @@ -2,7 +2,7 @@ <<run App.Utils.setLocalPronouns(getSlave($AS))>> -<<if (getSlave($AS).ID == $BodyguardID)>> +<<if ($AS == $BodyguardID)>> <<if (getSlave($AS).fetish == "masochist") && (getSlave($AS).fetishKnown == 1) && (getSlave($AS).fetishStrength > 95)>> Knowing how much your bodyguard likes being hurt, you decide to reward $him in $his own particular way. <<elseif (getSlave($AS).muscles < -5) && (getSlave($AS).skill.combat == 0)>> @@ -419,15 +419,15 @@ from your victim. $He's got no special physical targets for abuse, so you just rape $him hard and fast, raining stinging slaps down on $him as you do. $He cries and whimpers; you finish. <<= VCheck.Both(getSlave($AS), 1)>> <</if>> -<<if (getSlave($AS).ID !== $BodyguardID)>> +<<if ($AS !== $BodyguardID)>> This leaves $him sobbing on the floor <<if ($PC.dick == 0)>>as you shuck off the strap-on and drop it on $his face<<else>>with cum dripping out of $him<</if>>. -<<elseif (getSlave($AS).ID == $BodyguardID) && (getSlave($AS).fetish == "masochist") && (getSlave($AS).fetishKnown == 1) && (getSlave($AS).fetishStrength > 95)>> +<<elseif ($AS == $BodyguardID) && (getSlave($AS).fetish == "masochist") && (getSlave($AS).fetishKnown == 1) && (getSlave($AS).fetishStrength > 95)>> $He thanks you rapidly, trying to break away from the pleasure of your reward. $He quickly gets back to $his feet and stumbles towards the shower, to make sure you won't stay unprotected too long. <<else>> Even though $he's in a somewhat bad shape, $he still jumps back to $his feet and stumbles towards the shower, to make sure you won't stay unprotected too long. <</if>> -<<if (getSlave($AS).ID !== $BodyguardID)>> +<<if ($AS !== $BodyguardID)>> <<if getSlave($AS).minorInjury == 0>> <<if _assPain == 1>> The anal rape leaves $him with a sore butthole. @@ -443,7 +443,7 @@ from your victim. <<run healthDamage(getSlave($AS), 40)>> <</if>> -<<if (getSlave($AS).ID == $BodyguardID)>> +<<if ($AS == $BodyguardID)>> <<if (getSlave($AS).muscles <= 5) && (getSlave($AS).skill.combat == 0)>> Your bodyguard accepts this as a punishment for $his uselessness. <<elseif (getSlave($AS).muscles <= 5) && (getSlave($AS).skill.combat != 0)>> @@ -480,7 +480,7 @@ from your victim. <</if>> <<if (random(1,100) > (20+getSlave($AS).devotion+getSlave($AS).trust))>> - <<if (getSlave($AS).fetish !== "submissive") && (getSlave($AS).fetish !== "masochist") && (getSlave($AS).ID != $BodyguardID)>> + <<if (getSlave($AS).fetish !== "submissive") && (getSlave($AS).fetish !== "masochist") && ($AS != $BodyguardID)>> <<set _seed = random(1,8)>> Brutal abuse has left $him <<if (_seed == 1) && (getSlave($AS).behavioralFlaw !== "odd")>> @@ -513,7 +513,7 @@ from your victim. <</if>> <</if>> <</if>> -<<if (random(1,100) > (50+getSlave($AS).devotion+getSlave($AS).trust)) && (getSlave($AS).ID !== $BodyguardID)>> +<<if (random(1,100) > (50+getSlave($AS).devotion+getSlave($AS).trust)) && ($AS !== $BodyguardID)>> <<if (getSlave($AS).fetish !== "mindbroken") && (getSlave($AS).fetishKnown == 0) && (getSlave($AS).clitSetting !== getSlave($AS).fetish)>> $His acceptance of your abuse has twisted $his <<if (random(1,2) == 1) && (getSlave($AS).fetish !== "submissive")>> diff --git a/src/npc/interaction/fDick.tw b/src/npc/interaction/fDick.tw index 0155f53928fa763b8857cc51ee4bb3262921a2ce..fee893171945f35b4329eff571021c41e5ae430b 100644 --- a/src/npc/interaction/fDick.tw +++ b/src/npc/interaction/fDick.tw @@ -127,7 +127,7 @@ Such audacity takes you entirely by surprise and gives $him the edge $he needs to pull it off. $He vigorously pistons in and out of you with little regard for you<<if $PC.pregKnown == 1>> or your pregnancy<</if>>, fucking you senseless until $he has had enough and cums deep inside your <<if $PC.vagina != -1>>pussy<<else>>ass<</if>>. <<if canImpreg($PC, getSlave($AS)) && getSlave($AS).fetish == "pregnancy">> <<if hasAnyArms(getSlave($AS))>>Running a hand across<<else>>Grinding against<</if>> your firm belly, $he decides $his job is not yet done and begins reaming you once more, dead set on taking this opportunity to @@.orangered;show you your place by knocking you up with $his child.@@ $He manages to empty $his balls in your womb several more times before exhaustion kicks in, forcing $him to leave you twitching and drooling cum. - <<= knockMeUp($PC, 100, 0, getSlave($AS).ID)>> + <<= knockMeUp($PC, 100, 0, $AS)>> <<set getSlave($AS).counter.penetrative += 5, $penetrativeTotal += 5>> <<else>> Contently sighing, $he pulls $his still very hard cock from your overwhelmed body and forces it into your mouth, ready to blow a second load and give you a @@.orangered;taste of your place,@@ before leaving you twitching and drooling cum. @@ -256,10 +256,10 @@ <<if canImpreg($PC, getSlave($AS))>> <<if getSlave($AS).diet == "cum production">> <<set _pregChance = (getSlave($AS).balls * 5 * 1.2)>> - <<= knockMeUp($PC, _pregChance, 0, getSlave($AS).ID)>> + <<= knockMeUp($PC, _pregChance, 0, $AS)>> <<else>> <<set _pregChance = (getSlave($AS).balls * 5)>> - <<= knockMeUp($PC, _pregChance, 0, getSlave($AS).ID)>> + <<= knockMeUp($PC, _pregChance, 0, $AS)>> <</if>> <</if>> <<if $policies.sexualOpenness == 0>> diff --git a/src/npc/interaction/fFeelings.tw b/src/npc/interaction/fFeelings.tw index fdfa53f0dc7881097ca53d9ffcb0f40c70c01b91..22cd90895d5bedcf428146f3d51460c2b00884b7 100644 --- a/src/npc/interaction/fFeelings.tw +++ b/src/npc/interaction/fFeelings.tw @@ -1270,9 +1270,9 @@ My favorite part of my body i<<s>> "I — I'm fucking my mother," $he bursts out, blushing even harder. "It'<<s>> <<s>>o fucking wrong, but <<he 2>>'<<s>> <<s>>uch a hot MILF, I can't <<s>>top. <<elseif getSlave($AS).father == $slaves[_partner].ID>> I — I'm fucking my father," $he bursts out, blushing even harder. "It'<<s>> <<s>>o fucking wrong, but <<he 2>> know<<s>> <<s>>o much about penetration, I can't <<s>>top. - <<elseif $slaves[_partner].mother == getSlave($AS).ID>> + <<elseif $slaves[_partner].mother == $AS>> I — I'm fucking my <<daughter 2>>," $he bursts out, blushing even harder. "It'<<s>> <<s>>o fucking wrong, but <<he 2>> ha<<s>> <<s>>uch a hot little body, I can't <<s>>top. - <<elseif $slaves[_partner].father == getSlave($AS).ID>> + <<elseif $slaves[_partner].father == $AS>> I — I'm fucking my <<daughter 2>>," $he bursts out, blushing even harder. "It'<<s>> <<s>>o fucking wrong, but <<he 2>> ha<<s>> <<s>>uch a hot little body. <<He 2>> look<<s>> <<s>>o much like <<his 2>> mother, I can't <<s>>top. <<elseif areSisters(getSlave($AS), $slaves[_partner]) == 1>> I — I'm fucking my twin <<sister 2>>," $he bursts out, blushing even harder. "It'<<s>> <<s>>o fucking wrong, but <<he 2>>'<<s>> <<s>>o hot, I can't <<s>>top. @@ -1585,7 +1585,7 @@ My favorite part of my body i<<s>> <<if (getSlave($AS).devotion > 75)>> <<if getSlave($AS).tankBaby > 0|| getSlave($AS).mother == -1 || (areSisters(getSlave($AS), $PC) && getSlave($AS).actualAge <= $PC.actualAge)>> I've known you my whole life, <<Master>>, I can't really think of any time<<s>> you weren't there for me. - <<elseif (areSisters(getSlave($AS), $PC) && getSlave($AS).actualAge > $PC.actualAge) || $PC.mother == getSlave($AS).ID || $PC.father == getSlave($AS).ID>> + <<elseif (areSisters(getSlave($AS), $PC) && getSlave($AS).actualAge > $PC.actualAge) || $PC.mother == $AS || $PC.father == $AS>> You're my dear <<Master>>. I've known you <<s>>in<<c>>e you were born, and I will alway<<s>> be watching out for you, no matter what. <<elseif (getSlave($AS).weekAcquired == 0) && ($week > 104)>> I feel like I've known you my whole life, <<Master>>, and I would follow you to the end of the earth. diff --git a/src/npc/interaction/fSlaveSelfImpreg.tw b/src/npc/interaction/fSlaveSelfImpreg.tw index c3eff2cf1e6064a345df72d0a6caa3c426c728ed..649f87ea8025b2ea3247d05ab7fce75d95357d7c 100644 --- a/src/npc/interaction/fSlaveSelfImpreg.tw +++ b/src/npc/interaction/fSlaveSelfImpreg.tw @@ -190,7 +190,7 @@ You repeat this ritual throughout the week, ensuring that <<= getSlave($AS).slav is @@.lime;carrying $his own child.@@ <</if>> -<<= knockMeUp(getSlave($AS), 100, 2, getSlave($AS).ID, 1)>> +<<= knockMeUp(getSlave($AS), 100, 2, $AS, 1)>> <<if $arcologies[0].FSRestart != "unset">> <<if (getSlave($AS).breedingMark != 1 || $propOutcome == 0) && $eugenicsFullControl != 1>> diff --git a/src/npc/interaction/fSlaveSlaveVagConsummate.tw b/src/npc/interaction/fSlaveSlaveVagConsummate.tw index 33b0bfacec8508128fe17ddd9b9b5a5278c0c5cf..bbd23679f1f1bddcea4c32e391535405831f2268 100644 --- a/src/npc/interaction/fSlaveSlaveVagConsummate.tw +++ b/src/npc/interaction/fSlaveSlaveVagConsummate.tw @@ -61,13 +61,13 @@ You take a look at the slave you selected. <<if _isIncest == 1>> $slaverapistx.slaveName is well aware that _he2 is about to rape - <<if $slaverapistx.father == getSlave($AS).ID && $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.father == $AS && $slaverapistx.mother == $AS>> the slave that is both _his2 mother and _his2 father, <<elseif getSlave($AS).mother == $slaverapistx.ID || getSlave($AS).father == $slaverapistx.ID>> _his2 own <<print relativeTerm($slaverapistx, getSlave($AS))>>, - <<elseif $slaverapistx.mother == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS>> _his2 own mother, - <<elseif $slaverapistx.mother == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS>> the slave that fathered _him2, <<else>> _his2 <<print relativeTerm($slaverapistx, getSlave($AS))>>, @@ -79,7 +79,7 @@ You take a look at the slave you selected. but despite _his2 conflicted feelings _his2 arousal is clear. <</if>> <<set _incestMood = "Top">> - <<elseif ($slaverapistx.relationshipTarget == getSlave($AS).ID) && ($slaverapistx.relationship > 2)>> + <<elseif ($slaverapistx.relationshipTarget == $AS) && ($slaverapistx.relationship > 2)>> but since _he2's already in a sexual relationship with $him, it's only special because _his2 <<= getWrittenTitle($slaverapistx)>> is watching. <<set _incestMood = "Top">> <<else>> @@ -102,7 +102,7 @@ Next, you see to <<= getSlave($AS).slaveName>>. <<= getSlave($AS).slaveName>> is fully naked and <<if canSee(getSlave($AS))>>looking up at<<else>>waiting in front of<</if>> <<if getSlave($AS).father == $slaverapistx.ID && getSlave($AS).mother == $slaverapistx.ID>> the slave that is both $his mother and $his father, - <<elseif $slaverapistx.mother == getSlave($AS).ID || $slaverapistx.father == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS || $slaverapistx.father == $AS>> $his own <<print relativeTerm(getSlave($AS), $slaverapistx)>>, <<elseif getSlave($AS).mother == $slaverapistx.ID>> $his own mother, diff --git a/src/npc/interaction/passage/fMarry.tw b/src/npc/interaction/passage/fMarry.tw index fdeaa42dd9abeaaa5f09156493b8ceb7d5850e1f..2e966590f6cdb74475ab397018c83a92152a738b 100644 --- a/src/npc/interaction/passage/fMarry.tw +++ b/src/npc/interaction/passage/fMarry.tw @@ -713,7 +713,7 @@ You tell <<= getSlave($AS).slaveName>> that you're going to marry $him. (A propo <<replace "#result">> You order $assistant.name to invite deserving citizens to a straightforward ceremony for a slave being married to a slaveowner, and to make the arrangement. The wedding will take place during the upcoming week. <<set $weddingPlanned = 1>> - <<set $marrying.push(getSlave($AS).ID)>> + <<set $marrying.push($AS)>> <<run cashX(-10000, "event", getSlave($AS))>> <</replace>> <</link>> //This will cost <<print cashFormat(10000)>>// @@ -735,7 +735,7 @@ You tell <<= getSlave($AS).slaveName>> that you're going to marry $him. (A propo <<replace "#result">> You order $assistant.name to invite deserving citizens to an orgiastic ceremony for a slave being married to a slaveowner, and to make the arrangements. The wedding orgy will take place during the upcoming week. <<set $weddingPlanned = 2>> - <<set $marrying.push(getSlave($AS).ID)>> + <<set $marrying.push($AS)>> <<run cashX(-10000, "event", getSlave($AS))>> <</replace>> <</link>> //This will involve the slave having sex with a very large number of citizens, and will cost <<print cashFormat(10000)>>// @@ -758,7 +758,7 @@ You tell <<= getSlave($AS).slaveName>> that you're going to marry $him. (A propo <<replace "#result">> You order $assistant.name to invite deserving citizens to a ceremony for a fertile slave being married to a slaveowner, and to make the arrangements. The wedding will take place during the upcoming week. <<set $weddingPlanned = 3>> - <<set $marrying.push(getSlave($AS).ID)>> + <<set $marrying.push($AS)>> <<run cashX(-10000, "event", getSlave($AS))>> <</replace>> <</link>> //This will involve you impregnating the slave, and will cost <<print cashFormat(10000)>>// @@ -782,7 +782,7 @@ You tell <<= getSlave($AS).slaveName>> that you're going to marry $him. (A propo <<replace "#result">> You order $assistant.name to invite deserving citizens to a straightforward ceremony for a slave being married to a slaveowner, and to make the arrangement. The wedding will take place during the upcoming week. <<set $weddingPlanned = 1>> - <<set $marrying.push(getSlave($AS).ID)>> + <<set $marrying.push($AS)>> <<run cashX(-10000, "event", getSlave($AS))>> <</replace>> <</link>> //This will cost <<print cashFormat(10000)>>// @@ -792,7 +792,7 @@ You tell <<= getSlave($AS).slaveName>> that you're going to marry $him. (A propo <<replace "#result">> You order $assistant.name to invite deserving citizens to an orgiastic ceremony for a slave being married to a slaveowner, and to make the arrangements. The wedding orgy will take place during the upcoming week. <<set $weddingPlanned = 2>> - <<set $marrying.push(getSlave($AS).ID)>> + <<set $marrying.push($AS)>> <<run cashX(-10000, "event", getSlave($AS))>> <</replace>> <</link>> //This will involve the slave having sex with a very large number of citizens, and will cost <<print cashFormat(10000)>>// @@ -803,7 +803,7 @@ You tell <<= getSlave($AS).slaveName>> that you're going to marry $him. (A propo <<replace "#result">> You order $assistant.name to invite deserving citizens to a ceremony for a fertile slave being married to a slaveowner, and to make the arrangements. The wedding will take place during the upcoming week. <<set $weddingPlanned = 3>> - <<set $marrying.push(getSlave($AS).ID)>> + <<set $marrying.push($AS)>> <<run cashX(-10000, "event", getSlave($AS))>> <</replace>> <</link>> //This will involve you impregnating the slave, and will cost <<print cashFormat(10000)>>// diff --git a/src/npc/interaction/passage/fSlaveImpreg.tw b/src/npc/interaction/passage/fSlaveImpreg.tw index 7b22053148cf26ed69e162fb0f03a997f26cce06..294dbc3ced610cca0d353a4f1e83834e84328f51 100644 --- a/src/npc/interaction/passage/fSlaveImpreg.tw +++ b/src/npc/interaction/passage/fSlaveImpreg.tw @@ -8,7 +8,7 @@ <h3>Select an eligible slave to serve as the semen donatrix</h3> -<<set _eligibles = $slaves.filter((s) => (s.ID != getSlave($AS).ID) && canImpreg(getSlave($AS), s) && canPenetrate(s))>> +<<set _eligibles = $slaves.filter((s) => (s.ID != $AS) && canImpreg(getSlave($AS), s) && canPenetrate(s))>> <<set _kinship = ibc.kinship_one_many(getSlave($AS), _eligibles)>> <<for _i = 0; _i < _eligibles.length; _i++>> <<set _name = SlaveFullName(_eligibles[_i])>> diff --git a/src/npc/interaction/passage/fSlaveSlaveDick.tw b/src/npc/interaction/passage/fSlaveSlaveDick.tw index 95cdaf866991c189581420301ba529ed96e7c26e..ef39a98d7c4e3c449284da0f74ef66f48f99c85b 100644 --- a/src/npc/interaction/passage/fSlaveSlaveDick.tw +++ b/src/npc/interaction/passage/fSlaveSlaveDick.tw @@ -8,7 +8,7 @@ <h2>Select an eligible slave</h2> -<<set _eligibles = $slaves.filter((s) => (s.ID != getSlave($AS).ID) && isSlaveAvailable(s) && canDoVaginal(s) && canStand(s) /* amp-amp scene is not written */)>> +<<set _eligibles = $slaves.filter((s) => (s.ID != $AS) && isSlaveAvailable(s) && canDoVaginal(s) && canStand(s) /* amp-amp scene is not written */)>> <<for _i = 0; _i < _eligibles.length; _i++>> <div> <<set _name = SlaveFullName(_eligibles[_i])>> diff --git a/src/npc/interaction/passage/fSlaveSlaveDickConsummate.tw b/src/npc/interaction/passage/fSlaveSlaveDickConsummate.tw index 01248d8b1ef2110a73a14e9d82c215e01efb596e..5ac907ab513b9505bcd78565f56f9fec142915b1 100644 --- a/src/npc/interaction/passage/fSlaveSlaveDickConsummate.tw +++ b/src/npc/interaction/passage/fSlaveSlaveDickConsummate.tw @@ -130,7 +130,7 @@ You call $slaverapistx.slaveName into the room. <<if _isIncest == 1>> <<if getSlave($AS).father == $slaverapistx.ID && getSlave($AS).mother == $slaverapistx.ID>> the slave that is both $his mother and $his father, - <<elseif $slaverapistx.mother == getSlave($AS).ID || $slaverapistx.father == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS || $slaverapistx.father == $AS>> $his own <<print relativeTerm(getSlave($AS), $slaverapistx)>>, <<elseif getSlave($AS).mother == $slaverapistx.ID>> $his own mother, @@ -148,7 +148,7 @@ You call $slaverapistx.slaveName into the room. <<= getSlave($AS).slaveName>>'s simple mind does not even acknowledge that $slaverapistx.slaveName is <<if getSlave($AS).father == $slaverapistx.ID && getSlave($AS).mother == $slaverapistx.ID>> the slave that is both $his mother and $his father, - <<elseif $slaverapistx.mother == getSlave($AS).ID || $slaverapistx.father == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS || $slaverapistx.father == $AS>> $his own <<print relativeTerm(getSlave($AS), $slaverapistx)>>, <<elseif getSlave($AS).mother == $slaverapistx.ID>> $his own mother, @@ -167,7 +167,7 @@ You call $slaverapistx.slaveName into the room. <<= getSlave($AS).slaveName>> is fully naked and <<if canSee(getSlave($AS))>>looking up at<<else>>waiting in front of<</if>> <<if getSlave($AS).father == $slaverapistx.ID && getSlave($AS).mother == $slaverapistx.ID>> the slave that is both $his mother and $his father, - <<elseif $slaverapistx.mother == getSlave($AS).ID || $slaverapistx.father == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS || $slaverapistx.father == $AS>> $his own <<print relativeTerm(getSlave($AS), $slaverapistx)>>, <<elseif getSlave($AS).mother == $slaverapistx.ID>> $his own mother, @@ -224,13 +224,13 @@ You call $slaverapistx.slaveName into the room. <<else>> <<if _isIncest == 1>> $slaverapistx.slaveName sees - <<if $slaverapistx.father == getSlave($AS).ID && $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.father == $AS && $slaverapistx.mother == $AS>> the slave that is both _his2 mother and _his2 father <<elseif getSlave($AS).mother == $slaverapistx.ID || getSlave($AS).father == $slaverapistx.ID>> _his2 own <<print relativeTerm($slaverapistx, getSlave($AS))>> - <<elseif $slaverapistx.mother == getSlave($AS).ID>> + <<elseif $slaverapistx.mother == $AS>> _his2 own mother - <<elseif $slaverapistx.father == getSlave($AS).ID>> + <<elseif $slaverapistx.father == $AS>> the slave that fathered _him2 <<else>> _his2 <<print relativeTerm($slaverapistx, getSlave($AS))>> @@ -244,7 +244,7 @@ You call $slaverapistx.slaveName into the room. <<set _incestMood = "Top">> and becomes indecently aroused at their horrified expressions for the <<if ($slaverapistx.sexualQuirk == "perverted")>>perverted<<else>>sinful<</if>> incest to come. <</if>> - <<elseif ($slaverapistx.relationshipTarget == getSlave($AS).ID) && ($slaverapistx.relationship > 2)>> + <<elseif ($slaverapistx.relationshipTarget == $AS) && ($slaverapistx.relationship > 2)>> and licks _his2 lips involuntarily. <<else>> <<if $slaverapistx.devotion > 95>> @@ -304,7 +304,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -333,7 +333,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -377,7 +377,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -408,7 +408,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -438,7 +438,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -467,7 +467,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -496,7 +496,7 @@ You call $slaverapistx.slaveName into the room. As you anticipated, $slaverapistx.slaveName refuses to give <<= getSlave($AS).slaveName>> _his2 virginity. However, since $slaverapistx.slaveName is restrained _his2 resistance amounts to @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging.@@ Naturally, this cruel act @@.lime;breaks in _his2 pussy.@@ <<set $slaverapistx.vagina = 1, $slaverapistx.devotion -= 5, $slaverapistx.trust -= 5>> <</if>> - <<if $slaverapistx.mother == getSlave($AS).ID>> + <<if $slaverapistx.mother == $AS>> <<if (getSlave($AS).counter.penetrative == 0)>> <<= getSlave($AS).slaveName>> gasps and $his eyes widen as $he feels the tender folds of a pussy — and none other than $his <<print relativeTerm(getSlave($AS), $slaverapistx)>>'s — embracing $his <<if (getSlave($AS).clit >= 4)>>massive clit<<else>>_dickSize dick<</if>> for the first time. <<else>> @@ -535,14 +535,14 @@ You call $slaverapistx.slaveName into the room. <<set getSlave($AS).counter.penetrative += 1, $penetrativeTotal += 1, $slaverapistx.counter.vaginal += 1, $vaginalTotal += 1>> /% Friendship/lust? %/ -<<if ([2].includes(getSlave($AS).relationship) && getSlave($AS).relationshipTarget == $slaverapistx.ID) && ([2].includes($slaverapistx.relationship) && $slaverapistx.relationshipTarget == getSlave($AS).ID)>> +<<if ([2].includes(getSlave($AS).relationship) && getSlave($AS).relationshipTarget == $slaverapistx.ID) && ([2].includes($slaverapistx.relationship) && $slaverapistx.relationshipTarget == $AS)>> You keep <<= getSlave($AS).slaveName>>'s dick intimate with $slaverapistx.slaveName's pussy for awhile, something the two friends haven't been sharing with each other. In the end, you are certain they got closer, becoming @@.lightgreen;friends with benefits.@@ <<set getSlave($AS).relationship++, $slaverapistx.relationship++>> <</if>> /% pregnancy test %/ <<if canImpreg($slaverapistx, getSlave($AS))>> - <<= knockMeUp($slaverapistx, 25, 0, getSlave($AS).ID)>> + <<= knockMeUp($slaverapistx, 25, 0, $AS)>> <</if>> /% save changes %/ diff --git a/src/npc/interaction/passage/fSlaveSlaveVag.tw b/src/npc/interaction/passage/fSlaveSlaveVag.tw index f9ba29ce39375df7a271ebfe793f221e6f21f4ed..727ac81f3e9a4095fec7ea315fd4d8c4990fb0b2 100644 --- a/src/npc/interaction/passage/fSlaveSlaveVag.tw +++ b/src/npc/interaction/passage/fSlaveSlaveVag.tw @@ -9,7 +9,7 @@ <h2>Select an eligible slave</h2> -<<set _eligibles = $slaves.filter((s) => (s.ID != getSlave($AS).ID) && isSlaveAvailable(s) && (canPenetrate(s) || s.clit >= 4))>> +<<set _eligibles = $slaves.filter((s) => (s.ID != $AS) && isSlaveAvailable(s) && (canPenetrate(s) || s.clit >= 4))>> <<for _i = 0; _i < _eligibles.length; _i++>> <div> <<set _name = SlaveFullName(_eligibles[_i])>> diff --git a/src/npc/interaction/passage/matchmaking.tw b/src/npc/interaction/passage/matchmaking.tw index dcccc4f229bdc2ea734340d84c60ac881fc22473..970cc6c2f70b112c6e1127fd1ac17cda8afb4899 100644 --- a/src/npc/interaction/passage/matchmaking.tw +++ b/src/npc/interaction/passage/matchmaking.tw @@ -38,7 +38,7 @@ Their relationship would probably be somewhat artificial at first, and they'd ha <br><br>__Put $him with another worshipful <<if getSlave($AS).relationship == -2>>emotionally bonded slave<<else>>emotional slut<</if>>:__ <<includeDOM App.UI.SlaveList.slaveSelectionList( - s => s.devotion >= 100 && s.relationship === getSlave($AS).relationship && s.ID !== getSlave($AS).ID, + s => s.devotion >= 100 && s.relationship === getSlave($AS).relationship && s.ID !== $AS, App.UI.SlaveList.SlaveInteract.stdInteract, null, (s) => App.UI.DOM.passageLink('Match them', 'Matchmaking', () => { variables().subSlave = s; }) @@ -183,7 +183,7 @@ Being ordered into a relationship would be difficult for anyone, but they're so <</if>> <<set $subSlave.relationship = 4>> -<<set $subSlave.relationshipTarget = getSlave($AS).ID>> +<<set $subSlave.relationshipTarget = $AS>> <<set $subSlave.devotion -= 20>> <<set getSlave($AS).relationship = 4>> <<set getSlave($AS).relationshipTarget = $subSlave.ID>> diff --git a/src/npc/interaction/slaveOnSlaveFeeding/slaveOnSlaveFeeding.js b/src/npc/interaction/slaveOnSlaveFeeding/slaveOnSlaveFeeding.js index 7ca00156ab1acde44f9ad4412b15d24cbc1a8710..6f2bf3bda84b02de0ac90ca5e40ff844e11e390f 100644 --- a/src/npc/interaction/slaveOnSlaveFeeding/slaveOnSlaveFeeding.js +++ b/src/npc/interaction/slaveOnSlaveFeeding/slaveOnSlaveFeeding.js @@ -128,7 +128,7 @@ App.UI.SlaveInteract.slaveOnSlaveFeedingSelection = function(slave) { break; } } - if (tapSlave.rivalryTarget === getSlave(V.AS).ID) { + if (tapSlave.rivalryTarget === V.AS) { switch (tapSlave.relationship) { case 1: el.append(`dislikes`); diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js index b440b57db2f1c5cb0cb5c2473b8b9cbe6910677a..4742905683b367543449ed1a92fe21fe3eea94d6 100644 --- a/src/npc/startingGirls/startingGirls.js +++ b/src/npc/startingGirls/startingGirls.js @@ -90,6 +90,8 @@ App.StartingGirls.cleanup = function(slave) { slave.prestige = Math.clamp(slave.prestige, 0, 3) || 0; if (slave.prestige === 0) { slave.prestigeDesc = 0; + } else if (slave.prestigeDesc === 0) { + slave.prestigeDesc = ""; } }; @@ -1200,7 +1202,9 @@ App.StartingGirls.profile = function(slave) { App.UI.DOM.appendNewElement("h3", el, "Optional customizations"); options = new App.UI.OptionsGroup(); - options.addOption("Origin story", "origin", slave).showTextBox({large: true}).addComment("Use complete, capitalized and punctuated sentences."); + options.addOption("Origin story", "origin", slave) + .showTextBox({large: true, forceString: true}) + .addComment("Use complete, capitalized and punctuated sentences."); options.addOption("Origin override", "originOverride", V) .addValue("Enable", 1).on() @@ -1208,7 +1212,9 @@ App.StartingGirls.profile = function(slave) { .addComment("Prevent Starting Girls from overwriting custom origin and tattoo with its defaults."); if (slave.prestige) { - options.addOption("Prestige description", "prestigeDesc", slave).showTextBox().addComment("Use complete, capitalized and punctuated sentences."); + options.addOption("Prestige description", "prestigeDesc", slave) + .showTextBox({large: true, forceString: true}) + .addComment("Use complete, capitalized and punctuated sentences."); } options.addOption("Description", "desc", slave.custom).showTextBox().addComment("Use complete, capitalized and punctuated sentences."); options.addOption("Label", "label", slave.custom).showTextBox().addComment("Use a short phrase"); diff --git a/src/npc/surgery/surgery.js b/src/npc/surgery/surgery.js index 6c7ab79e59fa35ed9de98f477bf12fd3a6816431..d2a0f56ce704f8a411166d2c3ded2eac986d9eb5 100644 --- a/src/npc/surgery/surgery.js +++ b/src/npc/surgery/surgery.js @@ -644,8 +644,8 @@ globalThis.surgeryAmp = function(slave, part, cheat = false) { /** * @param {FC.HumanState} slave - * @param {string} side - * @param {string} action + * @param {"both"|"left"|"right"} side + * @param {"normal"|"glass"|"cybernetic"|"remove"|"blind"|"blur"|"fix"} action */ globalThis.eyeSurgery = function(slave, side, action) { if (side === "both") { @@ -655,7 +655,7 @@ globalThis.eyeSurgery = function(slave, side, action) { } if (side !== "left" && side !== "right") { return; } // make sure side can be used to access the object - let eyeExists = slave.eye[side] !== null; + const eyeExists = slave.eye[side] !== null; /* actions that don't need an eye */ switch (action) { @@ -676,32 +676,33 @@ globalThis.eyeSurgery = function(slave, side, action) { slave.eye[side].type = 3; slave.eye[side].vision = 2; return; - } - - function addEye(slave) { - slave.eye[side] = new App.Entity.SingleEyeState(); - resetEyeColor(slave, side); - } - - /* actions that need an eye */ - if (!eyeExists) { return; } // make sure the eye exists - - switch (action) { case "remove": - slave.eye[side] = null; - break; + if (eyeExists) { + slave.eye[side] = null; + } + return; case "blind": - slave.eye[side].vision = 0; - break; + if (eyeExists) { + slave.eye[side].vision = 0; + } + return; case "blur": - slave.eye[side].vision = 1; - break; + if (eyeExists) { + slave.eye[side].vision = 1; + } + return; case "fix": - slave.eye[side].vision = 2; - break; + if (eyeExists) { + slave.eye[side].vision = 2; + } + return; default: - // eslint-disable-next-line no-console - console.log(`ERROR: Unknown surgery action: ` + action); + throw `${typeof action} "${action}" not found`; + } + + function addEye(slave) { + slave.eye[side] = new App.Entity.SingleEyeState(); + resetEyeColor(slave, side); } }; diff --git a/src/npc/surgery/surgeryDegradation.js b/src/npc/surgery/surgeryDegradation.js index 7bc7d353888a8adcd5ceebb1a3bab771f9e36eea..1d2d186b04c68c68ed82796b09e807f671e7e1f2 100644 --- a/src/npc/surgery/surgeryDegradation.js +++ b/src/npc/surgery/surgeryDegradation.js @@ -533,7 +533,7 @@ App.UI.SlaveInteract.surgeryDegradation = function(slave) { } } break; - case "remove blinded eyes": + case "remove blind eyes": r.push(`Surgery doesn't take long, but since it was invasive there are <span class="health.dec">moderate health consequences.</span> As anesthesia wears off ${he} tries to open ${his} eyes and finds ${he} is unable to.`); if (slave.fetish !== "mindbroken" && slave.fuckdoll === 0) { if (slave.devotion > 50) { @@ -3485,16 +3485,12 @@ App.UI.SlaveInteract.surgeryDegradation = function(slave) { break; case "amp": V.nextButton = " "; - const ampFrag = jQuery(document.createDocumentFragment()); - ampFrag.wiki(App.Desc.limbChange().amputate(slave, V.oldLimbs, "Remote Surgery")); - r.push(ampFrag); + r.push(App.Medicine.Limbs.amputate(slave, V.oldLimbs, "Remote Surgery")); delete V.oldLimbs; break; case "PLimb interface": V.nextButton = " "; - const prosthFrag = jQuery(document.createDocumentFragment()); - prosthFrag.wiki(App.Desc.limbChange().prosthetic(slave, V.oldLimbs, "Remote Surgery")); - r.push(prosthFrag); + r.push(App.Medicine.Limbs.prosthetic(slave, V.oldLimbs, "Remote Surgery")); delete V.oldLimbs; break; /* diff --git a/src/player/electiveSurgery.tw b/src/player/electiveSurgery.tw index 945eae70c5008d62de38b765e3f72a600488f700..502a18a9d4da947f8ac095e616a7087a75f4066b 100644 --- a/src/player/electiveSurgery.tw +++ b/src/player/electiveSurgery.tw @@ -373,10 +373,10 @@ You have @@.orange;$PC.skin skin.@@<<if $PC.skin != $PC.origSkin>> Your original <<if $PC.dick != 0 && $PC.vagina != -1>> You have working @@.orange;male and female reproductive organs@@ and a @@.orange;<<if $PC.title > 0>>masculine<<else>>feminine<</if>> appearance.@@ "We'll store some of your sperm for you, should you decide to lose your maleness, and have it shipped to your arcology. Who you decide to use it on, well... That's up to you!" <br> - [[Remove your male half|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.storedCum += 10, cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2female"]] | + [[Remove your male half|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.counter.storedCum += 10, cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2female"]] | [[Remove your female half|PC Surgery Degradation][$PC.vagina = -1, $PC.vaginaLube = 0, $PC.ovaries = 0, $PC.preg = 0, WombFlush($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2male"]] <<if $PC.title > 0>> - | [[Remove your male half completely|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.storedCum += 10, $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2truefemale"]] + | [[Remove your male half completely|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.counter.storedCum += 10, $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2truefemale"]] <<else>> | [[Remove your female half completely|PC Surgery Degradation][$PC.vagina = -1, $PC.vaginaLube = 0, $PC.ovaries = 0, $PC.preg = 0, WombFlush($PC), $PC.boobs = 100, $PC.boobsImplant = 0, $PC.title = 1, generatePlayerPronouns($PC), cashX(forceNeg(25000), "PCmedical"), $surgeryType = "herm2truemale"]] <</if>> @@ -386,7 +386,7 @@ You have @@.orange;$PC.skin skin.@@<<if $PC.skin != $PC.origSkin>> Your original [[Have your male organs replaced with female ones|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.vagina = 1, $PC.newVag = 1, $PC.vaginaLube = 1, $PC.ovaries = 1, cashX(forceNeg(50000), "PCmedical"), $surgeryType = "male2female"]] | [[Add a female reproductive tract|PC Surgery Degradation][$PC.vagina = 1, $PC.newVag = 1, $PC.vaginaLube = 1, $PC.ovaries = 1, $PC.preg = 0, WombFlush($PC), cashX(forceNeg(150000), "PCmedical"), $surgeryType = "male2herm"]] <<if $PC.title > 0>> - | [[Become a woman|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.storedCum += 10, $PC.vagina = 1, $PC.newVag = 1, $PC.vaginaLube = 1, $PC.ovaries = 1, $PC.preg = 0, $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(50000), "PCmedical"), $surgeryType = "male2truefemale"]] + | [[Become a woman|PC Surgery Degradation][$PC.ballsImplant = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.dick = 0, $PC.prostate = 0, $PC.counter.storedCum += 10, $PC.vagina = 1, $PC.newVag = 1, $PC.vaginaLube = 1, $PC.ovaries = 1, $PC.preg = 0, $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(50000), "PCmedical"), $surgeryType = "male2truefemale"]] | [[Become a hermaphrodite girl|PC Surgery Degradation][$PC.vagina = 1, $PC.newVag = 1, $PC.vaginaLube = 1, $PC.ovaries = 1, $PC.preg = 0, WombFlush($PC), $PC.title = 0, generatePlayerPronouns($PC), cashX(forceNeg(150000), "PCmedical"), $surgeryType = "male2hermfemale"]] <</if>> <<else>> diff --git a/src/pregmod/artificialInsemination.tw b/src/pregmod/artificialInsemination.tw index 4efe97259c34afb55af62eac7c728508e2b897c8..fa5e2e35b2517adff6ae51f1380dd6cbebc32339 100644 --- a/src/pregmod/artificialInsemination.tw +++ b/src/pregmod/artificialInsemination.tw @@ -45,8 +45,8 @@ __Select an eligible slave to serve as the semen donatrix:__ <<if $PC.balls != 0>> <br> [[Use your own|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "insemination"]] -<<elseif $PC.storedCum > 0>> +<<elseif $PC.counter.storedCum > 0>> <br> - [[Use a vial of your own|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "insemination", $PC.storedCum--]] - //You have enough sperm stored away to inseminate $PC.storedCum more slave<<if $PC.storedCum > 1>>s<</if>>.// + [[Use a vial of your own|Surgery Degradation][$impregnatrix = $PC, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "insemination", $PC.counter.storedCum--]] + //You have enough sperm stored away to inseminate $PC.counter.storedCum more slave<<if $PC.counter.storedCum > 1>>s<</if>>.// <</if>> diff --git a/src/pregmod/eliteTakeOverResult.tw b/src/pregmod/eliteTakeOverResult.tw index 7f3808229dc744aff6a4f62ec2646257e55154e6..e71ead767701f1f33064380ca909b307594e27a3 100644 --- a/src/pregmod/eliteTakeOverResult.tw +++ b/src/pregmod/eliteTakeOverResult.tw @@ -164,13 +164,13 @@ <<set _race = _races.random()>> <</if>> <<if $seeDicks == 0>> - <<set _slave = GenerateNewSlave("XX", {minAge: 25, maxAge: $retirementAge-2,, race: _race})>> + <<set _slave = GenerateNewSlave("XX", {minAge: 25, maxAge: $retirementAge-2, race: _race})>> <<elseif $seeDicks == 100>> - <<set _slave = GenerateNewSlave("XY", {minAge: 25, maxAge: $retirementAge-2,, race: _race})>> + <<set _slave = GenerateNewSlave("XY", {minAge: 25, maxAge: $retirementAge-2, race: _race})>> <<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */ - <<set _slave = GenerateNewSlave("XX", {minAge: 25, maxAge: $retirementAge-2,, race: _race})>> + <<set _slave = GenerateNewSlave("XX", {minAge: 25, maxAge: $retirementAge-2, race: _race})>> <<else>> - <<set _slave = GenerateNewSlave("XY", {minAge: 25, maxAge: $retirementAge-2,, race: _race})>> + <<set _slave = GenerateNewSlave("XY", {minAge: 25, maxAge: $retirementAge-2, race: _race})>> <</if>> <<set _origin = "$He was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">> <<set _slave.origin = _origin>> diff --git a/src/uncategorized/RESS.tw b/src/uncategorized/RESS.tw index f9ef9ebf32892ab3662cfa24acb529a20f895771..e43057c78883a57c3785a2dbead60acd718b22dc 100644 --- a/src/uncategorized/RESS.tw +++ b/src/uncategorized/RESS.tw @@ -1497,7 +1497,7 @@ As you are retiring for the night, <<= App.UI.slaveDescriptionDialog($activeSlav walks <</if>> into your bedroom. Since $he is not allowed to ask questions, $he says nothing, but $his reason for being here is obvious enough. $He's on a medically reckless dosage of aphrodisiacs, and $he's panting as $he -<<if ($activeSlave.heels == 1 shoeHeelCategory($activeSlave) == 0)>> +<<if ($activeSlave.heels == 1) && (shoeHeelCategory($activeSlave) == 0)>> kneels <<elseif (shoeHeelCategory($activeSlave) > 1)>> teeters diff --git a/src/uncategorized/dairy.tw b/src/uncategorized/dairy.tw index e828a013cc1894a68106deb825f887b29ebb9804..f3b5d9a38af7870c9f2e58205d46810ccff920bc 100644 --- a/src/uncategorized/dairy.tw +++ b/src/uncategorized/dairy.tw @@ -159,7 +159,7 @@ <<switch $dairyDecoration>> <<case "Roman Revivalist">> The screens there review each slave's liquid contributions to the state in minute detail. - <<case "Roman Revivalist">> + <<case "Neo Imperialist">> The sleek screens display a variety of statistics on each slave's vitals and production. <<case "Aztec Revivalist">> The strange sight of the milking machines, designed to look like fertility statues gives the space an imposing feeling. diff --git a/src/uncategorized/freeRangeDairyAssignmentScene.tw b/src/uncategorized/freeRangeDairyAssignmentScene.tw index 0653f35f7555f3d1a217277d59d3d88bdbfa9e08..84fd818e05efb0caeecb171df47f3d911f867a57 100644 --- a/src/uncategorized/freeRangeDairyAssignmentScene.tw +++ b/src/uncategorized/freeRangeDairyAssignmentScene.tw @@ -49,7 +49,7 @@ </div> <<for _frdas = 0; _frdas < $slaves.length; _frdas++>> - <<if $slaves[_frdas].assignment == "work in the dairy" && $slaves[_frdas].ID != getSlave($AS).ID && $slaves[_frdas].balls >= 10 && $slaves[_frdas].dick > 0>> + <<if $slaves[_frdas].assignment == "work in the dairy" && $slaves[_frdas].ID != $AS && $slaves[_frdas].balls >= 10 && $slaves[_frdas].dick > 0>> <div style="clear:both"> <<setLocalPronouns $slaves[_frdas] 2>> <<set _aroused = true>> diff --git a/src/uncategorized/multiImplant.tw b/src/uncategorized/multiImplant.tw index edf763e58a6842ec8f3d79c8ee84cdacb8dd70f0..3f07842a777d8509ec79a340b279a159d8719253 100644 --- a/src/uncategorized/multiImplant.tw +++ b/src/uncategorized/multiImplant.tw @@ -65,7 +65,7 @@ that are ready be sent down. <<set $AS = $slaves[_i].ID>> /* count for estimating health impact */ - <<set _prostheticCount = $adjustProsthetics.filter(p => p.slaveID == getSlave($AS).ID && p.workLeft <= 0).length>> + <<set _prostheticCount = $adjustProsthetics.filter(p => p.slaveID == $AS && p.workLeft <= 0).length>> /* since we already have count, skip slaves that don't need work */ <<if _prostheticCount < 1>> @@ -83,7 +83,7 @@ that are ready be sent down. <<for _k = 0; _k < $adjustProsthetics.length; _k++>> <<set _p = $adjustProsthetics[_k]>> - <<if _p.slaveID == getSlave($AS).ID && _p.workLeft <= 0>> + <<if _p.slaveID == $AS && _p.workLeft <= 0>> <<set $adjustProsthetics.splice(_k, 1), _k-->> <<set $adjustProstheticsCompleted-->> <<set addProsthetic(getSlave($AS), _p.id)>> @@ -95,34 +95,34 @@ that are ready be sent down. <<set surgeryDamage(getSlave($AS), 20), $surgeryType = "ocular implant">> <<includeDOM App.UI.SlaveInteract.surgeryDegradation(getSlave($AS))>> <<else>> - //Since $he has working eyes the <<= setup.prosthetics.ocular.name>> will be put into storage.// + //Since $he has working eyes the <<= App.Data.prosthetics.ocular.name>> will be put into storage.// <</if>> <<case "cochlear">> <<if getSlave($AS).hears != 0>> <<set getSlave($AS).earImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 20), $surgeryType = "cochlear implant">> <<includeDOM App.UI.SlaveInteract.surgeryDegradation(getSlave($AS))>> <<else>> - //Since $he has working ears the <<= setup.prosthetics.cochlear.name>> will be put into storage.// + //Since $he has working ears the <<= App.Data.prosthetics.cochlear.name>> will be put into storage.// <</if>> <<case "electrolarynx">> <<if getSlave($AS).voice <= 0>> <<set getSlave($AS).electrolarynx = 1, getSlave($AS).voice = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 20), $surgeryType = "electrolarynx">> <<includeDOM App.UI.SlaveInteract.surgeryDegradation(getSlave($AS))>> <<else>> - //Since $he has a voice the <<= setup.prosthetics.electrolarynx.name>> will be put into storage.// + //Since $he has a voice the <<= App.Data.prosthetics.electrolarynx.name>> will be put into storage.// <</if>> <<case "interfaceP1">> <<if hasAnyNaturalLimbs(getSlave($AS))>> - //Since $he has at least one healthy limb the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.// + //Since $he has at least one healthy limb the <<= App.Data.prosthetics.interfaceP1.name>> will be put into storage.// <<elseif getSlave($AS).PLimb == 2>> - //Since $he already has <<= addA(setup.prosthetics.interfaceP2.name)>> installed the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.// + //Since $he already has <<= addA(App.Data.prosthetics.interfaceP2.name)>> installed the <<= App.Data.prosthetics.interfaceP1.name>> will be put into storage.// <<else>> <<set getSlave($AS).PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 20), $surgeryType = "PLimb interface1">> <<includeDOM App.UI.SlaveInteract.surgeryDegradation(getSlave($AS))>> <</if>> <<case "interfaceP2">> <<if hasAllNaturalLimbs(getSlave($AS))>> - //Since $he has no amputated limbs the <<= setup.prosthetics.interfaceP2.name>> will be put into storage.// + //Since $he has no amputated limbs the <<= App.Data.prosthetics.interfaceP2.name>> will be put into storage.// <<elseif getSlave($AS).PLimb == 1>> <<set getSlave($AS).PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS), 5), $surgeryType = "PLimb interface3">> <<includeDOM App.UI.SlaveInteract.surgeryDegradation(getSlave($AS))>> @@ -132,48 +132,48 @@ that are ready be sent down. <</if>> <<case "basicL" "sexL" "beautyL" "combatL" "cyberneticL">> <<if getSlave($AS).fuckdoll != 0>> - //Since a Fuckdoll can't use prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.// + //Since a Fuckdoll can't use prosthetic limbs the <<= App.Data.prosthetics[_p.id].name>> will be put into storage.// <<elseif hasAllNaturalLimbs(getSlave($AS))>> - //Since $he needs an amputated limb to attach prosthetics the <<= setup.prosthetics[_p.id].name>> will be put into storage.// + //Since $he needs an amputated limb to attach prosthetics the <<= App.Data.prosthetics[_p.id].name>> will be put into storage.// <<elseif getSlave($AS).PLimb == 0>> - //Since $he must have a prosthetic interface installed to attach prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.// + //Since $he must have a prosthetic interface installed to attach prosthetic limbs the <<= App.Data.prosthetics[_p.id].name>> will be put into storage.// <<else>> <<if _p.id == "basicL">> - <<set _state = App.Desc.limbChange().currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 2)>> + <<set _state = App.Medicine.Limbs.currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 2)>> <<if _change>> - <<= App.Desc.limbChange().reaction(getSlave($AS), _state)>> + <<includeDOM App.Medicine.Limbs.reaction(getSlave($AS), _state)>> <<else>> - //Since $he already has more advanced prosthetic limbs attached the <<= setup.prosthetics.basicL.name>> will be put into storage.// + //Since $he already has more advanced prosthetic limbs attached the <<= App.Data.prosthetics.basicL.name>> will be put into storage.// <</if>> <<elseif _p.id == "sexL">> - <<set _state = App.Desc.limbChange().currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 3)>> + <<set _state = App.Medicine.Limbs.currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 3)>> <<if _change>> - <<= App.Desc.limbChange().reaction(getSlave($AS), _state)>> + <<includeDOM App.Medicine.Limbs.reaction(getSlave($AS), _state)>> <<else>> - //Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.sexL.name>> will be put into storage.// + //Since $he already has advanced prosthetic limbs attached the <<= App.Data.prosthetics.sexL.name>> will be put into storage.// <</if>> <<elseif _p.id == "beautyL">> - <<set _state = App.Desc.limbChange().currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 4)>> + <<set _state = App.Medicine.Limbs.currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 4)>> <<if _change>> - <<= App.Desc.limbChange().reaction(getSlave($AS), _state)>> + <<includeDOM App.Medicine.Limbs.reaction(getSlave($AS), _state)>> <<else>> - //Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.beautyL.name>> will be put into storage.// + //Since $he already has advanced prosthetic limbs attached the <<= App.Data.prosthetics.beautyL.name>> will be put into storage.// <</if>> <<elseif _p.id == "combatL">> - <<set _state = App.Desc.limbChange().currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 5)>> + <<set _state = App.Medicine.Limbs.currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 5)>> <<if _change>> - <<= App.Desc.limbChange().reaction(getSlave($AS), _state)>> + <<includeDOM App.Medicine.Limbs.reaction(getSlave($AS), _state)>> <<else>> - //Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.combatL.name>> will be put into storage.// + //Since $he already has advanced prosthetic limbs attached the <<= App.Data.prosthetics.combatL.name>> will be put into storage.// <</if>> <<else>> <<if getSlave($AS).PLimb == 2>> - <<set _state = App.Desc.limbChange().currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 2)>> + <<set _state = App.Medicine.Limbs.currentLimbs(getSlave($AS)), _change = upgradeLimbs(getSlave($AS), 2)>> <<if _change>> - <<= App.Desc.limbChange().reaction(getSlave($AS), _state)>> + <<includeDOM App.Medicine.Limbs.reaction(getSlave($AS), _state)>> <</if>> <<else>> - //Since $he must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach cybernetic limbs the <<= setup.prosthetics.cyberneticL.name>> will be put into storage.// + //Since $he must have <<= addA(App.Data.prosthetics.interfaceP2.name)>> installed to attach cybernetic limbs the <<= App.Data.prosthetics.cyberneticL.name>> will be put into storage.// <</if>> <</if>> <</if>> @@ -182,11 +182,11 @@ that are ready be sent down. <<includeDOM App.UI.SlaveInteract.surgeryDegradation(getSlave($AS))>> <<case "modT" "sexT" "combatT">> <<if getSlave($AS).PTail == 0>> - //Since $he must have <<= addA(setup.prosthetics.interfaceTail.name)>> installed to attach tails the <<= setup.prosthetics[_p.id].name>> will be put into storage.// + //Since $he must have <<= addA(App.Data.prosthetics.interfaceTail.name)>> installed to attach tails the <<= App.Data.prosthetics[_p.id].name>> will be put into storage.// <<elseif getSlave($AS).tail != "none">> - //Since $he currently has a tail attached the <<= setup.prosthetics[_p.id].name>> will be put into storage.// + //Since $he currently has a tail attached the <<= App.Data.prosthetics[_p.id].name>> will be put into storage.// <<elseif _p.id == "modT">> - //Since installing <<= addA(setup.prosthetics.modT.name)>> is complicated it can't be automated.// + //Since installing <<= addA(App.Data.prosthetics.modT.name)>> is complicated it can't be automated.// /*Reason: there are different designs player can choose from.*/ <<elseif _p.id == "combatT">> <<set $prostheticsConfig = "attachTail", getSlave($AS).tail = "combat", getSlave($AS).tailColor = "jet black">> @@ -196,7 +196,7 @@ that are ready be sent down. <<include "Prosthetics Configuration">> <</if>> <<default>> - //Since there is no automated procedure to implant/attach <<= setup.prosthetics[_p.id].name>> it will be put into storage.// + //Since there is no automated procedure to implant/attach <<= App.Data.prosthetics[_p.id].name>> it will be put into storage.// <</switch>> <br> <</if>> diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw index f1996ce392fd9532ba4a5c2278029a1920905970..abee53873486d4f9ae71c81d6147232a6b8d40a4 100644 --- a/src/uncategorized/reRecruit.tw +++ b/src/uncategorized/reRecruit.tw @@ -1384,7 +1384,7 @@ <<set _pram = { minAge: 18, maxAge: 42, disableDisability: 1 - })>> + }>> <<if $arcologies[0].FSSupremacistLawME === 1>> <<set _pram.race = $arcologies[0].FSSupremacistRace>> <<elseif $arcologies[0].FSSubjugationistLawME === 1>> diff --git a/src/uncategorized/resEndowment.tw b/src/uncategorized/resEndowment.tw index d2100e4a607aefe95e09feb74f35bb7eabdb9047..216d3c85d00ad521d3f7fad2a4af83bd423d2089 100644 --- a/src/uncategorized/resEndowment.tw +++ b/src/uncategorized/resEndowment.tw @@ -46,7 +46,7 @@ provide good quality slaves at competitive prices." <</switch>> - Getting down to the business advantages, he adds that "donors receive considerable price advantage on future _SCH.nickname," which seems to translate into a discount of around 20% once the sales language is stripped off it. You point out that's bordering on pointlessness to you, given your ability to purchase almost anything you wish; he hesitates, but then admits that "as our foremost supporter" you could use an endowment to guide school policy to an extent. + Getting down to the business advantages, he adds that "donors receive considerable price advantage on future _SCH.slaveNoun," which seems to translate into a discount of around 20% once the sales language is stripped off it. You point out that's bordering on pointlessness to you, given your ability to purchase almost anything you wish; he hesitates, but then admits that "as our foremost supporter" you could use an endowment to guide school policy to an extent. <</if>> <br><br> diff --git a/src/uncategorized/resSale.tw b/src/uncategorized/resSale.tw index 6fab11b5d249fcbc8d06b630bd99e9f451e6a45e..a79f3c427bb5bde220e02aa7eb98720caf8b2211 100644 --- a/src/uncategorized/resSale.tw +++ b/src/uncategorized/resSale.tw @@ -115,7 +115,7 @@ You pause for a moment, and $he plunges on: "<<if $PC.title != 0>>Sir<<else>>Ma' <<if $RESSale == "TSS">> I've got the very best skills I could learn as a virgin. I'm healthy, obedient, and educated. And I'm fresh, and willing, and really eager." $He rips $his white school<<= $girl>> blouse open to show off a fresh pair of tits, and shakes them for you. "I would love to be your sex slave, <<if $PC.title != 0>>sir<<else>>ma'am<</if>>," $he says, doing $his very best to sound appealing, like $he's been trained. <<elseif $RESSale == "TUO">> - I'm smart and cute. I'm well educated and obedient, I will serve you well." $He blushes and maintains eye contact as he continues. "I'm unexperienced when it comes to sexual matters, I hope you will treat me well." $He bows to you and finished. "I would love to be your slave, <<if $PC.title != 0>>sir<<else>>ma'am<</if>>," $he says, doing $his very best to sound appealing, like $he's been taught. + I'm smart and cute. I'm well educated and obedient, I will serve you well." $He blushes and maintains eye contact as $he continues. "I'm unexperienced when it comes to sexual matters, I hope you will treat me well." $He bows to you and finished. "I would love to be your slave, <<if $PC.title != 0>>sir<<else>>ma'am<</if>>," $he says, doing $his very best to sound appealing, like $he's been taught. <<elseif $RESSale == "GRI">> I've, uh, been trained to obey." $His eyes flick to one side, like $he's reading $his cues. "And, um, I have really big boobs." $He's wearing a bathrobe, and $he suddenly jerks it open to reveal a bigger pair of breasts than anyone that age could possibly have grown $himself. "I would love to be your sex slave, <<if $PC.title != 0>>sir<<else>>ma'am<</if>>," $he says, doing $his very best to sound appealing. No doubt $he'd prefer not to be part of any more testing. <<elseif $RESSale == "SCP">> @@ -125,7 +125,7 @@ You pause for a moment, and $he plunges on: "<<if $PC.title != 0>>Sir<<else>>Ma' <<elseif $RESSale == "TGA">> My tutelage has been long and hard, and I'm very eager to begin my life as a slave." $He's nude, and stands up to reveal $his hard-on. $He spins for the camera, showing $himself off. "I can help protect you, too: I'm proficient in unarmed combat, and I have weapons training. I would love to be your bitch, or your bodyguard, <<if $PC.title != 0>>sir<<else>>ma'am<</if>>," $he says, doing $his very best to sound appealing, like $he's been told. <<elseif $RESSale == "HA">> - I am ready to serve you in any way you deem fit and do everything I can to protect your life." $He's wearing a delicate maid uniform, beautifully contrasting $his powerful physique and towering stature. "The academy has given me the opportunity to learn many valuable skills and I look forward put them at your service." + I am ready to serve you in any way you deem fit and do everything I can to protect your life." $He's wearing a delicate maid uniform, beautifully contrasting $his powerful physique and towering stature. "The academy has given me the opportunity to learn many valuable skills and I look forward to putting them at your service." <<elseif $RESSale == "NUL">> My education is complete, and I am ready to unveil the perfection of my form to the world." Naturally, $he's totally nude, yet you still are unable to even guess what sort of equipment $he was born with. "It is my duty and my honor to share myself in eternal servitude, in all manners and mechanisms," $he says in an unnervingly upbeat monotone. <<else>> diff --git a/src/uncategorized/slaveSold.tw b/src/uncategorized/slaveSold.tw index 9bae324a86f6bd1c23329ce8a8cdb1dd36048db7..bdcf8264c4d5f78e265795e750274878a3660e54 100644 --- a/src/uncategorized/slaveSold.tw +++ b/src/uncategorized/slaveSold.tw @@ -14,44 +14,44 @@ <<set $boomerangSlave = clone(getSlave($AS)), $boomerangWeeks = 1, $boomerangBuyer = $buyer>> <<set $boomerangSlave.assignment = "rest">> <<set $boomerangStats = {PCpregSource: 0, PCmother: 0, PCfather: 0, boomerangMother: [], boomerangFather: [], boomerangPregSources: [], boomerangMotherTank: [], boomerangFatherTank: [], boomerangRelationship: 0, boomerangRivalry: 0, boomerangRelation: 0, boomerangBody: 0}>> - <<if getSlave($AS).ID == $PC.pregSource>> - <<set $boomerangStats.PCpregSource = getSlave($AS).ID>> + <<if $AS == $PC.pregSource>> + <<set $boomerangStats.PCpregSource = $AS>> <</if>> - <<if $PC.mother == getSlave($AS).ID>> - <<set $boomerangStats.PCmother = getSlave($AS).ID>> + <<if $PC.mother == $AS>> + <<set $boomerangStats.PCmother = $AS>> <</if>> - <<if $PC.father == getSlave($AS).ID>> - <<set $boomerangStats.PCfather = getSlave($AS).ID>> + <<if $PC.father == $AS>> + <<set $boomerangStats.PCfather = $AS>> <</if>> <<for _ss = 0; _ss < $slaves.length; _ss++>> - <<if $slaves[_ss].ID != getSlave($AS).ID>> - <<if $slaves[_ss].mother == getSlave($AS).ID>> + <<if $slaves[_ss].ID != $AS>> + <<if $slaves[_ss].mother == $AS>> <<set $boomerangStats.boomerangMother.push($slaves[_ss].ID)>> <</if>> - <<if $slaves[_ss].father == getSlave($AS).ID>> + <<if $slaves[_ss].father == $AS>> <<set $boomerangStats.boomerangFather.push($slaves[_ss].ID)>> <</if>> - <<if getSlave($AS).ID == $slaves[_ss].pregSource>> + <<if $AS == $slaves[_ss].pregSource>> <<set $boomerangStats.boomerangPregSources.push($slaves[_ss].ID)>> <</if>> <</if>> <</for>> <<if $incubator > 0>> <<for _z = 0; _z < $tanks.length; _z++>> - <<if getSlave($AS).ID == $tanks[_z].mother>> + <<if $AS == $tanks[_z].mother>> <<set $boomerangStats.boomerangMotherTank.push($slaves[_z].ID)>> <</if>> - <<if getSlave($AS).ID == $tanks[_z].father>> + <<if $AS == $tanks[_z].father>> <<set $boomerangStats.boomerangFatherTank.push($slaves[_z].ID)>> <</if>> <</for>> <</if>> <<if $nursery > 0>> <<for _z = 0; _z < $cribs.length; _z++>> - <<if getSlave($AS).ID == $cribs[_z].mother>> + <<if $AS == $cribs[_z].mother>> <<set $boomerangStats.boomerangMotherTank.push($slaves[_z].ID)>> <</if>> - <<if getSlave($AS).ID == $cribs[_z].father>> + <<if $AS == $cribs[_z].father>> <<set $boomerangStats.boomerangFatherTank.push($slaves[_z].ID)>> <</if>> <</for>> @@ -64,7 +64,7 @@ <<set $boomerangStats.boomerangRivalry = getSlave($AS).rivalryTarget>> <</if>> <<if getSlave($AS).bodySwap > 0>> - <<set _myBody = $slaves.findIndex(function(s) { return s.origBodyOwnerID == getSlave($AS).ID; })>> + <<set _myBody = $slaves.findIndex(function(s) { return s.origBodyOwnerID == $AS; })>> <<if _myBody != -1>> <<set $boomerangStats.boomerangBody = $slaves[_myBody].ID>> <</if>> @@ -90,12 +90,12 @@ <br><br> <<set $slaves[_ss].devotion -= 10>> <</if>> - <<if getSlave($AS).ID == $slaves[_ss].father>> + <<if $AS == $slaves[_ss].father>> $slaves[_ss].slaveName is @@.mediumorchid;saddened@@ that you are selling _his2 father. <br><br> <<set $slaves[_ss].devotion -= 10>> <</if>> - <<if getSlave($AS).ID == $slaves[_ss].mother>> + <<if $AS == $slaves[_ss].mother>> $slaves[_ss].slaveName is @@.mediumorchid;grieved@@ that you are selling _his2 mother. <br><br> <<set $slaves[_ss].devotion -= 20>> diff --git a/src/uncategorized/subordinateTargeting.tw b/src/uncategorized/subordinateTargeting.tw index edbf8d558fbe58d75c9c7ea0ba59ac106e50fcdf..b96d185186838ea2be8ec382b1f1a9d1c99ed2bc 100644 --- a/src/uncategorized/subordinateTargeting.tw +++ b/src/uncategorized/subordinateTargeting.tw @@ -4,10 +4,10 @@ <<run App.Utils.setLocalPronouns(getSlave($AS))>> -<<if getSlave($AS).subTarget == getSlave($AS).ID>> +<<if getSlave($AS).subTarget == $AS>> <<set getSlave($AS).subTarget = 0>> <<elseif getSlave($AS).subTarget == -1>> - <<if $universalRulesImpregnation != "Stud" || getSlave($AS).ID != $StudID>> + <<if $universalRulesImpregnation != "Stud" || $AS != $StudID>> <<set getSlave($AS).subTarget = 0>> <</if>> <</if>> @@ -29,7 +29,7 @@ <br><br><<link "Reign $him in" "Subordinate Targeting">><<set getSlave($AS).subTarget = 0, $StudID = 0>><</link>> <<else>> <<if $universalRulesImpregnation == "Stud" && $StudID == 0>> - <br><br>[[Stud|Subordinate Targeting][getSlave($AS).subTarget = -1, $StudID = getSlave($AS).ID]] + <br><br>[[Stud|Subordinate Targeting][getSlave($AS).subTarget = -1, $StudID = $AS]] <</if>> <br><br>[[None|Subordinate Targeting][getSlave($AS).subTarget = 0]] <br><br>__Select a slave for $him to submit to, sexually:__