diff --git a/src/js/assayJS.js b/src/js/assayJS.js index 0952538a0f4cc77b32cf875d5d8b685bdaa2ecfc..3f303287d19bf3d913af0fd0f9abe35dbc042a33 100644 --- a/src/js/assayJS.js +++ b/src/js/assayJS.js @@ -210,9 +210,10 @@ window.newSlave = function newSlave(slave) { slave.albinismOverride = 0; } } else { - if (V.genePool.findIndex(function(s) { return s.ID === slave.ID; }) === -1) { V.genePool.push(slave); } + if (V.genePool.findIndex(function(s) { return s.ID === slave.ID; }) === -1) { + V.genePool.push(slave); + } } - assignJob(slave, slave.assignment); /** do not run the Rules Assistant before adding the new slave to the slaves list! **/ @@ -422,7 +423,9 @@ window.WrittenMaster = function WrittenMaster(slave) { const V = State.variables; if (slave !== undefined) { Enunciate(slave); - } else if (V.titleEnunciate === undefined) { Enunciate(V.activeSlave); } + } else if (V.titleEnunciate === undefined) { + Enunciate(V.activeSlave); + } return V.writtenTitle; }; @@ -459,7 +462,9 @@ window.Enunciate = function Enunciate(slave) { } else if (V.PC.mother === slave.ID || V.PC.father === slave.ID) { if (V.PC.title === 1) { V.titleEnunciate = "Thon"; - } else if (V.PC.title === 0) { V.titleEnunciate = "Daughter"; } + } else if (V.PC.title === 0) { + V.titleEnunciate = "Daughter"; + } } else if (areSisters(slave, V.PC) > 0) { if (V.PC.title === 1) { if (slave.actualAge < 18) { @@ -476,7 +481,9 @@ window.Enunciate = function Enunciate(slave) { } } } - if (slave.custom.titleLisp && slave.custom.titleLisp !== "") { V.titleEnunciate = slave.custom.titleLisp; } + if (slave.custom.titleLisp && slave.custom.titleLisp !== "") { + V.titleEnunciate = slave.custom.titleLisp; + } V.sayEnunciate = "lisp"; V.sEnunciate = "th"; V.SEnunciate = "Th"; @@ -526,7 +533,9 @@ window.Enunciate = function Enunciate(slave) { } else if (V.PC.mother === slave.ID || V.PC.father === slave.ID) { if (V.PC.title === 1) { V.titleEnunciate = "Son"; - } else if (V.PC.title === 0) { V.titleEnunciate = "Daughter"; } + } else if (V.PC.title === 0) { + V.titleEnunciate = "Daughter"; + } } else if (areSisters(slave, V.PC) > 0) { if (V.PC.title === 1) { if (slave.actualAge < 18) { @@ -543,7 +552,9 @@ window.Enunciate = function Enunciate(slave) { } } } - if (slave.custom.title !== undefined && slave.custom.title !== "") { V.titleEnunciate = slave.custom.title; } + if (slave.custom.title !== undefined && slave.custom.title !== "") { + V.titleEnunciate = slave.custom.title; + } if (V.PC.customTitle !== undefined) { V.writtenTitle = V.PC.customTitle; } else if (V.PC.title !== 0) { @@ -551,7 +562,9 @@ window.Enunciate = function Enunciate(slave) { } else { V.writtenTitle = "Mistress"; } - if (slave.custom.title !== undefined && slave.custom.title !== "" && slave.rudeTitle === 0) { V.writtenTitle = slave.custom.title; } + if (slave.custom.title !== undefined && slave.custom.title !== "" && slave.rudeTitle === 0) { + V.writtenTitle = slave.custom.title; + } V.sayEnunciate = "say"; V.sEnunciate = "s"; V.SEnunciate = "S"; @@ -604,7 +617,9 @@ window.fetishChangeChance = function fetishChangeChance(slave) { window.SlaveFullName = function SlaveFullName(slave) { const V = State.variables; const pair = slave.slaveSurname ? [slave.slaveName, slave.slaveSurname] : [slave.slaveName]; - if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2)) { pair.reverse(); } + if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2)) { + pair.reverse(); + } return pair.join(" "); }; @@ -615,14 +630,18 @@ window.SlaveFullName = function SlaveFullName(slave) { window.SlaveFullBirthName = function SlaveFullBirthName(slave) { const V = State.variables; const pair = slave.birthSurname ? [slave.birthName, slave.birthSurname] : [slave.birthName]; - if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2)) { pair.reverse(); } + if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(slave.nationality)) || (V.surnameOrder === 2)) { + pair.reverse(); + } return pair.join(" "); }; window.PlayerName = function PlayerName() { const V = State.variables; const names = V.PC.surname ? [V.PC.name, V.PC.surname] : [V.PC.name]; - if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(V.PC.nationality)) || (V.surnameOrder === 2)) { names.reverse(); } + if ((V.surnameOrder !== 1 && ["Cambodian", "Chinese", "Hungarian", "Japanese", "Korean", "Mongolian", "Taiwanese", "Vietnamese"].includes(V.PC.nationality)) || (V.surnameOrder === 2)) { + names.reverse(); + } return names.join(" "); }; @@ -2128,9 +2147,13 @@ window.faceIncrease = function faceIncrease(slave, amount) { r += `<span class="green">${His} face is now decently attractive,</span> rather than merely tolerable.`; } else if (slave.face <= 40 && slave.face + amount > 40) { r += `<span class="green">${His} face is now quite beautiful,</span> rather than merely pretty.`; - } else if (slave.face <= 95 && slave.face + amount > 95) { r += `<span class="green">${His} face is now perfect.</span> It's difficult to imagine how it could be any more beautiful.`; } + } else if (slave.face <= 95 && slave.face + amount > 95) { + r += `<span class="green">${His} face is now perfect.</span> It's difficult to imagine how it could be any more beautiful.`; + } slave.face = Math.clamp(slave.face + amount, -100, 100); - if (slave.face > 95) { slave.face = 100; } + if (slave.face > 95) { + slave.face = 100; + } return r; };