diff --git a/CHANGELOG.md b/CHANGELOG.md index 23bd112369659d2fda23e5eeff196d9c0db09056..cc1ed1e8f53299da131d1fe5f334422c0f79223e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Unreleased +## 0.10.7.1-4.0.0-alpha.13 - 2022-02-12 + +* first stages of a rudimentary modding API +* physicalDevelopment now applies to a growing PC * dairy converted to DOM * personal attention applicable to master suite slaves * Cosmetic implant surgeries reworked to be more realistic: implant size that can be fit in is dynamically computed based on asset size, players don't need to begin with the smallest size anymore if a bigger fits. Cosmetic implant surgeries now cost a lot more (beware, autosurgery is also affected!) to compensate for achieving the grow targets quickly. Autosurgery can be tuned to use only specific set of implant types and its note in the end week logs became more detailed and visually detectable. diff --git a/css/general/layout.css b/css/general/layout.css index 877cf5d1015c1a6a5190e8868800b94b8ac93e54..a7e20161b5c234608c7c4a4aa7a973f93d88383c 100644 --- a/css/general/layout.css +++ b/css/general/layout.css @@ -43,6 +43,12 @@ div.grid-2columns-auto { grid-column-gap: 1em; } +div.grid-3columns-auto { + display: grid; + grid-template-columns: max-content auto auto; + grid-column-gap: 1em; +} + .margin-top { margin-top: 1em; } diff --git a/devNotes/gitSetup.md b/devNotes/gitSetup.md index 0cceb0942d335e3382aa39f14c8bebfc9bf1d04d..75b62dd46b452fa46ceaf4ecca05890c567419b8 100644 --- a/devNotes/gitSetup.md +++ b/devNotes/gitSetup.md @@ -4,6 +4,7 @@ 0. [Install Git for terminal](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) or a Git GUI of your choice. + * If you are on Linux Git is usually preinstalled. 1. Create an account on gitgud if you don't have a usable one. * (optional) Add an SSH key to your account for easier pushing. This allows you to connect to gitgud through SHH, @@ -12,42 +13,56 @@ 2. Fork the main repository through gitgud interface. * (optional) Delete all branches other than pregmod-master, so you don't get them locally when fetching. -3. Clone the repo and then change to the new directory - * Clicking on the dropdown arrow on the far right blue clone button in the gitgud interface on your fork gives you the relevant URLs. - * Via terminal: `git clone --depth 1 --single-branch <url-to-your-fork> && cd fc-pregmod` +3. Clone the repo + * Clicking on the dropdown arrow on the far right blue clone button in the GitGud interface on your fork gives you + the relevant URLs. If you added an SSH key in step 2, use the SSH URL, otherwise use the HTTPS one. + * Via terminal: `git clone --depth 1 <url-to-your-fork>` -4. Add the main repository as a remote target - * Via terminal: `git remote add upstream https://gitgud.io/pregmodfan/fc-pregmod.git` +4. Change into the new directory + * Via terminal: `cd fc-pregmod` + +5. Add the main repository as a remote target + * Via terminal: `git remote add upstream https://gitgud.io/pregmodfan/fc-pregmod.git` + +6. Make your local `pregmod-master` track the main repository, makes getting future updates easier. + * Via terminal `git branch --set-upstream-to=upstream` ## Typical cycle with Git: -0. Switch to the pregmod-master branch, then check for and merge any upstream updates - before updating your remote if any updates are present - * Via terminal: `git checkout -q pregmod-master && git fetch upstream && git merge upstream/pregmod-master && git push -q` +0. Switch to the `pregmod-master` branch, then apply any updates from upstream + * Via terminal: `git checkout pregmod-master && git pull upstream` 1. Checkout a new branch for your work - * Via terminal: `git checkout -b <branch-name>` + * Via terminal: `git checkout -b <branch-name>` 2. Make desired changes -3. Add them to be committed - * Via terminal: `git add *` -4. Commit - * Make the commit message useful (`Fix X`, `Add Y`, etc.) - * Via terminal: `git commit -m "MESSAGE"` + +3. Add your changes to be committed + * Via terminal: `git add *` + +4. Commit your changes + * Via terminal: `git commit` + * Make the commit message useful (`Fix X`, `Add Y`, etc.) 5. (optional, but recommended) Run sanityCheck before final push to catch any errors you missed. - * You can ignore errors that already existed + * You can ignore errors that already existed + 6. Push result into your forked repository - * Via terminal: - * Initially: `git push -u origin $(git rev-parse --abbrev-ref HEAD)` - * Afterwards `git push` will suffice. + * Via terminal: + * Initially: `git push -u origin $(git rev-parse --abbrev-ref HEAD)` + * Afterwards `git push` will suffice. 7. Create merge request through gitgud interface. - * Suggestion: Tick "Delete source branch when merge request is accepted." - to help automatically tidy up your fork. + * Suggestion: Tick `Delete source branch when merge request is accepted.` to help automatically tidy up your fork. + 8. Checkout `pregmod-master` in preparation of next change. - * Via terminal: `git checkout -q pregmod-master` + * Via terminal: `git checkout pregmod-master` + 9. Once the merge request was accepted, delete your local branch. - * Via terminal: `git branch -dq <branch-name>` + * Via terminal: `git branch -d <branch-name>` + +## Tips -To get a list of all current branches run `git branch --list` via terminal. +* Never commit anything on the main `pregmod-master` branch, always use feature branches. +* To check the current state of your local copy, use `git status`. +* To get a list of all current branches run `git branch --list` via terminal. diff --git a/js/002-config/fc-js-init.js b/js/002-config/fc-js-init.js index 07aae1b15b699bd263856df1ab215e35658b660a..44af7f7416466653c6bd764d03bd231d0bf63866 100644 --- a/js/002-config/fc-js-init.js +++ b/js/002-config/fc-js-init.js @@ -32,6 +32,7 @@ App.Desc.Player = {}; App.Encyclopedia = {}; App.EndWeek = {}; App.EndWeek.Player = {}; +App.EndWeek.Shared = {}; App.Entity = {}; App.Entity.Utils = {}; App.Events = {}; @@ -74,6 +75,8 @@ App.SF = {}; App.SecExp = {}; App.SlaveAssignment = {}; App.StartingGirls = {}; +App.Status = {}; +App.Status.storyReady = false; App.UI = {}; App.UI.Cheat = {}; App.UI.DOM = {}; diff --git a/js/003-data/miscData.js b/js/003-data/miscData.js index b60032e47e71e575d06b375c7c2b51cdae377042..d0a8c4e390cc7ea68bf6bf479ad4050be1c444fb 100644 --- a/js/003-data/miscData.js +++ b/js/003-data/miscData.js @@ -1746,6 +1746,8 @@ App.Data.misc = { }, }, + redheadColors: ["auburn", "blazing red", "copper", "chestnut", "deep red", "ginger", "red", "strawberry-blonde"], + badWords: ["anus", "ass", "bitch", "boob", "butt", "cock", "crap", "cum", "cunny", "cunt", "dick", "fuck", "jizz", "junk", "piss", "prick", "pussy", "shit", "slave", "slut", "tit", "trash", "whore"], badNames: ["Ass Kisser", "Ass Licker", "Ass", "Assfucker", "Asshole", "Ballsack", "Bastard", "Beta", "Bitch", "Cock", "Cocksucker", "Coward", "Creep", "Cum Rag", "Cunt", "Degenerate", "Despoiler", "Dick", "Dickhead", "Dicksucker", "Dickweed", "Dipshit", "Douchebag", "Dumbass", "DumbFuck", "Dunderfuck", "Dyke", "Faggot", "Fucker", "Fuckface", "Fuckhead", "Fucko", "Fucktard", "Fuckwit", "Idiot", "Inbred", "Jackass", "Jerk", "Jizz Stain", "Loser", "Moron", "Motherfucker", "Nutsack", "Pissbaby", "Prick", "Pussy", "Rapist", "Ratfuck", "Retard", "Ruiner", "Schmuck", "Scumbag", "Shitbird", "Shithead", "Slave", "Slaver", "Sleazeball", "Slut", "Sodomite", "Thundercunt", "Traitor", "Trash", "Whore", "Wimp"], diff --git a/js/dynamicJSLoading.js b/js/dynamicJSLoading.js index aafbcf33d65380d6fd4c63cacc48ee5105f7725c..3eb225f9d8c362df620aed8a4b0fcb209e760fa5 100644 --- a/js/dynamicJSLoading.js +++ b/js/dynamicJSLoading.js @@ -106,6 +106,236 @@ App.Loader = (function() { }, get lastScript() { return lastScript; + }, + get hasNextScript() { + return scriptQueue.length > 0; } }; })(); + + +/** + * Dedicated Modding API to abstract the loading mechanisms + */ +App.Modding = (function() { + let loadingDone = false; + /** + * @type {Mod} + */ + let currentMod = null; + + /** + * @type {string[]} + */ + let modsToLoad = []; + + /** + * @type {Mod[]} + */ + const loadedMods = []; + + class Mod { + /** + * @param {string} directory where this mod is located relative to 'mods/' + */ + constructor(directory) { + this._path = "./mods/" + directory; + this.name = directory; + this.version = "0"; + this.description = ""; + + currentMod = this; + loadedMods.push(this); + + App.Loader.loadGroup(this._path); + App.Loader.nextScript(); + } + + /** + * @returns {string} + */ + get path() { + return this._path; + } + + /** + * @param {string} path + */ + addSubscript(path) { + App.Loader.getGroup(this._path).queueSubscript(path); + } + } + + /** + * Loads the next subscript or mod + */ + function nextScript() { + if (App.Loader.hasNextScript) { + App.Loader.nextScript(); + } else if (modsToLoad.length > 0) { + new Mod(modsToLoad.shift()); + } else { + loadingDone = true; + } + } + + /** + * Load all mods + */ + function loadMods() { + modsToLoad = loadModList(); + nextScript(); + } + + /** + * @returns {string[]} modList + */ + function loadModList() { + return SugarCube.storage.get("modList") || []; + } + + return { + internal: { + load: loadMods, + /** @returns {string[]} modList */ + get modList() { + return loadModList(); + }, + /** @param {string[]} modList */ + set modList(modList) { + SugarCube.storage.set("modList", modList); + }, + get loadedMods() { + return loadedMods; + }, + get done() { + return loadingDone; + } + }, + scriptDone: nextScript, + get currentMod() { + return currentMod; + }, + }; +})(); + +App.UI.playerMods = function() { + let modList = loadModList(); + const container = document.createElement("div"); + container.append(makeModSettings()); + return container; + + function makeModSettings() { + const f = new DocumentFragment(); + App.UI.DOM.appendNewElement("h2", f, "Player mods"); + App.UI.DOM.appendNewElement("div", f, "Player mods are mods loaded from external files located at 'mods/'. If a mod does not exist loading will fail and never finish. Mods are save independent."); + if (!App.Modding.internal.done) { + f.append("Mods have not finished loading. ", App.UI.DOM.link("Refresh", () => { + modList = loadModList(); + refresh(); + })); + } + App.UI.DOM.appendNewElement("h3", f, "Currently loaded mods"); + f.append(loadedList()); + App.UI.DOM.appendNewElement("h3", f, "Edit mod list"); + f.append(makeEditor()); + return f; + } + + /** + * @returns {string[]} + */ + function loadModList() { + if (App.Status.storyReady) { + return App.Modding.internal.modList; + } else { + return []; + } + } + + function loadedList() { + const loadedMods = App.Modding.internal.loadedMods; + const div = document.createElement("div"); + div.classList.add("grid-3columns-auto"); + for (const mod of loadedMods) { + App.UI.DOM.appendNewElement("div", div, mod.name); + App.UI.DOM.appendNewElement("div", div, mod.version); + App.UI.DOM.appendNewElement("div", div, mod.description); + } + return div; + } + + function refresh() { + $(container).empty().append(makeModSettings()); + } + + function makeEditor() { + const div = document.createElement("div"); + div.append("Add new mod. Input the exact name of the directory for the mod at 'mods/': ", + App.UI.DOM.makeTextBox("", name => { + modList.push(name); + refresh(); + })); + + App.UI.DOM.appendNewElement("div", div, "Mods are loaded from top to bottom."); + + const listDiv = document.createElement("div"); + for (let i = 0; i < modList.length; i++) { + const row = document.createElement("div"); + row.append(up(i), " ", down(i), " ", remove(i), " ", modList[i]); + listDiv.append(row); + } + div.append(listDiv); + + div.append(App.UI.DOM.link("Finalize (Will reload the game!)", () => { + App.Modding.internal.modList = modList; + window.location.reload(); + })); + return div; + } + + /** + * @param {number} index + * @returns {HTMLElement} + */ + function up(index) { + if (index === 0) { + return App.UI.DOM.makeElement("span", "Up", ["gray"]); + } + const button = App.UI.DOM.makeElement("a", "Up"); + button.onclick = () => { + arraySwap(modList, index, index - 1); + refresh(); + }; + return button; + } + + /** + * @param {number} index + * @returns {HTMLElement} + */ + function down(index) { + if (index === modList.length - 1) { + return App.UI.DOM.makeElement("span", "Down", ["gray"]); + } + const button = App.UI.DOM.makeElement("a", "Down"); + button.onclick = () => { + arraySwap(modList, index, index + 1); + refresh(); + }; + return button; + } + + /** + * @param {number} index + * @returns {HTMLElement} + */ + function remove(index) { + const button = App.UI.DOM.makeElement("a", "Remove"); + button.onclick = () => { + modList.splice(index, 1); + refresh(); + }; + return button; + } +}; diff --git a/js/medicine/surgery/exotic/retrogradeVirusInjectionNCS.js b/js/medicine/surgery/exotic/retrogradeVirusInjectionNCS.js index 9e3581f955b92fb453fb693b34d51162551d34e0..97d35eca6ad4fa0f46ce4e0b6ee678396d966b9c 100644 --- a/js/medicine/surgery/exotic/retrogradeVirusInjectionNCS.js +++ b/js/medicine/surgery/exotic/retrogradeVirusInjectionNCS.js @@ -168,14 +168,7 @@ App.Medicine.Surgery.Reactions.RetrogradeVirusInjectionNCS = class extends App.M if (genitalChanges.length > 0) { r.push(`${He} can ${sense} that ${his} junk is different now, it seems ${his}`); if (genitalChanges.length > 2) { - for (let i = 0; i < genitalChanges.length; i++) { - if (i < genitalChanges.length - 1) { - r.push(`${genitalChanges[i]},`); - } else { - r.push(`and ${genitalChanges[i]}.`); - } - } - r.push(`have all become <span class="change negative">smaller.</span>`); + r.push(`${toSentence(genitalChanges)} have all become <span class="change negative">smaller.</span>`); } else if (genitalChanges.length > 1) { r.push(`${genitalChanges[0]}, and ${genitalChanges[1]} have both become <span class="change negative">smaller.</span>`); } else { @@ -188,8 +181,8 @@ App.Medicine.Surgery.Reactions.RetrogradeVirusInjectionNCS = class extends App.M r.push(`also`); } r.push(`${sense} that ${his} body has some physical changes, it seems to ${him} that ${toSentence(physicalChanges)}`); - const reaction = ['comes as a bit of a surprise', 'comes as quite a shock', `confirms ${his} suspicions`, `doesn't seem to phase ${him}`, `${he} finds interesting`, `${he} can't get over`].random() + '.'; - r.push(`which ${reaction}`); + const reaction = ['comes as a bit of a surprise', 'comes as quite a shock', `confirms ${his} suspicions`, `doesn't seem to phase ${him}`, `${he} finds interesting`, `${he} can't get over`].random(); + r.push(`which ${reaction}.`); } if (statusChanges.length > 0) { r.push(`${He} can feel some`); @@ -197,9 +190,7 @@ App.Medicine.Surgery.Reactions.RetrogradeVirusInjectionNCS = class extends App.M r.push(`other`); } r.push(`changes that are a little harder to describe.`); - for (let i = 0; i < statusChanges.length; i++) { - r.push(statusChanges[i]); - } + r.push(...statusChanges); } } diff --git a/js/rulesAssistant/conditionEditor.js b/js/rulesAssistant/conditionEditor.js index eda0f1d63f27463f00e35e01595f1b3ef8caa342..349009179603ded4ffdfc94634288bb557f6a601 100644 --- a/js/rulesAssistant/conditionEditor.js +++ b/js/rulesAssistant/conditionEditor.js @@ -533,19 +533,22 @@ App.RA.Activation.Editor = (function() { /** * @typedef {"sub" | "div" | "eq" | "neq" | "gt" | "gte" | "lt" | "lte"| "substr"} RulePairComparators - * @type {Map<RulePairComparators, string>} + * @typedef {object} RulePairComparatorDisplay + * @property {string} key + * @property {string} name + * @type {RulePairComparatorDisplay[]} */ - const rulePairComparators = new Map([ - ["eq", "="], - ["neq", "≠"], - ["lt", "<"], - ["gt", ">"], - ["lte", "⩽"], - ["gte", "⩾"], - ["sub", "-"], - ["div", "/"], - ["substr", "Contains"], - ]); + const rulePairComparators = [ + {key: "eq", name: "="}, + {key: "neq", name: "≠"}, + {key: "lt", name: "<"}, + {key: "gt", name: ">"}, + {key: "lte", name: "⩽"}, + {key: "gte", name: "⩾"}, + {key: "sub", name: "-"}, + {key: "div", name: "/"}, + {key: "substr", name: "Contains"}, + ]; class RulePair extends RuleContainer { /** @@ -574,30 +577,11 @@ App.RA.Activation.Editor = (function() { this._conditionalDropLocation(div, this._child1, child => this.child1 = child); // operator - let matchFound = false; - const select = document.createElement("select"); - for (const [key, name] of rulePairComparators) { - const el = document.createElement("option"); - el.value = key; - el.textContent = name; - if (this.mode === key) { - el.selected = true; - matchFound = true; - } - select.append(el); - } - if (!matchFound) { - select.selectedIndex = -1; - } - select.onchange = () => { - /** @type {HTMLSelectElement} */ + div.append(App.UI.DOM.makeSelect(rulePairComparators, this.mode, mode => { // @ts-ignore - const option = select.children.item(select.selectedIndex); - // @ts-ignore - this.mode = option.value; + this.mode = mode; refreshEditor(); - }; - div.append(select); + })); // element 2 this._conditionalDropLocation(div, this._child2, child => this.child2 = child); @@ -930,35 +914,21 @@ App.RA.Activation.Editor = (function() { App.UI.DOM.appendNewElement("span", span, this.mode === "assignment" ? "Assignment" : "Slave", ["rule-right-margin"]); // values - let matchFound = false; - let select = document.createElement("select"); - for (const [key, value] of this._getterMap) { - if (value.visible && !value.visible()) { - continue; - } - let el = document.createElement("option"); - el.value = key; - el.textContent = value.name; - if (value.enabled) { - el.disabled = !value.enabled(); - } - if (this.key === key) { - el.selected = true; - matchFound = true; + /** + * @type {selectOption[]} + */ + const options = []; + this._getterMap.forEach((getter, key) => { + if (!getter.visible || getter.visible()) { + options.push({ + key: key, name: getter.name, enabled: !getter.enabled || getter.enabled() + }); } - select.append(el); - } - if (!matchFound) { - select.selectedIndex = -1; - } - select.onchange = () => { - /** @type {HTMLSelectElement} */ - // @ts-ignore - const option = select.children.item(select.selectedIndex); - this.key = option.value; + }); + span.append(App.UI.DOM.makeSelect(options, this.key, key => { + this.key = key; refreshEditor(); - }; - span.append(select); + })); return span; } diff --git a/js/ui/select.js b/js/ui/select.js index 5de606ff1e3ce635f6085944c848a075864f1c9b..4eb0e69d4a075fc963ec377e59cc18e8eb8bc203 100644 --- a/js/ui/select.js +++ b/js/ui/select.js @@ -1,13 +1,19 @@ +/** + * @typedef {object} selectOption + * @property {string} key + * @property {string} name + * @property {boolean} [enabled] + */ + /** * Creates a new dropdown with available and unavailable options. - * @param {Array<{value: string, name: string}>} options A list of options to display, where `value` sets the property and `name` is displayed. - * @param {string} selected The property to change upon selection. - * @param {function():void} [onchange] Any custom function to run upon selection. - * @param {Object} [object] Any object `property` belongs to, if not the default `V`. + * @param {Array<selectOption>} options A list of options to display + * @param {string} selected + * @param {function(string):void} onchange * * @returns {HTMLSelectElement} */ -App.UI.DOM.makeSelect = function(options, selected, onchange, object = V) { +App.UI.DOM.makeSelect = function(options, selected, onchange) { const select = document.createElement("select"); let matchFound = false; @@ -15,13 +21,17 @@ App.UI.DOM.makeSelect = function(options, selected, onchange, object = V) { const option = document.createElement("option"); option.text = choice.name; - option.value = choice.value; + option.value = choice.key; - if (object[selected] === choice.value) { + if (selected === choice.key) { option.selected = true; matchFound = true; } + if ("enabled" in choice && !choice.enabled) { + option.disabled = true; + } + select.append(option); } @@ -29,13 +39,7 @@ App.UI.DOM.makeSelect = function(options, selected, onchange, object = V) { select.selectedIndex = -1; } - select.onchange = () => { - object[selected] = select.options[select.selectedIndex].value; - - if (onchange) { - onchange(); - } - }; + select.onchange = () => onchange(select.value); return select; }; diff --git a/mods/example/index.js b/mods/example/index.js new file mode 100644 index 0000000000000000000000000000000000000000..67ff48ea01f56c20b7166fec46a0af68a0e403af --- /dev/null +++ b/mods/example/index.js @@ -0,0 +1,24 @@ +// Always scope your code to not pollute the global namespace. +{ + // Get the mod so we can modify it: + const mod = App.Modding.currentMod; + + // Set the name and version: + mod.name = "Example Mod"; + mod.version = "1.0"; + mod.description = "This is an example mod showing off the modding API and gives examples for moddable systems."; + + // For bigger mods it can be useful to split the mod in multiple parts. + // These parts can then be loaded as subscripts. + // Subscripts will be loaded in series and only once this script is done. + mod.addSubscript("subscript"); + + // Usage examples for moddable systems + mod.addSubscript("rulesAssistantGetters"); + + // Write to console, so we can easily see that the mod has loaded: + console.log("Index Loading: Success!"); + + // Tell the modding system this file is done. Do this at the end of EVERY script file. + App.Modding.scriptDone(); +} diff --git a/mods/example/rulesAssistantGetters.js b/mods/example/rulesAssistantGetters.js new file mode 100644 index 0000000000000000000000000000000000000000..e72951818c0e7f4e9ce221d324d7629905062467 --- /dev/null +++ b/mods/example/rulesAssistantGetters.js @@ -0,0 +1,18 @@ +// Add a new boolean getter for use in the RA condition editor. +// The first argument is a unique name for the getter. To ensure uniqueness with other mods it is recommended to +// prefix the name with the mod name. +// The second argument is an object describing the getter. +// 'name' is the string shown in the RA condition editor when selecting. +// 'description' should be a short description of the value the getter returns, with possible values if applicable. +// It will be displayed in the encyclopedia. +// 'val' is the actual getter reading out the value and returning it. It operates on a 'context' object with the current +// slave as an attribute. +// It is important that the getter always returns the data type that it is being added as, in this case 'string'. +// 'addNumber()' and 'addBoolean()' also exist. The usage is the same. +App.RA.Activation.getterManager.addString("example_slavename", + {name: "Slave Name", description: "The slave's name.", val: context => context.slave.slaveName} +); + +console.log("Rule Assistant Getters loaded."); + +App.Modding.scriptDone(); diff --git a/mods/example/subscript.js b/mods/example/subscript.js new file mode 100644 index 0000000000000000000000000000000000000000..98b9946a62ee900a8c75fbf2f40c967ef4593f96 --- /dev/null +++ b/mods/example/subscript.js @@ -0,0 +1,5 @@ +// Show the subscript loaded successfully: +console.log("Subscript loaded!"); + +// Tell the modding system this file is done. Do this at the end of EVERY script file. +App.Modding.scriptDone(); diff --git a/mods/mods.md b/mods/mods.md new file mode 100644 index 0000000000000000000000000000000000000000..e9eeb5db4b805293c088b72a73f9a1cfa205946d --- /dev/null +++ b/mods/mods.md @@ -0,0 +1,16 @@ +# Player Mods + +Player mods are scripts that are loaded after loading the game itself. + +There is currently very limited support for these mods with few systems exposing an API for modding. + +To use the mods in this directory copy the `mods` directory directly next to the game HTML file like this: + +* `FC_pregmod.html` +* `mods/` + * `example/` + * `index.js` + * ... + * ... + +The example mod explains the modding API itself and has examples for all moddable systems. diff --git a/package.json b/package.json index 247c5fc113474cffcf883df2f1d3ae427f91b1b8..8597ed95c2aef8be7a4022b1bcf317a0e1b8ce43 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,12 @@ "@types/jquery": "^3.5.1", "@types/lodash": "^4.14.159", "@types/mousetrap": "^1.6.3", - "@types/twine-sugarcube": "^2.33.0", - "eslint": "^7.6.0", - "eslint-plugin-jsdoc": "^32.0.0", - "eslint-plugin-sonarjs": "^0.6.0", - "ts-essentials": "^7.0.0", - "typescript": "^4.2.0" + "@types/twine-sugarcube": "^2.36.1", + "eslint": "^8.0.0", + "eslint-plugin-jsdoc": "^37.0.0", + "eslint-plugin-sonarjs": "^0.11.0", + "ts-essentials": "^9.1.1", + "typescript": "^4.4.0" }, "dependencies": { "autoprefixer": "^10.0.0", diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 08361a3295332d1a78832923689c3b5a9e1d4d04..5c8ef808853272290c293d08394e3a12b2756620 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -1,6 +1,6 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. - pmod: "4.0.0-alpha.12", + pmod: "4.0.0-alpha.13", commitHash: null, release: 1161, // 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/Mods/Catmod/events/CMRESS/catLove.js b/src/Mods/Catmod/events/CMRESS/catLove.js index afefe3a3aec46ae783cf901559cdfa89cdee093c..ca586f069982511903ccf5919776632385eb50e7 100644 --- a/src/Mods/Catmod/events/CMRESS/catLove.js +++ b/src/Mods/Catmod/events/CMRESS/catLove.js @@ -48,7 +48,7 @@ App.Events.CMRESSCatLove = class CMRESSCatLove extends App.Events.BaseEvent { App.Events.addParagraph(node, t); t = []; - t.push(`${He} holds the little sculpture out to you with wobbly hands, finding it hard to balance the unwieldy thing as you examine ${his} craftscatship. The sculpture is surprisingly pretty; one of the slaves around you is obviously supposed to be ${eventSlave.slaveName}, and they're all burshing up against you lovingly with individual expressions of happiness tediously moulded onto their faces.`); + t.push(`${He} holds the little sculpture out to you with wobbly hands, finding it hard to balance the unwieldy thing as you examine ${his} craftscatship. The sculpture is surprisingly pretty; one of the slaves around you is obviously supposed to be ${eventSlave.slaveName}, and they're all brushing up against you lovingly with individual expressions of happiness tediously moulded onto their faces.`); if (canTalk(eventSlave)) { t.push( Spoken(eventSlave, `"I thought you might like a better gift, so I found some clay in the workshop and made this, ${title}."`), diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index 6135beeb844de6b1d2725f2217a4d55411a354b6..2390e7614e2288d3f7db78f1c4073220d8ac8c99 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -1707,7 +1707,7 @@ App.EndWeek.neighborsDevelopment = function() { return; case "Petite Admiration": r.push(`${desc} convinced that tall equals beauty, leading the arcology to <span class="yellow">adopt Statuesque Glorification.</span>`); - adoptRivalFS("FSSlaveProfessionalism"); + adoptRivalFS("FSStatuesqueGlorification"); return; case "Statuesque Glorification": r.push(`${desc} enamored by those shorter than them, leading the arcology to <span class="yellow">adopt Petite Admiration.</span>`); diff --git a/src/endWeek/nextWeek/nextWeek.js b/src/endWeek/nextWeek/nextWeek.js index c22693fb2bf7f73989599e137592598a4b9f9c25..849f3f5e5a37d572a0089b25f69dc0cb266a0579 100644 --- a/src/endWeek/nextWeek/nextWeek.js +++ b/src/endWeek/nextWeek/nextWeek.js @@ -21,8 +21,47 @@ App.EndWeek.nextWeek = function() { if (V.playerAging === 2) { V.PC.physicalAge++; V.PC.actualAge++; - V.PC.visualAge++; - V.PC.ovaryAge++; + if (V.PC.geneMods.NCS === 1 || (V.PC.geneticQuirks.neoteny >= 2 && V.PC.geneticQuirks.progeria !== 2)) { + /* Induced NCS completely takes over visual aging. Additionally, because of the neoteny aspects of NCS, ovaries don't age quite as fast. */ + /* Unsurprisingly, actual neoteny has the same effect as long as progeria isn't in play. */ + V.PC.ovaryAge += either(0.5, 0.6, 0.7, 0.7, 0.8, 0.9, 1.0); + } else { + V.PC.visualAge++; + V.PC.ovaryAge += either(0.8, 0.9, 0.9, 1.0, 1.0, 1.0, 1.1); + } + if (V.PC.physicalAge <= 18 && V.loliGrow > 0) { + // this is temporary to make physDev not wig out! + if (V.PC.genes === "XX") { + if (V.PC.pubertyXX === 1) { + if (V.PC.pubertyXY === 1) { + V.PC.hormoneBalance = 20; + } else { + V.PC.hormoneBalance = 60; + } + } else { + if (V.PC.pubertyXY === 1) { + V.PC.hormoneBalance = -20; + } else { + V.PC.hormoneBalance = 20; + } + } + } else if (V.PC.genes === "XY") { + if (V.PC.pubertyXX === 1) { + if (V.PC.pubertyXY === 1) { + V.PC.hormoneBalance = 20; + } else { + V.PC.hormoneBalance = 40; + } + } else { + if (V.PC.pubertyXY === 1) { + V.PC.hormoneBalance = -40; + } else { + V.PC.hormoneBalance = 20; + } + } + } + App.EndWeek.Shared.physicalDevelopment(V.PC, true); + } agePCEffects(); } } diff --git a/src/endWeek/saChoosesOwnClothes.js b/src/endWeek/saChoosesOwnClothes.js index 11d97190eb16c7d70ce3dca608449cc4cab30923..68f5cfae609a3e8eb3244ac2fb320e14d2d432c2 100644 --- a/src/endWeek/saChoosesOwnClothes.js +++ b/src/endWeek/saChoosesOwnClothes.js @@ -1071,7 +1071,7 @@ App.SlaveAssignment.choosesOwnClothes = (function() { // } else { if (V.arcologies[0].FSRepopulationFocus > 0 && slave.pregKnown === 1) { - neck.push({text: `dons a digital display around ${his} neck that shows off ${his} pregnancy in support of your Repopulation efforts.`, collar: "preg biometrics"}); + neck.push({text: `dons a digital display around ${his} neck that shows off ${his} pregnancy in support of your Repopulation efforts,`, collar: "preg biometrics"}); } else { if (V.arcologies[0].FSEgyptianRevivalist > 0) { neck.push({text: `dons a wesekh to support your ancient Egyptian pretensions,`, collar: "ancient Egyptian"}); diff --git a/src/endWeek/shared/physicalDevelopment.js b/src/endWeek/shared/physicalDevelopment.js new file mode 100644 index 0000000000000000000000000000000000000000..5af501c23e4aefd17eef1b2c401fc2310e3a2f81 --- /dev/null +++ b/src/endWeek/shared/physicalDevelopment.js @@ -0,0 +1,3745 @@ +App.EndWeek.Shared.physicalDevelopment = function(actor, player = false) { + let gigantomastiaMod; + let uterineHypersensitivityMod; + const rearQuirk = actor.geneticQuirks.rearLipedema === 2 ? 2 : 0; + const rearQuirkDivider = rearQuirk === 0 ? 1 : rearQuirk; + const dickMod = (actor.geneticQuirks.wellHung === 2 ? 2 : 1); + let physicalAgeSwap; + const tallerPC = (player && actor.height >= Height.mean(actor) + 5); + + if (actor.geneticQuirks.progeria === 2) { + // since progeria increases .physicalAge, we need to work around it. + // nothing other than the incubator drastically desyncs it, and progeria actors do not live through incubation, so this should be fine. + physicalAgeSwap = actor.actualAge; + } else { + physicalAgeSwap = actor.physicalAge; + } + if (actor.geneMods.NCS !== 1) { + /* NCS completely blocks all natural physical growth: no height increases. It also blocks all hormonal secondary sexual * characteristics. So, on the female side: no boobs, no butt, no hips, and no labia. And on the male side: no dick, no clit, no balls, no scrotum, no shoulders. */ + /* so this is a big old NO-OP to skip the physical development. */ + if (actor.geneticQuirks.androgyny === 2) { /* takes a mix of both to create a very androgynous slave */ + if (actor.geneticQuirks.dwarfism === 2 && actor.geneticQuirks.gigantism !== 2) { + increaseHeightDwarf(actor); + } else if (actor.geneticQuirks.gigantism === 2) { + increaseHeightGiant(actor); + } else if (actor.geneticQuirks.neoteny === 2) { + increaseHeightNeoteny(actor); + } else { + increaseHeightXX(actor); + } + if (actor.geneticQuirks.neoteny !== 2) { + if (actor.boobs - actor.boobsImplant <= 300) { + increaseBoobsXX(actor); + } + if (actor.dick.isBetween(0, 3) || actor.geneticQuirks.wellHung === 2) { + increaseDick(actor); + } + if (actor.balls.isBetween(0, 3)) { + increaseBalls(actor); + } + if (actor.vagina > 0 && actor.ovaries > 0 && physicalAgeSwap > actor.pubertyAgeXX) { + increaseWetness(actor); + } + if (actor.waist < 10) { + increaseWaistXY(actor); + } + if (actor.hips - actor.hipsImplant < 0) { + increaseHipsXX(actor); + } + if (actor.butt - actor.buttImplant < 3) { + increaseButtXX(actor); + } + } + increasePregAdaptationXX(actor); + } else if (actor.genes === "XX") { /* loli becoming a woman */ + if (actor.geneticQuirks.dwarfism === 2 && actor.geneticQuirks.gigantism !== 2) { + increaseHeightDwarf(actor); + } else if (actor.geneticQuirks.gigantism === 2) { + increaseHeightGiant(actor); + } else if (actor.geneticQuirks.neoteny === 2) { + increaseHeightNeoteny(actor); + } else { + increaseHeightXX(actor); + } + if (physicalAgeSwap === 13 || (physicalAgeSwap > 13 && (actor.hormoneBalance >= 100 || actor.hormoneBalance <= -100))) { + increaseFaceXX(actor); + if (actor.voice > 0) { + increaseVoiceXX(actor); + } + } + if (actor.geneticQuirks.neoteny !== 2) { + increaseBoobsXX(actor); + if (actor.clit > 0) { + increaseClit(actor); + } + if (actor.vagina > 0 && actor.ovaries > 0 && physicalAgeSwap > actor.pubertyAgeXX) { + increaseWetness(actor); + } + increaseWaistXX(actor); + increaseHipsXX(actor); + increaseButtXX(actor); + } + increasePregAdaptationXX(actor); + } else { + /* shota becoming a man */ + if (actor.geneticQuirks.dwarfism === 2 && actor.geneticQuirks.gigantism !== 2) { + increaseHeightDwarf(actor); + } else if (actor.geneticQuirks.gigantism === 2) { + increaseHeightGiant(actor); + } else if (actor.geneticQuirks.neoteny === 2) { + increaseHeightNeoteny(actor); + } else { + increaseHeightXY(actor); + } + if (physicalAgeSwap === 13 || (physicalAgeSwap > 13 && (actor.hormoneBalance >= 100 || actor.hormoneBalance <= -100))) { + increaseFaceXY(actor); + if (actor.voice > 1) { + increaseVoiceXY(actor); + } + } + if (actor.geneticQuirks.neoteny !== 2) { + increaseBoobsXY(actor); + if (actor.dick > 0) { + increaseDick(actor); + } + if (actor.balls > 0) { + increaseBalls(actor); + } + increaseWaistXY(actor); + increaseHipsXY(actor); + increaseButtXY(actor); + } + increasePregAdaptationXY(actor); + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHeightXX(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 3) { + if (actor.height <= 91) { + actor.height += jsEither([8, 8, 9, 9]); + } else if (actor.height <= 101) { + actor.height += 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 101) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 109) { + actor.height += 4; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 109) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 116) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 116) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 124) { + actor.height += 3; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 131) { + actor.height += 3; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 156) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 163) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 163) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 168) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 168) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 171) { + actor.height += 3; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 171) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 173) { + actor.height += 3; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1]); + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1]); + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 3) { + if (actor.height <= 91) { + actor.height += jsEither([8, 8, 9, 9, 9]); + } else if (actor.height <= 101) { + actor.height += 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 101) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 109) { + actor.height += 4; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 109) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 116) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 116) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 124) { + actor.height += 3; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([7, 7, 8, 8, 8]); + } else if (actor.height <= 131) { + actor.height += 3; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 4, 5, 5, 5]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 156) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 163) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 163) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 168) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 168) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 171) { + actor.height += 3; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 171) { + actor.height += jsEither([4, 4, 5, 5, 5]); + } else if (actor.height <= 173) { + actor.height += 3; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 3) { + if (actor.height <= 91) { + actor.height += jsEither([9, 9, 9, 10, 10]); + } else if (actor.height <= 101) { + actor.height += 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 101) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 109) { + actor.height += 4; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 109) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 116) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 116) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 124) { + actor.height += 3; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([8, 8, 8, 9, 9]); + } else if (actor.height <= 131) { + actor.height += 3; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([5, 5, 5, 6, 6]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 156) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 163) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 163) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 168) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 168) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 171) { + actor.height += 3; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 171) { + actor.height += jsEither([5, 5, 5, 6, 6]); + } else if (actor.height <= 173) { + actor.height += 3; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 174) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 174) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 174) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 174) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 3) { + if (actor.height <= 91) { + actor.height += jsEither([8, 9, 9, 10, 10]); + } else if (actor.height <= 101) { + actor.height += 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 101) { + actor.height += jsEither([6, 7, 7, 8, 8]); + } else if (actor.height <= 109) { + actor.height += 4; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 109) { + actor.height += jsEither([6, 7, 7, 8, 8]); + } else if (actor.height <= 116) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 116) { + actor.height += jsEither([5, 6, 6, 7, 7]); + } else if (actor.height <= 124) { + actor.height += 3; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([7, 8, 8, 9, 9]); + } else if (actor.height <= 131) { + actor.height += 3; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 6, 6, 7, 7]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 5, 5, 6, 6]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([6, 7, 7, 8, 8]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 156) { + actor.height += jsEither([5, 6, 6, 7, 7]); + } else if (actor.height <= 163) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 163) { + actor.height += jsEither([6, 7, 7, 8, 8]); + } else if (actor.height <= 168) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 168) { + actor.height += jsEither([5, 6, 6, 7, 7]); + } else if (actor.height <= 171) { + actor.height += 3; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 171) { + actor.height += jsEither([4, 5, 5, 6, 6]); + } else if (actor.height <= 173) { + actor.height += 3; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 174) { + actor.height += jsEither([0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 174) { + actor.height += jsEither([0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 174) { + actor.height += jsEither([0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 174) { + actor.height += jsEither([0, 1, 1, 2, 2]); + } + } + } else { + if (physicalAgeSwap === 3) { + if (actor.height <= 91) { + actor.height += jsEither([8, 8, 9, 9, 9, 10]); + } else if (actor.height <= 101) { + actor.height += 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 101) { + actor.height += jsEither([6, 6, 7, 7, 8, 8]); + } else if (actor.height <= 109) { + actor.height += 4; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 109) { + actor.height += jsEither([6, 6, 7, 7, 7, 8]); + } else if (actor.height <= 116) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 116) { + actor.height += jsEither([5, 5, 6, 6, 6, 7]); + } else if (actor.height <= 124) { + actor.height += 3; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([7, 7, 8, 8, 8, 9]); + } else if (actor.height <= 131) { + actor.height += 3; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 5, 6, 6, 6, 7]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 4, 5, 5, 5, 6]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([6, 6, 7, 7, 7, 8]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 156) { + actor.height += jsEither([5, 5, 6, 6, 6, 7]); + } else if (actor.height <= 163) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 163) { + actor.height += jsEither([6, 6, 7, 7, 7, 8]); + } else if (actor.height <= 168) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 168) { + actor.height += jsEither([5, 5, 6, 6, 6, 7]); + } else if (actor.height <= 171) { + actor.height += 3; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 171) { + actor.height += jsEither([4, 4, 5, 5, 5, 6]); + } else if (actor.height <= 173) { + actor.height += 3; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1, 2]); + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 174) { + actor.height += jsEither([0, 0, 1, 1, 1, 2]); + } + } + } + // experiment - Let's see if this keeps players on average above average height or if it makes them too tall in the long run. + if (tallerPC) { + actor.height += random(0, 3); + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHeightXY(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 3) { + if (actor.height <= 93) { + actor.height += jsEither([9, 9, 10, 10]); + } else if (actor.height <= 103) { + actor.height += 6; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 103) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 110) { + actor.height += 5; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 110) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 117) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 117) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 124) { + actor.height += 4; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 131) { + actor.height += 4; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 150) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 150) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 156) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 162) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 162) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 170) { + actor.height += 5; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 170) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 177) { + actor.height += 4; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 177) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 184) { + actor.height += 4; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 184) { + actor.height += jsEither([2, 2, 3, 3]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 185) { + actor.height += jsEither([1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 186) { + actor.height += jsEither([0, 0, 1, 1]); + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 3) { + if (actor.height <= 93) { + actor.height += jsEither([9, 9, 9, 10, 10]); + } else if (actor.height <= 103) { + actor.height += 6; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 103) { + actor.height += jsEither([7, 7, 8, 8, 8]); + } else if (actor.height <= 110) { + actor.height += 5; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 110) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 117) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 117) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 124) { + actor.height += 4; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 131) { + actor.height += 4; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 4, 5, 5, 5]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 150) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 150) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 156) { + actor.height += jsEither([5, 5, 6, 6, 6]); + } else if (actor.height <= 162) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 162) { + actor.height += jsEither([7, 7, 8, 8, 8]); + } else if (actor.height <= 170) { + actor.height += 5; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 170) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 177) { + actor.height += 4; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 177) { + actor.height += jsEither([6, 6, 7, 7, 7]); + } else if (actor.height <= 184) { + actor.height += 4; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 184) { + actor.height += jsEither([2, 2, 3, 3, 3]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 185) { + actor.height += jsEither([1, 1, 2, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 186) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 3) { + if (actor.height <= 93) { + actor.height += jsEither([10, 10, 11, 11]); + } else if (actor.height <= 103) { + actor.height += 6; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 103) { + actor.height += jsEither([8, 8, 9, 9]); + } else if (actor.height <= 110) { + actor.height += 5; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 110) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 117) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 117) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 124) { + actor.height += 4; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 131) { + actor.height += 4; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 150) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 150) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 156) { + actor.height += jsEither([6, 6, 7, 7]); + } else if (actor.height <= 162) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 162) { + actor.height += jsEither([8, 8, 9, 9]); + } else if (actor.height <= 170) { + actor.height += 5; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 170) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 177) { + actor.height += 4; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 177) { + actor.height += jsEither([7, 7, 8, 8]); + } else if (actor.height <= 184) { + actor.height += 4; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 184) { + actor.height += jsEither([3, 3, 4, 4]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 185) { + actor.height += jsEither([2, 2, 3, 3]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 186) { + actor.height += jsEither([1, 1, 2, 2]); + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 3) { + if (actor.height <= 93) { + actor.height += jsEither([10, 10, 10, 11, 11]); + } else if (actor.height <= 103) { + actor.height += 6; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 103) { + actor.height += jsEither([8, 8, 8, 9, 9]); + } else if (actor.height <= 110) { + actor.height += 5; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 110) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 117) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 117) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 124) { + actor.height += 4; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 131) { + actor.height += 4; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([5, 5, 5, 6, 6]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 150) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 150) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 156) { + actor.height += jsEither([6, 6, 6, 7, 7]); + } else if (actor.height <= 162) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 162) { + actor.height += jsEither([8, 8, 8, 9, 9]); + } else if (actor.height <= 170) { + actor.height += 5; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 170) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 177) { + actor.height += 4; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 177) { + actor.height += jsEither([7, 7, 7, 8, 8]); + } else if (actor.height <= 184) { + actor.height += 4; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 184) { + actor.height += jsEither([3, 3, 3, 4, 4]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 185) { + actor.height += jsEither([2, 2, 2, 3, 3]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 186) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } + } else { + if (physicalAgeSwap === 3) { + if (actor.height <= 93) { + actor.height += jsEither([9, 9, 10, 10, 10, 11]); + } else if (actor.height <= 103) { + actor.height += 6; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 103) { + actor.height += jsEither([7, 7, 8, 8, 9, 9]); + } else if (actor.height <= 110) { + actor.height += 5; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 110) { + actor.height += jsEither([6, 6, 7, 7, 8, 8]); + } else if (actor.height <= 117) { + actor.height += 4; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 117) { + actor.height += jsEither([6, 6, 7, 7, 8, 8]); + } else if (actor.height <= 124) { + actor.height += 4; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 124) { + actor.height += jsEither([6, 6, 7, 7, 8, 8]); + } else if (actor.height <= 131) { + actor.height += 4; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 131) { + actor.height += jsEither([5, 5, 6, 6, 7, 7]); + } else if (actor.height <= 137) { + actor.height += 3; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 137) { + actor.height += jsEither([4, 4, 5, 5, 5, 6]); + } else if (actor.height <= 144) { + actor.height += 3; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 144) { + actor.height += jsEither([5, 5, 6, 6, 7, 7]); + } else if (actor.height <= 150) { + actor.height += 3; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 150) { + actor.height += jsEither([5, 5, 6, 6, 6, 7]); + } else if (actor.height <= 156) { + actor.height += 3; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 156) { + actor.height += jsEither([5, 5, 6, 6, 7, 7]); + } else if (actor.height <= 162) { + actor.height += 3; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 162) { + actor.height += jsEither([7, 7, 8, 8, 9, 9]); + } else if (actor.height <= 170) { + actor.height += 5; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 170) { + actor.height += jsEither([6, 6, 7, 7, 8, 8]); + } else if (actor.height <= 177) { + actor.height += 4; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 177) { + actor.height += jsEither([6, 6, 7, 7, 8, 8]); + } else if (actor.height <= 184) { + actor.height += 4; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 184) { + actor.height += jsEither([2, 2, 3, 3, 4, 4]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 185) { + actor.height += jsEither([1, 1, 2, 2, 3, 3]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 186) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } + } + // experiment - Let's see if this keeps players on average above average height or if it makes them too tall in the long run. + if (tallerPC) { + actor.height += random(0, 3); + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHeightDwarf(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 3) { + if (actor.height <= 80) { + actor.height += jsEither([1, 1, 2, 2]); + } else if (actor.height <= 84) { + actor.height += 1; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 84) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 90) { + actor.height += 2; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 90) { + actor.height += jsEither([8, 8, 9, 9]); + } else if (actor.height <= 100) { + actor.height += 5; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 100) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 105) { + actor.height += 2; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 105) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 109) { + actor.height += 1; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 109) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 114) { + actor.height += 1; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 114) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 118) { + actor.height += 1; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 118) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 122) { + actor.height += 1; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 122) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 127) { + actor.height += 2; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 127) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 132) { + actor.height += 2; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 132) { + actor.height += jsEither([1, 1, 2, 2]); + } else if (actor.height <= 135) { + actor.height += 1; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 135) { + actor.height += jsEither([1, 1, 2, 2]); + } else if (actor.height <= 138) { + actor.height += 1; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 138) { + actor.height += jsEither([1, 1, 2, 2]); + } else if (actor.height <= 141) { + actor.height += 1; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1]); + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 3) { + if (actor.height <= 80) { + actor.height += jsEither([1, 1, 2, 2, 2]); + } else if (actor.height <= 84) { + actor.height += 1; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 84) { + actor.height += jsEither([4, 4, 5, 5, 5]); + } else if (actor.height <= 90) { + actor.height += 2; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 90) { + actor.height += jsEither([8, 8, 9, 9, 9]); + } else if (actor.height <= 100) { + actor.height += 5; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 100) { + actor.height += jsEither([3, 3, 4, 4, 4]); + } else if (actor.height <= 105) { + actor.height += 2; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 105) { + actor.height += jsEither([2, 2, 3, 3, 3]); + } else if (actor.height <= 109) { + actor.height += 1; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 109) { + actor.height += jsEither([3, 3, 4, 4, 4]); + } else if (actor.height <= 114) { + actor.height += 1; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 114) { + actor.height += jsEither([2, 2, 3, 3, 3]); + } else if (actor.height <= 118) { + actor.height += 1; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 118) { + actor.height += jsEither([2, 2, 3, 3, 3]); + } else if (actor.height <= 122) { + actor.height += 1; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 122) { + actor.height += jsEither([3, 3, 4, 4, 4]); + } else if (actor.height <= 127) { + actor.height += 2; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 127) { + actor.height += jsEither([3, 3, 4, 4, 4]); + } else if (actor.height <= 132) { + actor.height += 2; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 132) { + actor.height += jsEither([1, 1, 2, 2, 2]); + } else if (actor.height <= 135) { + actor.height += 1; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 135) { + actor.height += jsEither([1, 1, 2, 2, 2]); + } else if (actor.height <= 138) { + actor.height += 1; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 138) { + actor.height += jsEither([1, 1, 2, 2, 2]); + } else if (actor.height <= 141) { + actor.height += 1; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1, 1]); + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 3) { + if (actor.height <= 80) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 84) { + actor.height += 1; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 84) { + actor.height += jsEither([5, 5, 6, 6]); + } else if (actor.height <= 90) { + actor.height += 2; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 90) { + actor.height += jsEither([9, 9, 10, 10]); + } else if (actor.height <= 100) { + actor.height += 5; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 100) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 105) { + actor.height += 2; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 105) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 109) { + actor.height += 1; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 109) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 114) { + actor.height += 1; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 114) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 118) { + actor.height += 1; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 118) { + actor.height += jsEither([3, 3, 4, 4]); + } else if (actor.height <= 122) { + actor.height += 1; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 122) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 127) { + actor.height += 2; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 127) { + actor.height += jsEither([4, 4, 5, 5]); + } else if (actor.height <= 132) { + actor.height += 2; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 132) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 135) { + actor.height += 1; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 135) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 138) { + actor.height += 1; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 138) { + actor.height += jsEither([2, 2, 3, 3]); + } else if (actor.height <= 141) { + actor.height += 1; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 143) { + actor.height += jsEither([1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 143) { + actor.height += jsEither([1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 143) { + actor.height += jsEither([1, 1, 2, 2]); + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 3) { + if (actor.height <= 80) { + actor.height += jsEither([2, 2, 2, 3, 3]); + } else if (actor.height <= 84) { + actor.height += 1; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 84) { + actor.height += jsEither([5, 5, 5, 6, 6]); + } else if (actor.height <= 90) { + actor.height += 2; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 90) { + actor.height += jsEither([9, 9, 9, 10, 10]); + } else if (actor.height <= 100) { + actor.height += 5; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 100) { + actor.height += jsEither([4, 4, 4, 5, 5]); + } else if (actor.height <= 105) { + actor.height += 2; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 105) { + actor.height += jsEither([3, 3, 3, 4, 4]); + } else if (actor.height <= 109) { + actor.height += 1; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 109) { + actor.height += jsEither([4, 4, 4, 5, 5]); + } else if (actor.height <= 114) { + actor.height += 1; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 114) { + actor.height += jsEither([3, 3, 3, 4, 4]); + } else if (actor.height <= 118) { + actor.height += 1; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 118) { + actor.height += jsEither([3, 3, 3, 4, 4]); + } else if (actor.height <= 122) { + actor.height += 1; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 122) { + actor.height += jsEither([4, 4, 4, 5, 5]); + } else if (actor.height <= 127) { + actor.height += 2; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 127) { + actor.height += jsEither([4, 4, 4, 5, 5]); + } else if (actor.height <= 132) { + actor.height += 2; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 132) { + actor.height += jsEither([2, 2, 2, 3, 3]); + } else if (actor.height <= 135) { + actor.height += 1; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 135) { + actor.height += jsEither([2, 2, 2, 3, 3]); + } else if (actor.height <= 138) { + actor.height += 1; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 138) { + actor.height += jsEither([2, 2, 2, 3, 3]); + } else if (actor.height <= 141) { + actor.height += 1; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 143) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 143) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 143) { + actor.height += jsEither([1, 1, 1, 2, 2]); + } + } + } else { + if (physicalAgeSwap === 3) { + if (actor.height <= 80) { + actor.height += jsEither([1, 1, 2, 2, 3, 3]); + } else if (actor.height <= 84) { + actor.height += 1; + } + } else if (physicalAgeSwap === 4) { + if (actor.height <= 84) { + actor.height += jsEither([4, 4, 5, 5, 6, 6]); + } else if (actor.height <= 90) { + actor.height += 2; + } + } else if (physicalAgeSwap === 5) { + if (actor.height <= 90) { + actor.height += jsEither([8, 8, 9, 9, 10, 10]); + } else if (actor.height <= 100) { + actor.height += 5; + } + } else if (physicalAgeSwap === 6) { + if (actor.height <= 100) { + actor.height += jsEither([3, 3, 4, 4, 5, 5]); + } else if (actor.height <= 105) { + actor.height += 2; + } + } else if (physicalAgeSwap === 7) { + if (actor.height <= 105) { + actor.height += jsEither([2, 2, 3, 3, 4, 4]); + } else if (actor.height <= 109) { + actor.height += 1; + } + } else if (physicalAgeSwap === 8) { + if (actor.height <= 109) { + actor.height += jsEither([3, 3, 4, 4, 5, 5]); + } else if (actor.height <= 114) { + actor.height += 1; + } + } else if (physicalAgeSwap === 9) { + if (actor.height <= 114) { + actor.height += jsEither([2, 2, 3, 3, 4, 4]); + } else if (actor.height <= 118) { + actor.height += 1; + } + } else if (physicalAgeSwap === 10) { + if (actor.height <= 118) { + actor.height += jsEither([2, 2, 3, 3, 4, 4]); + } else if (actor.height <= 122) { + actor.height += 1; + } + } else if (physicalAgeSwap === 11) { + if (actor.height <= 122) { + actor.height += jsEither([3, 3, 4, 4, 5, 5]); + } else if (actor.height <= 127) { + actor.height += 2; + } + } else if (physicalAgeSwap === 12) { + if (actor.height <= 127) { + actor.height += jsEither([3, 3, 4, 4, 5, 5]); + } else if (actor.height <= 132) { + actor.height += 2; + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 132) { + actor.height += jsEither([1, 1, 2, 2, 3, 3]); + } else if (actor.height <= 135) { + actor.height += 1; + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 135) { + actor.height += jsEither([1, 1, 2, 2, 3, 3]); + } else if (actor.height <= 138) { + actor.height += 1; + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 138) { + actor.height += jsEither([1, 1, 2, 2, 3, 3]); + } else if (actor.height <= 141) { + actor.height += 1; + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 143) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHeightGiant(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap < 16) { + if (actor.height <= 270) { + actor.height += random(5, 12); + } + } else { + if (actor.height <= 270) { + actor.height += random(3, 7); + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap < 16) { + if (actor.height <= 270) { + actor.height += random(7, 15); + } + } else { + if (actor.height <= 270) { + actor.height += random(5, 7); + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap < 16) { + if (actor.height <= 270) { + actor.height += random(10, 25); + } + } else { + if (actor.height <= 270) { + actor.height += random(7, 13); + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap < 16) { + if (actor.height <= 270) { + actor.height += random(7, 22); + } + } else { + if (actor.height <= 270) { + actor.height += random(7, 12); + } + } + } else { + if (physicalAgeSwap < 16) { + if (actor.height <= 270) { + actor.height += random(7, 20); + } + } else { + if (actor.height <= 270) { + actor.height += random(5, 10); + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHeightNeoteny(actor) { + if (physicalAgeSwap <= 12) { + if (actor.height <= 120) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 13) { + if (actor.height <= 120) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 14) { + if (actor.height <= 120) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 15) { + if (actor.height <= 120) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 16) { + if (actor.height <= 130) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 17) { + if (actor.height <= 130) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } else if (physicalAgeSwap === 18) { + if (actor.height <= 130) { + actor.height += jsEither([0, 0, 1, 1, 2, 2]); + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseBoobsXX(actor) { + if (actor.geneticQuirks.gigantomastia === 2 && actor.geneticQuirks.macromastia === 2) { + gigantomastiaMod = 3; + } else if (actor.geneticQuirks.gigantomastia === 2) { + gigantomastiaMod = 2; + } else if (actor.geneticQuirks.macromastia === 2) { + gigantomastiaMod = 1.5; + } else if (actor.geneticQuirks.gigantomastia === 3) { + gigantomastiaMod = 1.2; + } else if (actor.geneticQuirks.macromastia === 3) { + gigantomastiaMod = 1.1; + } else { + gigantomastiaMod = 1; + } + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8) { + actor.boobs += 50; + } else if (physicalAgeSwap === 9) { + actor.boobs += 50; + } else if (physicalAgeSwap === 10) { + actor.boobs += 50; + } else if (physicalAgeSwap === 11) { + if (actor.boobs < (600 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 12) { + if (actor.boobs < (700 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 13) { + if (actor.boobs < (1000 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 14) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 15) { + if (actor.boobs < (900 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 16) { + if (actor.boobs < (1200 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 17) { + if (actor.boobs < (1600 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 18) { + if (actor.boobs < (2000 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 8) { + actor.boobs += 25; + } else if (physicalAgeSwap === 9) { + actor.boobs += 25; + } else if (physicalAgeSwap === 10) { + actor.boobs += 25; + } else if (physicalAgeSwap === 11) { + if (actor.boobs < (500 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 12) { + if (actor.boobs < (600 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 13) { + if (actor.boobs < (900 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 14) { + if (actor.boobs < (700 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 15) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 16) { + if (actor.boobs < (1000 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 17) { + if (actor.boobs < (1200 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 18) { + if (actor.boobs < (1600 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap >= 11) { + if (actor.boobs > 200 && gigantomastiaMod !== 3) { + actor.boobs -= 100; + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap >= 11) { + if (actor.boobs > 200 && gigantomastiaMod !== 3) { + actor.boobs -= 50; + } + } + } else { + if (physicalAgeSwap === 11) { + if (actor.boobs < (300 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.boobs < (300 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.boobs < (400 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.boobs < (500 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.boobs < (500 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (50 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (60 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (70 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseBoobsXY(actor) { + if (actor.geneticQuirks.gigantomastia === 2 && actor.geneticQuirks.macromastia === 2) { + gigantomastiaMod = 3; + } else if (actor.geneticQuirks.gigantomastia === 2) { + gigantomastiaMod = 2; + } else if (actor.geneticQuirks.macromastia === 2) { + gigantomastiaMod = 1.5; + } else if (actor.geneticQuirks.gigantomastia === 3) { + gigantomastiaMod = 1.2; + } else if (actor.geneticQuirks.macromastia === 3) { + gigantomastiaMod = 1.1; + } else { + gigantomastiaMod = 1; + } + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8) { + actor.boobs += 50; + } else if (physicalAgeSwap === 9) { + actor.boobs += 50; + } else if (physicalAgeSwap === 10) { + actor.boobs += 50; + } else if (physicalAgeSwap === 11) { + actor.boobs += 50; + } else if (physicalAgeSwap === 12) { + actor.boobs += 50; + } else if (physicalAgeSwap === 13) { + if (actor.boobs < (1000 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 14) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 15) { + if (actor.boobs < (900 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 16) { + if (actor.boobs < (1200 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 17) { + if (actor.boobs < (1600 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } else if (physicalAgeSwap === 18) { + if (actor.boobs < (2000 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 100; + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 8) { + actor.boobs += 25; + } else if (physicalAgeSwap === 9) { + actor.boobs += 25; + } else if (physicalAgeSwap === 10) { + actor.boobs += 25; + } else if (physicalAgeSwap === 11) { + actor.boobs += 25; + } else if (physicalAgeSwap === 12) { + actor.boobs += 25; + } else if (physicalAgeSwap === 13) { + if (actor.boobs < (900 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 25; + } else if (physicalAgeSwap === 14) { + if (actor.boobs < (700 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 15) { + if (actor.boobs < (800 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 16) { + if (actor.boobs < (1000 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 17) { + if (actor.boobs < (1200 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } else if (physicalAgeSwap === 18) { + if (actor.boobs < (1600 * gigantomastiaMod)) { + if (random(1, 100) > (40 / gigantomastiaMod)) { + actor.boobs += 100; + } + } + actor.boobs += 50; + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap >= 11) { + if (actor.boobs > 200 && gigantomastiaMod !== 3) { + actor.boobs -= 100; + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap >= 11) { + if (actor.boobs > 200 && gigantomastiaMod !== 3) { + actor.boobs -= 50; + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHipsXX(actor) { + if (actor.geneticQuirks.uterineHypersensitivity === 2) { + uterineHypersensitivityMod = 1.5; + } else if (actor.geneticQuirks.uterineHypersensitivity === 1) { + uterineHypersensitivityMod = 1.2; + } else { + uterineHypersensitivityMod = 1; + } + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 99 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 60 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 60 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 60 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 60 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseHipsXY(actor) { + if (actor.geneticQuirks.uterineHypersensitivity === 2) { + uterineHypersensitivityMod = 1.3; + } else if (actor.geneticQuirks.uterineHypersensitivity === 1) { + uterineHypersensitivityMod = 1.15; + } else { + uterineHypersensitivityMod = 1; + } + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.hips < 2) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.hips < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 8) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.hips < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 99 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 95 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } else { + if (physicalAgeSwap === 14) { + if (actor.hips < 2) { + if (random(1, 100) > 60 / uterineHypersensitivityMod) { + actor.hips++; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseButtXX(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (20 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (20 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (20 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (40 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (40 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (40 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (95 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (95 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (95 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (60 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (60 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (60 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (60 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseButtXY(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (20 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (20 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (20 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (40 / rearQuirkDivider)) { + actor.butt++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.butt < (4 + rearQuirk)) { + if (random(1, 100) > (40 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (90 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 8) { + if (actor.butt < (3 + rearQuirk)) { + if (random(1, 100) > (80 / rearQuirkDivider)) { + actor.butt++; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseDick(actor) { + if (actor.hormoneBalance >= 200) { + // + } else if (actor.hormoneBalance >= 100) { + // + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 8) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 9) { + if (actor.dick < 6 && dickMod === 2) { + if (random(1, 100) > 70) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 10) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 11) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 12) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 13) { + if (actor.dick < 6) { + if (random(1, 100) > (50 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 14) { + if (actor.dick < 6) { + if (random(1, 100) > (20 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 15) { + if (actor.dick < 6) { + if (random(1, 100) > (20 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 16) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 17) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 18) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 8) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 9) { + if (actor.dick < 6 && dickMod === 2) { + if (random(1, 100) > 70) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 10) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 11) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 12) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 13) { + if (actor.dick < 6) { + if (random(1, 100) > (70 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 14) { + if (actor.dick < 6) { + if (random(1, 100) > (40 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 15) { + if (actor.dick < 6) { + if (random(1, 100) > (40 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 16) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 17) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 18) { + if (actor.dick < 6) { + if (random(1, 100) > (90 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } + } else { + if (physicalAgeSwap === 9) { + if (actor.dick < 6 && dickMod === 2) { + if (random(1, 100) > 70) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 10) { + if (actor.dick < 6 && dickMod === 2) { + if (random(1, 100) > 70) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 11) { + if (actor.dick < 6 && dickMod === 2) { + if (random(1, 100) > 70) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 12) { + if (actor.dick < 6 && dickMod === 2) { + if (random(1, 100) > 70) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 13) { + if (actor.dick < 6) { + if (random(1, 100) > (50 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 14) { + if (actor.dick < 6) { + if (random(1, 100) > (50 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } else if (physicalAgeSwap === 15) { + if (actor.dick < 6) { + if (random(1, 100) > (50 / dickMod)) { + actor.dick++; + if (actor.foreskin > 0) { + actor.foreskin++; + } + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseBalls(actor) { + if (actor.hormoneBalance >= 200) { + // + } else if (actor.hormoneBalance >= 100) { + // + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 8) { + if (actor.balls < 6) { + if (random(1, 100) > 10) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 10) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 11) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 12) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 13) { + if (actor.balls < 6) { + if (random(1, 100) > 50) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 14) { + if (actor.balls < 6) { + if (random(1, 100) > 20) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 15) { + if (actor.balls < 6) { + if (random(1, 100) > 20) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 16) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 17) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 18) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 8) { + if (actor.balls < 6) { + if (random(1, 100) > 30) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 10) { + if (actor.balls < 6) { + if (random(1, 100) > 90) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 11) { + if (actor.balls < 6) { + if (random(1, 100) > 90) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 12) { + if (actor.balls < 6) { + if (random(1, 100) > 90) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 13) { + if (actor.balls < 6) { + if (random(1, 100) > 70) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 14) { + if (actor.balls < 6) { + if (random(1, 100) > 40) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 15) { + if (actor.balls < 6) { + if (random(1, 100) > 40) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 16) { + if (actor.balls < 6) { + if (random(1, 100) > 90) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 17) { + if (actor.balls < 6) { + if (random(1, 100) > 90) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 18) { + if (actor.balls < 6) { + if (random(1, 100) > 90) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } + } else { + if (physicalAgeSwap === 8) { + if (actor.balls < 6) { + if (random(1, 100) > 50) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 13) { + if (actor.balls < 6) { + if (random(1, 100) > 50) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 14) { + if (actor.balls < 6) { + if (random(1, 100) > 50) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } else if (physicalAgeSwap === 15) { + if (actor.balls < 6) { + if (random(1, 100) > 50) { + actor.balls++; + if (actor.scrotum > 0) { + actor.scrotum++; + } + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseClit(actor) { + if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap === 8) { + if (actor.clit < 4) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.clit < 4) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.clit < 4) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.clit < 4) { + if (random(1, 100) > 50) { + actor.clit++; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap === 8) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 90) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 9) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 90) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 10) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 90) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 11) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 12) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 13) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 14) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 15) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 16) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 17) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } else if (physicalAgeSwap === 18) { + if (actor.clit.isBetween(0, 4)) { + if (random(1, 100) > 70) { + actor.clit++; + } + } + } + } + if (physicalAgeSwap >= 11 && actor.geneticQuirks.wellHung === 2 && actor.clit < 5 && random(1, 100) > 60) { + actor.clit++; + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseWetness(actor) { + if (actor.geneticQuirks.uterineHypersensitivity === 2) { + uterineHypersensitivityMod = 1.5; + } else if (actor.geneticQuirks.uterineHypersensitivity === 1) { + uterineHypersensitivityMod = 1.2; + } else { + uterineHypersensitivityMod = 1; + } + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap === 8 || physicalAgeSwap === 9) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 90 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } else if (physicalAgeSwap <= 12) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 60 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } else if (actor.vaginaLube < 2) { + if (random(1, 100) > 80 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } else if (physicalAgeSwap <= 15) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 30 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } else if (actor.vaginaLube < 2) { + if (random(1, 100) > 50 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } else if (physicalAgeSwap <= 18) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 10 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } else if (actor.vaginaLube < 2) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap > 9 && physicalAgeSwap <= 12) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 70 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } else if (physicalAgeSwap <= 15) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } else if (actor.vaginaLube < 2) { + if (random(1, 100) > 70 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } else if (physicalAgeSwap <= 18) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 20 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } else if (actor.vaginaLube < 2) { + if (random(1, 100) > 40 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } + } else if (actor.hormoneBalance >= -20) { + if (physicalAgeSwap > 15 && physicalAgeSwap <= 18) { + if (actor.vaginaLube < 1) { + if (random(1, 100) > 50 / uterineHypersensitivityMod) { + actor.vaginaLube++; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseWaistXX(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap >= 12) { + if (actor.waist > -60) { + if (random(1, 100) > 20) { + actor.waist -= 5; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap >= 12) { + if (actor.waist > -30) { + if (random(1, 100) > 20) { + actor.waist -= 5; + } + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap >= 12) { + if (actor.waist < 60) { + if (random(1, 100) > 20) { + actor.waist += 5; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap >= 12) { + if (actor.waist < 30) { + if (random(1, 100) > 20) { + actor.waist += 5; + } + } + } + } else { + if (physicalAgeSwap >= 12) { + if (actor.waist > -20) { + if (random(1, 100) > 60) { + actor.waist -= 5; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseWaistXY(actor) { + if (actor.hormoneBalance >= 200) { + if (physicalAgeSwap >= 12) { + if (actor.waist > -30) { + if (random(1, 100) > 20) { + actor.waist -= 5; + } + } + } + } else if (actor.hormoneBalance >= 100) { + if (physicalAgeSwap >= 12) { + if (actor.waist > -15) { + if (random(1, 100) > 20) { + actor.waist -= 5; + } + } + } + } else if (actor.hormoneBalance <= -200) { + if (physicalAgeSwap >= 12) { + if (actor.waist < 90) { + if (random(1, 100) > 20) { + actor.waist += 5; + } + } + } + } else if (actor.hormoneBalance <= -100) { + if (physicalAgeSwap >= 12) { + if (actor.waist < 60) { + if (random(1, 100) > 20) { + actor.waist += 5; + } + } + } + } else { + if (physicalAgeSwap >= 12) { + if (actor.waist < 20) { + if (random(1, 100) > 60) { + actor.waist += 5; + } + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseFaceXX(actor) { + if (actor.hormoneBalance >= 200) { + if (actor.face > 60) { + if (random(1, 100) > 80) { + actor.face += 5; + } + } else if (actor.face <= 60) { + if (random(1, 100) > 30) { + actor.face += 10; + } + } + } else if (actor.hormoneBalance >= 100) { + if (actor.face > 60) { + if (random(1, 100) > 80) { + actor.face += 5; + } + } else if (actor.face <= 60) { + if (random(1, 100) > 30) { + actor.face += 10; + } + } + } else if (actor.hormoneBalance <= -200) { + if (actor.face < 100) { + if (random(1, 100) > 50) { + actor.face -= 20; + } + } + } else if (actor.hormoneBalance <= -100) { + if (actor.face < 100) { + if (random(1, 100) > 70) { + actor.face -= 20; + } + } + } else { + if (actor.face > 60) { + if (random(1, 100) > 90) { + actor.face += 5; + } + } else if (actor.face <= 60) { + if (random(1, 100) > 40) { + actor.face += 10; + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseFaceXY(actor) { + if (actor.hormoneBalance >= 200) { + if (actor.face > 60) { + if (random(1, 100) > 80) { + actor.face += 5; + } + } else if (actor.face <= 60) { + if (random(1, 100) > 50) { + actor.face += 10; + } + } + } else if (actor.hormoneBalance >= 100) { + if (actor.face > 60) { + if (random(1, 100) > 80) { + actor.face += 10; + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseVoiceXX(actor) { + if (actor.hormoneBalance >= 200) { + if (actor.voice === 3) { + if (random(1, 100) > 90) { + actor.voice--; + } + } + } else if (actor.hormoneBalance >= 100) { + if (actor.voice === 3) { + if (random(1, 100) > 80) { + actor.voice--; + } + } + } else if (actor.hormoneBalance <= -200) { + if (actor.voice <= 3) { + if (random(1, 100) > 30) { + actor.voice--; + } + } + } else if (actor.hormoneBalance <= -100) { + if (actor.voice <= 3) { + if (random(1, 100) > 60) { + actor.voice--; + } + } + } else { + if (actor.voice === 3) { + if (random(1, 100) > 60) { + actor.voice--; + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increaseVoiceXY(actor) { + if (actor.hormoneBalance >= 200) { + if (actor.voice < 2) { + if (random(1, 100) > 50) { + actor.voice--; + } + } + } else if (actor.hormoneBalance >= 100) { + if (actor.voice < 3) { + if (random(1, 100) > 50) { + actor.voice--; + } + } + } else if (actor.hormoneBalance <= -200) { + if (actor.voice > 1) { + if (random(1, 100) > 10) { + actor.voice--; + } + } + } else if (actor.hormoneBalance <= -100) { + if (actor.voice > 1) { + if (random(1, 100) > 30) { + actor.voice--; + } + } + } else { + if (actor.voice > 1) { + if (random(1, 100) > 60) { + actor.voice--; + } + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increasePregAdaptationXX(actor) { + if (physicalAgeSwap === 3) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation = 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 5) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 6) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 7) { + if (actor.pregAdaptation < 6) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 8) { + if (actor.pregAdaptation < 7) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 9) { + if (actor.pregAdaptation < 8) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 10) { + if (actor.pregAdaptation < 9) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 11) { + if (actor.pregAdaptation < 10) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 12) { + if (actor.pregAdaptation < 14) { + actor.pregAdaptation += 4; + } + } else if (physicalAgeSwap === 13) { + if (actor.pregAdaptation < 18) { + actor.pregAdaptation += 4; + } + } else if (physicalAgeSwap === 14) { + if (actor.pregAdaptation < 22) { + actor.pregAdaptation += 4; + } + } else if (physicalAgeSwap === 15) { + if (actor.pregAdaptation < 28) { + actor.pregAdaptation += 6; + } + } else if (physicalAgeSwap === 16) { + if (actor.pregAdaptation < 34) { + actor.pregAdaptation += 6; + } + } else if (physicalAgeSwap === 17) { + if (actor.pregAdaptation < 42) { + actor.pregAdaptation += 8; + } + } else if (physicalAgeSwap === 18) { + if (actor.pregAdaptation < 50) { + actor.pregAdaptation += 8; + } + } + } + + /** + * @param {FC.HumanState} actor + */ + function increasePregAdaptationXY(actor) { + if (physicalAgeSwap === 3) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation = 5; + } + } else if (physicalAgeSwap === 4) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 5) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 6) { + if (actor.pregAdaptation < 5) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 7) { + if (actor.pregAdaptation < 6) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 8) { + if (actor.pregAdaptation < 7) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 9) { + if (actor.pregAdaptation < 8) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 10) { + if (actor.pregAdaptation < 9) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 11) { + if (actor.pregAdaptation < 10) { + actor.pregAdaptation++; + } + } else if (physicalAgeSwap === 12) { + if (actor.pregAdaptation < 12) { + actor.pregAdaptation += 2; + } + } else if (physicalAgeSwap === 13) { + if (actor.pregAdaptation < 14) { + actor.pregAdaptation += 2; + } + } else if (physicalAgeSwap === 14) { + if (actor.pregAdaptation < 16) { + actor.pregAdaptation += 2; + } + } else if (physicalAgeSwap === 15) { + if (actor.pregAdaptation < 18) { + actor.pregAdaptation += 2; + } + } else if (physicalAgeSwap === 16) { + if (actor.pregAdaptation < 20) { + actor.pregAdaptation += 2; + } + } else if (physicalAgeSwap === 17) { + if (actor.pregAdaptation < 20) { + actor.pregAdaptation += 2; + } + } else if (physicalAgeSwap === 18) { + if (actor.pregAdaptation < 20) { + actor.pregAdaptation += 2; + } + } + } +}; diff --git a/src/events/RE/reBoomerang.js b/src/events/RE/reBoomerang.js index 2c8facc45b85f68fbbff4e67dc23ac01b8645b79..ef3745eb0644ba2a66d56a2dc0679187a3e6f03f 100644 --- a/src/events/RE/reBoomerang.js +++ b/src/events/RE/reBoomerang.js @@ -44,7 +44,7 @@ App.Events.REBoomerang = class REBoomerang extends App.Events.BaseEvent { r.push(`Your work is interrupted by ${V.assistant.name} with an alert from the entrance to the penthouse.`); if (V.assistant) { - r.push(Spoken(slave, `"${properTitle()}," ${heA} says, "you're going to want to see this."`)); + r.push(`"${properTitle()}," ${heA} says, "you're going to want to see this."`); } else { r.push(`${HeA}'s got the incident flagged as not fitting into any of the usual categories of disturbance, and requests your attention.`); } diff --git a/src/events/RE/reNickname.js b/src/events/RE/reNickname.js index af3d36373850c43e77799fb260cc78b22848b317..80e0e7aba13a95a981762d5932067214e1a37341 100644 --- a/src/events/RE/reNickname.js +++ b/src/events/RE/reNickname.js @@ -81,48 +81,28 @@ App.Events.RENickname = class RENickname extends App.Events.BaseEvent { function selectCategory(cheat) { const el = new DocumentFragment(); if (cheat) { - const choice = App.UI.DOM.appendNewElement("span", el, `Select a category of nicknames `); - const select = App.UI.DOM.appendNewElement("select", choice); - let matchFound = false; + App.UI.DOM.appendNewElement("span", el, `Select a category of nicknames `); + const options = []; for (const category of qualifiedNicknames.keys()) { - const option = App.UI.DOM.appendNewElement("option", select, category); - option.value = category; - if (option.value === seed) { - option.selected = true; - matchFound = true; - } - } - if (!matchFound) { - select.selectedIndex = -1; + options.push({key: category, name: category}); } - select.onchange = () => { - const O = select.options[select.selectedIndex]; - seed = O.value; + el.append(App.UI.DOM.makeSelect(options, seed, value => { + seed = value; jQuery(intro).empty().append(introPassage()); - }; + })); } return el; } function selectNickname(cheat) { const el = new DocumentFragment(); if (cheat) { - const select = App.UI.DOM.appendNewElement("select", el); - let matchFound = false; + const options = []; for (const category of nicknameArray) { - const option = App.UI.DOM.appendNewElement("option", select, `'${category}'`); - option.value = category; - if (option.value === nickname) { - option.selected = true; - matchFound = true; - } - } - if (!matchFound) { - select.selectedIndex = -1; + options.push({key: category, name: `'${category}'`}); } - select.onchange = () => { - const O = select.options[select.selectedIndex]; - nickname = O.value; - }; + el.append(App.UI.DOM.makeSelect(options, nickname, name => { + nickname = name; + })); } else { App.UI.DOM.appendNewElement("span", el, `${nickname} `, "pink"); } diff --git a/src/events/RE/rePregInventorShowOff.js b/src/events/RE/rePregInventorShowOff.js index c80f2c699141a696bdfc7378992e6fca9f5f57f6..253d4c39e3455a8687d8e09d01dedb1b085f1152 100644 --- a/src/events/RE/rePregInventorShowOff.js +++ b/src/events/RE/rePregInventorShowOff.js @@ -556,7 +556,7 @@ App.Events.rePregInventorShowOff = class rePregInventorShowOff extends App.Event function tv() { const frag = new DocumentFragment(); let r = []; - r.push(`You are so impressed by ${his} ideas that you arrange to have ${him} demonstrate ${his} discoveries on a prominent FCTV talk show. It will take some time, and you'll have to insure that ${he}'s at least reasonably well known before the show's executives will agree to allow ${him} on-air, but you're certain that ${slave.slaveName}'s name will soon be on the lips of pregnancy-loving slaveowners and Free Cities citizens around the world. In the meantime, you implement ${his} ideas around the arcology. ${He} is <span class="devotion inc">thrilled</span> to have pleased you so much that you would <span class="trust inc">put such faith in ${his} ideas.</span>`); + r.push(`You are so impressed by ${his} ideas that you arrange to have ${him} demonstrate ${his} discoveries on a prominent FCTV talk show. It will take some time, and you'll have to ensure that ${he}'s at least reasonably well known before the show's executives will agree to allow ${him} on-air, but you're certain that ${slave.slaveName}'s name will soon be on the lips of pregnancy-loving slaveowners and Free Cities citizens around the world. In the meantime, you implement ${his} ideas around the arcology. ${He} is <span class="devotion inc">thrilled</span> to have pleased you so much that you would <span class="trust inc">put such faith in ${his} ideas.</span>`); cashX(-tvCost, "event", slave); V.pregInventor = 2; V.pregInventions = 1; diff --git a/src/events/intro/introSummary.js b/src/events/intro/introSummary.js index 8c77b8fba619fc3b560a1f5062ba98834996238d..f72206639a9929d774233191868f72c6a26cce8c 100644 --- a/src/events/intro/introSummary.js +++ b/src/events/intro/introSummary.js @@ -186,8 +186,8 @@ App.Intro.summary = function() { V.PC.skill.trading = -25; V.PC.skill.warfare = -50; V.PC.skill.slaving = -25; - V.PC.skill.engineering = 50; - V.PC.skill.medicine = -25; + V.PC.skill.engineering = -25; + V.PC.skill.medicine = 50; V.PC.skill.hacking = -20; V.PC.muscles = 0; break; diff --git a/src/events/intro/newGamePlusPassage.js b/src/events/intro/newGamePlusPassage.js index 14b371992b12e618075307bebe207cce07388fb8..a7fa901b07841b53d50a7baac81df3290ef671e6 100644 --- a/src/events/intro/newGamePlusPassage.js +++ b/src/events/intro/newGamePlusPassage.js @@ -12,7 +12,7 @@ App.Intro.newGamePlus = function() { App.UI.DOM.appendNewElement("p", node, `You have decided to start over and will be able to take a few things with you: a few slaves, a small fraction of your current reserves of money, and possibly even your experience as an arcology owner, which will give you a very powerful career background. Many of your other customizations and settings will be carried over as the defaults for your new game, but can be revised freely.`); if (V.cash >= fee) { - App.Events.addNode(node, [`You have allocated funds to bring up to ${V.slavesToImportMax} slaves with you (or your equivalent) to a new arcology. It will cost <span class="yellowgreen">${cashFormat(fee)}</span> to insure another slave's safe transfer. You have <span class="yellowgreen">${cashFormat(V.cash)}</span> to spend.`], "div"); + App.Events.addNode(node, [`You have allocated funds to bring up to ${V.slavesToImportMax} slaves with you (or your equivalent) to a new arcology. It will cost <span class="yellowgreen">${cashFormat(fee)}</span> to ensure another slave's safe transfer. You have <span class="yellowgreen">${cashFormat(V.cash)}</span> to spend.`], "div"); App.UI.DOM.appendNewElement("div", node, App.UI.DOM.link( "Increase slave import capacity by 1.", () => { diff --git a/src/events/nonRandom/pRaped.js b/src/events/nonRandom/pRaped.js index 3182f8a7762bae198bedfabc6d0975e305ed77b6..b6bfc25dd6bddf88029265d4a71b040dc8a34827 100644 --- a/src/events/nonRandom/pRaped.js +++ b/src/events/nonRandom/pRaped.js @@ -32,6 +32,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { rapist.waist = 50; rapist.skill.oral = 0; rapist.skill.anal = 0; + rapist.pronoun = 1; //janky workaround - reset later by repeating generatePronouns - reexamine in any diversePronouns rework } else { rapist = GenerateNewSlave("XX", genParam); rapist.vagina = 1; @@ -65,7 +66,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { r.push(`over, but your body has grown a bit too unwieldy as of late, so you find yourself quickly outmaneuvered and held with a knife to your throat.`); } } else if (isPCCareerInCategory("slaver") || V.PC.skill.warfare >= 45) { - r.push(`The moment you notice an arm coming around from behind you does your training kick in.`); + r.push(`The moment you notice an arm coming around from behind you, your training kicks in.`); if (!isHindered(V.PC)) { r.push(`You quickly disarm the assailant and knock them to the floor before placing them in a choke-hold. Once they are subdued, you stand back to decide what to do next.`); V.raped = 0; @@ -104,184 +105,184 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { if (V.PC.vagina >= 0) { if (V.PC.butt > 4) { r.push(Spoken(rapist, `"God, the way your fat ass is hugging my dick, you were just made to be bent over, weren't you?"`)); - r.push(`he states matter of factly as ${he} pulls you closer.`); + r.push(`${he} states matter-of-factly as ${he} pulls you closer.`); } r.push(`With ${his} free hand, ${he} begins to explore your vulnerable body.`); if (V.PC.weight > 130) { r.push(Spoken(rapist, `"Normally I don't go for fatties, but for you, I think I can make an exception,"`)); - r.push(`he chides as grinds against your soft form.`); + r.push(`${he} chides as ${he} grinds against your soft form.`); } else if (V.PC.weight > 95) { r.push(Spoken(rapist, `"Bit soon to be letting yourself go, isn't it?"`)); - r.push(`he chides as grinds against your soft form.`); + r.push(`${he} chides as ${he} grinds against your soft form.`); } else if (V.PC.weight > 30) { r.push(Spoken(rapist, `"Nothing wrong with carrying a little extra weight,"`)); - r.push(`he teases as grinds against your soft form.`); + r.push(`${he} teases as ${he} grinds against your soft form.`); } if (isPCCareerInCategory("wealth")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. How much did you have to pay for these babies?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Couldn't afford an abortion after you took over? How sad,"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Went with the full package didn't you?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("capitalist")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. Bet these got you some great deals with guys, didn't they?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Sleeping with guys to close deals? Such a slut,"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Guess you fuck people over in more ways than one, don't you?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("mercenary")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"So did you ever actually see combat, or did you just spend all your days in the barracks servicing the real soldiers?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Well now I know why you aren't serving still,"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Got a little surgery between missions, eh?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("engineer")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. Did the other engineers care about your designs or just your tits?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"I can see why your designs were so popular, you fucked your way into the spotlight!"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Well you do know how to erect things, don't you?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("medicine")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. Did you implant them yourself?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Look at that belly! I bet you inseminated yourself with your own seed,"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } else { r.push(Spoken(rapist, `"I see how you work. Mess up a surgery and give the guy a pity fuck. Surprised you couldn't get their spawn out of your belly though. Guess you aren't that good of a surgeon,"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"I'm impressed. Your woman impression is quite good. Did you do the surgery yourself?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); r.push(Spoken(rapist, `"Still going to fuck you though."`)); } } else if (isPCCareerInCategory("slaver")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"With tits like these, I bet you were the bait used to lure them in,"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Did a slave beat me to you?"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Bet you raped a bunch of girls with this, didn't you? Consider what's coming karma,"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("celebrity")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. I wonder how many guys jacked off to your pictures?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"I can see how you got so popular!"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"How much tape did it take to hold this guy down?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("escort")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and soft. How many dicks have been between these babies?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"What kind of whore doesn't know about protection?"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"So, did you ever get to use this when you were a prostitute?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("gang")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"I bet I'm not the first person to do this to you, am I?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Ah, now I get it. Your role in the gang was to lie on your back and take dick all day, wasn't it?"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Fuck or be fucked world; today, it's gonna be you,"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("servant")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. Bet your Master spent a fortune making these so nice,"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Holding on to your Master's final gift are you?"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"When your Master first undressed you, what did he think of his 'girl'?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } else if (isPCCareerInCategory("BlackHat")) { if (V.PC.boobs >= 300) { r.push(Spoken(rapist, `"Nice and supple. What are the odds that I can find these babies on the internet?"`)); - r.push(`he smirks as he gropes your breasts.`); + r.push(`${he} smirks as ${he} gropes your breasts.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"You'd think someone so skilled at breaking security would understand protection themselves. Or did you trade your pussy for information?"`)); - r.push(`he chuckles as he rubs your pregnant belly.`); + r.push(`${he} chuckles as ${he} rubs your pregnant belly.`); } if (V.PC.dick > 0) { r.push(Spoken(rapist, `"Trying to catch a signal with that?"`)); - r.push(`he mocks as he flicks the tip of your stiffening cock.`); + r.push(`${he} mocks as ${he} flicks the tip of your stiffening cock.`); } } - r.push(`Finally he reaches your moistening pussy.`); + r.push(`Finally ${he} reaches your moistening pussy.`); r.push(Spoken(rapist, `"Already wet are we? Glad you know your place,"`)); - r.push(`he states as he pulls your clothes off and bends you over.`); + r.push(`${he} states as ${he} pulls your clothes off and bends you over.`); if (V.PC.vagina === 0) { r.push(Spoken(rapist, `"And you still have your innocence, how delightful!"`)); } App.Events.addParagraph(node, r); r = []; - r.push(`You can feel the head of his cock teasing your`); + r.push(`You can feel the head of ${his} cock teasing your`); if (V.PC.vagina === 0) { - r.push(`virgin pussy; you grit your teeth knowing what will come next. Without mercy, he <span class="red">tears through your hymen</span> and forces himself as deep as your tight pussy lets him. You choke back a sob as he struggles to hilt himself in you. He must have undergone surgery or something because there is no way your body can handle such a monster. You're in agony already - you can't fathom what will happen when he loses his patience.`); + r.push(`virgin pussy; you grit your teeth knowing what will come next. Without mercy, ${he} <span class="red">tears through your hymen</span> and forces ${himself} as deep as your tight pussy lets him. You choke back a sob as ${he} struggles to hilt ${himself} in you. ${He} must have undergone surgery or something because there is no way your body can handle such a monster. You're in agony already - you can't fathom what will happen when ${he} loses ${his} patience.`); } else { - r.push(`pussy lips; you hope it feels bigger than it really is. As he struggles to force it into you, you regret thinking about it. He must have undergone surgery or something because he fills you completely. You feel weak just from him sticking it in, you can't fathom what will happen once he starts thrusting.`); + r.push(`pussy lips; you hope it feels bigger than it really is. As ${he} struggles to force it into you, you regret thinking about it. ${He} must have undergone surgery or something because ${he} fills you completely. You feel weak just from ${him} sticking it in, you can't fathom what will happen once ${he} starts thrusting.`); } - r.push(`You soon find out as he wastes no time starting slow. He violently rams his oversized cock deep into you, threatening to penetrate your cervix with each thrust. He quickens his pace, fucking you like a beast.`); + r.push(`You soon find out as ${he} wastes no time starting slow. ${He} violently rams ${his} oversized cock deep into you, threatening to penetrate your cervix with each thrust. ${He} quickens ${his} pace, fucking you like a beast.`); if (V.PC.preg < 1) { if (random(1, 100) > 60) { r.push(`His hand rises to your lips and forces something into your mouth.`); @@ -289,18 +290,18 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { r.push(`You obey, hoping to just get this over with.`); V.PC.forcedFertDrugs += 3; } - r.push(`With one final thrust, he forces through your battered cervix and unloads in the depths of your`); + r.push(`With one final thrust, ${he} forces through your battered cervix and unloads in the depths of your`); if (canGetPregnant(V.PC)) { r.push(`fertile`); } r.push(`womb.`); } else { - r.push(`With one final thrust, he forces it in as deep as he can into you and blows his seed deep in your aching cunt.`); + r.push(`With one final thrust, ${he} forces it in as deep as ${he} can into you and blows ${his} seed deep in your aching cunt.`); } if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Now your ${(V.PC.pregType > 1) ? `children` : `child`} will know what a real man's sperm is like!"`)); } - r.push(`He shoves you to the ground, pussy gaping from the size of his shaft and leaking his huge load all over yourself. By the time you loosen your bindings, he is long gone.`); + r.push(`${He} shoves you to the ground, your pussy gaping from the size of ${his} shaft and leaking ${his} huge load all over yourself. By the time you loosen your bindings, ${he} is long gone.`); App.Events.addParagraph(node, r); r = []; r.push(`It would be prudent to up security in your arcology. That or take a guard along when you leave the penthouse. Such a thing, happening to you. You can't allow such an indignity to happen again,`); @@ -309,7 +310,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { } else { r.push(`you think to yourself,`); } - r.push(`as you try to coax his sperm from your abused pussy.`); + r.push(`as you try to coax ${his} sperm from your abused pussy.`); if (canGetPregnant(V.PC)) { r.push(`For some reason your body feels really satisfied, despite`); if (V.PC.vagina === 0) { @@ -317,12 +318,13 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { } else { r.push(`not climaxing...`); } - r.push(`Is this what it feels like to be bred by someone so dominant? You should take a pregnancy test right away and make sure he didn't knock you up.`); + r.push(`Is this what it feels like to be bred by someone so dominant? You should take a pregnancy test right away and make sure ${he} didn't knock you up.`); knockMeUp(V.PC, 100, 0, -2); } if (V.PC.vagina === 0) { V.PC.vagina++; } + App.Events.addParagraph(node, r); } else { if (V.PC.weight > 95) { r.push(Spoken(rapist, `"I don't mind a little weight, so long as it doesn't get in the way. And even if it did, it won't stop me."`)); @@ -331,7 +333,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { r.push(`With ${his} free hand, ${he} begins to explore your bound body.`); if (V.PC.preg >= 20 || V.PC.belly >= 5000) { r.push(Spoken(rapist, `"Can't say I've ever had sex with a pregnant ${womanP} before... I'll figure it out, don't you worry!"`)); - r.push(`${he} teases as he rubs your pregnant belly.`); + r.push(`${he} teases as ${he} rubs your pregnant belly.`); r.push(Spoken(rapist, `"I won't be far behind you..."`)); r.push(`${he} thinks out loud, much to your chagrin.`); } @@ -571,6 +573,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { function enslave() { const el = new DocumentFragment(); cashX(forceNeg(contractCost), "slaveTransfer", rapist); + generatePronouns(rapist); el.append(`You complete the legalities and biometric scanning quickly and without fuss. The idiot will regret crossing you when ${he} wakes in the penthouse for basic slave induction.`); el.append(App.UI.newSlaveIntro(rapist)); return el; @@ -579,6 +582,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { function stocks() { const el = new DocumentFragment(); const r = []; + generatePronouns(rapist); healthDamage(rapist, 10); rapist.behavioralFlaw = "odd"; rapist.sexualFlaw = "hates penetration"; @@ -605,6 +609,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { } function arcade() { + generatePronouns(rapist); assignJob(rapist, "be confined in the arcade"); rapist.sentence = 4; cashX(forceNeg(contractCost), "slaveTransfer", rapist); @@ -615,6 +620,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { function dairy() { const el = new DocumentFragment(); const r = []; + generatePronouns(rapist); assignJob(rapist, "work in the dairy"); cashX(forceNeg(contractCost), "slaveTransfer", rapist); r.push(`You complete the legalities and biometric scanning quickly and cautiously. The idiot will wake up`); @@ -632,6 +638,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { function farmyard() { const el = new DocumentFragment(); const r = []; + generatePronouns(rapist); assignJob(rapist, "work as a farmhand"); cashX(forceNeg(contractCost), "slaveTransfer", rapist); r.push(`You complete the legalities and biometric scanning quickly and cautiously. The idiot will wake up in ${V.farmyardName}, where ${he} will spend the rest of ${his} days`); @@ -657,6 +664,7 @@ App.Events.pRaped = class pRaped extends App.Events.BaseEvent { function amputate() { const el = new DocumentFragment(); const r = []; + generatePronouns(rapist); healthDamage(rapist, 20); removeLimbs(rapist, "all"); rapist.behavioralFlaw = "odd"; diff --git a/src/events/randomEvent.js b/src/events/randomEvent.js index 462608e912ef4139484e39d00436f29a9bfeff11..348b86548877ac1767af54ceb3952aeb603fe723 100644 --- a/src/events/randomEvent.js +++ b/src/events/randomEvent.js @@ -456,21 +456,17 @@ App.Events.playRandomIndividualEvent = function() { if (V.RIESkip.length > 0) { countPara.append(` An event has already played for ${toSentence(V.RIESkip.map(s => SlaveFullName(getSlave(s))))}, so they are not eligible to play another.`); } + const slaveDiv = App.UI.DOM.appendNewElement("div", d, "Show events for this slave: "); - const slaveDropdown = App.UI.DOM.appendNewElement("select", slaveDiv); + const options = []; const startingSlave = eligibleSlaves.random(); for (const s of eligibleSlaves) { - const choice = App.UI.DOM.appendNewElement("option", slaveDropdown, SlaveFullName(s)); - choice.value = s.ID.toString(); - if (s.ID === startingSlave.ID) { - choice.selected = true; - } + options.push({key: s.ID.toString(), name: SlaveFullName(s)}); } - slaveDropdown.onchange = () => { - const O = slaveDropdown.options[slaveDropdown.selectedIndex]; - const slaveID = parseInt(O.value); - writeEventList(getSlave(slaveID)); - }; + slaveDiv.append(App.UI.DOM.makeSelect(options, startingSlave.ID.toString(), slaveID => { + writeEventList(getSlave(parseInt(slaveID))); + })); + App.UI.DOM.appendNewElement("p", d, "One of the following individual events would have been chosen for this slave."); const linkList = App.UI.DOM.appendNewElement("div", d, '', "event-section"); diff --git a/src/events/reRecruit.js b/src/events/reRecruit.js index a205f532c2af58e6178ed63e195e9b0cd2aa8ecf..f182c1b76f038dace1f3307d085cd45b975cfbd7 100644 --- a/src/events/reRecruit.js +++ b/src/events/reRecruit.js @@ -112,18 +112,13 @@ App.Events.RERecruit = class RERecruit extends App.Events.BaseEvent { if (V.debugMode && V.debugModeEventSelection) { const el = App.UI.DOM.appendNewElement("span", node); App.UI.DOM.appendNewElement("span", el, `One of the following recruitment events would have appeared: `); - const select = App.UI.DOM.appendNewElement("select", el); const evList = this.eventList.filter(e => App.Events.canExecute(e)); - for (const ev of evList) { - const choice = App.UI.DOM.appendNewElement("option", select, ev.eventName); - choice.value = ev.eventName; - } - select.selectedIndex = -1; - select.onchange = () => { - const O = select.options[select.selectedIndex]; + el.append(App.UI.DOM.makeSelect(evList.map(e => { + return {key: e.eventName, name: e.eventName}; + }), null, e => { el.remove(); - evList.find(ev => ev.eventName === O.value).execute(node); - }; + evList.find(ev => ev.eventName === e).execute(node); + })); } else { // forward execution to the delegate event this.params.event.execute(node); diff --git a/src/events/recETS/recetsDesperateBroodmother.js b/src/events/recETS/recetsDesperateBroodmother.js index 42111bdd4d7a2b65ffa3c5e693fe3d5090bffcce..ededc9b8892b1b0b5e05ca1e5eeb162571adeb25 100644 --- a/src/events/recETS/recetsDesperateBroodmother.js +++ b/src/events/recETS/recetsDesperateBroodmother.js @@ -186,7 +186,7 @@ App.Events.recetsDesperateBroodmother = class recetsDesperateBroodmother extends r.push( `desperate for work, carrying a young child on ${his} shoulder, quadruplets on ${his} back and a large sack against ${his} middle, while looking absolutely exhausted.`, Spoken(mother, `"Please, would you happen to have any work for a desperate mother? I need to eat, and my babies are starting to go hungry... I tried whoring, but I got pregnant again..."`), - `${He} struggles back to allow you to see ${his} full body. The object you thought were ${his} possessions is, in fact, ${his} massively distended stomach.`, + `${He} struggles back to allow you to see ${his} full body. The object you thought was ${his} possessions is, in fact, ${his} massively distended stomach.`, Spoken(mother, `"I'm having so many and I don't know what to do anymore... I can't care for this many... Anything you can do for meeEEEEEE!"`), `${He} groans as an intense contraction hits ${him}.`, Spoken(mother, `"Oh god! Not now! Not like this! I'm not ready... Please, I'm giving birth right now... Forget work, I'll be your slave if you can help me..."`), diff --git a/src/events/scheduled/seFctvRemote.js b/src/events/scheduled/seFctvRemote.js index 850ad0c0f59b32ea3b55ee617cedb9b421101e19..f36306360c6dcdfc69659542f950f3f6c129a794 100644 --- a/src/events/scheduled/seFctvRemote.js +++ b/src/events/scheduled/seFctvRemote.js @@ -142,6 +142,8 @@ App.Events.SEfctvRemote = class SEfctvRemote extends App.Events.BaseEvent { tech.stampTat = "'Shove that upgraded package here' is tattooed above $his rear."; cashX(forceNeg((V.modCost * 2) + V.SPcost), "slaveMod", tech); // two tats and a smart piercing + App.Events.refreshEventArt([tech, customer]); + r.push(`With a barely perceptible signal to ${V.assistant.name}, ${his} drone whirs to a stop and begins to fall to the floor. Before it lands, a dart hits ${him} in the neck. ${He} collapses into darkness.`); App.Events.addParagraph(frag, r); @@ -160,9 +162,6 @@ App.Events.SEfctvRemote = class SEfctvRemote extends App.Events.BaseEvent { App.Events.addParagraph(frag, r); r = []; - if (V.seeImages > 0) { - App.Events.drawEventArt(frag, [tech, customer]); - } r.push(`The door opens, and one of your citizens appears. ${tech.slaveName} doesn't know it, but you've made a small change to ${his} calendar. ${His} new client has a`); if (customer.dick > 0) { r.push(`legendarily large dick,`); diff --git a/src/events/scheduled/seRaiding.js b/src/events/scheduled/seRaiding.js index ed73894ee89bb52e74ced1ed5fb49da6d3095533..8f7fb187ed9dd7404169f9aa9de1ce2ec25f3add 100644 --- a/src/events/scheduled/seRaiding.js +++ b/src/events/scheduled/seRaiding.js @@ -6,7 +6,7 @@ It has been rebalanced to improve capture odds. If changing values, check your math and make sure that: no target is completely impossible to capture, with or without SF, odds of capturing an average target are about 50% WITHOUT the SF, -and odds of capturing a worst-case target are about 50% WITH the SF. +and odds of capturing a worst-case target are about 50% WITH fully upgraded SF. */ App.Events.SERaiding = class SERaiding extends App.Events.BaseEvent { @@ -255,7 +255,10 @@ App.Events.SERaiding = class SERaiding extends App.Events.BaseEvent { } else if (slave.muscles > 5) { r.push(`${His} muscles are toned, but still nimble.`); targetEscape += 1; - } else if (slave.muscles <= 5) { + } else if (slave.muscles < -30) { + r.push(`${His} muscles barely have the strength to keep ${him} standing, let alone power a flight.`); + targetEscape -= 3; + } else if (slave.muscles < -5) { r.push(`${His} body is soft and toneless.`); targetEscape -= 1; } else { diff --git a/src/facilities/farmyard/animals/Animal.js b/src/facilities/farmyard/animals/Animal.js index 9aa3708022ac61f847113edd16910b2ea9d4ce60..567241a5af5dd38a4ba6c6ce75da35b9afbe1694 100644 --- a/src/facilities/farmyard/animals/Animal.js +++ b/src/facilities/farmyard/animals/Animal.js @@ -46,6 +46,21 @@ App.Entity.Animal = class Animal { return this; } + /** @returns {this} */ + sell() { + if (this.isActive) { + V.active[this.type] = V.animals[this.type].random().name || null; + } + + if (V.pit && V.pit.animal === this.name) { + V.pit.animal = null; + } + + V.animals[this.type] = V.animals[this.type].filter(animal => animal.name !== this.name); + + return this; + } + /** @param {string} name */ setName(name) { this.name = name; diff --git a/src/facilities/farmyard/animals/animals.js b/src/facilities/farmyard/animals/animals.js index 2c94185aed50444ac0acad0574b71d24bc770edc..38831ccdaf54596465da8e813fbd4988e0f64c6b 100644 --- a/src/facilities/farmyard/animals/animals.js +++ b/src/facilities/farmyard/animals/animals.js @@ -1,54 +1,24 @@ App.Facilities.Farmyard.animals = function() { - App.Facilities.Farmyard.animals.init(); + if (!App.Data.animals || App.Data.animals.size === 0) { + App.Facilities.Farmyard.animals.init(); + } const frag = new DocumentFragment(); + const hrMargin = '0'; App.UI.DOM.appendNewElement("h1", frag, 'Animals'); - const activeDiv = App.UI.DOM.appendNewElement("div", frag, null, ['margin-bottom']); - const domesticDiv = App.UI.DOM.appendNewElement("div", frag, null, ['margin-bottom']); - const exoticDiv = App.UI.DOM.appendNewElement("div", frag, null, ['margin-bottom']); - const hrMargin = '0'; + const activeDiv = App.UI.DOM.appendNewElement("div", frag, activeAnimals(), ['margin-bottom']); - const canine = 'canine'; - const hooved = 'hooved'; - const feline = 'feline'; - const exotic = 'exotic'; - const domestic = 'domestic'; + App.UI.DOM.appendNewElement("div", frag, domestic(), ['margin-bottom']); + App.UI.DOM.appendNewElement("div", frag, exotic(), ['margin-bottom']); + frag.append(addAnimal()); V.nextButton = "Back"; V.nextLink = "Farmyard"; V.returnTo = "Farmyard Animals"; V.encyclopedia = "Farmyard"; - if (V.active.canine || V.active.hooved || V.active.feline) { - App.UI.DOM.appendNewElement("h2", activeDiv, 'Active Animals'); - } - - App.UI.DOM.appendNewElement("h2", domesticDiv, 'Domestic Animals'); - - if (V.farmyardKennels > 1 || V.farmyardStables > 1 || V.farmyardCages > 1) { - App.UI.DOM.appendNewElement("h2", exoticDiv, 'Exotic Animals'); - } - - activeDiv.append(activeAnimals()); - - domesticDiv.append( - domesticCanines(), - domesticHooved(), - domesticFelines(), - ); - - exoticDiv.append( - exoticCanines(), - exoticHooved(), - exoticFelines(), - ); - - if (V.debugMode || V.cheatMode) { - frag.append(addAnimal()); - } - return frag; // Active Animals @@ -60,7 +30,7 @@ App.Facilities.Farmyard.animals = function() { hr.style.margin = hrMargin; - App.UI.DOM.appendNewElement("span", div, 'Canine', ['bold']); + App.UI.DOM.appendNewElement("h2", div, 'Active Animals'); div.append(hr); @@ -77,12 +47,14 @@ App.Facilities.Farmyard.animals = function() { return div; } - return document.createElement("div"); + return new DocumentFragment(); function canine() { const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); const options = new App.UI.OptionsGroup(); + App.UI.DOM.appendNewElement("h3", div, 'Canine'); + const option = options.addOption(null, "canine", V.active); V.animals.canine.forEach(canine => { option.addValue(capFirstChar(canine.name), canine.name).pulldown(); @@ -97,6 +69,8 @@ App.Facilities.Farmyard.animals = function() { const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); const options = new App.UI.OptionsGroup(); + App.UI.DOM.appendNewElement("h3", div, 'Hooved'); + const option = options.addOption(null, "hooved", V.active); V.animals.hooved.forEach(hooved => { option.addValue(capFirstChar(hooved.name), hooved.name).pulldown(); @@ -111,6 +85,8 @@ App.Facilities.Farmyard.animals = function() { const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); const options = new App.UI.OptionsGroup(); + App.UI.DOM.appendNewElement("h3", div, 'Feline'); + const option = options.addOption(null, "feline", V.active); V.animals.feline.forEach(feline => { option.addValue(capFirstChar(feline.name), feline.name).pulldown(); @@ -124,108 +100,159 @@ App.Facilities.Farmyard.animals = function() { // Domestic Animals - function domesticCanines() { - if (V.farmyardKennels) { - const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); - const hr = document.createElement("hr"); + function domestic() { + const frag = new DocumentFragment(); - hr.style.margin = hrMargin; + App.UI.DOM.appendNewElement("h2", frag, 'Domestic Animals'); - App.UI.DOM.appendNewElement("span", div, 'Dogs', ['bold']); + frag.append( + canine(), + hooved(), + feline(), + ); - div.append(hr, animalList(canine, domestic, 5000, canine)); + return frag; - return div; - } + function canine() { + if (V.farmyardKennels) { + const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); + const hr = document.createElement("hr"); - return document.createElement("div"); - } + hr.style.margin = hrMargin; - function domesticHooved() { - if (V.farmyardStables) { - const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); - const hr = document.createElement("hr"); + App.UI.DOM.appendNewElement("span", div, 'Dogs', ['bold']); + div.append(hr, animalList('canine', 'domestic', 5000, 'canine', 'dog')); - hr.style.margin = hrMargin; + if ([...App.Data.animals].some(animal => + animal.type === 'canine' && + animal.rarity === 'domestic' && + animal.species !== 'dog')) { + const hr = document.createElement("hr"); - App.UI.DOM.appendNewElement("span", div, 'Hooved Animals', ['bold']); + hr.style.margin = hrMargin; - div.append(hr, animalList(hooved, domestic, 20000, hooved)); + App.UI.DOM.appendNewElement("span", div, 'Other Canines', ['bold']); + div.append(hr, animalList('canine', 'domestic', 5000, 'canine', null, 'dog')); + } - return div; - } + return div; + } - return document.createElement("div"); - } + return new DocumentFragment(); + } - function domesticFelines() { - if (V.farmyardCages) { - const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); - const hr = document.createElement("hr"); + function hooved() { + if (V.farmyardStables) { + const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); + const hr = document.createElement("hr"); - hr.style.margin = hrMargin; + hr.style.margin = hrMargin; - App.UI.DOM.appendNewElement("span", div, 'Cats', ['bold']); + App.UI.DOM.appendNewElement("span", div, 'Hooved Animals', ['bold']); + div.append(hr, animalList('hooved', 'domestic', 20000, 'hooved')); - div.append(hr, animalList(feline, domestic, 1000, feline)); + return div; + } - return div; + return new DocumentFragment(); } - return document.createElement("div"); + function feline() { + if (V.farmyardCages) { + const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); + const hr = document.createElement("hr"); + + hr.style.margin = hrMargin; + + App.UI.DOM.appendNewElement("span", div, 'Cats', ['bold']); + div.append(hr, animalList('feline', 'domestic', 1000, 'feline', 'cat')); + + if ([...App.Data.animals].some(animal => + animal.type === 'feline' && + animal.rarity === 'domestic' && + animal.species !== 'cat')) { + const hr = document.createElement("hr"); + + hr.style.margin = hrMargin; + + App.UI.DOM.appendNewElement("span", div, 'Other Felines', ['bold']); + div.append(hr, animalList('feline', 'domestic', 5000, 'feline', null, 'cat')); + } + + return div; + } + + return new DocumentFragment(); + } } // Exotic Animals - function exoticCanines() { - if (V.farmyardKennels > 1) { - const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); - const hr = document.createElement("hr"); + function exotic() { + const frag = new DocumentFragment(); - hr.style.margin = hrMargin; + if (V.farmyardKennels > 1 || V.farmyardStables > 1 || V.farmyardCages > 1) { + App.UI.DOM.appendNewElement("h2", frag, 'Exotic Animals'); + } - App.UI.DOM.appendNewElement("span", div, 'Canines', ['bold']); + frag.append( + canine(), + hooved(), + feline(), + ); - div.append(hr, animalList(canine, exotic, 50000, canine)); + return frag; - return div; + function canine() { + if (V.farmyardKennels > 1) { + const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); + const hr = document.createElement("hr"); + + hr.style.margin = hrMargin; + + App.UI.DOM.appendNewElement("span", div, 'Canines', ['bold']); + + div.append(hr, animalList('canine', 'exotic', 50000, 'canine')); + + return div; + } + + return new DocumentFragment(); } - return document.createElement("div"); - } + function hooved() { + if (V.farmyardStables > 1) { + const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); + const hr = document.createElement("hr"); - function exoticHooved() { - if (V.farmyardStables > 1) { - const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); - const hr = document.createElement("hr"); + hr.style.margin = hrMargin; - hr.style.margin = hrMargin; + App.UI.DOM.appendNewElement("span", div, 'Hooved Animals', ['bold']); - App.UI.DOM.appendNewElement("span", div, 'Hooved Animals', ['bold']); + div.append(hr, animalList('hooved', 'exotic', 75000, 'hooved')); - div.append(hr, animalList(hooved, exotic, 75000, hooved)); + return div; + } - return div; + return new DocumentFragment(); } - return document.createElement("div"); - } + function feline() { + if (V.farmyardCages > 1) { + const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); + const hr = document.createElement("hr"); - function exoticFelines() { - if (V.farmyardCages > 1) { - const div = App.UI.DOM.makeElement("div", null, ['margin-bottom']); - const hr = document.createElement("hr"); + hr.style.margin = hrMargin; - hr.style.margin = hrMargin; + App.UI.DOM.appendNewElement("span", div, 'Felines', ['bold']); - App.UI.DOM.appendNewElement("span", div, 'Felines', ['bold']); + div.append(hr, animalList('feline', 'exotic', 100000, 'feline')); - div.append(hr, animalList(feline, exotic, 100000, feline)); + return div; + } - return div; + return new DocumentFragment(); } - - return document.createElement("div"); } // Helper Functions @@ -239,21 +266,32 @@ App.Facilities.Farmyard.animals = function() { * @param {number} param.price * @param {function():void} param.setActiveHandler * @param {function():void} param.purchaseHandler + * @param {function():void} param.sellHandler * @returns {string|HTMLElement} */ - function animalLink({animal, active, type, price, setActiveHandler, purchaseHandler}) { + function animalLink({animal, active, type, price, setActiveHandler, purchaseHandler, sellHandler}) { if (animal.purchased || V.animals[animal.type].some(a => a.name === animal.name)) { + const div = document.createElement("div"); + + const options = []; + if (V.active[active] && V.active[active] === animal.name) { - return App.UI.DOM.makeElement("span", `Set as active ${type}`, ["note"]); + options.push( + App.UI.DOM.disabledLink(`Set as active ${type}`, ['Already set as active']), + App.UI.DOM.link(`Sell`, sellHandler) + ); } else { - return App.UI.DOM.link(`Set as active ${type}`, setActiveHandler); + options.push( + App.UI.DOM.link(`Set as active ${type}`, setActiveHandler), + App.UI.DOM.link(`Sell`, sellHandler) + ); } + + div.append(App.UI.DOM.generateLinksStrip(options)); + + return div; } else { - return App.UI.DOM.link( - `Purchase`, - purchaseHandler, - [], '', `Costs ${cashFormat(price)} and will incur upkeep costs.` - ); + return new Purchase(`Purchase ${animal.articleAn} ${animal.name}`, price, "farmyard", {note: `Costs ${cashFormat(price)} and will incur upkeep costs.`, handler: purchaseHandler}).render(); } } @@ -263,58 +301,76 @@ App.Facilities.Farmyard.animals = function() { * @param {'domestic'|'exotic'} rarity One of 'domestic' or 'exotic'. * @param {number} price * @param {string} active The name of the current active animal of the given type. + * @param {string} [species] Any specific species to filter by, + * @param {string} [exclude] Any species to exclude. * @returns {HTMLDivElement} */ - function animalList(type, rarity, price, active) { - const mainDiv = document.createElement("div"); - const filteredArray = App.Data.animals.filter(animal => animal.rarity === rarity && animal.type === type); - - filteredArray.forEach(animal => { - const animalDiv = document.createElement("div"); - const optionSpan = document.createElement("span"); - - const args = { - animal: animal, - active: active, - type: type, - price: price, - setActiveHandler() { - animal.setActive(); - App.UI.DOM.replace(mainDiv, animalList(type, rarity, price, active)); - App.UI.DOM.replace(activeDiv, activeAnimals()); - }, - purchaseHandler() { - cashX(forceNeg(price), "farmyard"); - animal.purchase(); - if (!V.active[animal.type]) { - animal.setActive(); - } - App.UI.DOM.replace(activeDiv, activeAnimals()); - App.UI.DOM.replace(mainDiv, animalList(type, rarity, price, active)); + function animalList(type, rarity, price, active, species, exclude) { + const div = document.createElement("div"); + [...App.Data.animals] + .filter(animal => animal.rarity === rarity && animal.type === type && animal.species !== exclude) + .forEach(animal => { + if (species && animal.species !== species) { + return div; } - }; - optionSpan.append(animalLink(args)); + const animalDiv = document.createElement("div"); + const optionDiv = App.UI.DOM.makeElement("div", null, ['indent']); - animalDiv.append(capFirstChar(animal.name), ' ', optionSpan); - - mainDiv.appendChild(animalDiv); - }); + const args = { + animal: animal, + active: active, + type: type, + price: price, + setActiveHandler() { + animal.setActive(); + App.UI.DOM.replace(div, animalList(type, rarity, price, active)); + App.UI.DOM.replace(activeDiv, activeAnimals()); + }, + purchaseHandler() { + cashX(forceNeg(price), "farmyard"); + animal.purchase(); + if (!V.active[animal.type]) { + animal.setActive(); + } + App.UI.DOM.replace(activeDiv, activeAnimals()); + App.UI.DOM.replace(div, animalList(type, rarity, price, active, species, exclude)); + }, + sellHandler() { + cashX(price * 0.75, "farmyard"); + animal.sell(); + App.UI.DOM.replace(activeDiv, activeAnimals()); + App.UI.DOM.replace(div, animalList(type, rarity, price, active, species, exclude)); + }, + }; + + optionDiv.append(animalLink(args)); + animalDiv.append(capFirstChar(animal.name), optionDiv); + + div.append(animalDiv); + }); - return mainDiv; + return div; } function addAnimal() { - const addAnimalDiv = document.createElement("div"); + const frag = new DocumentFragment(); + + const nameDiv = document.createElement("div"); + const speciesDiv = document.createElement("div"); + const typeDiv = document.createElement("div"); + const rarityDiv = document.createElement("div"); + const articleDiv = document.createElement("div"); const dickDiv = document.createElement("div"); const deadlinessDiv = document.createElement("div"); - const addDiv = App.UI.DOM.makeElement("div", null, ['animal-add']); + const addDiv = App.UI.DOM.makeElement("div", null, ['margin-top']); const animal = new App.Entity.Animal(null, null, "canine", "domestic"); + let animalName = animal.name || 'animal'; - App.UI.DOM.appendNewElement("div", addAnimalDiv, `Add a New Animal`, ['uppercase', 'bold']); + App.UI.DOM.appendNewElement("h2", frag, `Custom Animals`); - addAnimalDiv.append( + frag.append( name(), species(), type(), @@ -325,156 +381,78 @@ App.Facilities.Farmyard.animals = function() { add(), ); - return addAnimalDiv; + return frag; function name() { - const nameDiv = document.createElement("div"); - nameDiv.append( `Name: `, App.UI.DOM.makeTextBox(animal.name || '', value => { animal.setName(value); + animal.setSpecies(value); + animalName = animal.name; - App.UI.DOM.replace(nameDiv, name); - App.UI.DOM.replace(dickDiv, dick); - App.UI.DOM.replace(deadlinessDiv, deadliness); - App.UI.DOM.replace(addDiv, add); + refresh(); }), + App.UI.DOM.makeElement("span", ` Can be lowercase.`, ['note']), ); return nameDiv; } function species() { - const speciesDiv = document.createElement("div"); - speciesDiv.append( `Species: `, - App.UI.DOM.makeTextBox(animal.species || '', value => { + App.UI.DOM.makeTextBox(animal.species || animal.name || '', value => { animal.setSpecies(value); - App.UI.DOM.replace(speciesDiv, species); - App.UI.DOM.replace(addDiv, add); + refresh(); }), + App.UI.DOM.makeElement("span", ` Can be different than the animal's name.`, ['note']), ); return speciesDiv; } function type() { - const typeDiv = document.createElement("div"); - - const typeLinks = []; + const options = new App.UI.OptionsGroup().customRefresh(refresh); + options.addOption(null, "type", animal) + .addValue('Canine', 'canine') + .addValue('Hooved', 'hooved') + .addValue('Feline', 'feline'); if (animal.type === "canine") { - typeLinks.push( - App.UI.DOM.disabledLink(`Canine`, [`Already selected.`]), - App.UI.DOM.link(`Hooved`, () => { - animal.setType('hooved'); - - App.UI.DOM.replace(typeDiv, type); - }), - App.UI.DOM.link(`Feline`, () => { - animal.setType("feline"); - - App.UI.DOM.replace(typeDiv, type); - }), - ); + typeDiv.append(`The ${animalName} is a canine.`, options.render()); } else if (animal.type === "hooved") { - typeLinks.push( - App.UI.DOM.link(`Canine`, () => { - animal.setType("canine"); - - App.UI.DOM.replace(typeDiv, type); - }), - App.UI.DOM.disabledLink(`Hooved`, [`Already selected.`]), - App.UI.DOM.link(`Feline`, () => { - animal.setType("feline"); - - App.UI.DOM.replace(typeDiv, type); - }), - ); + typeDiv.append(`The ${animalName} is a hooved animal.`, options.render()); } else { - typeLinks.push( - App.UI.DOM.link(`Canine`, () => { - animal.setType("canine"); - - App.UI.DOM.replace(typeDiv, type); - }), - App.UI.DOM.link(`Hooved`, () => { - animal.setType("hooved"); - - App.UI.DOM.replace(typeDiv, type); - }), - App.UI.DOM.disabledLink(`Feline`, [`Already selected.`]), - ); + typeDiv.append(`The ${animalName} is a feline.`, options.render()); } - typeDiv.append(`Type: `, App.UI.DOM.generateLinksStrip(typeLinks)); - return typeDiv; } function rarity() { - const rarityDiv = document.createElement("div"); - - const rarityLinks = []; + const options = new App.UI.OptionsGroup().customRefresh(refresh); + options.addOption(null, "rarity", animal) + .addValue('Domestic', 'domestic') + .addValue('Exotic', 'exotic'); if (animal.rarity === "domestic") { - rarityLinks.push( - App.UI.DOM.disabledLink(`Domestic`, [`Already selected.`]), - App.UI.DOM.link(`Exotic`, () => { - animal.setRarity('exotic'); - - App.UI.DOM.replace(rarityDiv, rarity); - }), - ); + rarityDiv.append(`The ${animalName} is domesticated.`, options.render()); } else { - rarityLinks.push( - App.UI.DOM.link(`Domestic`, () => { - animal.setRarity('domestic'); - - App.UI.DOM.replace(rarityDiv, rarity); - }), - App.UI.DOM.disabledLink(`Exotic`, [`Already selected.`]), - ); + rarityDiv.append(`The ${animalName} is exotic and tamed.`, options.render()); } - rarityDiv.append(`Rarity: `, App.UI.DOM.generateLinksStrip(rarityLinks)); - return rarityDiv; } function article() { - const articleDiv = document.createElement("div"); - - const articleLinks = []; - - if (animal.articleAn === 'a') { - articleLinks.push( - App.UI.DOM.link("Yes", () => { - animal.articleAn = 'an'; - - App.UI.DOM.replace(articleDiv, article); - App.UI.DOM.replace(dickDiv, dick); - App.UI.DOM.replace(deadlinessDiv, deadliness); - }), - App.UI.DOM.disabledLink("No", [`Already selected.`]), - ); - } else { - articleLinks.push( - App.UI.DOM.disabledLink("Yes", [`Already selected.`]), - App.UI.DOM.link("No", () => { - animal.articleAn = 'a'; - - App.UI.DOM.replace(articleDiv, article); - App.UI.DOM.replace(dickDiv, dick); - App.UI.DOM.replace(deadlinessDiv, deadliness); - }), - ); - } + const options = new App.UI.OptionsGroup().customRefresh(refresh); + options.addOption(null, "articleAn", animal) + .addValue('Yes', 'an') + .addValue('No', 'a'); - articleDiv.append(`Is this animal's name preceded by an 'an'? `, App.UI.DOM.generateLinksStrip(articleLinks)); + articleDiv.append(`Is the ${animalName}'s name preceded by an 'an'?`, options.render()); return articleDiv; } @@ -488,13 +466,13 @@ App.Facilities.Farmyard.animals = function() { const dickSizeDiv = document.createElement("div"); dickSizeDiv.append( - `How large is ${animal.name ? `${animal.articleAn} male ${animal.name}` : `a male`}'s penis? `, + `How large is a male${animal.name ? ` ${animalName}` : ``}'s penis? `, App.UI.DOM.makeTextBox(animal.dick.size || 2, value => { animal.setDick(value, animal.dick.desc || null); - App.UI.DOM.replace(dickSizeDiv, dickSize); + refresh(); }, true), - App.UI.DOM.makeElement("span", `1 is smallest, and default is 2. `, ['note']), + App.UI.DOM.makeElement("span", ` 1 is smallest and default is 2.`, ['note']), ); return dickSizeDiv; @@ -504,13 +482,13 @@ App.Facilities.Farmyard.animals = function() { const dickDescDiv = document.createElement("div"); dickDescDiv.append( - `What does it look like? `, + `What does the penis look like? `, App.UI.DOM.makeTextBox(animal.dick.desc || '', value => { animal.setDick(animal.dick.size || 2, value); - App.UI.DOM.replace(dickDescDiv, dickDesc); + refresh(); }), - App.UI.DOM.makeElement("span", `Default is 'large'. `, ['note']), + App.UI.DOM.makeElement("span", ` Default is 'large', but you can use any descriptor.`, ['note']), ); return dickDescDiv; @@ -523,7 +501,7 @@ App.Facilities.Farmyard.animals = function() { App.UI.DOM.makeTextBox(5, value => { animal.setDick(value); }, true), - App.UI.DOM.makeElement("span", `Default is 5. `, ['note']), + App.UI.DOM.makeElement("span", ` Default is 5.`, ['note']), ); return deadlinessDiv; @@ -532,8 +510,6 @@ App.Facilities.Farmyard.animals = function() { function add() { const disabledReasons = []; - let link; - if (!animal.name) { disabledReasons.push(`Animal must have a name.`); } @@ -543,19 +519,28 @@ App.Facilities.Farmyard.animals = function() { } if (disabledReasons.length > 0) { - link = App.UI.DOM.disabledLink(`Add`, disabledReasons); + App.UI.DOM.appendNewElement("div", addDiv, App.UI.DOM.disabledLink(`Add`, disabledReasons), ['margin-top']); } else { - link = App.UI.DOM.link(`Add`, () => { - App.Data.animals.push(animal); + App.UI.DOM.appendNewElement("div", addDiv, App.UI.DOM.link(`Add`, () => { + App.Data.animals.add(animal); - App.UI.DOM.replace(addAnimalDiv, addAnimal); - }); + App.UI.reload(); + }), ['margin-top']); } - addDiv.appendChild(link); - return addDiv; } + + function refresh() { + App.UI.DOM.replace(nameDiv, name); + App.UI.DOM.replace(speciesDiv, species); + App.UI.DOM.replace(typeDiv, type); + App.UI.DOM.replace(rarityDiv, rarity); + App.UI.DOM.replace(articleDiv, article); + App.UI.DOM.replace(dickDiv, dick); + App.UI.DOM.replace(deadlinessDiv, deadliness); + App.UI.DOM.replace(addDiv, add); + } } }; @@ -571,7 +556,7 @@ globalThis.getAnimal = function(name) { }; App.Facilities.Farmyard.animals.init = function() { - if (!App.Data.animals || App.Data.animals.length === 0) { + if (!App.Data.animals || App.Data.animals.size === 0) { class Animal extends App.Entity.Animal {} const dog = 'dog'; @@ -584,7 +569,7 @@ App.Facilities.Farmyard.animals.init = function() { const an = 'an'; /** @type {Animal[]} */ - App.Data.animals = [ + [ new Animal("beagle", dog, canine, domestic) .setDeadliness(2), new Animal("bulldog", dog, canine, domestic), @@ -638,9 +623,9 @@ App.Facilities.Farmyard.animals.init = function() { new Animal("lynx", "lynx", feline, exotic), new Animal("puma", "puma", feline, exotic), new Animal("tiger", "tiger", feline, exotic), - ]; + ].forEach(animal => App.Data.animals.add(animal)); } }; -/** @type {App.Entity.Animal[]} */ -App.Data.animals = App.Data.animals || []; +/** @type {Set<App.Entity.Animal>} */ +App.Data.animals = App.Data.animals || new Set; diff --git a/src/facilities/farmyard/farmyard.js b/src/facilities/farmyard/farmyard.js index 2a9de5a0667afb2ce26445cfa6ce9dc676bba0de..3622bde708ff51810af379337e84b7248d407a1c 100644 --- a/src/facilities/farmyard/farmyard.js +++ b/src/facilities/farmyard/farmyard.js @@ -661,67 +661,66 @@ App.Facilities.Farmyard.farmyard = class Farmyard extends App.Facilities.Facilit } /** @returns {HTMLDivElement} */ - get removeAnimalHousing() { - const div = App.UI.DOM.makeElement("div", null, ['margin-top']); + get animals() { + const div = document.createElement("div"); - const cost = ((V.farmyardKennels + V.farmyardStables + V.farmyardCages) * 5000) * V.upgradeMultiplierArcology; + App.UI.DOM.appendNewElement("h2", div, `Animals`); - if (V.farmyardKennels || V.farmyardStables || V.farmyardCages) { - App.UI.DOM.appendNewElement("div", div, App.UI.DOM.link("Remove the animal housing", () => { - V.farmyardKennels = 0; - V.farmyardStables = 0; - V.farmyardCages = 0; + div.append( + this.kennels, + this.stables, + this.cages, + removeAnimalHousing(), + ); - V.animals = { - canine: [], - hooved: [], - feline: [], - }; + return div; - V.active = { - canine: null, - hooved: null, - feline: null, - }; + function removeAnimalHousing() { + const div = document.createElement("div"); - if (V.pit) { - V.pit.animal = null; - } + const cost = ((V.farmyardKennels + V.farmyardStables + V.farmyardCages) * 5000) * V.upgradeMultiplierArcology; - V.farmyardShows = 0; - V.farmyardBreeding = 0; - V.farmyardRestraints = 0; + if (V.farmyardKennels || V.farmyardStables || V.farmyardCages) { + App.UI.DOM.appendNewElement("div", div, App.UI.DOM.link("Remove the animal housing", () => { + V.farmyardKennels = 0; + V.farmyardStables = 0; + V.farmyardCages = 0; - cashX(forceNeg(cost), "farmyard"); + V.animals = { + canine: [], + hooved: [], + feline: [], + }; - this.refresh(); - }, - [], '', `Will cost ${cashFormat(cost)}.`), ['indent']); - } + V.active = { + canine: null, + hooved: null, + feline: null, + }; - return div; - } + if (V.pit) { + V.pit.animal = null; + } - /** @returns {HTMLDivElement} */ - get animals() { - const div = document.createElement("div"); + V.farmyardShows = 0; + V.farmyardBreeding = 0; + V.farmyardRestraints = 0; - App.UI.DOM.appendNewElement("h2", div, `Animals`); + cashX(forceNeg(cost), "farmyard"); - div.append( - this.kennels, - this.stables, - this.cages, - ); + this.refresh(); + }, + [], '', `Will cost ${cashFormat(cost)}.`), ['indent']); + } - return div; + return div; + } } /** @returns {HTMLDivElement[]} */ get customNodes() { return [ this.animals, - this.removeAnimalHousing, ]; } }; diff --git a/src/facilities/penthouse/penthousePassage.js b/src/facilities/penthouse/penthousePassage.js index 7e9092e1e075e5cabcfecb7aa3359a952ea0e3b3..519d9cb065d253be20e2a1ff0e171571c41af929 100644 --- a/src/facilities/penthouse/penthousePassage.js +++ b/src/facilities/penthouse/penthousePassage.js @@ -419,25 +419,15 @@ App.UI.managePenthouse = function() { r = []; if (V.boobAccessibility > 0 || V.pregAccessibility > 0 || V.dickAccessibility > 0 || V.ballsAccessibility > 0 || V.buttAccessibility > 0) { const removeCost = Math.trunc((5000 * (V.boobAccessibility + V.pregAccessibility + V.dickAccessibility + V.ballsAccessibility + V.buttAccessibility)) * V.upgradeMultiplierArcology); - App.UI.DOM.appendNewElement( - "div", - el, - App.UI.DOM.link( - "Remove the accessibility renovations", - () => { - cashX(forceNeg(removeCost), "capEx"); - V.boobAccessibility = 0; - V.pregAccessibility = 0; - V.dickAccessibility = 0; - V.ballsAccessibility = 0; - V.buttAccessibility = 0; - }, - [], - "Manage Penthouse", - `Will cost ${cashFormat(removeCost)}` - ), - "detail" - ); + el.append(makePurchase(`Remove the accessibility renovations`, removeCost, "capEx", { + handler: () => { + V.boobAccessibility = 0; + V.pregAccessibility = 0; + V.dickAccessibility = 0; + V.ballsAccessibility = 0; + V.buttAccessibility = 0; + } + })); } App.Events.addNode(el, r, "div"); @@ -531,14 +521,14 @@ App.UI.managePenthouse = function() { function makeLink(title, handler, cost = 5000) { const el = new DocumentFragment(); cost = Math.trunc(cost * V.upgradeMultiplierArcology); - el.append(new Purchase(title, cost, "capEx", { + el.append(makePurchase(title, cost, "capEx", { handler: () => { handler(); V.PC.skill.engineering += .1; jQuery(container).empty().append(createPage()); } - }).render()); + })); return el; } diff --git a/src/facilities/salon/salonPassage.js b/src/facilities/salon/salonPassage.js index d4b4e07a90d4f1c892a5ef4426a4b0d253495c91..ca637f7341ebd9e8df1f532b50824ebd8f131ba0 100644 --- a/src/facilities/salon/salonPassage.js +++ b/src/facilities/salon/salonPassage.js @@ -1,9 +1,10 @@ /** * UI for the Salon. Refreshes without refreshing the passage. * @param {App.Entity.SlaveState} slave - * @param {boolean} cheat if true, will hide scenes and keep the player from being billed for changes. + * @param {boolean} [cheat=false] if true, will hide scenes and keep the player from being billed for changes. + * @param {boolean} [startingGirls=false] change systems for starting girls */ -App.UI.salon = function(slave, cheat = false) { +App.UI.salon = function(slave, cheat = false, startingGirls = false) { const container = document.createElement("span"); container.id = "salon"; const { @@ -20,7 +21,11 @@ App.UI.salon = function(slave, cheat = false) { App.Events.drawEventArt(el, slave); el.append(intro()); } - el.append(eyewear()); + if (!startingGirls) { + // Starting girls has its own, more powerful, eye modifier which interferes with this one. + // TODO: unify them + el.append(eyewear()); + } if ( (["leopard", "tiger", "jaguar"].includes(slave.earT) && slave.earTColor !== "hairless") || ["leopard", "tiger", "jaguar", "gazelle", "tanuki", "raccoon"].includes(slave.tailShape) diff --git a/src/facilities/surgery/surgeryPassageExotic.js b/src/facilities/surgery/surgeryPassageExotic.js index d0db94c1977012723fb543181cea8a6d245194ba..01d28af97829faa79bdbfcfe217aba43cc3a2b5b 100644 --- a/src/facilities/surgery/surgeryPassageExotic.js +++ b/src/facilities/surgery/surgeryPassageExotic.js @@ -105,10 +105,10 @@ App.UI.surgeryPassageExotic = function(slave, refreshParent, cheat = false) { function retroVirus() { const el = new DocumentFragment(); const slaveGeneList = App.UI.DOM.appendNewElement("ul", el); - const select = App.UI.DOM.makeElement("select", null, "choices"); const canEditGenes = slave.indentureRestrictions === 0 && slave.health.health >= 0; - select.classList.add("rajs-list"); const description = App.UI.DOM.appendNewElement("div", el, null); + + const options = /** @type {selectOption[]} */ []; for (const gene in slave.geneticQuirks) { const geneData = App.Data.geneticQuirks.get(gene); @@ -132,18 +132,13 @@ App.UI.surgeryPassageExotic = function(slave, refreshParent, cheat = false) { continue; } if (canEditGenes) { - const choice = App.UI.DOM.appendNewElement("option", select, capFirstChar(geneData.title)); - choice.value = gene; - select.append(choice); + options.push({key: gene, name: capFirstChar(geneData.title)}); } } if (canEditGenes) { - select.selectedIndex = -1; - select.onchange = () => { - // selectedGene = select.options[select.selectedIndex]; - jQuery(description).empty().append(describeGene(select.value)); - }; - el.append(select); + el.append(App.UI.DOM.makeSelect(options, null, gene => { + jQuery(description).empty().append(describeGene(gene)); + })); } return el; diff --git a/src/facilities/toyShop/toyShop.js b/src/facilities/toyShop/toyShop.js index 4e910d977a1da986d7ac2637f112a4c07f12b59d..300d5b90b6cf74ef7047326a836ffa9ff0b19b36 100644 --- a/src/facilities/toyShop/toyShop.js +++ b/src/facilities/toyShop/toyShop.js @@ -326,32 +326,21 @@ App.UI.toyShop = function() { /** * @param {toy} toy * @param {string} itemKey - * @returns {DocumentFragment} + * @returns {HTMLElement} */ function selectDesign(toy, itemKey) { - const el = new DocumentFragment(); - const choice = App.UI.DOM.appendNewElement("span", el, ` or choose an existing design to edit `); - const select = App.UI.DOM.appendNewElement("select", choice); - let matchFound = false; + const choice = App.UI.DOM.makeElement("span", ` or choose an existing design to edit `); + const options = []; for (const [key, values] of V.customItem[itemKey]) { - const option = App.UI.DOM.appendNewElement("option", select, values.name); - option.value = key; - if (option.value === toy.name) { - option.selected = true; - matchFound = true; - } - } - if (!matchFound) { - select.selectedIndex = -1; + options.push({key: key, name: values.name}); } - select.onchange = () => { - const O = select.options[select.selectedIndex]; - toy.selected = O.value; + choice.append(App.UI.DOM.makeSelect(options, toy.name, key => { + toy.selected = key; toy.name = toy.selected; toy.data = V.customItem[itemKey].get(toy.selected); refresh(); - }; - return el; + })); + return choice; } function refresh() { diff --git a/src/futureSocieties/fsPassage.js b/src/futureSocieties/fsPassage.js index 8c165e13bfdee676a93cd4905edeba2a645db616..86cb4b40626ed879a404c703efbb8f560c3f2aa6 100644 --- a/src/futureSocieties/fsPassage.js +++ b/src/futureSocieties/fsPassage.js @@ -372,21 +372,14 @@ App.UI.fsPassage = function() { r.push(`${arc.FSSupremacistRace} superiority.`); } r.push(`Select race:`); - const select = document.createElement("select"); - r.push(select); + const options = []; for (const race of App.Utils.getRaceArrayWithoutParamRace(arc.FSSubjugationistRace)) { // Subjugation race cannot be superior, so remove - const choice = App.UI.DOM.appendNewElement("option", select, capFirstChar(race)); - choice.value = race; - if (race === arc.FSSupremacistRace) { - choice.selected = true; - } + options.push({key: race, name: capFirstChar(race)}); } - - select.onchange = () => { - const O = select.options[select.selectedIndex]; - arc.FSSupremacistRace = O.value; + r.push(App.UI.DOM.makeSelect(options, arc.FSSupremacistRace, race => { + arc.FSSupremacistRace = /** @type {FC.Race} */ (race); App.UI.reload(); - }; + })); } else { /* <span class="note"><span style="font-weight:Bold">Racial Supremacism:</span> a belief in the superiority of a chosen race.</span>*/ } @@ -415,22 +408,15 @@ App.UI.fsPassage = function() { r.push(`${arc.FSSubjugationistRace} inferiority.`); } r.push(`Select race:`); - const select = document.createElement("select"); - r.push(select); + const options = []; for (const race of App.Utils.getRaceArrayWithoutParamRace(arc.FSSupremacistRace)) { // Superior race cannot be subj, so remove - const choice = App.UI.DOM.appendNewElement("option", select, capFirstChar(race)); - choice.value = race; - if (race === arc.FSSubjugationistRace) { - choice.selected = true; - } + options.push({key: race, name: capFirstChar(race)}); } - - select.onchange = () => { - const O = select.options[select.selectedIndex]; - arc.FSSubjugationistRace = O.value; + r.push(App.UI.DOM.makeSelect(options, arc.FSSubjugationistRace, race => { + arc.FSSubjugationistRace = race; App.UI.reload(); - }; + })); } else { /* <span class="note"><span style="font-weight:Bold">Racial Subjugationism:</span> a belief in the inferiority of a subject race.</span>*/ } diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index fc06e17d0f8387d5cffbadf0f7ee6953ffeb6133..d5f010b8d897a9030ab76566b2a2ca00642279e7 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -851,8 +851,6 @@ ARCOLOGY FACILITIES <<case "Nursery">> The ''Nursery'' is used to raise children from birth naturally. Once a spot is reserved for the child, they will be placed in the Nursery upon birth and ejected once they are old enough. The Nursery can be furnished according to <<= App.Encyclopedia.Dialog.linkSC("future society", "Future Societies")>> styles, and doing so can add a slight @@.hotpink;<<= App.Encyclopedia.Dialog.linkSC("devotion", "From Rebellious to Devoted")>>@@ boost to slaves working there. - <br><br>''Extended family mode must be enabled.'' //This entry still needs work and will be updated with more information as it matures. If this message is still here, remind one of the devs to remove it.// - <<case "Farmyard">> /* TODO: this will need more information */ The ''Farmyard'' is where the majority of the <<= App.Encyclopedia.Dialog.linkSC("food", "Food")>> in your arcology is grown, once it is built. It also allows you to house animals<<if $seeBestiality == 1>>, which you can have interact with your slaves<</if>>. The Farmyard can be furnished according to <<= App.Encyclopedia.Dialog.linkSC("future society", "Future Societies")>> styles, and doing so can add a slight @@.hotpink;<<= App.Encyclopedia.Dialog.linkSC("devotion", "From Rebellious to Devoted")>>@@ boost to slaves working there. /* TODO: this may need to be changed */ @@ -2139,8 +2137,6 @@ MODS <<case "The Incubation Facility">> A facility used to rapidly age children kept within its aging tanks using a combination of growth hormones, accelerants, stem cells and other chemicals; slaves that come out of it are rarely healthy. The Incubator requires a massive amount of electricity to run, though once powered contains a battery backup that can last at least a day. It can be upgraded to combat malnutrition and thinness caused by a body growing far beyond any natural rate. Hormones can also be added to encourage puberty and even sex organ development. Growth control systems include cost saving overrides, though enabling them may result in bloated, sex crazed slaves barely capable of moving. - <br><br>''Extended family mode must be enabled.'' /*Removed for brevity, replace if necessary*/ - <<case "Organic Mesh Breast Implant">> A specialized organic implant produced from the dispensary designed to be implanted into to a slave's natural breast tissue to maintain a slave's breast shape no matter how big her breasts may grow. An expensive and risky procedure proportional to the size of the breasts the mesh will be implanted into. Should health become an issue, the slave in surgery may undergo an emergency mastectomy. Furthermore, once implanted, the mesh cannot be safely removed from the breast. However, total breast removal will rid the slave of the implant; consider strongly when and if you want to implant the mesh before doing so. They are exceedingly difficult to identify once bound to the breast tissue, and combined with their natural shape, are often overlooked. diff --git a/src/gui/options/options.js b/src/gui/options/options.js index cdb48250c30b3fae8e60aef33bbf3ed55d13a747..ebda1302ef01f94bb3b9419ec40f57642bf046f9 100644 --- a/src/gui/options/options.js +++ b/src/gui/options/options.js @@ -778,6 +778,8 @@ App.UI.optionsPassage = function() { .addComment("This will enable a new way to interact with slaves. Currently working but missing flavor text."); el.append(options.render()); + + el.append(App.UI.playerMods()); return el; } }; diff --git a/src/gui/options/optionsGroup.js b/src/gui/options/optionsGroup.js index c49892ec2149452801e93eb75c9acdc3e5275a03..b7403c7b291452cc87043757b2b1925de9405f4b 100644 --- a/src/gui/options/optionsGroup.js +++ b/src/gui/options/optionsGroup.js @@ -268,36 +268,21 @@ App.UI.OptionsGroup = (function() { buttonGroup.append(button); } } else { - let matchFound = false; - let select = document.createElement("select"); - - for (const value of this.valuePairs) { - let el = document.createElement("option"); - el.textContent = value.name; - el.value = value.value; - if (this.object[this.property] === value.value) { - el.selected = true; - matchFound = true; + const options = this.valuePairs.map(value => { + return {key: value.value, name: value.name}; + }); + buttonGroup.append(App.UI.DOM.makeSelect(options, this.object[this.property], value => { + if (!isNaN(Number(value))) { + // @ts-ignore + value = Number(value); } - select.appendChild(el); - } - if (!matchFound) { - select.selectedIndex = -1; - } - select.onchange = () => { - const O = select.options[select.selectedIndex]; - if (isNaN(Number(O.value))) { - this.object[this.property] = O.value; - } else { - this.object[this.property] = Number(O.value); - } - const originalObj = this.valuePairs.find(obj => obj.name === O.textContent); + this.object[this.property] = value; + const originalObj = this.valuePairs.find(obj => obj.value === value); if (originalObj && typeof originalObj.callback === "function") { originalObj.callback(originalObj.value); } refresh(); - }; - buttonGroup.append(select); + })); } if (this.textbox) { diff --git a/src/interaction/prostheticConfig.js b/src/interaction/prostheticConfig.js index 44147410af15659fb89f0fca0c1fedfcbf71e45b..9a64ec644b246b8b9dc56fb3a13121a187343c6b 100644 --- a/src/interaction/prostheticConfig.js +++ b/src/interaction/prostheticConfig.js @@ -324,30 +324,19 @@ App.UI.prostheticsConfig = function(slave) { return f; function tailSelect() { - const frag = new DocumentFragment(); - const sortedTails = Array.from(App.Data.modTails.keys()).sort((a, b) => a > b ? 1 : -1); - const select = App.UI.DOM.appendNewElement("select", frag); - let matchFound = false; - for (const shape of sortedTails) { - const option = App.UI.DOM.appendNewElement("option", select, App.Data.modTails.get(shape).animal); - option.value = shape; - if (option.value === slave.tailShape) { - option.selected = true; - matchFound = true; - } - } - if (!matchFound) { - select.selectedIndex = -1; - } - select.onchange = () => { + const sortedTails = Array.from(App.Data.modTails.keys()) + .sort((a, b) => a > b ? 1 : -1) + .map(tail => { + return {key: tail, name: App.Data.modTails.get(tail).animal}; + }); + return App.UI.DOM.makeSelect(sortedTails, slave.tailShape, tail => { V.prostheticsConfig = "attachTail"; slave.tail = "mod"; - slave.tailShape = select.options[select.selectedIndex].value; + slave.tailShape = /** @type {FC.TailShape} */ (tail); slave.tailColor = (slave.tailColor === "none") ? slave.hColor : slave.tailColor; // if color not set yet, match hair. cashX(forceNeg(V.modCost), "slaveMod", slave); App.UI.reload(); - }; - return frag; + }); } } diff --git a/src/interaction/useSlave/useSlave.js b/src/interaction/useSlave/useSlave.js index 95531ea3040220467dffd9f2f3e1c11c60efbc91..6fa129796950035ac388ad090a9e64ffcedf2774 100644 --- a/src/interaction/useSlave/useSlave.js +++ b/src/interaction/useSlave/useSlave.js @@ -44,7 +44,7 @@ App.UI.SlaveInteract.useSlave = function(slave) { if (introShown) { div.append(`You are out of stamina.`); } else { - App.UI.DOM.appendNewElement("span", div, `You have recently had sex with ${him}`, "note"); + App.UI.DOM.appendNewElement("span", div, `You have recently had sex with ${him}`, ["note"]); } } @@ -176,6 +176,7 @@ App.UI.SlaveInteract.useSlave = function(slave) { const noUnderwearOutfits = ["a burkini", "a comfortable bodysuit", "a tight Imperial bodysuit", "a cybersuit", "a fallen nuns habit", "a leotard", "a latex catsuit", "a monokini", "a one-piece swimsuit", "a scalemail bikini", "a slutty klan robe", "a slutty maid outfit", "a slutty nurse outfit", "a slutty pony outfit", "a slutty qipao", "a slutty schutzstaffel uniform", "a string bikini", "a succubus outfit", "a toga", "an apron", "chains", "clubslut netting", "harem gauze", "overalls", "restrictive latex", "shibari ropes", "slutty business attire", "slutty jewelry", "uncomfortable straps"]; // ex. swimsuits, slutty jewelry, bodysuits const noBottomOutfits = ["a button-up shirt", "a sweater", "a t-shirt", "a tank-top", "a tube top", "an oversized t-shirt"]; const noTopOutfits = ["boyshorts", "cutoffs", "jeans", "leather pants", "sport shorts"]; + if (nakedOutfits.includes(slave.clothes)) { slaveState.clothing.top.isOff = true; slaveState.clothing.bottom.isOff = true; diff --git a/src/js/Purchase.js b/src/js/Purchase.js index a13f10cff8dc26180ba32b0e07d90aa24640e9b2..c45976967dfd45db054eaefc6c26a0d14528c569 100644 --- a/src/js/Purchase.js +++ b/src/js/Purchase.js @@ -1,99 +1,65 @@ -/** Creates a user-facing "purchase" button. */ -globalThis.Purchase = class Purchase { - /** - * Creates a new button allowing the user to purchase something. - * @param {string} text The text to display. - * @param {number} cost The amount of ¤ the purchase costs. - * @param {keyof App.Data.Records.LastWeeksCash} what What the purchase is for. - * @param {Object} [args] Any additional arguments to pass. - * @param {string} [args.note] Any additional information to display. - * @param {function():void} [args.handler] Any custom handler to run upon purchase. - */ - constructor(text, cost, what, {note, handler} = {}) { - /** @type {string} */ - this.link = text; - /** @type {number} */ - this.cost = cost; - /** @type {keyof App.Data.Records.LastWeeksCash} */ - this.what = what; - /** @type {string} */ - this.note = note; - /** @type {function():void} */ - this.handler = handler; - } - - render() { - const div = App.UI.DOM.makeElement("div", null, ['indent']); - - if (V.purchaseStyle === 'button') { - div.append(this.renderButton()); - } else { - div.append(this.renderLink()); - } - - return div; - } +/** + * Creates a user-facing link or button allowing the user to purchase something. + * @param {string} link The text to display. + * @param {number} cost The amount of ¤ the purchase costs. + * @param {keyof App.Data.Records.LastWeeksCash} what What the purchase is for. + * @param {Object} [args] Any additional arguments to pass. + * @param {string} [args.note] Any additional information to display. + * @param {function():void} [args.handler] Any custom handler to run upon purchase. + */ +globalThis.makePurchase = function(link, cost, what, {note, handler} = {}) { + return App.UI.DOM.makeElement("div", V.purchaseStyle === 'button' ? renderButton() : renderLink(), ['indent']); - executeHandler() { - cashX(forceNeg(this.cost), this.what); + function execute() { + cashX(forceNeg(cost), what); - if (this.handler) { - this.handler(); + if (handler) { + handler(); } } - /** - * Renders a button. - * - * @private - */ - renderButton() { - const text = App.UI.DOM.makeElement("span", this.link, ['note']); - const price = this.cost !== 0 ? `${cashFormat(Math.trunc(this.cost))}` : `free`; - const button = App.UI.DOM.makeElement("button", capFirstChar(price), ['purchase-button']); + function renderButton() { + const _text = App.UI.DOM.makeElement("span", link, ['note']); + const _price = cost !== 0 ? `${cashFormat(Math.trunc(cost))}` : `free`; + const _button = App.UI.DOM.makeElement("button", capFirstChar(_price), ['purchase-button']); - if (V.cash > this.cost) { - button.onclick = () => this.executeHandler(); + if (V.cash > cost) { + _button.onclick = execute; - if (this.note) { - const note = this.note.substring(0, 5) === ' and ' ? this.note.replace(' and ', '') : this.note; - tippy(button, { - content: capFirstChar(note), + if (note) { + const _note = note.substring(0, 5) === ' and ' ? note.replace(' and ', '') : note; + tippy(_button, { + content: capFirstChar(_note), }); } } else { - button.classList.add("disabled"); + _button.classList.add("disabled"); - tippy(button, { + tippy(_button, { content: `You cannot afford this purchase`, }); } - text.append(button); + _text.append(_button); - return text; + return _text; } - /** - * Renders a link. - * - * @private - */ - renderLink() { - const span = document.createElement("span"); - const price = this.cost !== 0 ? `${cashFormat(Math.trunc(this.cost))}` : `free`; - const cost = `${this.cost !== 0 ? `Costs ${price}` : capFirstChar(price)}${this.note || ''}`; - const link = App.UI.DOM.link(`${this.link} `, () => this.executeHandler(), [], ''); - const disabledLink = App.UI.DOM.disabledLink(`${this.link} `, ['You cannot afford this purchase']); + function renderLink() { + const _span = document.createElement("span"); + const _price = cost !== 0 ? `${cashFormat(Math.trunc(cost))}` : `free`; + const _cost = `${cost !== 0 ? `Costs ${_price}` : capFirstChar(_price)}${note || ''}`; + const _link = App.UI.DOM.link(`${link} `, execute, [], ''); + const _disabledLink = App.UI.DOM.disabledLink(`${link} `, ['You cannot afford this purchase']); - if (V.cash > this.cost) { - span.append(link); + if (V.cash > cost) { + _span.append(_link); } else { - span.append(disabledLink); + _span.append(_disabledLink); } - App.UI.DOM.appendNewElement("span", span, cost, ['note']); + App.UI.DOM.appendNewElement("span", _span, _cost, ['note']); - return span; + return _span; } }; diff --git a/src/js/eventHandlers.js b/src/js/eventHandlers.js index c72f2e3efddaaa583adc4962106404e95bf8b628..521bb80790a99932e8c9cc5a1df85733d39dc7fd 100644 --- a/src/js/eventHandlers.js +++ b/src/js/eventHandlers.js @@ -33,9 +33,12 @@ App.EventHandlers = function() { } function storyReady() { + App.Status.storyReady = true; App.UI.Theme.init(); App.UI.Hotkeys.init(); App.UI.GlobalTooltips.update(); + // Load player mods. Do this last + App.Modding.internal.load(); } function optionsChanged() { diff --git a/src/js/physicalDevelopment.js b/src/js/physicalDevelopment.js deleted file mode 100644 index 9e5308e027d7579829044960852376b89c81fb53..0000000000000000000000000000000000000000 --- a/src/js/physicalDevelopment.js +++ /dev/null @@ -1,3752 +0,0 @@ -globalThis.physicalDevelopment = (function physicalDevelopment() { - "use strict"; - - let gigantomastiaMod; - let uterineHypersensitivityMod; - let rearQuirk; - let rearQuirkDivider; - let dickMod; - let physicalAgeSwap; - - return physicalDevelopment; - - /** - * @param {App.Entity.SlaveState} slave - */ - function physicalDevelopment(slave) { - if (slave.geneticQuirks.progeria === 2) { - // since progeria increases .physicalAge, we need to work around it. - // nothing other than the incubator drastically desyncs it, and progeria slaves do not live through incubation, so this should be fine. - physicalAgeSwap = slave.actualAge; - } else { - physicalAgeSwap = slave.physicalAge; - } - if (slave.geneMods.NCS !== 1) { - /* NCS completely blocks all natural physical growth: no height increases. It also blocks all hormonal secondary sexual * characteristics. So, on the female side: no boobs, no butt, no hips, and no labia. And on the male side: no dick, no clit, no balls, no scrotum, no shoulders. */ - /* so this is a big old NO-OP to skip the physical development. */ - if (slave.geneticQuirks.androgyny === 2) { /* takes a mix of both to create a very androgynous slave */ - if (slave.geneticQuirks.dwarfism === 2 && slave.geneticQuirks.gigantism !== 2) { - increaseHeightDwarf(slave); - } else if (slave.geneticQuirks.gigantism === 2) { - increaseHeightGiant(slave); - } else if (slave.geneticQuirks.neoteny === 2) { - increaseHeightNeoteny(slave); - } else { - increaseHeightXX(slave); - } - if (slave.geneticQuirks.neoteny !== 2) { - if (slave.boobs - slave.boobsImplant <= 300) { - increaseBoobsXX(slave); - } - if (slave.dick.isBetween(0, 3) || slave.geneticQuirks.wellHung === 2) { - increaseDick(slave); - } - if (slave.balls.isBetween(0, 3)) { - increaseBalls(slave); - } - if (slave.vagina > 0 && slave.ovaries > 0 && physicalAgeSwap > slave.pubertyAgeXX) { - increaseWetness(slave); - } - if (slave.waist < 10) { - increaseWaistXY(slave); - } - if (slave.hips - slave.hipsImplant < 0) { - increaseHipsXX(slave); - } - if (slave.butt - slave.buttImplant < 3) { - increaseButtXX(slave); - } - } - increasePregAdaptationXX(slave); - } else if (slave.genes === "XX") { /* loli becoming a woman */ - if (slave.geneticQuirks.dwarfism === 2 && slave.geneticQuirks.gigantism !== 2) { - increaseHeightDwarf(slave); - } else if (slave.geneticQuirks.gigantism === 2) { - increaseHeightGiant(slave); - } else if (slave.geneticQuirks.neoteny === 2) { - increaseHeightNeoteny(slave); - } else { - increaseHeightXX(slave); - } - if (physicalAgeSwap === 13 || (physicalAgeSwap > 13 && (slave.hormoneBalance >= 100 || slave.hormoneBalance <= -100))) { - increaseFaceXX(slave); - if (slave.voice > 0) { - increaseVoiceXX(slave); - } - } - if (slave.geneticQuirks.neoteny !== 2) { - increaseBoobsXX(slave); - if (slave.clit > 0) { - increaseClit(slave); - } - if (slave.vagina > 0 && slave.ovaries > 0 && physicalAgeSwap > slave.pubertyAgeXX) { - increaseWetness(slave); - } - increaseWaistXX(slave); - increaseHipsXX(slave); - increaseButtXX(slave); - } - increasePregAdaptationXX(slave); - } else { - /* shota becoming a man */ - if (slave.geneticQuirks.dwarfism === 2 && slave.geneticQuirks.gigantism !== 2) { - increaseHeightDwarf(slave); - } else if (slave.geneticQuirks.gigantism === 2) { - increaseHeightGiant(slave); - } else if (slave.geneticQuirks.neoteny === 2) { - increaseHeightNeoteny(slave); - } else { - increaseHeightXY(slave); - } - if (physicalAgeSwap === 13 || (physicalAgeSwap > 13 && (slave.hormoneBalance >= 100 || slave.hormoneBalance <= -100))) { - increaseFaceXY(slave); - if (slave.voice > 1) { - increaseVoiceXY(slave); - } - } - if (slave.geneticQuirks.neoteny !== 2) { - increaseBoobsXY(slave); - if (slave.dick > 0) { - increaseDick(slave); - } - if (slave.balls > 0) { - increaseBalls(slave); - } - increaseWaistXY(slave); - increaseHipsXY(slave); - increaseButtXY(slave); - } - increasePregAdaptationXY(slave); - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHeightXX(slave) { - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 3) { - if (slave.height <= 91) { - slave.height += jsEither([8, 8, 9, 9]); - } else if (slave.height <= 101) { - slave.height += 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 101) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 109) { - slave.height += 4; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 109) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 116) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 116) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 124) { - slave.height += 3; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 131) { - slave.height += 3; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 156) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 163) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 163) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 168) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 168) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 171) { - slave.height += 3; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 171) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 173) { - slave.height += 3; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1]); - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1]); - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 3) { - if (slave.height <= 91) { - slave.height += jsEither([8, 8, 9, 9, 9]); - } else if (slave.height <= 101) { - slave.height += 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 101) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 109) { - slave.height += 4; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 109) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 116) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 116) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 124) { - slave.height += 3; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([7, 7, 8, 8, 8]); - } else if (slave.height <= 131) { - slave.height += 3; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 4, 5, 5, 5]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 156) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 163) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 163) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 168) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 168) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 171) { - slave.height += 3; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 171) { - slave.height += jsEither([4, 4, 5, 5, 5]); - } else if (slave.height <= 173) { - slave.height += 3; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 3) { - if (slave.height <= 91) { - slave.height += jsEither([9, 9, 9, 10, 10]); - } else if (slave.height <= 101) { - slave.height += 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 101) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 109) { - slave.height += 4; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 109) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 116) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 116) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 124) { - slave.height += 3; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([8, 8, 8, 9, 9]); - } else if (slave.height <= 131) { - slave.height += 3; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([5, 5, 5, 6, 6]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 156) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 163) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 163) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 168) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 168) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 171) { - slave.height += 3; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 171) { - slave.height += jsEither([5, 5, 5, 6, 6]); - } else if (slave.height <= 173) { - slave.height += 3; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 174) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 174) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 174) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 174) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 3) { - if (slave.height <= 91) { - slave.height += jsEither([8, 9, 9, 10, 10]); - } else if (slave.height <= 101) { - slave.height += 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 101) { - slave.height += jsEither([6, 7, 7, 8, 8]); - } else if (slave.height <= 109) { - slave.height += 4; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 109) { - slave.height += jsEither([6, 7, 7, 8, 8]); - } else if (slave.height <= 116) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 116) { - slave.height += jsEither([5, 6, 6, 7, 7]); - } else if (slave.height <= 124) { - slave.height += 3; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([7, 8, 8, 9, 9]); - } else if (slave.height <= 131) { - slave.height += 3; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 6, 6, 7, 7]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 5, 5, 6, 6]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([6, 7, 7, 8, 8]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 156) { - slave.height += jsEither([5, 6, 6, 7, 7]); - } else if (slave.height <= 163) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 163) { - slave.height += jsEither([6, 7, 7, 8, 8]); - } else if (slave.height <= 168) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 168) { - slave.height += jsEither([5, 6, 6, 7, 7]); - } else if (slave.height <= 171) { - slave.height += 3; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 171) { - slave.height += jsEither([4, 5, 5, 6, 6]); - } else if (slave.height <= 173) { - slave.height += 3; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 174) { - slave.height += jsEither([0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 174) { - slave.height += jsEither([0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 174) { - slave.height += jsEither([0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 174) { - slave.height += jsEither([0, 1, 1, 2, 2]); - } - } - } else { - if (physicalAgeSwap === 3) { - if (slave.height <= 91) { - slave.height += jsEither([8, 8, 9, 9, 9, 10]); - } else if (slave.height <= 101) { - slave.height += 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 101) { - slave.height += jsEither([6, 6, 7, 7, 8, 8]); - } else if (slave.height <= 109) { - slave.height += 4; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 109) { - slave.height += jsEither([6, 6, 7, 7, 7, 8]); - } else if (slave.height <= 116) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 116) { - slave.height += jsEither([5, 5, 6, 6, 6, 7]); - } else if (slave.height <= 124) { - slave.height += 3; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([7, 7, 8, 8, 8, 9]); - } else if (slave.height <= 131) { - slave.height += 3; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 5, 6, 6, 6, 7]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 4, 5, 5, 5, 6]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([6, 6, 7, 7, 7, 8]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 156) { - slave.height += jsEither([5, 5, 6, 6, 6, 7]); - } else if (slave.height <= 163) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 163) { - slave.height += jsEither([6, 6, 7, 7, 7, 8]); - } else if (slave.height <= 168) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 168) { - slave.height += jsEither([5, 5, 6, 6, 6, 7]); - } else if (slave.height <= 171) { - slave.height += 3; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 171) { - slave.height += jsEither([4, 4, 5, 5, 5, 6]); - } else if (slave.height <= 173) { - slave.height += 3; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1, 2]); - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 174) { - slave.height += jsEither([0, 0, 1, 1, 1, 2]); - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHeightXY(slave) { - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 3) { - if (slave.height <= 93) { - slave.height += jsEither([9, 9, 10, 10]); - } else if (slave.height <= 103) { - slave.height += 6; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 103) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 110) { - slave.height += 5; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 110) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 117) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 117) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 124) { - slave.height += 4; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 131) { - slave.height += 4; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 150) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 150) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 156) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 162) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 162) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 170) { - slave.height += 5; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 170) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 177) { - slave.height += 4; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 177) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 184) { - slave.height += 4; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 184) { - slave.height += jsEither([2, 2, 3, 3]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 185) { - slave.height += jsEither([1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 186) { - slave.height += jsEither([0, 0, 1, 1]); - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 3) { - if (slave.height <= 93) { - slave.height += jsEither([9, 9, 9, 10, 10]); - } else if (slave.height <= 103) { - slave.height += 6; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 103) { - slave.height += jsEither([7, 7, 8, 8, 8]); - } else if (slave.height <= 110) { - slave.height += 5; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 110) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 117) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 117) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 124) { - slave.height += 4; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 131) { - slave.height += 4; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 4, 5, 5, 5]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 150) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 150) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 156) { - slave.height += jsEither([5, 5, 6, 6, 6]); - } else if (slave.height <= 162) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 162) { - slave.height += jsEither([7, 7, 8, 8, 8]); - } else if (slave.height <= 170) { - slave.height += 5; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 170) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 177) { - slave.height += 4; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 177) { - slave.height += jsEither([6, 6, 7, 7, 7]); - } else if (slave.height <= 184) { - slave.height += 4; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 184) { - slave.height += jsEither([2, 2, 3, 3, 3]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 185) { - slave.height += jsEither([1, 1, 2, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 186) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 3) { - if (slave.height <= 93) { - slave.height += jsEither([10, 10, 11, 11]); - } else if (slave.height <= 103) { - slave.height += 6; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 103) { - slave.height += jsEither([8, 8, 9, 9]); - } else if (slave.height <= 110) { - slave.height += 5; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 110) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 117) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 117) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 124) { - slave.height += 4; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 131) { - slave.height += 4; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 150) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 150) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 156) { - slave.height += jsEither([6, 6, 7, 7]); - } else if (slave.height <= 162) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 162) { - slave.height += jsEither([8, 8, 9, 9]); - } else if (slave.height <= 170) { - slave.height += 5; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 170) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 177) { - slave.height += 4; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 177) { - slave.height += jsEither([7, 7, 8, 8]); - } else if (slave.height <= 184) { - slave.height += 4; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 184) { - slave.height += jsEither([3, 3, 4, 4]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 185) { - slave.height += jsEither([2, 2, 3, 3]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 186) { - slave.height += jsEither([1, 1, 2, 2]); - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 3) { - if (slave.height <= 93) { - slave.height += jsEither([10, 10, 10, 11, 11]); - } else if (slave.height <= 103) { - slave.height += 6; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 103) { - slave.height += jsEither([8, 8, 8, 9, 9]); - } else if (slave.height <= 110) { - slave.height += 5; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 110) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 117) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 117) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 124) { - slave.height += 4; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 131) { - slave.height += 4; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([5, 5, 5, 6, 6]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 150) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 150) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 156) { - slave.height += jsEither([6, 6, 6, 7, 7]); - } else if (slave.height <= 162) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 162) { - slave.height += jsEither([8, 8, 8, 9, 9]); - } else if (slave.height <= 170) { - slave.height += 5; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 170) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 177) { - slave.height += 4; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 177) { - slave.height += jsEither([7, 7, 7, 8, 8]); - } else if (slave.height <= 184) { - slave.height += 4; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 184) { - slave.height += jsEither([3, 3, 3, 4, 4]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 185) { - slave.height += jsEither([2, 2, 2, 3, 3]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 186) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } - } else { - if (physicalAgeSwap === 3) { - if (slave.height <= 93) { - slave.height += jsEither([9, 9, 10, 10, 10, 11]); - } else if (slave.height <= 103) { - slave.height += 6; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 103) { - slave.height += jsEither([7, 7, 8, 8, 9, 9]); - } else if (slave.height <= 110) { - slave.height += 5; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 110) { - slave.height += jsEither([6, 6, 7, 7, 8, 8]); - } else if (slave.height <= 117) { - slave.height += 4; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 117) { - slave.height += jsEither([6, 6, 7, 7, 8, 8]); - } else if (slave.height <= 124) { - slave.height += 4; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 124) { - slave.height += jsEither([6, 6, 7, 7, 8, 8]); - } else if (slave.height <= 131) { - slave.height += 4; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 131) { - slave.height += jsEither([5, 5, 6, 6, 7, 7]); - } else if (slave.height <= 137) { - slave.height += 3; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 137) { - slave.height += jsEither([4, 4, 5, 5, 5, 6]); - } else if (slave.height <= 144) { - slave.height += 3; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 144) { - slave.height += jsEither([5, 5, 6, 6, 7, 7]); - } else if (slave.height <= 150) { - slave.height += 3; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 150) { - slave.height += jsEither([5, 5, 6, 6, 6, 7]); - } else if (slave.height <= 156) { - slave.height += 3; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 156) { - slave.height += jsEither([5, 5, 6, 6, 7, 7]); - } else if (slave.height <= 162) { - slave.height += 3; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 162) { - slave.height += jsEither([7, 7, 8, 8, 9, 9]); - } else if (slave.height <= 170) { - slave.height += 5; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 170) { - slave.height += jsEither([6, 6, 7, 7, 8, 8]); - } else if (slave.height <= 177) { - slave.height += 4; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 177) { - slave.height += jsEither([6, 6, 7, 7, 8, 8]); - } else if (slave.height <= 184) { - slave.height += 4; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 184) { - slave.height += jsEither([2, 2, 3, 3, 4, 4]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 185) { - slave.height += jsEither([1, 1, 2, 2, 3, 3]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 186) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHeightDwarf(slave) { - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 3) { - if (slave.height <= 80) { - slave.height += jsEither([1, 1, 2, 2]); - } else if (slave.height <= 84) { - slave.height += 1; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 84) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 90) { - slave.height += 2; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 90) { - slave.height += jsEither([8, 8, 9, 9]); - } else if (slave.height <= 100) { - slave.height += 5; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 100) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 105) { - slave.height += 2; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 105) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 109) { - slave.height += 1; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 109) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 114) { - slave.height += 1; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 114) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 118) { - slave.height += 1; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 118) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 122) { - slave.height += 1; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 122) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 127) { - slave.height += 2; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 127) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 132) { - slave.height += 2; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 132) { - slave.height += jsEither([1, 1, 2, 2]); - } else if (slave.height <= 135) { - slave.height += 1; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 135) { - slave.height += jsEither([1, 1, 2, 2]); - } else if (slave.height <= 138) { - slave.height += 1; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 138) { - slave.height += jsEither([1, 1, 2, 2]); - } else if (slave.height <= 141) { - slave.height += 1; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1]); - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 3) { - if (slave.height <= 80) { - slave.height += jsEither([1, 1, 2, 2, 2]); - } else if (slave.height <= 84) { - slave.height += 1; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 84) { - slave.height += jsEither([4, 4, 5, 5, 5]); - } else if (slave.height <= 90) { - slave.height += 2; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 90) { - slave.height += jsEither([8, 8, 9, 9, 9]); - } else if (slave.height <= 100) { - slave.height += 5; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 100) { - slave.height += jsEither([3, 3, 4, 4, 4]); - } else if (slave.height <= 105) { - slave.height += 2; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 105) { - slave.height += jsEither([2, 2, 3, 3, 3]); - } else if (slave.height <= 109) { - slave.height += 1; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 109) { - slave.height += jsEither([3, 3, 4, 4, 4]); - } else if (slave.height <= 114) { - slave.height += 1; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 114) { - slave.height += jsEither([2, 2, 3, 3, 3]); - } else if (slave.height <= 118) { - slave.height += 1; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 118) { - slave.height += jsEither([2, 2, 3, 3, 3]); - } else if (slave.height <= 122) { - slave.height += 1; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 122) { - slave.height += jsEither([3, 3, 4, 4, 4]); - } else if (slave.height <= 127) { - slave.height += 2; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 127) { - slave.height += jsEither([3, 3, 4, 4, 4]); - } else if (slave.height <= 132) { - slave.height += 2; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 132) { - slave.height += jsEither([1, 1, 2, 2, 2]); - } else if (slave.height <= 135) { - slave.height += 1; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 135) { - slave.height += jsEither([1, 1, 2, 2, 2]); - } else if (slave.height <= 138) { - slave.height += 1; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 138) { - slave.height += jsEither([1, 1, 2, 2, 2]); - } else if (slave.height <= 141) { - slave.height += 1; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1, 1]); - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 3) { - if (slave.height <= 80) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 84) { - slave.height += 1; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 84) { - slave.height += jsEither([5, 5, 6, 6]); - } else if (slave.height <= 90) { - slave.height += 2; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 90) { - slave.height += jsEither([9, 9, 10, 10]); - } else if (slave.height <= 100) { - slave.height += 5; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 100) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 105) { - slave.height += 2; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 105) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 109) { - slave.height += 1; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 109) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 114) { - slave.height += 1; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 114) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 118) { - slave.height += 1; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 118) { - slave.height += jsEither([3, 3, 4, 4]); - } else if (slave.height <= 122) { - slave.height += 1; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 122) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 127) { - slave.height += 2; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 127) { - slave.height += jsEither([4, 4, 5, 5]); - } else if (slave.height <= 132) { - slave.height += 2; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 132) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 135) { - slave.height += 1; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 135) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 138) { - slave.height += 1; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 138) { - slave.height += jsEither([2, 2, 3, 3]); - } else if (slave.height <= 141) { - slave.height += 1; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 143) { - slave.height += jsEither([1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 143) { - slave.height += jsEither([1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 143) { - slave.height += jsEither([1, 1, 2, 2]); - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 3) { - if (slave.height <= 80) { - slave.height += jsEither([2, 2, 2, 3, 3]); - } else if (slave.height <= 84) { - slave.height += 1; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 84) { - slave.height += jsEither([5, 5, 5, 6, 6]); - } else if (slave.height <= 90) { - slave.height += 2; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 90) { - slave.height += jsEither([9, 9, 9, 10, 10]); - } else if (slave.height <= 100) { - slave.height += 5; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 100) { - slave.height += jsEither([4, 4, 4, 5, 5]); - } else if (slave.height <= 105) { - slave.height += 2; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 105) { - slave.height += jsEither([3, 3, 3, 4, 4]); - } else if (slave.height <= 109) { - slave.height += 1; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 109) { - slave.height += jsEither([4, 4, 4, 5, 5]); - } else if (slave.height <= 114) { - slave.height += 1; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 114) { - slave.height += jsEither([3, 3, 3, 4, 4]); - } else if (slave.height <= 118) { - slave.height += 1; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 118) { - slave.height += jsEither([3, 3, 3, 4, 4]); - } else if (slave.height <= 122) { - slave.height += 1; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 122) { - slave.height += jsEither([4, 4, 4, 5, 5]); - } else if (slave.height <= 127) { - slave.height += 2; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 127) { - slave.height += jsEither([4, 4, 4, 5, 5]); - } else if (slave.height <= 132) { - slave.height += 2; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 132) { - slave.height += jsEither([2, 2, 2, 3, 3]); - } else if (slave.height <= 135) { - slave.height += 1; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 135) { - slave.height += jsEither([2, 2, 2, 3, 3]); - } else if (slave.height <= 138) { - slave.height += 1; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 138) { - slave.height += jsEither([2, 2, 2, 3, 3]); - } else if (slave.height <= 141) { - slave.height += 1; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 143) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 143) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 143) { - slave.height += jsEither([1, 1, 1, 2, 2]); - } - } - } else { - if (physicalAgeSwap === 3) { - if (slave.height <= 80) { - slave.height += jsEither([1, 1, 2, 2, 3, 3]); - } else if (slave.height <= 84) { - slave.height += 1; - } - } else if (physicalAgeSwap === 4) { - if (slave.height <= 84) { - slave.height += jsEither([4, 4, 5, 5, 6, 6]); - } else if (slave.height <= 90) { - slave.height += 2; - } - } else if (physicalAgeSwap === 5) { - if (slave.height <= 90) { - slave.height += jsEither([8, 8, 9, 9, 10, 10]); - } else if (slave.height <= 100) { - slave.height += 5; - } - } else if (physicalAgeSwap === 6) { - if (slave.height <= 100) { - slave.height += jsEither([3, 3, 4, 4, 5, 5]); - } else if (slave.height <= 105) { - slave.height += 2; - } - } else if (physicalAgeSwap === 7) { - if (slave.height <= 105) { - slave.height += jsEither([2, 2, 3, 3, 4, 4]); - } else if (slave.height <= 109) { - slave.height += 1; - } - } else if (physicalAgeSwap === 8) { - if (slave.height <= 109) { - slave.height += jsEither([3, 3, 4, 4, 5, 5]); - } else if (slave.height <= 114) { - slave.height += 1; - } - } else if (physicalAgeSwap === 9) { - if (slave.height <= 114) { - slave.height += jsEither([2, 2, 3, 3, 4, 4]); - } else if (slave.height <= 118) { - slave.height += 1; - } - } else if (physicalAgeSwap === 10) { - if (slave.height <= 118) { - slave.height += jsEither([2, 2, 3, 3, 4, 4]); - } else if (slave.height <= 122) { - slave.height += 1; - } - } else if (physicalAgeSwap === 11) { - if (slave.height <= 122) { - slave.height += jsEither([3, 3, 4, 4, 5, 5]); - } else if (slave.height <= 127) { - slave.height += 2; - } - } else if (physicalAgeSwap === 12) { - if (slave.height <= 127) { - slave.height += jsEither([3, 3, 4, 4, 5, 5]); - } else if (slave.height <= 132) { - slave.height += 2; - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 132) { - slave.height += jsEither([1, 1, 2, 2, 3, 3]); - } else if (slave.height <= 135) { - slave.height += 1; - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 135) { - slave.height += jsEither([1, 1, 2, 2, 3, 3]); - } else if (slave.height <= 138) { - slave.height += 1; - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 138) { - slave.height += jsEither([1, 1, 2, 2, 3, 3]); - } else if (slave.height <= 141) { - slave.height += 1; - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 143) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHeightGiant(slave) { - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap < 16) { - if (slave.height <= 270) { - slave.height += jsRandom(5, 12); - } - } else { - if (slave.height <= 270) { - slave.height += jsRandom(3, 7); - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap < 16) { - if (slave.height <= 270) { - slave.height += jsRandom(7, 15); - } - } else { - if (slave.height <= 270) { - slave.height += jsRandom(5, 7); - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap < 16) { - if (slave.height <= 270) { - slave.height += jsRandom(10, 25); - } - } else { - if (slave.height <= 270) { - slave.height += jsRandom(7, 13); - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap < 16) { - if (slave.height <= 270) { - slave.height += jsRandom(7, 22); - } - } else { - if (slave.height <= 270) { - slave.height += jsRandom(7, 12); - } - } - } else { - if (physicalAgeSwap < 16) { - if (slave.height <= 270) { - slave.height += jsRandom(7, 20); - } - } else { - if (slave.height <= 270) { - slave.height += jsRandom(5, 10); - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHeightNeoteny(slave) { - if (physicalAgeSwap <= 12) { - if (slave.height <= 120) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 13) { - if (slave.height <= 120) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 14) { - if (slave.height <= 120) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 15) { - if (slave.height <= 120) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 16) { - if (slave.height <= 130) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 17) { - if (slave.height <= 130) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } else if (physicalAgeSwap === 18) { - if (slave.height <= 130) { - slave.height += jsEither([0, 0, 1, 1, 2, 2]); - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseBoobsXX(slave) { - if (slave.geneticQuirks.gigantomastia === 2 && slave.geneticQuirks.macromastia === 2) { - gigantomastiaMod = 3; - } else if (slave.geneticQuirks.gigantomastia === 2) { - gigantomastiaMod = 2; - } else if (slave.geneticQuirks.macromastia === 2) { - gigantomastiaMod = 1.5; - } else if (slave.geneticQuirks.gigantomastia === 3) { - gigantomastiaMod = 1.2; - } else if (slave.geneticQuirks.macromastia === 3) { - gigantomastiaMod = 1.1; - } else { - gigantomastiaMod = 1; - } - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8) { - slave.boobs += 50; - } else if (physicalAgeSwap === 9) { - slave.boobs += 50; - } else if (physicalAgeSwap === 10) { - slave.boobs += 50; - } else if (physicalAgeSwap === 11) { - if (slave.boobs < (600 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 12) { - if (slave.boobs < (700 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 13) { - if (slave.boobs < (1000 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 14) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 15) { - if (slave.boobs < (900 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 16) { - if (slave.boobs < (1200 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 17) { - if (slave.boobs < (1600 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 18) { - if (slave.boobs < (2000 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 8) { - slave.boobs += 25; - } else if (physicalAgeSwap === 9) { - slave.boobs += 25; - } else if (physicalAgeSwap === 10) { - slave.boobs += 25; - } else if (physicalAgeSwap === 11) { - if (slave.boobs < (500 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 12) { - if (slave.boobs < (600 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 13) { - if (slave.boobs < (900 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 14) { - if (slave.boobs < (700 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 15) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 16) { - if (slave.boobs < (1000 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 17) { - if (slave.boobs < (1200 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 18) { - if (slave.boobs < (1600 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap >= 11) { - if (slave.boobs > 200 && gigantomastiaMod !== 3) { - slave.boobs -= 100; - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap >= 11) { - if (slave.boobs > 200 && gigantomastiaMod !== 3) { - slave.boobs -= 50; - } - } - } else { - if (physicalAgeSwap === 11) { - if (slave.boobs < (300 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.boobs < (300 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.boobs < (400 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.boobs < (500 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.boobs < (500 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (50 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (60 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (70 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseBoobsXY(slave) { - if (slave.geneticQuirks.gigantomastia === 2 && slave.geneticQuirks.macromastia === 2) { - gigantomastiaMod = 3; - } else if (slave.geneticQuirks.gigantomastia === 2) { - gigantomastiaMod = 2; - } else if (slave.geneticQuirks.macromastia === 2) { - gigantomastiaMod = 1.5; - } else if (slave.geneticQuirks.gigantomastia === 3) { - gigantomastiaMod = 1.2; - } else if (slave.geneticQuirks.macromastia === 3) { - gigantomastiaMod = 1.1; - } else { - gigantomastiaMod = 1; - } - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8) { - slave.boobs += 50; - } else if (physicalAgeSwap === 9) { - slave.boobs += 50; - } else if (physicalAgeSwap === 10) { - slave.boobs += 50; - } else if (physicalAgeSwap === 11) { - slave.boobs += 50; - } else if (physicalAgeSwap === 12) { - slave.boobs += 50; - } else if (physicalAgeSwap === 13) { - if (slave.boobs < (1000 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 14) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 15) { - if (slave.boobs < (900 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 16) { - if (slave.boobs < (1200 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 17) { - if (slave.boobs < (1600 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } else if (physicalAgeSwap === 18) { - if (slave.boobs < (2000 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 100; - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 8) { - slave.boobs += 25; - } else if (physicalAgeSwap === 9) { - slave.boobs += 25; - } else if (physicalAgeSwap === 10) { - slave.boobs += 25; - } else if (physicalAgeSwap === 11) { - slave.boobs += 25; - } else if (physicalAgeSwap === 12) { - slave.boobs += 25; - } else if (physicalAgeSwap === 13) { - if (slave.boobs < (900 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 25; - } else if (physicalAgeSwap === 14) { - if (slave.boobs < (700 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 15) { - if (slave.boobs < (800 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 16) { - if (slave.boobs < (1000 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 17) { - if (slave.boobs < (1200 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } else if (physicalAgeSwap === 18) { - if (slave.boobs < (1600 * gigantomastiaMod)) { - if (jsRandom(1, 100) > (40 / gigantomastiaMod)) { - slave.boobs += 100; - } - } - slave.boobs += 50; - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap >= 11) { - if (slave.boobs > 200 && gigantomastiaMod !== 3) { - slave.boobs -= 100; - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap >= 11) { - if (slave.boobs > 200 && gigantomastiaMod !== 3) { - slave.boobs -= 50; - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHipsXX(slave) { - if (slave.geneticQuirks.uterineHypersensitivity === 2) { - uterineHypersensitivityMod = 1.5; - } else if (slave.geneticQuirks.uterineHypersensitivity === 1) { - uterineHypersensitivityMod = 1.2; - } else { - uterineHypersensitivityMod = 1; - } - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 99 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 60 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 60 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 60 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 60 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseHipsXY(slave) { - if (slave.geneticQuirks.uterineHypersensitivity === 2) { - uterineHypersensitivityMod = 1.3; - } else if (slave.geneticQuirks.uterineHypersensitivity === 1) { - uterineHypersensitivityMod = 1.15; - } else { - uterineHypersensitivityMod = 1; - } - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 8) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 99 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 95 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } else { - if (physicalAgeSwap === 14) { - if (slave.hips < 2) { - if (jsRandom(1, 100) > 60 / uterineHypersensitivityMod) { - slave.hips++; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseButtXX(slave) { - rearQuirk = slave.geneticQuirks.rearLipedema === 2 ? 2 : 0; - rearQuirkDivider = rearQuirk === 0 ? 1 : rearQuirk; - - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (20 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (20 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (20 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (40 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (40 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (40 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (95 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (95 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (95 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (60 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (60 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (60 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (60 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseButtXY(slave) { - rearQuirk = slave.geneticQuirks.rearLipedema === 2 ? 2 : 0; - rearQuirkDivider = rearQuirk === 0 ? 1 : rearQuirk; - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (20 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (20 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (20 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (40 / rearQuirkDivider)) { - slave.butt++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.butt < (4 + rearQuirk)) { - if (jsRandom(1, 100) > (40 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (90 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 8) { - if (slave.butt < (3 + rearQuirk)) { - if (jsRandom(1, 100) > (80 / rearQuirkDivider)) { - slave.butt++; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseDick(slave) { - dickMod = (slave.geneticQuirks.wellHung === 2 ? 2 : 1); - - if (slave.hormoneBalance >= 200) { - // - } else if (slave.hormoneBalance >= 100) { - // - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 8) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 9) { - if (slave.dick < 6 && dickMod === 2) { - if (jsRandom(1, 100) > 70) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 10) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 11) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 12) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 13) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (50 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 14) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (20 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 15) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (20 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 16) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 17) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 18) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 8) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 9) { - if (slave.dick < 6 && dickMod === 2) { - if (jsRandom(1, 100) > 70) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 10) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 11) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 12) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 13) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (70 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 14) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (40 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 15) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (40 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 16) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 17) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 18) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (90 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } - } else { - if (physicalAgeSwap === 9) { - if (slave.dick < 6 && dickMod === 2) { - if (jsRandom(1, 100) > 70) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 10) { - if (slave.dick < 6 && dickMod === 2) { - if (jsRandom(1, 100) > 70) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 11) { - if (slave.dick < 6 && dickMod === 2) { - if (jsRandom(1, 100) > 70) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 12) { - if (slave.dick < 6 && dickMod === 2) { - if (jsRandom(1, 100) > 70) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 13) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (50 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 14) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (50 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } else if (physicalAgeSwap === 15) { - if (slave.dick < 6) { - if (jsRandom(1, 100) > (50 / dickMod)) { - slave.dick++; - if (slave.foreskin > 0) { - slave.foreskin++; - } - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseBalls(slave) { - if (slave.hormoneBalance >= 200) { - // - } else if (slave.hormoneBalance >= 100) { - // - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 8) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 10) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 10) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 11) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 12) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 13) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 50) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 14) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 20) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 15) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 20) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 16) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 17) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 18) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 8) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 30) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 10) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 90) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 11) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 90) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 12) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 90) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 13) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 70) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 14) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 40) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 15) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 40) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 16) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 90) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 17) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 90) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 18) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 90) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } - } else { - if (physicalAgeSwap === 8) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 50) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 13) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 50) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 14) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 50) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } else if (physicalAgeSwap === 15) { - if (slave.balls < 6) { - if (jsRandom(1, 100) > 50) { - slave.balls++; - if (slave.scrotum > 0) { - slave.scrotum++; - } - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseClit(slave) { - if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap === 8) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.clit < 4) { - if (jsRandom(1, 100) > 50) { - slave.clit++; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap === 8) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 90) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 9) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 90) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 10) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 90) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 11) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 12) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 13) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 14) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 15) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 16) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 17) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } else if (physicalAgeSwap === 18) { - if (slave.clit.isBetween(0, 4)) { - if (jsRandom(1, 100) > 70) { - slave.clit++; - } - } - } - } - if (physicalAgeSwap >= 11 && slave.geneticQuirks.wellHung === 2 && slave.clit < 5 && jsRandom(1, 100) > 60) { - slave.clit++; - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseWetness(slave) { - if (slave.geneticQuirks.uterineHypersensitivity === 2) { - uterineHypersensitivityMod = 1.5; - } else if (slave.geneticQuirks.uterineHypersensitivity === 1) { - uterineHypersensitivityMod = 1.2; - } else { - uterineHypersensitivityMod = 1; - } - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap === 8 || physicalAgeSwap === 9) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 90 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } else if (physicalAgeSwap <= 12) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 60 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } else if (slave.vaginaLube < 2) { - if (jsRandom(1, 100) > 80 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } else if (physicalAgeSwap <= 15) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 30 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } else if (slave.vaginaLube < 2) { - if (jsRandom(1, 100) > 50 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } else if (physicalAgeSwap <= 18) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 10 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } else if (slave.vaginaLube < 2) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap > 9 && physicalAgeSwap <= 12) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 70 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } else if (physicalAgeSwap <= 15) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } else if (slave.vaginaLube < 2) { - if (jsRandom(1, 100) > 70 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } else if (physicalAgeSwap <= 18) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 20 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } else if (slave.vaginaLube < 2) { - if (jsRandom(1, 100) > 40 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } - } else if (slave.hormoneBalance >= -20) { - if (physicalAgeSwap > 15 && physicalAgeSwap <= 18) { - if (slave.vaginaLube < 1) { - if (jsRandom(1, 100) > 50 / uterineHypersensitivityMod) { - slave.vaginaLube++; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseWaistXX(slave) { - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap >= 12) { - if (slave.waist > -60) { - if (jsRandom(1, 100) > 20) { - slave.waist -= 5; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap >= 12) { - if (slave.waist > -30) { - if (jsRandom(1, 100) > 20) { - slave.waist -= 5; - } - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap >= 12) { - if (slave.waist < 60) { - if (jsRandom(1, 100) > 20) { - slave.waist += 5; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap >= 12) { - if (slave.waist < 30) { - if (jsRandom(1, 100) > 20) { - slave.waist += 5; - } - } - } - } else { - if (physicalAgeSwap >= 12) { - if (slave.waist > -20) { - if (jsRandom(1, 100) > 60) { - slave.waist -= 5; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseWaistXY(slave) { - if (slave.hormoneBalance >= 200) { - if (physicalAgeSwap >= 12) { - if (slave.waist > -30) { - if (jsRandom(1, 100) > 20) { - slave.waist -= 5; - } - } - } - } else if (slave.hormoneBalance >= 100) { - if (physicalAgeSwap >= 12) { - if (slave.waist > -15) { - if (jsRandom(1, 100) > 20) { - slave.waist -= 5; - } - } - } - } else if (slave.hormoneBalance <= -200) { - if (physicalAgeSwap >= 12) { - if (slave.waist < 90) { - if (jsRandom(1, 100) > 20) { - slave.waist += 5; - } - } - } - } else if (slave.hormoneBalance <= -100) { - if (physicalAgeSwap >= 12) { - if (slave.waist < 60) { - if (jsRandom(1, 100) > 20) { - slave.waist += 5; - } - } - } - } else { - if (physicalAgeSwap >= 12) { - if (slave.waist < 20) { - if (jsRandom(1, 100) > 60) { - slave.waist += 5; - } - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseFaceXX(slave) { - if (slave.hormoneBalance >= 200) { - if (slave.face > 60) { - if (jsRandom(1, 100) > 80) { - slave.face += 5; - } - } else if (slave.face <= 60) { - if (jsRandom(1, 100) > 30) { - slave.face += 10; - } - } - } else if (slave.hormoneBalance >= 100) { - if (slave.face > 60) { - if (jsRandom(1, 100) > 80) { - slave.face += 5; - } - } else if (slave.face <= 60) { - if (jsRandom(1, 100) > 30) { - slave.face += 10; - } - } - } else if (slave.hormoneBalance <= -200) { - if (slave.face < 100) { - if (jsRandom(1, 100) > 50) { - slave.face -= 20; - } - } - } else if (slave.hormoneBalance <= -100) { - if (slave.face < 100) { - if (jsRandom(1, 100) > 70) { - slave.face -= 20; - } - } - } else { - if (slave.face > 60) { - if (jsRandom(1, 100) > 90) { - slave.face += 5; - } - } else if (slave.face <= 60) { - if (jsRandom(1, 100) > 40) { - slave.face += 10; - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseFaceXY(slave) { - if (slave.hormoneBalance >= 200) { - if (slave.face > 60) { - if (jsRandom(1, 100) > 80) { - slave.face += 5; - } - } else if (slave.face <= 60) { - if (jsRandom(1, 100) > 50) { - slave.face += 10; - } - } - } else if (slave.hormoneBalance >= 100) { - if (slave.face > 60) { - if (jsRandom(1, 100) > 80) { - slave.face += 10; - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseVoiceXX(slave) { - if (slave.hormoneBalance >= 200) { - if (slave.voice === 3) { - if (jsRandom(1, 100) > 90) { - slave.voice--; - } - } - } else if (slave.hormoneBalance >= 100) { - if (slave.voice === 3) { - if (jsRandom(1, 100) > 80) { - slave.voice--; - } - } - } else if (slave.hormoneBalance <= -200) { - if (slave.voice <= 3) { - if (jsRandom(1, 100) > 30) { - slave.voice--; - } - } - } else if (slave.hormoneBalance <= -100) { - if (slave.voice <= 3) { - if (jsRandom(1, 100) > 60) { - slave.voice--; - } - } - } else { - if (slave.voice === 3) { - if (jsRandom(1, 100) > 60) { - slave.voice--; - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increaseVoiceXY(slave) { - if (slave.hormoneBalance >= 200) { - if (slave.voice < 2) { - if (jsRandom(1, 100) > 50) { - slave.voice--; - } - } - } else if (slave.hormoneBalance >= 100) { - if (slave.voice < 3) { - if (jsRandom(1, 100) > 50) { - slave.voice--; - } - } - } else if (slave.hormoneBalance <= -200) { - if (slave.voice > 1) { - if (jsRandom(1, 100) > 10) { - slave.voice--; - } - } - } else if (slave.hormoneBalance <= -100) { - if (slave.voice > 1) { - if (jsRandom(1, 100) > 30) { - slave.voice--; - } - } - } else { - if (slave.voice > 1) { - if (jsRandom(1, 100) > 60) { - slave.voice--; - } - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increasePregAdaptationXX(slave) { - if (physicalAgeSwap === 3) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation = 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 5) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 6) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 7) { - if (slave.pregAdaptation < 6) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 8) { - if (slave.pregAdaptation < 7) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 9) { - if (slave.pregAdaptation < 8) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 10) { - if (slave.pregAdaptation < 9) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 11) { - if (slave.pregAdaptation < 10) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 12) { - if (slave.pregAdaptation < 14) { - slave.pregAdaptation += 4; - } - } else if (physicalAgeSwap === 13) { - if (slave.pregAdaptation < 18) { - slave.pregAdaptation += 4; - } - } else if (physicalAgeSwap === 14) { - if (slave.pregAdaptation < 22) { - slave.pregAdaptation += 4; - } - } else if (physicalAgeSwap === 15) { - if (slave.pregAdaptation < 28) { - slave.pregAdaptation += 6; - } - } else if (physicalAgeSwap === 16) { - if (slave.pregAdaptation < 34) { - slave.pregAdaptation += 6; - } - } else if (physicalAgeSwap === 17) { - if (slave.pregAdaptation < 42) { - slave.pregAdaptation += 8; - } - } else if (physicalAgeSwap === 18) { - if (slave.pregAdaptation < 50) { - slave.pregAdaptation += 8; - } - } - } - - /** - * @param {App.Entity.SlaveState} slave - */ - function increasePregAdaptationXY(slave) { - if (physicalAgeSwap === 3) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation = 5; - } - } else if (physicalAgeSwap === 4) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 5) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 6) { - if (slave.pregAdaptation < 5) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 7) { - if (slave.pregAdaptation < 6) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 8) { - if (slave.pregAdaptation < 7) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 9) { - if (slave.pregAdaptation < 8) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 10) { - if (slave.pregAdaptation < 9) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 11) { - if (slave.pregAdaptation < 10) { - slave.pregAdaptation++; - } - } else if (physicalAgeSwap === 12) { - if (slave.pregAdaptation < 12) { - slave.pregAdaptation += 2; - } - } else if (physicalAgeSwap === 13) { - if (slave.pregAdaptation < 14) { - slave.pregAdaptation += 2; - } - } else if (physicalAgeSwap === 14) { - if (slave.pregAdaptation < 16) { - slave.pregAdaptation += 2; - } - } else if (physicalAgeSwap === 15) { - if (slave.pregAdaptation < 18) { - slave.pregAdaptation += 2; - } - } else if (physicalAgeSwap === 16) { - if (slave.pregAdaptation < 20) { - slave.pregAdaptation += 2; - } - } else if (physicalAgeSwap === 17) { - if (slave.pregAdaptation < 20) { - slave.pregAdaptation += 2; - } - } else if (physicalAgeSwap === 18) { - if (slave.pregAdaptation < 20) { - slave.pregAdaptation += 2; - } - } - } -})(); diff --git a/src/js/pregJS.js b/src/js/pregJS.js index e0facf9fe6d6f3ca93ade68995391bf32a3d6b0b..44529f375689fbb08e58a532020a120335122e7f 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -474,10 +474,12 @@ globalThis.getNurseryReserved = function( /* slaves */ ) { return FetusGlobalReserveCount("nursery"); }; +/** Find a slave's father, if they are also one of your slaves, wherever they may be + * @param {number} fatherID + * @returns {FC.HumanState} + */ globalThis.findFather = function(fatherID) { - let father; - - father = getSlave(fatherID); + let father = getSlave(fatherID); if (father === undefined) { if (V.incubator.capacity > 0) { father = V.incubator.tanks.find(s => s.ID === fatherID); @@ -492,13 +494,6 @@ globalThis.findFather = function(fatherID) { return father; }; -globalThis.adjustFatherProperty = function(actor, property, newValue) { - let father = findFather(actor.ID); - if (father) { - father[property] = newValue; - } -}; - /* not to be used until that last part is defined. It may become slave.boobWomb.volume or some shit */ /** * @param {App.Entity.SlaveState} slave diff --git a/src/js/salon.js b/src/js/salon.js index 127a647bc8a4ec9c53f620c8f96a8b12698754ea..356efbee4e24f1709ff41da44edf0f10e46712c1 100644 --- a/src/js/salon.js +++ b/src/js/salon.js @@ -1,6 +1,6 @@ /** * @param {FC.HumanState} entity - * @param {boolean} cheat + * @param {boolean} [cheat=false] * @returns {HTMLDivElement} */ App.Medicine.Modification.eyeSelector = function(entity, cheat = false) { diff --git a/src/js/slaveCostJS.js b/src/js/slaveCostJS.js index 408c47403c32ccad24106f672a1ffe2b3aec2794..ecce8d21ee7072c2660a0bc92504fcde292cb9fb 100644 --- a/src/js/slaveCostJS.js +++ b/src/js/slaveCostJS.js @@ -385,7 +385,7 @@ globalThis.BeautyArray = (function() { case "heavily freckled": if ((skinToneLevel(slave.skin) > 5) && (skinToneLevel(slave.skin) < 10)) { adjustBeauty("Freckles", 2); - if (slave.hColor === "red") { + if (App.Data.misc.redheadColors.includes(slave.hColor)) { adjustBeauty("Freckles: Redhead", 2); } } diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index b8809b420e4f32bab016593c5a7a28d8f927b72d..971ffb8a626bc0121f1dda4cce95a6786e9ab37f 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -156,11 +156,6 @@ App.UI.SlaveList.render = function() { if ((slave.assignment === Job.REST) && (slave.health.condition >= -20)) { assignment.className = "freeAssignment"; assignment.innerText = slave.assignment; - } else if ((slave.assignment === Job.CONFINEMENT) && ((slave.devotion > 20) || ((slave.trust < -20) && (slave.devotion >= -20)) || ((slave.trust < -50) && (slave.devotion >= -50)))) { - assignment.innerText = slave.assignment; - if (slave.sentence > 0) { - assignment.innerText += ` (${slave.sentence} weeks)`; - } } else if (slave.choosesOwnAssignment === 1) { assignment.innerText = `choose ${getPronouns(slave).possessive} own job`; } else { @@ -549,10 +544,16 @@ App.UI.SlaveList.sortingLinks = function(passage) { let span = App.UI.DOM.makeElement("span", "Sort by: "); let order = ["devotion", "trust", "name", "assignment", "seniority", "actualAge", "visualAge", "physicalAge", "weeklyIncome", "health", "weight", "muscles", "intelligence", "sexDrive", "pregnancy", "prestige"]; const orderMap = order.map(so => { - return {value: so, name: textify(so)}; + return {key: so, name: capFirstChar(so)}; }); - div.append(App.UI.DOM.makeSelect(orderMap, 'sortSlavesBy', App.UI.reload)); + div.append( + span, + App.UI.DOM.makeSelect(orderMap, V.sortSlavesBy, val => { + V.sortSlavesBy = val; + App.UI.reload(); + }), + ); span = App.UI.DOM.makeElement("span", " Sort direction: "); order = ["descending", "ascending"]; diff --git a/src/js/statsChecker/eyeChecker.js b/src/js/statsChecker/eyeChecker.js index a5343c127e20e65162f4eb9e0bc309df1a994797..ab817eb9bb113204d41a836260f9b9f805e43196 100644 --- a/src/js/statsChecker/eyeChecker.js +++ b/src/js/statsChecker/eyeChecker.js @@ -263,7 +263,7 @@ globalThis.hasVisibleHeterochromia = function(slave) { * @param {"iris"|"pupil"|"sclera"} [eyePart="iris"] * @returns {string} */ -globalThis.getGeneticEyeColor = function(playerOrSlave, side, eyePart) { +globalThis.getGeneticEyeColor = function(playerOrSlave, side, eyePart = "iris") { if (eyePart === "iris") { if (playerOrSlave.geneticQuirks.albinism === 2 && "albinismOverride" in playerOrSlave) { return playerOrSlave.albinismOverride.eyeColor; diff --git a/src/js/upgrade.js b/src/js/upgrade.js index 17375c27520a53d5bd59b8fb05e9c8e1019ded15..1e6b0bdfb8d17887c7d5b1ce06bb2201f5e22176 100644 --- a/src/js/upgrade.js +++ b/src/js/upgrade.js @@ -38,7 +38,7 @@ App.Upgrade = class Upgrade { App.UI.DOM.appendNewElement("div", frag, text); if (link) { - App.UI.DOM.appendNewElement("div", frag, new Purchase(link, cost, "capEx", { + App.UI.DOM.appendNewElement("div", frag, makePurchase(link, cost, "capEx", { note, handler: () => { this._object[this._property] = upgraded; @@ -49,7 +49,7 @@ App.Upgrade = class Upgrade { this.refresh(); }, - }).render()); + })); } if (nodes) { diff --git a/src/js/utilsAssessSlave.js b/src/js/utilsAssessSlave.js index 908a147fa1604c5950bd7bb3ea9f079de2cb3c4c..f223ccd7f189610f3a758f30bf1efa2fe7beeaf5 100644 --- a/src/js/utilsAssessSlave.js +++ b/src/js/utilsAssessSlave.js @@ -194,7 +194,7 @@ globalThis.getWrittenTitle = function(slave) { }; /** - * @param {App.Entity.SlaveState} slave + * @param {FC.HumanState} slave * @returns {string} */ globalThis.SlaveFullName = function(slave) { diff --git a/src/js/utilsSlave.js b/src/js/utilsSlave.js index 8ae29c3b277f3d7dcf707a9c8be016afbf976812..517aa5f776499e6cb8d71e92a99deeb1baf3cf15 100644 --- a/src/js/utilsSlave.js +++ b/src/js/utilsSlave.js @@ -3299,7 +3299,7 @@ globalThis.ageSlave = function(slave, forceDevelopment = false) { slave.ovaryAge += 0.2; } if (slave.physicalAge <= 18 && (forceDevelopment || V.loliGrow > 0)) { - physicalDevelopment(slave); + App.EndWeek.Shared.physicalDevelopment(slave); } }; diff --git a/src/js/vignettes.js b/src/js/vignettes.js index 6e61b8f7dcf487a5ad196f9eeb28c6cbab73b46d..cd617d62bba1ff2fc0a3431c51c3a4c427fd161e 100644 --- a/src/js/vignettes.js +++ b/src/js/vignettes.js @@ -1690,7 +1690,7 @@ globalThis.GetVignette = function(slave) { } if (slave.nipples === "fuckable" || slave.nipples === "flat") { vignettes.push({ - text: `${he} lost a customer who refused ${he} could possibly be a proper cow with nipples like ${hers},`, + text: `${he} lost a customer who refused to believe ${he} could possibly be a proper cow with nipples like ${hers},`, type: "cash", effect: -1, }); diff --git a/src/markets/specificMarkets/customSlaveMarket.js b/src/markets/specificMarkets/customSlaveMarket.js index 139c7d8a6c366b63b6b118e3c9fdf18381d766f4..a9b76aeb00edf580c1e03fbb0d5dbc2bd51c6b7f 100644 --- a/src/markets/specificMarkets/customSlaveMarket.js +++ b/src/markets/specificMarkets/customSlaveMarket.js @@ -62,33 +62,23 @@ App.Markets["Custom Slave"] = function() { createDescription(el, description, "age"); // Choices - const select = document.createElement("select"); + const options = []; for (let i = 0; i < ages.length; i++) { const high = ages[i]; - const low = (ages[i - 1] + 1 ) || (ages[i] - 1); // First element of array has nothing before it, obviously, so display low as one less than high. + const low = (ages[i - 1] + 1) || (ages[i] - 1); // First element of array has nothing before it, obviously, so display low as one less than high. if (low < V.minimumSlaveAge) { continue; } else if (high > V.retirementAge) { - const option = document.createElement("option"); - option.text = `${low}+`; - option.value = low.toString(); - select.append(option); + options.push({key: low.toString(), name: `${low}+`}); break; } - const option = document.createElement("option"); - option.text = `${low}-${high}`; - option.value = high.toString(); - if (slave.age === high) { - option.selected = true; - } - select.append(option); + options.push({key: high.toString(), name: `${low}-${high}`}); } - select.onchange = () => { - slave.age = Number(select.options[select.selectedIndex].value); + el.append(App.UI.DOM.makeSelect(options, slave.age.toString(), a => { + slave.age = Number(a); jQuery("#age-text").empty().append(description()); - }; - el.append(select); + })); return el; function description() { @@ -297,32 +287,18 @@ App.Markets["Custom Slave"] = function() { function race() { const el = document.createElement("div"); const slaveProperty = "race"; - const choices = new Map([ - ["ethnicity is unimportant", "Ethnicity is unimportant"], - ]); + const choices = [{key: "ethnicity is unimportant", name: "Ethnicity is unimportant"}]; for (const [race, capRace] of App.Data.misc.filterRacesPublic) { - choices.set(race, capRace); + choices.push({key: race, name: capRace}); } createDescription(el, description, slaveProperty); // Choices - - const select = document.createElement("select"); - for (const [value, text] of choices) { - const option = document.createElement("option"); - option.text = text; - option.value = value; - if (slave.race === option.value) { - option.selected = true; - } - select.append(option); - } - select.onchange = () => { - slave.race = select.options[select.selectedIndex].value; + el.append(App.UI.DOM.makeSelect(choices, slave.race, r => { + slave.race = r; jQuery("#race-text").empty().append(description()); - }; - el.append(select); + })); function description() { const el = new DocumentFragment(); @@ -345,31 +321,18 @@ App.Markets["Custom Slave"] = function() { function skin() { const el = document.createElement("div"); const slaveProperty = "skin"; - const choices = new Map([ - ["left natural", "Left natural"] - ]); + const choices = [{key: "left natural", name: "Left natural"}]; for (const skin of App.Medicine.Modification.naturalSkins) { - choices.set(skin, capFirstChar(skin)); + choices.push({key: skin, name: capFirstChar(skin)}); } createDescription(el, description, slaveProperty); // Choices - const select = document.createElement("select"); - for (const [value, text] of choices) { - const option = document.createElement("option"); - option.text = text; - option.value = value; - if (slave.skin === option.value) { - option.selected = true; - } - select.append(option); - } - select.onchange = () => { - slave.skin = select.options[select.selectedIndex].value; + el.append(App.UI.DOM.makeSelect(choices, slave.skin, s => { + slave.skin = s; jQuery("#skin-text").empty().append(description()); - }; - el.append(select); + })); function description() { const el = new DocumentFragment(); @@ -942,38 +905,26 @@ App.Markets["Custom Slave"] = function() { function nationality() { const el = document.createElement("div"); const slaveProperty = "nationality"; - const choices = new Map([ - ["slave", "Slave"], - ["Stateless", "Stateless"], - ["Nationality is unimportant", "Nationality is unimportant"], - ]); + const choices = [{key: "slave", name: "Slave"}, + {key: "Stateless", name: "Stateless"}, + {key: "Nationality is unimportant", name: "Nationality is unimportant"}, + ]; for (const nationality of App.Data.misc.baseNationalities) { - choices.set(nationality, nationality); + choices.push({key: nationality, name: nationality}); } createDescription(el, description, slaveProperty); // Choices - const select = document.createElement("select"); - for (const [value, text] of choices) { - const option = document.createElement("option"); - option.text = text; - option.value = value; - if (slave.nationality === option.value) { - option.selected = true; - } - select.append(option); - } - select.onchange = () => { - slave.nationality = select.options[select.selectedIndex].value; + el.append(App.UI.DOM.makeSelect(choices, slave.nationality, nat => { + slave.nationality = nat; jQuery("#nationality-text").empty().append(description()); - }; - el.append(select); + })); function description() { - for (const [value, text] of choices) { - if (slave.nationality === value) { - return `${text}. `; + for (const choice of choices) { + if (slave.nationality === choice.key) { + return `${choice.name}. `; } } } diff --git a/src/markets/specificMarkets/prestigiousSlave.js b/src/markets/specificMarkets/prestigiousSlave.js index f8e3e6bf4052a2aeec6bc92255159745dd42db2e..20e721233a79f1111bbd254f8d6908fe5d76cf97 100644 --- a/src/markets/specificMarkets/prestigiousSlave.js +++ b/src/markets/specificMarkets/prestigiousSlave.js @@ -49,19 +49,12 @@ App.Markets["Prestigious Slave"] = function() { content.append(passage()); }; const cheatOptions = (V.seeDicks > 0) ? options.concat(...dickOptions) : Array.from(options); - const slaveDropdown = App.UI.DOM.appendNewElement("select", frag); - for (const o of cheatOptions) { - const choice = App.UI.DOM.appendNewElement("option", slaveDropdown, capFirstChar(o)); - choice.value = o; - if (seed === o) { - choice.selected = true; - } - } - slaveDropdown.onchange = () => { - const O = slaveDropdown.options[slaveDropdown.selectedIndex]; - seed = O.value; + frag.append(App.UI.DOM.makeSelect(cheatOptions.map(v => { + return {key: v, name: capFirstChar(v)}; + }), seed, v => { + seed = v; reload(); - }; + })); App.UI.DOM.appendNewElement("span", frag, App.UI.DOM.link(" Refresh slave", reload)); } slave = makeSlave(seed); diff --git a/src/neighbor/neighborDescription.js b/src/neighbor/neighborDescription.js index be0408f197757524e9be12a778520fc07010c412..72d1f0f3c4f7a9619b6b8300666b5f5ec18466b9 100644 --- a/src/neighbor/neighborDescription.js +++ b/src/neighbor/neighborDescription.js @@ -35,7 +35,7 @@ App.UI.neighborDescription = function(i) { } let economicUncertainty = App.Utils.economicUncertainty(i); if (V.arcologies[i].direction === 0) { - r.push(`You control <span class="lime">${V.arcologies[i].ownership}%</span> of the arcology, and the largest minority holder controls <span class="orange">${V.arcologies[i].minority}%.</span>`); + r.push(`You control <span class="lime">${V.arcologies[i].ownership}%</span> of the arcology${V.arcologies[0].ownership !== 100 ? `, and the largest minority holder controls <span class="orange">${V.arcologies[i].minority}%.</span>` : `.`}`); } else if ((V.arcologies[i].government !== "your trustees") && (V.arcologies[i].government !== "your agent")) { r.push(`Its leadership has control of approximately <span class="orange">${Math.trunc(V.arcologies[i].ownership*economicUncertainty)}%</span> of the arcology${(V.arcologies[i].minority > V.arcologies[i].ownership-10) ? `, a dangerously narrow margin over competition with a <span class="tan">${Math.trunc(V.arcologies[i].minority*economicUncertainty)}%</span> share` : ``}.`); } diff --git a/src/npc/databases/dSlavesDatabase.js b/src/npc/databases/dSlavesDatabase.js index 57d725ec95ecd7107f43991c0d8cf137896490b1..f10b60df74d8f12b674e02fc877b9949502503cc 100644 --- a/src/npc/databases/dSlavesDatabase.js +++ b/src/npc/databases/dSlavesDatabase.js @@ -900,8 +900,8 @@ App.Data.HeroSlaves.D = [ height: 155, race: "white", eye: {origColor: "blue"}, - origHColor: "strawberry blonde", - pubicHColor: "strawberry blonde", + origHColor: "strawberry-blonde", + pubicHColor: "strawberry-blonde", origSkin: "white", hLength: 60, hStyle: "luxurious", @@ -1813,8 +1813,8 @@ App.Data.HeroSlaves.D = [ weight: 20, race: "white", eye: {origColor: "green"}, - origHColor: "strawberry blonde", - pubicHColor: "strawberry blonde", + origHColor: "strawberry-blonde", + pubicHColor: "strawberry-blonde", origSkin: "white", hLength: 60, hStyle: "neat", diff --git a/src/npc/descriptions/crotch/vagina.js b/src/npc/descriptions/crotch/vagina.js index a508ff882022c2d97cc4377a896a85dd4a2da7c2..81b0d83a9a166054cfd7b10924f2edd8f8d588a4 100644 --- a/src/npc/descriptions/crotch/vagina.js +++ b/src/npc/descriptions/crotch/vagina.js @@ -11,7 +11,7 @@ App.Desc.vagina = function(slave) { if (slave.dick > 0) { if (slave.vagina > -1) { r.push(`${His}`); - if (slave.genes === "XX") { + if (slave.genes === "XX" || slave.prestigeDesc && slave.prestigeDesc.includes("natural-born hermaphrodite")) { r.push(`beautifully natural`); } else if (slave.ovaries === 1) { r.push(`finely crafted`); diff --git a/src/npc/descriptions/longSlave.js b/src/npc/descriptions/longSlave.js index 0e7e05a792f00dfbee2c8bf9e1a570fbb3b3b73c..80235921cb24c94721c161fef18e48e5f68c0906 100644 --- a/src/npc/descriptions/longSlave.js +++ b/src/npc/descriptions/longSlave.js @@ -451,7 +451,7 @@ App.Desc.longSlave = function(slave, {descType, market = 0, prisonCrime, noArt} } if (slave.fuckdoll === 0) { - if (slave.hColor === "red") { + if (App.Data.misc.redheadColors.includes(slave.hColor)) { if (slave.hLength >= 10) { if (slave.markings === "freckles" || slave.markings === "heavily freckled") { if (skinToneLevel(slave.skin).isBetween(5, 10)) { diff --git a/src/npc/descriptions/skin.js b/src/npc/descriptions/skin.js index 0d77ff53d2da7b6dc66f65512b809f612a36cf5e..a8eadc79375588f086cab2c6b37d4010346c8a88 100644 --- a/src/npc/descriptions/skin.js +++ b/src/npc/descriptions/skin.js @@ -77,7 +77,7 @@ App.Desc.skin = function(slave, descType) { r.push(`${slave.skin} and lightly spotted.`); } else if (slave.markings === "freckles") { r.push(`${slave.skin} and lightly`); - if ((skinToneLevel(slave.skin) > 5) && (skinToneLevel(slave.skin) < 10) && (slave.hColor === "red")) { + if ((skinToneLevel(slave.skin) > 5) && (skinToneLevel(slave.skin) < 10) && (App.Data.misc.redheadColors.includes(slave.hColor))) { r.push(`freckled, an attractive combination.`); } else { r.push(`freckled.`); @@ -86,7 +86,7 @@ App.Desc.skin = function(slave, descType) { r.push(`${slave.skin} and heavily spotted.`); } else if (slave.markings === "heavily freckled") { r.push(`${slave.skin} and heavily`); - if ((skinToneLevel(slave.skin) > 5) && (skinToneLevel(slave.skin) < 10) && (slave.hColor === "red")) { + if ((skinToneLevel(slave.skin) > 5) && (skinToneLevel(slave.skin) < 10) && (App.Data.misc.redheadColors.includes(slave.hColor))) { r.push(`freckled, an attractive combination.`); } else { r.push(`freckled.`); diff --git a/src/npc/descriptions/womb/superfetation.js b/src/npc/descriptions/womb/superfetation.js index 4be3a3870a587e7ae274c492c1b90e5b9a621ca5..f1841349f2e6cc05bd2836a0374bf4d2dd6a4cea 100644 --- a/src/npc/descriptions/womb/superfetation.js +++ b/src/npc/descriptions/womb/superfetation.js @@ -4,12 +4,22 @@ * @returns {string} */ App.Desc.superfetation = function(slave, descType) { + function daddyName(daddyID) { + if (daddyID > 0) { + const lsd = findFather(daddyID); + if (lsd) { + return SlaveFullName(lsd); + } + } else if (daddyID in V.missingTable && V.showMissingSlaves) { + return V.missingTable[daddyID].fullName; + } + return "another slave"; + } + const r = []; const { his, His } = getPronouns(slave); - let lsd; - let daddy; const slaveWD = WombGetLittersData(slave); if (slave.geneticQuirks.superfetation === 2 && slaveWD.litters.length > 1 && V.pregnancyMonitoringUpgrade === 1 && descType !== DescType.MARKET) { r.push(`${His} womb contains ${num(slaveWD.litters.length)} separate pregnancies:`); @@ -19,151 +29,43 @@ App.Desc.superfetation = function(slave, descType) { const was = countLitter > 1 ? "were" : "was"; if (litCount === 0) { r.push(`the eldest`); - if (countLitter > 1) { - r.push(`set of ${num(countLitter)},`); - } else { - r.push(`one,`); - } - r.push(`at ${slaveWD.litters[litCount]}`); - if (slaveWD.litters[litCount] > 1) { - r.push(`weeks`); - } else { - r.push(`week`); - } - r.push(`of development,`); - if (slaveWD.litterData[litCount][0].fatherID === -7) { - r.push(`${is} from the gene lab,`); - } else if (slaveWD.litterData[litCount][0].age > slave.pregData.normalBirth / 8) { - if (slaveWD.litterData[litCount][0].fatherID === -1) { - r.push(`${was} fathered by your seed,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -2) { - r.push(`${was} fathered by one of your citizens,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -3) { - r.push(`${was} fathered by your former Master,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -4) { - r.push(`${was} fathered by another arcology owner,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -5) { - r.push(`${was} fathered by one of your clients,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -6) { - r.push(`${was} fathered by a member of the Societal Elite,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -9) { - r.push(`${was} fathered by the Futanari Sisters,`); - } else if (slaveWD.litterData[litCount][0].fatherID === 0) { - r.push(`${is} from an unidentifiable source,`); - } else if (slaveWD.litterData[litCount][0].fatherID === slave.ID) { - r.push(`${is} from ${his} own handiwork,`); - } else { - if (slaveWD.litterData[litCount][0].fatherID > 0) { - lsd = findFather(slaveWD.litterData[litCount][0].fatherID); - if (lsd) { - daddy = SlaveFullName(lsd); - } else { - daddy = "another slave"; - } - } else if (slaveWD.litterData[litCount][0].fatherID in V.missingTable && V.showMissingSlaves) { - daddy = V.missingTable[slave.pregSource].fullName; - } - r.push(`${was} fathered by ${daddy}'s seed,`); - } - } else { - r.push(`${is} too young to tell the father of,`); - } } else if (litCount === slaveWD.litters.length - 1) { r.push(`and the youngest`); - if (countLitter > 1) { - r.push(`set of ${num(countLitter)},`); - } else { - r.push(`one,`); - } - r.push(`at ${slaveWD.litters[litCount]}`); - if (slaveWD.litters[litCount] > 1) { - r.push(`weeks`); - } else { - r.push(`week`); - } - r.push(`of development,`); - if (slaveWD.litterData[litCount][0].fatherID === -7) { - r.push(`${is} from the gene lab.`); - } else if (slaveWD.litterData[litCount][0].age > slave.pregData.normalBirth / 8) { - if (slaveWD.litterData[litCount][0].fatherID === -1) { - r.push(`${was} fathered by your seed.`); - } else if (slaveWD.litterData[litCount][0].fatherID === -2) { - r.push(`${was} fathered by one of your citizens.`); - } else if (slaveWD.litterData[litCount][0].fatherID === -3) { - r.push(`${was} fathered by your former Master. He was quite the busy man.`); - } else if (slaveWD.litterData[litCount][0].fatherID === -4) { - r.push(`${was} fathered by another arcology owner.`); - } else if (slaveWD.litterData[litCount][0].fatherID === -5) { - r.push(`${was} fathered by one of your clients.`); - } else if (slaveWD.litterData[litCount][0].fatherID === -6) { - r.push(`${was} fathered by a member of the Societal Elite.`); - } else if (slaveWD.litterData[litCount][0].fatherID === -9) { - r.push(`${was} fathered by the Futanari Sisters.`); - } else if (slaveWD.litterData[litCount][0].fatherID === 0) { - r.push(`${is} from an unidentifiable source.`); - } else if (slaveWD.litterData[litCount][0].fatherID === slave.ID) { - r.push(`${is} from ${his} own seed.`); - } else { - if (slaveWD.litterData[litCount][0].fatherID > 0) { - lsd = findFather(slaveWD.litterData[litCount][0].fatherID); - if (lsd) { - daddy = SlaveFullName(lsd); - } else { - daddy = "another slave"; - } - } else if (slaveWD.litterData[litCount][0].fatherID in V.missingTable && V.showMissingSlaves) { - daddy = V.missingTable[slave.pregSource].fullName; - } - r.push(`${was} fathered by ${daddy}'s seed.`); - } - } else { - r.push(`${is} too young to tell the father of.`); - } } else { - r.push(`the next set of ${num(countLitter)} at ${slaveWD.litters[litCount]}`); - if (slaveWD.litters[litCount] > 1) { - r.push(`weeks`); - } else { - r.push(`week`); - } - r.push(`of development`); - if (slaveWD.litterData[litCount][0].fatherID === -7) { - r.push(`${is} from the gene lab,`); - } else if (slaveWD.litterData[litCount][0].age > slave.pregData.normalBirth / 8) { - if (slaveWD.litterData[litCount][0].fatherID === -1) { - r.push(`${was} fathered by your seed,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -2) { - r.push(`${was} fathered by one of your citizens,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -3) { - r.push(`${was} fathered by your former Master,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -4) { - r.push(`${was} fathered by another arcology owner,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -5) { - r.push(`${was} fathered by one of your clients,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -6) { - r.push(`${was} fathered by a member of the Societal Elite,`); - } else if (slaveWD.litterData[litCount][0].fatherID === -9) { - r.push(`${was} fathered by the Futanari Sisters,`); - } else if (slaveWD.litterData[litCount][0].fatherID === 0) { - r.push(`${is} from an unidentifiable source,`); - } else if (slaveWD.litterData[litCount][0].fatherID === slave.ID) { - r.push(`${is} from ${his} own handiwork,`); - } else { - if (slaveWD.litterData[litCount][0].fatherID > 0) { - lsd = findFather(slaveWD.litterData[litCount][0].fatherID); - if (lsd) { - daddy = SlaveFullName(lsd); - } else { - daddy = "another slave"; - } - } else if (slaveWD.litterData[litCount][0].fatherID in V.missingTable && V.showMissingSlaves) { - daddy = V.missingTable[slave.pregSource].fullName; - } - r.push(`${was} fathered by ${daddy}'s seed,`); - } + r.push(`the next`); + } + if (countLitter > 1) { + r.push(`set of ${num(countLitter)},`); + } else { + r.push(`one,`); + } + r.push(`at ${numberWithPluralOne(slaveWD.litters[litCount], "week")} of development,`); + if (slaveWD.litterData[litCount][0].fatherID === -7) { + r.push(`${is} from the gene lab,`); + } else if (slaveWD.litterData[litCount][0].age > slave.pregData.normalBirth / 8) { + if (slaveWD.litterData[litCount][0].fatherID === -1) { + r.push(`${was} fathered by your seed,`); + } else if (slaveWD.litterData[litCount][0].fatherID === -2) { + r.push(`${was} fathered by one of your citizens,`); + } else if (slaveWD.litterData[litCount][0].fatherID === -3) { + r.push(`${was} fathered by your former Master,`); + } else if (slaveWD.litterData[litCount][0].fatherID === -4) { + r.push(`${was} fathered by another arcology owner,`); + } else if (slaveWD.litterData[litCount][0].fatherID === -5) { + r.push(`${was} fathered by one of your clients,`); + } else if (slaveWD.litterData[litCount][0].fatherID === -6) { + r.push(`${was} fathered by a member of the Societal Elite,`); + } else if (slaveWD.litterData[litCount][0].fatherID === -9) { + r.push(`${was} fathered by the Futanari Sisters,`); + } else if (slaveWD.litterData[litCount][0].fatherID === 0) { + r.push(`${is} from an unidentifiable source,`); + } else if (slaveWD.litterData[litCount][0].fatherID === slave.ID) { + r.push(`${is} from ${his} own handiwork,`); } else { - r.push(`${is} too young to tell the father of,`); + r.push(`${was} fathered by ${daddyName(slaveWD.litterData[litCount][0].fatherID)}'s seed,`); } + } else { + r.push(`${is} too young to tell the father of,`); } } } diff --git a/src/npc/generate/lawCompliance.js b/src/npc/generate/lawCompliance.js index 1177cec825cc83fc49934fb50c6fe478936a34e8..c4018d3685061a6a854f125a0c8a67649e4a5e17 100644 --- a/src/npc/generate/lawCompliance.js +++ b/src/npc/generate/lawCompliance.js @@ -179,7 +179,7 @@ App.Desc.lawCompliance = function(slave, market = 0) { slave.pregKnown = 1; SetBellySize(slave); } - return `If ${he} was unable to become pregnant before, ${he} has been made to now. ${He} is fertilized surgically to insure a healthy pregnancy.`; + return `If ${he} was unable to become pregnant before, ${he} has been made to now. ${He} is fertilized surgically to ensure a healthy pregnancy.`; } function FSAssetExpansionistSMR() { @@ -190,9 +190,15 @@ App.Desc.lawCompliance = function(slave, market = 0) { slave.lips = jsRandom(15, 55); if (slave.dick > 0) { slave.dick = jsRandom(4, 7); + if (slave.foreskin > 0) { + slave.foreskin = (slave.dick + either(-1, 0, 0)); + } } if (slave.balls > 0) { slave.balls = jsRandom(4, 7); + if (slave.scrotum > 0) { + slave.scrotum = (slave.balls + either(-1, 0, 0)); + } } return `${He} has been on powerful growth hormones for a long time, and has experienced growth in several areas as a result.`; } diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js index 0d9ed58d2837caa395ef9ada7e3716877d9f1d40..ed5cd6368747c9715bff0e237fc2cfc5394256dc 100644 --- a/src/npc/startingGirls/startingGirls.js +++ b/src/npc/startingGirls/startingGirls.js @@ -1604,20 +1604,15 @@ App.StartingGirls.makeCareerFilterPulldown = function() { const frag = new DocumentFragment(); frag.append(`Filter by desired bonus: `); - const select = document.createElement("select"); - select.style.fontStyle = "normal"; + const options = []; for (const cat of App.StartingGirls.careerBonusFilters.keys()) { - const choice = App.UI.DOM.appendNewElement("option", select, cat); - if (App.StartingGirls.careerFilter === cat) { - choice.selected = true; - } + options.push({key: cat, name: cat}); } - - select.onchange = () => { - App.StartingGirls.careerFilter = select.value; + frag.append(App.UI.DOM.makeSelect(options, App.StartingGirls.careerFilter, cat => { + App.StartingGirls.careerFilter = cat; App.UI.reload(); - }; - frag.append(select); + })); + return frag; }; @@ -1961,7 +1956,7 @@ App.StartingGirls.skills = function(slave, cheat = false) { option = options.addOption("Vaginal sex", "vaginal", slave.skill); if (slave.vagina === 0 && !cheat) { - option.addComment("Virgins cannot be given anal skills."); + option.addComment("Virgins cannot be given vaginal skills."); } else if (slave.vagina === -1) { option.addComment("Must have a vagina to have vaginal skills."); } else { @@ -2064,8 +2059,15 @@ App.StartingGirls.finalize = function(slave) { if (slave.pregSource === -1) { V.PC.counter.slavesKnockedUp++; } + // Make newSlave keep certain changes + slave.override_H_Color = 1; + slave.override_Arm_H_Color = 1; + slave.override_Brow_H_Color = 1; + slave.override_Skin = 1; + newSlave(clone(slave)); }; + if (V.cash - cost > minimumSlaveCost()) { const {him} = getPronouns(slave); App.UI.DOM.appendNewElement("div", el, diff --git a/src/npc/startingGirls/startingGirlsPassage.js b/src/npc/startingGirls/startingGirlsPassage.js index 9d158c14c4e70a6bfc10cafd181ab34ea1d00071..9bed3894a16d6b2b59f4631aa21e1da4329ec789 100644 --- a/src/npc/startingGirls/startingGirlsPassage.js +++ b/src/npc/startingGirls/startingGirlsPassage.js @@ -339,18 +339,20 @@ App.StartingGirls.passage = function() { `Start over with a finalized slave's relative`, () => { const el = new DocumentFragment(); - const select = App.UI.DOM.appendNewElement("select", el); + + const options = []; for (const slave of newSlaves) { - const option = App.UI.DOM.appendNewElement("option", select, `${SlaveFullName(slave)} (${slave.genes}, ${slave.actualAge})`); - option.value = slave.ID.toString(); + options.push({ + key: slave.ID.toString(), + name: `${SlaveFullName(slave)} (${slave.genes}, ${slave.actualAge})` + }); } - select.selectedIndex = -1; - select.onchange = () => { - const ID = Number.parseInt(select.options[select.selectedIndex].value); - const srcSlave = getSlave(ID); + const select = App.UI.DOM.makeSelect(options, null, slaveID => { + const srcSlave = getSlave(Number.parseInt(slaveID)); jQuery(linkDiv).empty().append(relativeLinkStrip(srcSlave, srcSlave)); - }; + }); App.UI.DOM.appendNewElement("div", el, App.UI.DOM.combineNodes(`Relative of slave: `, select)); + const linkDiv = App.UI.DOM.appendNewElement("div", el, ``); App.UI.DOM.appendNewElement("div", el, "Warning: related slaves will influence each others' opinion of you, and may become difficult to control if not properly broken.", "note"); App.UI.DOM.appendNewElement("div", el, App.UI.DOM.passageLink("Back", "Starting Girls")); @@ -402,7 +404,7 @@ App.StartingGirls.passage = function() { tabBar.addTab("Stats", "stats", App.StartingGirls.stats(V.activeSlave)); tabBar.addTab("Family", "family", App.Intro.editFamily(V.activeSlave)); tabBar.addTab("Body Mods", "body-mods", App.UI.bodyModification(V.activeSlave, true)); - tabBar.addTab("Salon", "salon", App.UI.salon(V.activeSlave, true)); + tabBar.addTab("Salon", "salon", App.UI.salon(V.activeSlave, true, true)); tabBar.addTab("Finalize", "finalize", App.StartingGirls.finalize(V.activeSlave), startingSlaveCost(V.activeSlave) > V.cash ? "show-warning" : undefined); el.append(tabBar.render()); diff --git a/src/personalAssistant/assistantAppearance.js b/src/personalAssistant/assistantAppearance.js index e713166e86c5b3cec0dcb9fc1afcef2b61a1bae4..27c9f3d2e606b204bc98d0dd94023a6a3bb61af2 100644 --- a/src/personalAssistant/assistantAppearance.js +++ b/src/personalAssistant/assistantAppearance.js @@ -1960,21 +1960,18 @@ globalThis.availableAssistantAppearances = function() { const el = document.createElement("div"); const {hisA} = getPronouns(assistant.pronouns().main).appendSuffix('A'); el.append(`Select ${hisA} appearance: `); - const select = App.UI.DOM.appendNewElement("select", el); + + const options = []; for (const [appearance, obj] of App.Data.Assistant.appearances) { if (obj.requirements) { - const option = App.UI.DOM.appendNewElement("option", select, capFirstChar(appearance)); - option.value = appearance; - if (V.assistant.appearance === appearance) { - option.selected = true; - } + options.push({key: appearance, name: capFirstChar(appearance)}); } } - select.onchange = () => { - const O = select.options[select.selectedIndex]; - V.assistant.appearance = /** @type {assistantAppearance} */ (O.value); + el.append(App.UI.DOM.makeSelect(options, V.assistant.appearance, appearance => { + V.assistant.appearance =/** @type {assistantAppearance} */ (appearance); App.UI.reload(); - }; + })); + return el; }; diff --git a/src/player/electiveSurgery.js b/src/player/electiveSurgery.js index cbf10edda6d16cc2f851a948b245a282766ed020..55fd1e625c7099ed75a3063c5d7ed2106982131d 100644 --- a/src/player/electiveSurgery.js +++ b/src/player/electiveSurgery.js @@ -161,34 +161,22 @@ App.UI.electiveSurgery = function() { App.Events.addNode(p, r, "div"); const choiceDiv = document.createElement("div"); - const choices = new Map([]); + /** + * @type {selectOption[]} + */ + const choices = []; if (V.PC.skin !== V.PC.origSkin) { - choices.set(V.PC.origSkin, capFirstChar(`Restore natural ${V.PC.origSkin}`)); + choices.push({key: V.PC.origSkin, name: capFirstChar(`Restore natural ${V.PC.origSkin}`)}); } for (const skin of App.Medicine.Modification.naturalSkins) { - choices.set(skin, capFirstChar(skin)); + choices.push({key: skin, name: capFirstChar(skin)}); } - const select = document.createElement("select"); - let matchFound; - for (const [value, text] of choices) { - const option = document.createElement("option"); - option.text = text; - option.value = value; - if (V.PC.skin === option.value) { - option.selected = true; - matchFound = true; - } - select.append(option); - } - if (!matchFound) { - select.selectedIndex = -1; - } - select.onchange = () => { - V.PC.skin = select.options[select.selectedIndex].value; + const select = App.UI.DOM.makeSelect(choices, V.PC.skin, value => { + V.PC.skin = value; cashX(forceNeg(2000), "PCmedical"); showDegradation("skinTone"); - }; + }); choiceDiv.append(select, " or custom ", App.UI.DOM.makeTextBox( V.PC.skin, v => { diff --git a/src/pregmod/FCTV/FCTVshows.js b/src/pregmod/FCTV/FCTVshows.js index 4c36f4463a6ddd65432bb0a15c4c27b483dac9ca..07e2033ae854e47343143f08fe8592705cd89eef 100644 --- a/src/pregmod/FCTV/FCTVshows.js +++ b/src/pregmod/FCTV/FCTVshows.js @@ -11,7 +11,7 @@ App.Data.FCTV.actors = { slave.hLength = 50; slave.skin = "dark olive"; slave.hStyle = "luxurious"; - slave.hColor = "strawberry blonde"; + slave.hColor = "strawberry-blonde"; slave.clothes = "a leotard"; return slave; }, @@ -382,7 +382,7 @@ App.Data.FCTV.actors = { slave.trust = 100; slave.hLength = 50; slave.hStyle = "luxurious"; - slave.hColor = "strawberry blonde"; + slave.hColor = "strawberry-blonde"; slave.boobs = 1400; slave.nipples = "huge"; slave.boobShape = "perky"; @@ -399,7 +399,7 @@ App.Data.FCTV.actors = { slave.trust = 100; slave.hLength = 50; slave.hStyle = "luxurious"; - slave.hColor = "strawberry blonde"; + slave.hColor = "strawberry-blonde"; slave.boobs = 1400; slave.nipples = "huge"; slave.boobShape = "perky"; diff --git a/tsconfig.json b/tsconfig.json index bd2df2c88db402e947cf31ad8ee5edf5fcc49b78..2700b989a42888a3df54b1e201285dd85c036a5f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "allowJs": true, "checkJs": true, "noEmit": true, - "target": "ESNext", + "target": "es2021", "noImplicitAny": false, "disableSizeLimit": true },