diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 65fb889bfd34362a0b2420ba368e42ee1c72d8bb..0c91e88911959b4a25d4f9824b4af120e0a169e1 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -3154,13 +3154,6 @@ window.Height = (function(){ return table[nationality + "." + race] || table[nationality] || table["." + race] || table[""] || def; }; - // Helper method - generate two independent Gaussian numbers using Box-Muller transform - const gaussianPair = function() { - let r = Math.sqrt(-2.0 * Math.log(1 - Math.random())); - let sigma = 2.0 * Math.PI * (1 - Math.random()); - return [r * Math.cos(sigma), r * Math.sin(sigma)]; - }; - // Helper method: Generate a skewed normal random variable with the skew s // Reference: http://azzalini.stat.unipd.it/SN/faq-r.html const skewedGaussian = function(s) { @@ -3300,6 +3293,125 @@ window.Height = (function(){ }; })(); +/* + * Intelligence.random(options) - returns a random intelligence. If no options are passed, the generated number + * will be on a normal distribution with mean 0 and standard deviation 45. + * + * Example: Only generate above-average intelligence based on $activeSlave: + * Intelligence.random({limitIntelligence: [0, 100]}) + * + * Intelligence.config(configuration) - configures the random height generator globally and returns the current configuration + * + * The options and their default values are: + * mean: 0 - What the average intelligence will be. Increasing this will make it more likely + * to generate a smart slave, but will not guarantee it. + * Minimum value: -100, maximum value: 100 + * limitMult: [-3, 3] - Limit to this many standard deviations from the mean. + * In normal use, the values are almost never reached; only 0.27% of values are + * outside this range and need to be regenerated. With higher skew (see below), + * this might change. + * spread: 45 - The random standard deviation of the calculated distribution. A higher value + * will make it more likely to have extreme values, a lower value will make any + * generated values cluster around the mean. If spread is 0, it will always return the mean. + * skew: 0 - How much the height distribution skews to the right (positive) or left (negative) side + * of the height. Unless you have a very specific reason, you should not need to change this. + * Minimum value: -1000, maximum value: 1000 + * limitIntelligence: [-100,100] - Limit the resulting height range. + * Warning: A small intelligence limit range not containing the + * mean, and with a low spread value results in the generator + * having to do lots of work generating and re-generating random + * intelligences until one "fits". + * + * This was modeled using the Height generator above. For some more information, see the comments for that. + */ +window.Intelligence = (function(){ + 'use strict'; + + // Global configuration (for different game modes/options/types) + var mean = 0; + var minMult = -3.0; + var maxMult = 3.0; + var skew = 0.0; + var spread = 45; + var minIntelligence = -101; + var maxIntelligence = 100; + + // Configuration method for the above values + const _config = function(conf) { + if(_.isUndefined(conf)) { + return {mean: mean, limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread}; + } + if(_.isFinite(conf.mean)) { mean = Math.clamp(conf.mean, -100, 100); } + if(_.isFinite(conf.skew)) { skew = Math.clamp(conf.skew, -1000, 1000); } + if(_.isFinite(conf.spread)) { spread = Math.clamp(conf.spread, 0.1, 100); } + if(_.isArray(conf.limitMult) && conf.limitMult.length === 2 && conf.limitMult[0] !== conf.limitMult[1] && + _.isFinite(conf.limitMult[0]) && _.isFinite(conf.limitMult[1])) { + minMult = Math.min(conf.limitMult[0], conf.limitMult[1]); + maxMult = Math.max(conf.limitMult[0], conf.limitMult[1]); + } + if(_.isArray(conf.limitIntelligence) && conf.limitIntelligence.length === 2 && conf.limitIntelligence[0] !== conf.limitIntelligence[1] && + _.isFinite(conf.limitIntelligence[0]) && _.isFinite(conf.limitIntelligence[1])) { + minIntelligence = Math.clamp(Math.min(conf.limitIntelligence[0], conf.limitIntelligence[1]),-101,100); + maxIntelligence = Math.clamp(Math.max(conf.limitIntelligence[0], conf.limitIntelligence[1]),-101,100); + } + return {limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread}; + }; + + // Helper method: Generate a skewed normal random variable with the skew s + // Reference: http://azzalini.stat.unipd.it/SN/faq-r.html + const skewedGaussian = function(s) { + let randoms = gaussianPair(); + if(s === 0) { + // Don't bother, return an unskewed normal distribution + return randoms[0]; + } + let delta = s / Math.sqrt(1 + s * s); + let result = delta * randoms[0] + Math.sqrt(1 - delta * delta) * randoms[1]; + return randoms[0] >= 0 ? result : -result; + }; + + // Intelligence multiplier generator; skewed gaussian according to global parameters + const multGenerator = function() { + let result = skewedGaussian(skew); + while(result < minMult || result > maxMult) { + result = skewedGaussian(skew); + } + return result; + }; + + // Helper method: Transform the values from multGenerator to have the appropriate mean and standard deviation. + const intelligenceGenerator = function() { + let result = multGenerator() * spread + mean; + while(result < minIntelligence || result > maxIntelligence) { + result = multGenerator() * spread + mean; + } + return Math.ceil(result); + }; + + const _randomIntelligence = function(settings) { + if (settings) { + const currentConfig = _config(); + _config(settings); + const result = intelligenceGenerator(); + _config(currentConfig); + return result; + } + return intelligenceGenerator(); + }; + + return { + random: _randomIntelligence, + config: _config, + }; +})(); + +// Helper method - generate two independent Gaussian numbers using Box-Muller transform +window.gaussianPair = function() { + let r = Math.sqrt(-2.0 * Math.log(1 - Math.random())); + let sigma = 2.0 * Math.PI * (1 - Math.random()); + return [r * Math.cos(sigma), r * Math.sin(sigma)]; +}; + if(!Array.prototype.findIndex) { Array.prototype.findIndex = function(predicate) { if (this == null) { @@ -30904,9 +31016,10 @@ window.Count = function() { T.Base = S.Firebase + S.Armoury + S.Drugs + S.Drones + T.H+T.SFF; T.BaseU = T.FU + T.AU + T.DrugsU + T.DU + T.HU+T.SFFU; } - if (V.terrain !== "oceanic") T.LBU += T.GRU, T.LB += S.GiantRobot, T.Base += T.G, T.BaseU += T.GU; - T.max = T.BaseU + T.LBU, V.SF.Units = T.Base + T.LB; - if (V.terrain === "oceanic" || V.terrain === "marine") { + T.max = T.BaseU, V.SF.Units = T.Base; + if (V.terrain !== "oceanic") { T.LBU += T.GRU, T.LB += S.GiantRobot, T.Base += T.G, T.BaseU += T.GU; + T.max += T.LBU, V.SF.Units += T.LB; + } else { T.NY = S.AircraftCarrier + S.Sub + S.HAT, V.SF.Units += T.NY; T.NYU = T.ACU + T.SubU + T.HATU, T.max += T.NYU;} V.SF.Units = C(V.SF.Units, 0, T.max); diff --git a/src/SpecialForce/JS.js b/src/SpecialForce/JS.js index 0f51ed8ece7a7fd65337a9552f15f3ed6e7f8fa7..a5e26db86e9285fc68a448f9c6c509d56a0d92ea 100644 --- a/src/SpecialForce/JS.js +++ b/src/SpecialForce/JS.js @@ -68,8 +68,9 @@ window.Count = function() { T.Base = S.Firebase + S.Armoury + S.Drugs + S.Drones + T.H+T.SFF; T.BaseU = T.FU + T.AU + T.DrugsU + T.DU + T.HU+T.SFFU; } + T.max = T.BaseU, V.SF.Units = T.Base; if (V.terrain !== "oceanic") { T.LBU += T.GRU, T.LB += S.GiantRobot, T.Base += T.G, T.BaseU += T.GU; - T.max = T.BaseU + T.LBU, V.SF.Units = T.Base + T.LB; + T.max += T.LBU, V.SF.Units += T.LB; } else { T.NY = S.AircraftCarrier + S.Sub + S.HAT, V.SF.Units += T.NY; T.NYU = T.ACU + T.SubU + T.HATU, T.max += T.NYU;} diff --git a/src/cheats/mod_EditFSCheat.tw b/src/cheats/mod_EditFSCheat.tw index 46c86f0776dce6bd5f8fd725377790302b48ea1c..d37eb895bf33bf6baab40bf0692e6b4965c39355 100644 --- a/src/cheats/mod_EditFSCheat.tw +++ b/src/cheats/mod_EditFSCheat.tw @@ -23,17 +23,17 @@ | <<radiobutton "$arcologies[0].FSSupremacistLawME" 1>> 1 (Passed.) <br>Supremacist Race: - <<radiobutton "$arcologies[0].FSSupremacistRace" white>> White | - <<radiobutton "$arcologies[0].FSSupremacistRace" asian>> Asian | - <<radiobutton "$arcologies[0].FSSupremacistRace" latina>> Latina | - <<radiobutton "$arcologies[0].FSSupremacistRace" middle eastern>> Middle Eastern | - <<radiobutton "$arcologies[0].FSSupremacistRace" black>> Black | - <<radiobutton "$arcologies[0].FSSupremacistRace" indo-aryan>> Indo-Aryan | - <<radiobutton "$arcologies[0].FSSupremacistRace" amerindian>> Amerindian | - <<radiobutton "$arcologies[0].FSSupremacistRace" pacific islander>> Pacific Islander | - <<radiobutton "$arcologies[0].FSSupremacistRace" southern european>> Southern European | - <<radiobutton "$arcologies[0].FSSupremacistRace" semitic>> Semitic | - <<radiobutton "$arcologies[0].FSSupremacistRace" mixed race>> Mixed Race + <<radiobutton "$arcologies[0].FSSupremacistRace" "white">> White | + <<radiobutton "$arcologies[0].FSSupremacistRace" "asian">> Asian | + <<radiobutton "$arcologies[0].FSSupremacistRace" "latina">> Latina | + <<radiobutton "$arcologies[0].FSSupremacistRace" "middle eastern">> Middle Eastern | + <<radiobutton "$arcologies[0].FSSupremacistRace" "black">> Black | + <<radiobutton "$arcologies[0].FSSupremacistRace" "indo-aryan">> Indo-Aryan | + <<radiobutton "$arcologies[0].FSSupremacistRace" "amerindian">> Amerindian | + <<radiobutton "$arcologies[0].FSSupremacistRace" "pacific islander">> Pacific Islander | + <<radiobutton "$arcologies[0].FSSupremacistRace" "southern european">> Southern European | + <<radiobutton "$arcologies[0].FSSupremacistRace" "semitic">> Semitic | + <<radiobutton "$arcologies[0].FSSupremacistRace" "mixed race">> Mixed Race <br>[[Apply and reset Racial Subjugationism|MOD_Edit FS Cheat][$arcologies[0].FSSubjugationist = "unset", $arcologies[0].FSSubjugationistRace = 0, $arcologies[0].FSSubjugationistDecoration = 20, $arcologies[0].FSSubjugationistLawME = 0]] @@ -59,17 +59,17 @@ | <<radiobutton "$arcologies[0].FSSubjugationistLawME" 1>> 1 (Passed.) <br>Subjugationist Race: - <<radiobutton "$arcologies[0].FSSubjugationistRace" white>> White | - <<radiobutton "$arcologies[0].FSSubjugationistRace" asian>> Asian | - <<radiobutton "$arcologies[0].FSSubjugationistRace" latina>> Latina | - <<radiobutton "$arcologies[0].FSSubjugationistRace" middle eastern>> Middle Eastern | - <<radiobutton "$arcologies[0].FSSubjugationistRace" black>> Black | - <<radiobutton "$arcologies[0].FSSubjugationistRace" indo-aryan>> Indo-Aryan | - <<radiobutton "$arcologies[0].FSSubjugationistRace" amerindian>> Amerindian | - <<radiobutton "$arcologies[0].FSSubjugationistRace" pacific islander>> Pacific Islander | - <<radiobutton "$arcologies[0].FSSubjugationistRace" southern european>> Southern European | - <<radiobutton "$arcologies[0].FSSubjugationistRace" semitic>> Semitic | - <<radiobutton "$arcologies[0].FSSubjugationistRace" mixed race>> Mixed Race + <<radiobutton "$arcologies[0].FSSubjugationistRace" "white">> White | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "asian">> Asian | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "latina">> Latina | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "middle eastern">> Middle Eastern | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "black">> Black | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "indo-aryan">> Indo-Aryan | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "amerindian">> Amerindian | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "pacific islander">> Pacific Islander | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "southern european">> Southern European | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "semitic">> Semitic | + <<radiobutton "$arcologies[0].FSSubjugationistRace" "mixed race">> Mixed Race <br>[[Apply and reset Racial Supremacy|MOD_Edit FS Cheat][$arcologies[0].FSSupremacist = "unset",$arcologies[0].FSSupremacistRace = 0, $arcologies[0].FSSupremacistDecoration = 20, $arcologies[0].FSSupremacistLawME = 0]] diff --git a/src/cheats/mod_EditNeighborArcologyCheatWidget.tw b/src/cheats/mod_EditNeighborArcologyCheatWidget.tw index 99339244154c6a3ef6edd942b4e7973ed6bd89de..2143602b253485603f15ed60da71da1a418778ac 100644 --- a/src/cheats/mod_EditNeighborArcologyCheatWidget.tw +++ b/src/cheats/mod_EditNeighborArcologyCheatWidget.tw @@ -68,17 +68,17 @@ <br> '' $arcologies[_i].name Supremacist race:'' $arcologies[_i].FSSupremacistRace - <br><<radiobutton "$arcologies[_i].FSSupremacistRace" white>> White | - <<radiobutton "$arcologies[_i].FSSupremacistRace" asian>> Asian | - <<radiobutton "$arcologies[_i].FSSupremacistRace" latina>> Latina | - <<radiobutton "$arcologies[_i].FSSupremacistRace" middle eastern>> Middle Eastern | - <<radiobutton "$arcologies[_i].FSSupremacistRace" black>> Black | - <<radiobutton "$arcologies[_i].FSSupremacistRace" indo-aryan>> Indo-Aryan | - <<radiobutton "$arcologies[_i].FSSupremacistRace" amerindian>> Amerindian | - <<radiobutton "$arcologies[_i].FSSupremacistRace" pacific islander>> Pacific Islander | - <<radiobutton "$arcologies[_i].FSSupremacistRace" southern european>> Southern European | - <<radiobutton "$arcologies[_i].FSSupremacistRace" semitic>> Semitic | - <<radiobutton "$arcologies[_i].FSSupremacistRace" mixed race>> Mixed Race + <br><<radiobutton "$arcologies[_i].FSSupremacistRace" "white">> White | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "asian">> Asian | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "latina">> Latina | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "middle eastern">> Middle Eastern | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "black">> Black | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "indo-aryan">> Indo-Aryan | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "amerindian">> Amerindian | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "pacific islander">> Pacific Islander | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "southern european">> Southern European | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "semitic">> Semitic | + <<radiobutton "$arcologies[_i].FSSupremacistRace" "mixed race">> Mixed Race <br> @@ -88,17 +88,17 @@ <br> '' $arcologies[_i].name Subjugationist race:'' $arcologies[_i].FSSubjugationistRace - <br><<radiobutton "$arcologies[_i].FSSubjugationistRace" white>> White | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" asian>> Asian | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" latina>> Latina | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" middle eastern>> Middle Eastern | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" black>> Black | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" indo-aryan>> Indo-Aryan | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" amerindian>> Amerindian | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" pacific islander>> Pacific Islander | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" southern european>> Southern European | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" semitic>> Semitic | - <<radiobutton "$arcologies[_i].FSSubjugationistRace" mixed race>> Mixed Race + <br><<radiobutton "$arcologies[_i].FSSubjugationistRace" "white">> White | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "asian">> Asian | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "latina">> Latina | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "middle eastern">> Middle Eastern | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "black">> Black | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "indo-aryan">> Indo-Aryan | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "amerindian">> Amerindian | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "pacific islander">> Pacific Islander | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "southern european">> Southern European | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "semitic">> Semitic | + <<radiobutton "$arcologies[_i].FSSubjugationistRace" "mixed race">> Mixed Race <br> diff --git a/src/cheats/mod_EditSlaveCheat.tw b/src/cheats/mod_EditSlaveCheat.tw index d9da6d383726ad4a694316edd8eed4363b86af99..bf0d33ac8e559a90f5eda0231809cab153d34b9a 100644 --- a/src/cheats/mod_EditSlaveCheat.tw +++ b/src/cheats/mod_EditSlaveCheat.tw @@ -366,12 +366,12 @@ Custom sclera color: <<textbox "$tempSlave.sclerae" $tempSlave.sclerae>> ''Face Shape: $tempSlave.faceShape |'' <<textbox "$tempSlave.faceShape" $tempSlave.faceShape>> <br> -<<radiobutton "$tempSlave.faceShape" masculine>> Masculine -<<radiobutton "$tempSlave.faceShape" androgynous>> Androgynous -<<radiobutton "$tempSlave.faceShape" normal>> Normal -<<radiobutton "$tempSlave.faceShape" cute>> Cute -<<radiobutton "$tempSlave.faceShape" sensual>> Sensual -<<radiobutton "$tempSlave.faceShape" exotic>> Exotic +<<radiobutton "$tempSlave.faceShape" "masculine">> Masculine +<<radiobutton "$tempSlave.faceShape" "androgynous">> Androgynous +<<radiobutton "$tempSlave.faceShape" "normal">> Normal +<<radiobutton "$tempSlave.faceShape" "cute">> Cute +<<radiobutton "$tempSlave.faceShape" "sensual">> Sensual +<<radiobutton "$tempSlave.faceShape" "exotic">> Exotic <br> @@ -389,11 +389,11 @@ Custom sclera color: <<textbox "$tempSlave.sclerae" $tempSlave.sclerae>> ''Natural Skin Distinctiveness: $tempSlave.markings |'' <<textbox "$tempSlave.markings" $tempSlave.markings>> <br> -<<radiobutton "$tempSlave.markings" none>> None -<<radiobutton "$tempSlave.markings" freckles>> Freckles -<<radiobutton "$tempSlave.markings" heavily freckled>> Heavy Freckles -<<radiobutton "$tempSlave.markings" beauty mark>> Beauty Mark -<<radiobutton "$tempSlave.markings" birthmark>> Birth Mark +<<radiobutton "$tempSlave.markings" "none">> None +<<radiobutton "$tempSlave.markings" "freckles">> Freckles +<<radiobutton "$tempSlave.markings" "heavily freckled">> Heavy Freckles +<<radiobutton "$tempSlave.markings" "beauty mark">> Beauty Mark +<<radiobutton "$tempSlave.markings" "birthmark">> Birth Mark <br> @@ -484,17 +484,17 @@ Unskilled. <<textbox "$tempSlave.teeth" $tempSlave.teeth>> <br> <<if $tempSlave.physicalAge >= 12>> - <<radiobutton "$tempSlave.teeth" normal>> Normal + <<radiobutton "$tempSlave.teeth" "normal">> Normal <<elseif $tempSlave.physicalAge >= 6>> - <<radiobutton "$tempSlave.teeth" mixed>> Mixed + <<radiobutton "$tempSlave.teeth" "mixed">> Mixed <<else>> - <<radiobutton "$tempSlave.teeth" baby>> Baby + <<radiobutton "$tempSlave.teeth" "baby">> Baby <</if>> -<<radiobutton "$tempSlave.teeth" pointy>> Pointy -<<radiobutton "$tempSlave.teeth" crooked>> Crooked -<<radiobutton "$tempSlave.teeth" straightening braces>> Straightening Braces -<<radiobutton "$tempSlave.teeth" cosmetic braces>> Cosmetic Braces -<<radiobutton "$tempSlave.teeth" removable>> Removable +<<radiobutton "$tempSlave.teeth" "pointy">> Pointy +<<radiobutton "$tempSlave.teeth" "crooked">> Crooked +<<radiobutton "$tempSlave.teeth" "straightening braces">> Straightening Braces +<<radiobutton "$tempSlave.teeth" "cosmetic braces">> Cosmetic Braces +<<radiobutton "$tempSlave.teeth" "removable">> Removable <br> ''Voice (0,1,2,3): $tempSlave.voice |'' diff --git a/src/cheats/mod_editSlaveCheatNew.tw b/src/cheats/mod_editSlaveCheatNew.tw index 4b8828269a38cf2c4b63f8fb7fad2228c1d3a0db..174e54fa224e635b099dd7791df96fdf4e0f459c 100644 --- a/src/cheats/mod_editSlaveCheatNew.tw +++ b/src/cheats/mod_editSlaveCheatNew.tw @@ -1416,12 +1416,12 @@ ''Face Shape: @@.yellow;$tempSlave.faceShape@@ '' <br> - <<radiobutton "$tempSlave.faceShape" masculine>> Masculine - <<radiobutton "$tempSlave.faceShape" androgynous>> Androgynous - <<radiobutton "$tempSlave.faceShape" normal>> Normal - <<radiobutton "$tempSlave.faceShape" cute>> Cute - <<radiobutton "$tempSlave.faceShape" sensual>> Sensual - <<radiobutton "$tempSlave.faceShape" exotic>> Exotic + <<radiobutton "$tempSlave.faceShape" "masculine">> Masculine + <<radiobutton "$tempSlave.faceShape" "androgynous">> Androgynous + <<radiobutton "$tempSlave.faceShape" "normal">> Normal + <<radiobutton "$tempSlave.faceShape" "cute">> Cute + <<radiobutton "$tempSlave.faceShape" "sensual">> Sensual + <<radiobutton "$tempSlave.faceShape" "exotic">> Exotic <br><br> ''Face Implant (0 to 100):'' @@ -1442,11 +1442,11 @@ ''Natural Skin Distinctiveness: @@.yellow;$tempSlave.markings@@ '' <br> - <<radiobutton "$tempSlave.markings" none>> None - <<radiobutton "$tempSlave.markings" freckles>> Freckles - <<radiobutton "$tempSlave.markings" heavily freckled>> Heavy Freckles - <<radiobutton "$tempSlave.markings" beauty mark>> Beauty Mark - <<radiobutton "$tempSlave.markings" birthmark>> Birth Mark + <<radiobutton "$tempSlave.markings" "none">> None + <<radiobutton "$tempSlave.markings" "freckles">> Freckles + <<radiobutton "$tempSlave.markings" "heavily freckled">> Heavy Freckles + <<radiobutton "$tempSlave.markings" "beauty mark">> Beauty Mark + <<radiobutton "$tempSlave.markings" "birthmark">> Birth Mark <br><br> ''Her hearing is :'' @@ -1920,17 +1920,17 @@ ''Teeth: @@.yellow;$tempSlave.teeth@@ '' <br> <<if $tempSlave.physicalAge >= 12>> - <<radiobutton "$tempSlave.teeth" normal>> Normal + <<radiobutton "$tempSlave.teeth" "normal">> Normal <<elseif $tempSlave.physicalAge >= 6>> - <<radiobutton "$tempSlave.teeth" mixed>> Mixed + <<radiobutton "$tempSlave.teeth" "mixed">> Mixed <<else>> - <<radiobutton "$tempSlave.teeth" baby>> Baby + <<radiobutton "$tempSlave.teeth" "baby">> Baby <</if>> - <<radiobutton "$tempSlave.teeth" pointy>> Pointy - <<radiobutton "$tempSlave.teeth" crooked>> Crooked - <<radiobutton "$tempSlave.teeth" straightening braces>> Straightening Braces - <<radiobutton "$tempSlave.teeth" cosmetic braces>> Cosmetic Braces - <<radiobutton "$tempSlave.teeth" removable>> Removable + <<radiobutton "$tempSlave.teeth" "pointy">> Pointy + <<radiobutton "$tempSlave.teeth" "crooked">> Crooked + <<radiobutton "$tempSlave.teeth" "straightening braces">> Straightening Braces + <<radiobutton "$tempSlave.teeth" "cosmetic braces">> Cosmetic Braces + <<radiobutton "$tempSlave.teeth" "removable">> Removable <br><br> diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index 9fe71b5d97dc3117d1fc068bdf5f1928703feaa7..893ad5059b55f01143c5f7689da78562e3c10dd5 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -1017,11 +1017,12 @@ __''Mods''__ ''disabled.'' [[Enable|Intro Summary][$SF.Toggle = 1]] <<else>> ''enabled.'' [[Disable|Intro Summary][$SF.Toggle = 0]] + <br> The support facility is <<if ($SF.Facility.Toggle === 0)>> @@.red;DISABLED@@. [[Enable|Intro Summary][$SF.Facility.Toggle = 1]] <<else>> @@.cyan;ENABLED@@. [[Disable|Intro Summary][$SF.Facility.Toggle = 0]] - <</if>> + <</if>> //Prep for future content. <</if>> <br>// This mod is initially from anon1888 but expanded by SFanon offers a lategame special (started out as security but changed to special in order to try and reduce confusion with CrimeAnon's separate Security Expansion (SecExp) mod) force, that is triggered after week 80. It is non-canon where it conflicts with canonical updates to the base game.// <br><br> diff --git a/src/js/utilJS.tw b/src/js/utilJS.tw index 18549d4aa775c47dcff17da733c7cbd37892327b..59530845c7604474bba3a94f0d8c508dd1c6250f 100644 --- a/src/js/utilJS.tw +++ b/src/js/utilJS.tw @@ -144,13 +144,6 @@ window.Height = (function(){ return table[nationality + "." + race] || table[nationality] || table["." + race] || table[""] || def; }; - // Helper method - generate two independent Gaussian numbers using Box-Muller transform - const gaussianPair = function() { - let r = Math.sqrt(-2.0 * Math.log(1 - Math.random())); - let sigma = 2.0 * Math.PI * (1 - Math.random()); - return [r * Math.cos(sigma), r * Math.sin(sigma)]; - }; - // Helper method: Generate a skewed normal random variable with the skew s // Reference: http://azzalini.stat.unipd.it/SN/faq-r.html const skewedGaussian = function(s) { @@ -290,6 +283,125 @@ window.Height = (function(){ }; })(); +/* + * Intelligence.random(options) - returns a random intelligence. If no options are passed, the generated number + * will be on a normal distribution with mean 0 and standard deviation 45. + * + * Example: Only generate above-average intelligence based on $activeSlave: + * Intelligence.random({limitIntelligence: [0, 100]}) + * + * Intelligence.config(configuration) - configures the random height generator globally and returns the current configuration + * + * The options and their default values are: + * mean: 0 - What the average intelligence will be. Increasing this will make it more likely + * to generate a smart slave, but will not guarantee it. + * Minimum value: -100, maximum value: 100 + * limitMult: [-3, 3] - Limit to this many standard deviations from the mean. + * In normal use, the values are almost never reached; only 0.27% of values are + * outside this range and need to be regenerated. With higher skew (see below), + * this might change. + * spread: 45 - The random standard deviation of the calculated distribution. A higher value + * will make it more likely to have extreme values, a lower value will make any + * generated values cluster around the mean. If spread is 0, it will always return the mean. + * skew: 0 - How much the height distribution skews to the right (positive) or left (negative) side + * of the height. Unless you have a very specific reason, you should not need to change this. + * Minimum value: -1000, maximum value: 1000 + * limitIntelligence: [-100,100] - Limit the resulting height range. + * Warning: A small intelligence limit range not containing the + * mean, and with a low spread value results in the generator + * having to do lots of work generating and re-generating random + * intelligences until one "fits". + * + * This was modeled using the Height generator above. For some more information, see the comments for that. + */ +window.Intelligence = (function(){ + 'use strict'; + + // Global configuration (for different game modes/options/types) + var mean = 0; + var minMult = -3.0; + var maxMult = 3.0; + var skew = 0.0; + var spread = 45; + var minIntelligence = -101; + var maxIntelligence = 100; + + // Configuration method for the above values + const _config = function(conf) { + if(_.isUndefined(conf)) { + return {mean: mean, limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread}; + } + if(_.isFinite(conf.mean)) { mean = Math.clamp(conf.mean, -100, 100); } + if(_.isFinite(conf.skew)) { skew = Math.clamp(conf.skew, -1000, 1000); } + if(_.isFinite(conf.spread)) { spread = Math.clamp(conf.spread, 0.1, 100); } + if(_.isArray(conf.limitMult) && conf.limitMult.length === 2 && conf.limitMult[0] !== conf.limitMult[1] && + _.isFinite(conf.limitMult[0]) && _.isFinite(conf.limitMult[1])) { + minMult = Math.min(conf.limitMult[0], conf.limitMult[1]); + maxMult = Math.max(conf.limitMult[0], conf.limitMult[1]); + } + if(_.isArray(conf.limitIntelligence) && conf.limitIntelligence.length === 2 && conf.limitIntelligence[0] !== conf.limitIntelligence[1] && + _.isFinite(conf.limitIntelligence[0]) && _.isFinite(conf.limitIntelligence[1])) { + minIntelligence = Math.clamp(Math.min(conf.limitIntelligence[0], conf.limitIntelligence[1]),-101,100); + maxIntelligence = Math.clamp(Math.max(conf.limitIntelligence[0], conf.limitIntelligence[1]),-101,100); + } + return {limitMult: [minMult, maxMult], limitIntelligence: [minIntelligence, maxIntelligence], skew: skew, spread: spread}; + }; + + // Helper method: Generate a skewed normal random variable with the skew s + // Reference: http://azzalini.stat.unipd.it/SN/faq-r.html + const skewedGaussian = function(s) { + let randoms = gaussianPair(); + if(s === 0) { + // Don't bother, return an unskewed normal distribution + return randoms[0]; + } + let delta = s / Math.sqrt(1 + s * s); + let result = delta * randoms[0] + Math.sqrt(1 - delta * delta) * randoms[1]; + return randoms[0] >= 0 ? result : -result; + }; + + // Intelligence multiplier generator; skewed gaussian according to global parameters + const multGenerator = function() { + let result = skewedGaussian(skew); + while(result < minMult || result > maxMult) { + result = skewedGaussian(skew); + } + return result; + }; + + // Helper method: Transform the values from multGenerator to have the appropriate mean and standard deviation. + const intelligenceGenerator = function() { + let result = multGenerator() * spread + mean; + while(result < minIntelligence || result > maxIntelligence) { + result = multGenerator() * spread + mean; + } + return Math.ceil(result); + }; + + const _randomIntelligence = function(settings) { + if (settings) { + const currentConfig = _config(); + _config(settings); + const result = intelligenceGenerator(); + _config(currentConfig); + return result; + } + return intelligenceGenerator(); + }; + + return { + random: _randomIntelligence, + config: _config, + }; +})(); + +// Helper method - generate two independent Gaussian numbers using Box-Muller transform +window.gaussianPair = function() { + let r = Math.sqrt(-2.0 * Math.log(1 - Math.random())); + let sigma = 2.0 * Math.PI * (1 - Math.random()); + return [r * Math.cos(sigma), r * Math.sin(sigma)]; +}; + if(!Array.prototype.findIndex) { Array.prototype.findIndex = function(predicate) { if (this == null) { diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index d52fd51c7c70aeb8230cfca89c9a7f66f1d27ea7..16891318b0af18041e0a6bd4ae4f50707c610836 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -1278,13 +1278,21 @@ <<elseif ndef $arcologies[0].FSSupremacist>> <<set $arcologies[0].FSSupremacist = "unset">> <</if>> - <<if def $FSSupremacistLawME && $FSSupremacistLawME != 0>> <<set $arcologies[0].FSSupremacistLawME = $FSSupremacistLawME>> <<unset $FSSupremacistLawME>> <<elseif ndef $arcologies[0].FSSupremacistLawME>> <<set $arcologies[0].FSSupremacistLawME = 0>> <</if>> +<<if $arcologies[0].FSSupremacistRace == "middle">> + <<set $arcologies[0].FSSupremacistRace = "middle eastern">> +<<elseif $arcologies[0].FSSupremacistRace == "pacific">> + <<set $arcologies[0].FSSupremacistRace = "pacific islander">> +<<elseif $arcologies[0].FSSupremacistRace == "southern">> + <<set $arcologies[0].FSSupremacistRace = "southern european">> +<<elseif $arcologies[0].FSSupremacistRace == "mixed">> + <<set $arcologies[0].FSSupremacistRace = "mixed race">> +<</if>> <<if def $FSSubjugationist && $FSSubjugationist != "unset">> <<set $arcologies[0].FSSubjugationist = $FSSubjugationist>> @@ -1294,13 +1302,21 @@ <<elseif ndef $arcologies[0].FSSubjugationist>> <<set $arcologies[0].FSSubjugationist = "unset">> <</if>> - <<if def $FSSubjugationistLawME && $FSSubjugationistLawME != 0>> <<set $arcologies[0].FSSubjugationistLawME = $FSSubjugationistLawME>> <<unset $FSSubjugationistLawME>> <<elseif ndef $arcologies[0].FSSubjugationistLawME>> <<set $arcologies[0].FSSubjugationistLawME = 0>> <</if>> +<<if $arcologies[0].FSSubjugationistRace == "middle">> + <<set $arcologies[0].FSSubjugationistRace = "middle eastern">> +<<elseif $arcologies[0].FSSubjugationistRace == "pacific">> + <<set $arcologies[0].FSSubjugationistRace = "pacific islander">> +<<elseif $arcologies[0].FSSubjugationistRace == "southern">> + <<set $arcologies[0].FSSubjugationistRace = "southern european">> +<<elseif $arcologies[0].FSSubjugationistRace == "mixed">> + <<set $arcologies[0].FSSubjugationistRace = "mixed race">> +<</if>> <<if def $FSDegradationist && $FSDegradationist != "unset">> <<set $arcologies[0].FSDegradationist = $FSDegradationist>> @@ -2699,6 +2715,12 @@ Setting missing slave variables: <<set _Slave.faceShape = "normal">> <</if>> +<<if _Slave.markings == "heavily">> + <<set _Slave.markings = "heavily freckled">> +<<elseif _Slave.markings == "beauty">> + <<set _Slave.markings = "beauty mark">> +<</if>> + <<if ndef _Slave.customTitle>> <<set _Slave.customTitle = "">> <</if>> @@ -2757,6 +2779,10 @@ Setting missing slave variables: <<if _Slave.teeth == 0>> <<set _Slave.teeth = "normal">> +<<elseif _Slave.teeth == "straightening">> + <<set _Slave.teeth = "straightening braces">> +<<elseif _Slave.teeth == "cosmetic">> + <<set _Slave.teeth = "cosmetic braces">> <</if>> <<if ndef _Slave.boobShape>> diff --git a/src/uncategorized/RETS.tw b/src/uncategorized/RETS.tw index b21d76b03b2233642a187bb51b2946acaaac3c00..16b8a0565b96bcae4a01f3cc3d89357fc181c126 100644 --- a/src/uncategorized/RETS.tw +++ b/src/uncategorized/RETS.tw @@ -310,7 +310,7 @@ After you complete your weekly inspection of <<EventNameLink $activeSlave>>, the $desc asks if $he can beg a favor. Absurd though it sounds, $he does exactly that, saying in $his <<if $activeSlave.voice > 2>>high<<elseif $activeSlave.voice > 1>>feminine<<else>>bimbo<</if>> voice, "<<Master>>, may I a<<s>>k a favor?" You take a moment to look at $him, standing there in front of your desk. $He's devoted to you, willing to please you for the sake of pleasing you, rather than to avoid punishment or make $his own life easier. And $he's very trusting, confident that $he can say such an odd thing without fear. So, you hear $him out. <br><br> -"Thank you, <<Master>>," $he <<say>>s. "I would like to do <<s>>omething for $subSlave.slaveName." You ask if $he's worried about $his <<if $activeSlave.relationship >= 5>>wife<<else>>girlfriend<</if>> for some reason. "Oh no, <<Master>>," $he answers hurriedly. "No, no, that came out wrong. It'<<s>> ju<<s>>t that I love <<him 2>> and I want to, you know, get <<him 2>> <<s>>omething or do <<s>>omething <<s>>pe<<c>>ial for <<him 2>>. We don't really have <<s>>tuff of our own, <<s>>o I can't give <<him 2>> a pre<<s>>ent, and we already do everything either one of u<<s>> want<<s>> in bed, <<s>>o I can't really think of anything." $He <<if canSee($activeSlave)>>looks<<else>>gazes<</if>> at you hopefully. +"Thank you, <<Master>>," $he <<say>>s. "I would like to do <<s>>omething for $subSlave.slaveName." You ask if $he's worried about $his <<if $activeSlave.relationship >= 5>>wife<<else>>girlfriend<</if>> for some reason. "Oh no, <<Master>>," $he answers hurriedly. "No, no, that came out wrong. It'<<s>> ju<<s>>t that I love _him2 and I want to, you know, get _him2 <<s>>omething or do <<s>>omething <<s>>pe<<c>>ial for _him2. We don't really have <<s>>tuff of our own, <<s>>o I can't give _him2 a pre<<s>>ent, and we already do everything either one of u<<s>> want<<s>> in bed, <<s>>o I can't really think of anything." $He <<if canSee($activeSlave)>>looks<<else>>gazes<</if>> at you hopefully. <<case "anal cowgirl">> @@ -364,20 +364,20 @@ Surprisingly, the slave on top doesn't seem too unhappy with this. _He2's no sla breathlessly, doing _his2 best to greet you properly despite the bouncing. <br><br> $activeSlave.slaveName stops thrusting, and $his <<if $activeSlave.face > 95>>gorgeous<<elseif $activeSlave.face >= -10>>pretty<<else>>homely<</if>> face instantly appears, craning out from behind $subSlave.slaveName's back to see. "Oh, hi, <<Master>>!" $he says with a cheerful smile, <<if $activeSlave.muscles > 30>>not breathing hard at all despite bouncing a girl off $his crotch<<elseif $activeSlave.muscles > 5>>barely out of breath despite the effort<<else>>completely out of breath<</if>>. -"I <<if canSee($activeSlave)>><<s>>aw<<else>>heard<</if>> <<him>> going by, and I thought <<he>>'d look cute with <<if canPenetrate($activeSlave)>>my dick<<else>>a <<s>>trap-on<</if>> up <<his>> butthole, +"I <<if canSee($activeSlave)>><<s>>aw<<else>>heard<</if>> _him2 going by, and I thought <<he>>'d look cute with <<if canPenetrate($activeSlave)>>my dick<<else>>a <<s>>trap-on<</if>> up <<his>> butthole, <<if $universalRulesConsent == 0>> - <<s>>o I told <<him>> to get in here and take it." + <<s>>o I told _him2 to get in here and take it." <<else>> - <<s>>o I a<<s>>ked <<him>> to come in, and <<he>> did!" + <<s>>o I a<<s>>ked _him2 to come in, and <<he>> did!" <</if>> $He shrugs. <<if $activeSlave.fetish == "sadist">> "I thought <<he>> wa<<s>> going to whine and <<s>>truggle, but <<he>>'<<s>> kinda di<<ss>>appointing." <<elseif $activeSlave.fetish == "pregnancy" && $subSlave.belly >= 10000>> <<if $subSlave.bellyPreg >= 8000>> - "<<He>>'<<s>> <<s>>o pregnant, I ju<<s>>t had to fuck <<him>>. I'm <<s>>urpri<<s>>ed <<he>>'<<s>> enjoying it <<s>>o much." + "<<He>>'<<s>> <<s>>o pregnant, I ju<<s>>t had to fuck _him2. I'm <<s>>urpri<<s>>ed <<he>>'<<s>> enjoying it <<s>>o much." <<else>> - "<<His>> belly'<<s>> <<s>>o round, I ju<<s>>t had to fuck <<him>>. I ju<<s>>t wi<<sh>> <<he>> wa<<s>> pregnant." + "<<His>> belly'<<s>> <<s>>o round, I ju<<s>>t had to fuck _him2. I ju<<s>>t wi<<sh>> <<he>> wa<<s>> pregnant." <</if>> <<elseif $activeSlave.fetish == "buttslut">> "I like butt<<s>>e<<x>> <<s>>o much, it'<<s>> good to give back." @@ -735,20 +735,20 @@ $activeSlave.slaveName senses your presence above and behind $him, and twists $h <<elseif $activeSlave.fetishKnown && $activeSlave.fetish == "dom">> "The crying almo<<s>>t make<<s>> me feel bad, but fucking a bitch feel<<s>> <<s>>o, <<s>>o good," the dominant $desc admits conversationally. <<elseif $activeSlave.fetishKnown && $activeSlave.fetish == "pregnancy" && _vaginal == 1 && canImpreg($subSlave, $activeSlave)>> - "I couldn't help my<<s>>elf," the $desc admits. "<<He 2>>'d look <<s>>o pretty with a pregnant belly and I ju<<s>>t couldn't re<<s>>i<<s>>t giving <<him 2>> one. <<He 2>> tried to <<s>>ay <<he 2>> didn't want to be a mother, <<s>>o..." + "I couldn't help my<<s>>elf," the $desc admits. "<<He 2>>'d look <<s>>o pretty with a pregnant belly and I ju<<s>>t couldn't re<<s>>i<<s>>t giving _him2 one. <<He 2>> tried to <<s>>ay <<he 2>> didn't want to be a mother, <<s>>o..." <<elseif $activeSlave.energy > 95>> "I can't help my<<s>>elf," the nymphomaniac $desc admits breathlessly. "Thank you for letting me take what I need from the other girl<<s>>." <<elseif $activeSlave.energy > 60>> "I couldn't help my<<s>>elf," the $desc admits. "I wa<<s>> really, really horny and <<he 2>> was ju<<s>>t, um, there. And <<he 2>> tried to <<s>>ay no." <<else>> - "I know it'<<s>> not like me," the $desc admits. "But I a<<s>>ked <<him 2>>, like, mo<<s>>tly joking, and <<he 2>> tried to <<s>>ay no." + "I know it'<<s>> not like me," the $desc admits. "But I a<<s>>ked _him2, like, mo<<s>>tly joking, and <<he 2>> tried to <<s>>ay no." <</if>> <br><br> <<run Enunciate($subSlave)>> -$subSlave.slaveName <<if _vaginal>>looks out from under $activeSlave.slaveName<<else>>turns _his2 head<</if>> and <<if canSee($subSlave)>>looks at<<else>>faces<</if>> you too. "<<Master $subSlave>>, plea<<s>>e," _he2 begs. "P-plea<<s>>e, make <<him>> <<s>>-<<s>>top - mhhh -" $activeSlave.slaveName shuts _him2 up by <<if _vaginal>>kissing _his2 unwilling mouth<<else>>shoving _his2 face back against the floor<</if>>. Once $he has $subSlave.slaveName back under control, $activeSlave.slaveName slows $his thrusting, reaches around behind $himself, and <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>>spreads $his futa pussy for you.<<else>>pulls one asscheek aside to offer you $his anus. To make the offer extra clear, $he starts winking it lewdly.<</if>> +$subSlave.slaveName <<if _vaginal>>looks out from under $activeSlave.slaveName<<else>>turns _his2 head<</if>> and <<if canSee($subSlave)>>looks at<<else>>faces<</if>> you too. "<<Master $subSlave>>, plea<<s>>e," _he2 begs. "P-plea<<s>>e, make $him <<s>>-<<s>>top - mhhh -" $activeSlave.slaveName shuts _him2 up by <<if _vaginal>>kissing _his2 unwilling mouth<<else>>shoving _his2 face back against the floor<</if>>. Once $he has $subSlave.slaveName back under control, $activeSlave.slaveName slows $his thrusting, reaches around behind $himself, and <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>>spreads $his futa pussy for you.<<else>>pulls one asscheek aside to offer you $his anus. To make the offer extra clear, $he starts winking it lewdly.<</if>> <br><br> <<run Enunciate($activeSlave)>> -"Plea<<s>>e fuck me while I rape <<him 2>>, <<Master>>," $activeSlave.slaveName <<say>>s in a mockery of $subSlave.slaveName's <<if $subSlave.voice > 2>>high-pitched whining<<elseif $subSlave.voice > 1>>begging<<else>>deep-voiced begging<</if>>. "Ooh, or, plea<<s>>e, <<Master>>, may I flip <<him 2>> over? I'd love to feel <<if $PC.dick>>your cock in<<s>>ide <<him 2>> along<<s>>ide mine<<else>>that <<s>>trap-on you u<<s>>e in<<s>>ide <<him 2>> along<<s>>ide my cock<</if>>!" +"Plea<<s>>e fuck me while I rape _him2, <<Master>>," $activeSlave.slaveName <<say>>s in a mockery of $subSlave.slaveName's <<if $subSlave.voice > 2>>high-pitched whining<<elseif $subSlave.voice > 1>>begging<<else>>deep-voiced begging<</if>>. "Ooh, or, plea<<s>>e, <<Master>>, may I flip _him2 over? I'd love to feel <<if $PC.dick>>your cock in<<s>>ide _him2 along<<s>>ide mine<<else>>that <<s>>trap-on you u<<s>>e in<<s>>ide _him2 along<<s>>ide my cock<</if>>!" <br><br> <<run Enunciate($subSlave)>> "Plea<<s>>e, no," sobs $subSlave.slaveName. @@ -1689,7 +1689,7 @@ $he adds impishly. Hearing this, $subSlave.slaveName lets the breast pop free of <<replace "#result">> You order $activeSlave.slaveName to go back to what $he was doing. $He's a little disappointed you're not joining in, but $he obeys, pounding the crying $subSlave.slaveName without mercy. Then $activeSlave.slaveName feels the head of <<if $PC.dick>>your dick<<else>>a strap-on<</if>> brush $his butt. <<run Enunciate($activeSlave)>> - "Ooh!" $he squeals, @@.hotpink;pleased $he was wrong after all.@@ "Ye<<s>>, thank you, <<Master>>! Fuck me! Fuck me while I rape <<him 2>>!" Underneath $him, $subSlave.slaveName cries harder, even though $activeSlave.slaveName has to stop $his thrusting for a moment to let you inside. In fact, you reflect as you hammer $activeSlave.slaveName's <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>><<if $activeSlave.vagina > 2>>roomy<<elseif $activeSlave.vagina > 1>>delectable<<else>>tight little<</if>> cunt<<else>><<if $activeSlave.anus > 2>>gaping<<elseif $activeSlave.anus > 1>>relaxed<<else>>poor little<</if>> asspussy<</if>>, it's a little strange that $subSlave.slaveName @@.gold;seems to think this is worse@@ than just being raped by $activeSlave.slaveName. After all, having your <<if $PC.dick>>turgid cock<<else>>formidable strap-on<</if>> sliding energetically in and out of $his <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>>womanhood<<else>>rectum<</if>> is cramping $activeSlave.slaveName's style a bit. Maybe it's that $subSlave.slaveName is a little squashed under there. + "Ooh!" $he squeals, @@.hotpink;pleased $he was wrong after all.@@ "Ye<<s>>, thank you, <<Master>>! Fuck me! Fuck me while I rape _him2!" Underneath $him, $subSlave.slaveName cries harder, even though $activeSlave.slaveName has to stop $his thrusting for a moment to let you inside. In fact, you reflect as you hammer $activeSlave.slaveName's <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>><<if $activeSlave.vagina > 2>>roomy<<elseif $activeSlave.vagina > 1>>delectable<<else>>tight little<</if>> cunt<<else>><<if $activeSlave.anus > 2>>gaping<<elseif $activeSlave.anus > 1>>relaxed<<else>>poor little<</if>> asspussy<</if>>, it's a little strange that $subSlave.slaveName @@.gold;seems to think this is worse@@ than just being raped by $activeSlave.slaveName. After all, having your <<if $PC.dick>>turgid cock<<else>>formidable strap-on<</if>> sliding energetically in and out of $his <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>>womanhood<<else>>rectum<</if>> is cramping $activeSlave.slaveName's style a bit. Maybe it's that $subSlave.slaveName is a little squashed under there. <<set $activeSlave.devotion += 4>> <<set $activeSlave.penetrativeCount++, $penetrativeTotal++>> <<if $activeSlave.vagina != 0 && canDoVaginal($activeSlave)>> @@ -1798,7 +1798,7 @@ $he adds impishly. Hearing this, $subSlave.slaveName lets the breast pop free of <</if>> _He2 was on the edge of orgasm when you stepped in, and this is just too much. _He2 climaxes with indecent speed, involuntarily humping against the machine, shooting rope after rope of _his2 cum into $activeSlave.slaveName's mouth<<if $PC.dick>> and spasming against your invading penis wonderfully<</if>>. You hold the quivering $subSlave.slaveName down and keep hammering _him2 until you're certain _he2's fed $activeSlave.slaveName every drop _he2 has. Then you let _him2 up. <br><br> - As $subSlave.slaveName stumbles off, looking @@.hotpink;rather submissive,@@ $activeSlave.slaveName scoots out from underneath the machine. "<<Master>>," $he <<say>>s @@.hotpink;devotedly,@@ "that ta<<s>>ted incredible. It ta<<s>>te<<s>> <<s>>o much better when you fuck it out of <<him 2>>!" $He rubs $his<<if $activeSlave.belly >= 5000>> rounded<</if>> tummy with exaggerated satisfaction, and then realizes that you weren't fucking for nearly long enough to have gotten off yourself. + As $subSlave.slaveName stumbles off, looking @@.hotpink;rather submissive,@@ $activeSlave.slaveName scoots out from underneath the machine. "<<Master>>," $he <<say>>s @@.hotpink;devotedly,@@ "that ta<<s>>ted incredible. It ta<<s>>te<<s>> <<s>>o much better when you fuck it out of _him2!" $He rubs $his<<if $activeSlave.belly >= 5000>> rounded<</if>> tummy with exaggerated satisfaction, and then realizes that you weren't fucking for nearly long enough to have gotten off yourself. <<if $activeSlave.lactation || $activeSlave.balls>> "I need to be milked now, too," $he <<say>>s flirtily, and turns to mount the machine in turn. "Plea<<s>>e, plea<<s>>e do me too!" The machine hasn't had a turn first, this time, so $he's much tighter<<if $PC.dick>>, and when $he's done being milked, $he's got a load of your cum inside $him<</if>>. <<set $activeSlave.analCount++, $analTotal++>> diff --git a/src/uncategorized/fsDevelopments.tw b/src/uncategorized/fsDevelopments.tw index 74e6adc1b353bd6427409fab65204f0cf8088f69..cac395d9ae548ed68df0b324b94fdb6941e80f4a 100644 --- a/src/uncategorized/fsDevelopments.tw +++ b/src/uncategorized/fsDevelopments.tw @@ -129,7 +129,7 @@ <</if>> <</if>> <<if $secExp == 1>> - <<if $propCampaign == 1 && $propFocus == "social engineering">> + <<if $propCampaign >= 1 && $propFocus == "social engineering">> Your propaganda campaign helps further your societal engineering efforts. <<if $RecuriterOffice == 0 || $Recruiter == 0>> <<if $propCampaignBoost == 1>> @@ -140,9 +140,9 @@ <<else>> ''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is able to further boost your societal engineering campaign from her PR hub office. <<if $propCampaignBoost == 1>> - <<set _broadProgress += 4+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>> + <<set _broadProgress += $propCampaign + Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>> <<else>> - <<set _broadProgress += 3+Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>> + <<set _broadProgress += 1 + Math.floor(($Recruiter.intelligence+$Recruiter.intelligenceImplant)/32)>> <</if>> <</if>> <</if>> diff --git a/src/uncategorized/generateXXSlave.tw b/src/uncategorized/generateXXSlave.tw index d37a79497c00794e3943ac0a7773329d0acc25aa..8024fbb9225d3f971dc31c26bb4e92163101afc2 100644 --- a/src/uncategorized/generateXXSlave.tw +++ b/src/uncategorized/generateXXSlave.tw @@ -27,10 +27,11 @@ <<set $activeSlave.ID = $IDNumber++>> <<set $activeSlave.weekAcquired = $week>> -<<set $activeSlave.intelligence = random(-100,100)>> -<<if random(10,110) < $activeSlave.intelligence>> +<<set _gaussianPair = gaussianPair()>> +<<set $activeSlave.intelligence = Intelligence.random()>> +<<if _gaussianPair[0] < _gaussianPair[1] + $activeSlave.intelligence/29 - 0.35>> /* 40.23% chance if intelligence is 0, 99.26% chance if intelligence is 100 */ <<set $activeSlave.intelligenceImplant = 15>> - <<if random(50,150) < $activeSlave.intelligence>> + <<if random(15,150) < $activeSlave.intelligence>> <<set $activeSlave.intelligenceImplant = 30>> <</if>> <</if>> diff --git a/src/uncategorized/generateXYSlave.tw b/src/uncategorized/generateXYSlave.tw index c2399f4df28102ef729973152c03ba0ed12822e9..814b177681ccb45a5e129ed830bbe240aaf60e0e 100644 --- a/src/uncategorized/generateXYSlave.tw +++ b/src/uncategorized/generateXYSlave.tw @@ -26,10 +26,11 @@ <<set $activeSlave.ID = $IDNumber++>> <<set $activeSlave.weekAcquired = $week>> -<<set $activeSlave.intelligence = random(-100,100)>> -<<if random(10,110) < $activeSlave.intelligence>> +<<set _gaussianPair = gaussianPair()>> +<<set $activeSlave.intelligence = Intelligence.random()>> +<<if _gaussianPair[0] < _gaussianPair[1] + $activeSlave.intelligence/29 - 0.35>> /* 40.23% chance if intelligence is 0, 99.26% chance if intelligence is 100 */ <<set $activeSlave.intelligenceImplant = 15>> - <<if random(50,150) < $activeSlave.intelligence>> + <<if random(15,150) < $activeSlave.intelligence>> <<set $activeSlave.intelligenceImplant = 30>> <</if>> <</if>> diff --git a/src/uncategorized/lawCompliance.tw b/src/uncategorized/lawCompliance.tw index 92d39f7091c3408b3956fd014d5c66e1ee1cce5e..d0a0acbb6659130729177be7f6a638557989eec0 100644 --- a/src/uncategorized/lawCompliance.tw +++ b/src/uncategorized/lawCompliance.tw @@ -410,7 +410,7 @@ <<if $BasicIntelligenceSMR == 1>> <<if $activeSlave.intelligence <= -15>> - <<set $activeSlave.intelligence = random(0,40)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [0,40]})>> <</if>> While she was in the slave pens, she saw that less intelligent slaves were immediately designated as menials and fuckdolls, and she is @@.gold;terrified@@ that if she makes a mistake, she'll be thought stupid and be reassigned on the spot. <<set $activeSlave.trust -= 5>> @@ -418,7 +418,7 @@ <<if $QualityIntelligenceSMR == 1>> <<if $activeSlave.intelligence <= 15>> - <<set $activeSlave.intelligence = random(16,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [16,100]})>> <</if>> While she was in the slave pens, she saw that less intelligent slaves were immediately designated as menials and fuckdolls, and she is @@.gold;terrified@@ that if she makes a mistake, she'll be thought stupid and be reassigned on the spot. <<set $activeSlave.trust -= 5>> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index fe994fdb72c0538ecea1a48784e42c614e68c2c2..fd45ba212fb95d637f1f64c851fa3c1be8f8912d 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -435,6 +435,12 @@ Curative side effects are @@.red;DISABLED@@. [[Enable|Options][$curativeSideEffe @@.red;DISABLED@@. [[Enable|Options][$SF.Toggle = 1]] <<else>> @@.cyan;ENABLED@@. [[Disable|Options][$SF.Toggle = 0]] + <br> The support facility is + <<if ($SF.Facility.Toggle === 0)>> + @@.red;DISABLED@@. [[Enable|Intro Summary][$SF.Facility.Toggle = 1]] + <<else>> + @@.cyan;ENABLED@@. [[Disable|Intro Summary][$SF.Facility.Toggle = 0]] + <</if>> //Prep for future content. <</if>> //Will not affect mod content that has already been encountered.// <br> diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 2ae357c246d2ad9ddb307b12040ce394c5728048..a5395721f9ac814dd57f3915727cc92cef133139 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -5517,8 +5517,7 @@ Society @@.green;approves@@ of $his unmarked, unblemished skin, advancing the fashion for unspoiled slaves. <<FSChangePorn "BodyPurist" 1>> <</if>> - <<set _race = $slaves[$i].race>> - <<if $slaves[$i].faceImplant <= 5 && _race.indexOf("surgically") == -1>> + <<if $slaves[$i].faceImplant <= 5 && $slaves[$i].race == $slaves[$i].origRace>> Society @@.green;approves@@ of $his natural, untouched appearance, advancing the fashion for unaltered slaves. <<FSChangePorn "BodyPurist" 1>> <<else>> @@ -5559,8 +5558,7 @@ <<FSChangePorn "TransformationFetishist" 1>> <<set _transformed = 1>> <</if>> - <<set _race = $slaves[$i].race>> - <<if $slaves[$i].faceImplant > 30 || _race.indexOf("surgically") == 1>> + <<if $slaves[$i].faceImplant > 30 || $slaves[$i].race != $slaves[$i].origRace>> Society @@.green;approves@@ of $his surgically improved appearance; this supports the fashion for surgical corrections. <<FSChangePorn "TransformationFetishist" 1>> <</if>> diff --git a/src/uncategorized/seRecruiterSuccess.tw b/src/uncategorized/seRecruiterSuccess.tw index d9fa1a9824ddcdc68c00b2bdd86485a522bd61cd..f74bac5fed5bd4d5f01df97bc3ea19c3464c87ee 100644 --- a/src/uncategorized/seRecruiterSuccess.tw +++ b/src/uncategorized/seRecruiterSuccess.tw @@ -19,7 +19,7 @@ <<set $activeSlave.analSkill = 0>> <<if $recruiterEugenics == 1>> <<if $IntelligenceEugenicsSMR == 1>> - <<set $activeSlave.intelligence = random(40,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>> <</if>> <<if $HeightEugenicsSMR == 1>> <<set $activeSlave.height = random(185,190)>> @@ -51,7 +51,7 @@ Your recruiter $Recruiter.slaveName has succeeded; she's convinced a starving yo <<set $activeSlave.analSkill = 0>> <<if $recruiterEugenics == 1>> <<if $IntelligenceEugenicsSMR == 1>> - <<set $activeSlave.intelligence = random(40,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>> <</if>> <<if $HeightEugenicsSMR == 1>> <<set $activeSlave.height = random(185,190)>> @@ -78,7 +78,7 @@ Your recruiter $Recruiter.slaveName has succeeded; she's convinced a recent divo <</if>> <<if $recruiterEugenics == 1>> <<if $IntelligenceEugenicsSMR == 1>> - <<set $activeSlave.intelligence = random(40,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>> <</if>> <<if $HeightEugenicsSMR == 1>> <<set $activeSlave.height = random(185,190)>> @@ -122,7 +122,7 @@ Your recruiter $Recruiter.slaveName has succeeded; she's convinced an old world <<set $activeSlave.sexualFlaw = "hates women">> <<if $recruiterEugenics == 1>> <<if $IntelligenceEugenicsSMR == 1>> - <<set $activeSlave.intelligence = random(40,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>> <</if>> <<if $HeightEugenicsSMR == 1>> <<set $activeSlave.height = random(185,190)>> @@ -156,7 +156,7 @@ Your recruiter $Recruiter.slaveName has succeeded; she's convinced an old world <<set $activeSlave.weight = random(0,50)>> <<if $recruiterEugenics == 1>> <<if $IntelligenceEugenicsSMR == 1>> - <<set $activeSlave.intelligence = random(40,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>> <</if>> <<if $HeightEugenicsSMR == 1>> <<set $activeSlave.height = random(185,190)>> @@ -203,7 +203,7 @@ Your recruiter $Recruiter.slaveName has succeeded; she's convinced an unhealthy <<set $activeSlave.clitPiercing = random(0,1)>> <<if $recruiterEugenics == 1>> <<if $IntelligenceEugenicsSMR == 1>> - <<set $activeSlave.intelligence = random(40,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>> <</if>> <<if $HeightEugenicsSMR == 1>> <<set $activeSlave.height = random(185,190)>> diff --git a/src/utility/assayWidgets.tw b/src/utility/assayWidgets.tw index 7ecdf636f7bf4bce3e8d8b23778d79ef4a263416..57898776b85a806b21409fa88bd9966e2f6bd408 100644 --- a/src/utility/assayWidgets.tw +++ b/src/utility/assayWidgets.tw @@ -980,8 +980,7 @@ <<if (Math.abs($args[0].hipsImplant) > 1)>> <<set $beauty += ($arcologies[0].FSTransformationFetishist/20)+(Math.abs($args[0].hipsImplant))>> <</if>> - <<set _race = $args[0].race>> - <<if _race.indexOf("surgically") != -1>> + <<if $args[0].race != $args[0].origRace>> <<set $beauty += ($arcologies[0].FSTransformationFetishist/20)>> <</if>> <<if $args[0].faceImplant > 95 && $args[0].face > 40>> @@ -996,8 +995,7 @@ <<if $args[0].faceImplant > 5>> <<set $beauty -= ($arcologies[0].FSBodyPurist/100)*($args[0].faceImplant/10)>> <</if>> - <<set _race = $args[0].race>> - <<if _race.indexOf("surgically") != -1>> + <<if $args[0].race == $args[0].origRace>> <<set $beauty -= ($arcologies[0].FSBodyPurist/20)>> <</if>> <<elseif $arcologies[0].FSTransformationFetishist == "unset">> diff --git a/src/utility/slaveCreationWidgets.tw b/src/utility/slaveCreationWidgets.tw index 53c550bf7a4d459b92847fb5991bc61e73dd94c7..cc350a230fe3241a721b4aba8d1e5b6037869b79 100644 --- a/src/utility/slaveCreationWidgets.tw +++ b/src/utility/slaveCreationWidgets.tw @@ -1905,10 +1905,10 @@ <</if>> <<if $entrapmentUpgradeIntelligence == "intelligent">> Intelligent slaves have a high priority for training. - <<set $activeSlave.intelligence = random(30,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [30,100]})>> <<elseif $entrapmentUpgradeIntelligence == "stupid">> Stupid slaves have a high priority for training. - <<set $activeSlave.intelligence = random(-100,-30)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-100,-30]})>> <<else>> Slaves' intelligence is not given special consideration. <</if>> @@ -2687,7 +2687,7 @@ <<set $activeSlave.devotion = 0>> <<set $activeSlave.trust = 0>> <<set $activeSlave.career = "a slave">> - <<set $activeSlave.intelligence = random(-100,0)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-100,0]})>> <<set $activeSlave.intelligenceImplant = 0>> <<set $activeSlave.health = random(-99,0)>> <<set $activeSlave.weight = random(-100,0)>> @@ -2740,7 +2740,7 @@ <<set $activeSlave.devotion = 40>> <<set $activeSlave.trust = -100>> <<set $activeSlave.career = either("a politician", "a college scout", "a business owner", "a house DJ", "a soldier", "a prison guard", "a doctor", "a counselor", "a dairy worker", "a secretary", "a teacher")>> - <<set $activeSlave.intelligence = either(20,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [20,100]})>> <<set $activeSlave.intelligenceImplant = 30>> <<set $activeSlave.health = random(-99,-50)>> <<set $activeSlave.weight = random(-100,-50)>> @@ -2820,7 +2820,7 @@ <<set $activeSlave.origin = "You bought her from the kidnappers' slave market, so she was probably forced into slavery.">> <<set $activeSlave.devotion -= 5>> <<set $activeSlave.trust = random(-45,-25)>> - <<set $activeSlave.intelligence = either(-90,45)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-90,45]})>> <<set $activeSlave.health = random(-80,20)>> <<if $activeSlave.vagina > 1 && isFertile($activeSlave)>> <<set $activeSlave.preg = either(-2, -1, -1, -1, -1, -1, -1, -1, 1, 20, 40)>> @@ -2855,7 +2855,7 @@ <<set $activeSlave.origin = "You bought her from the runaway hunters' slave market after they recaptured her and her original owner did not pay their fee.">> <<set $activeSlave.devotion = -20>> <<set $activeSlave.trust = random(-15,15)>> - <<set $activeSlave.intelligence = random(0,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [0,100]})>> <<set $activeSlave.intelligenceImplant = 15>> <<if $activeSlave.physicalAge >= 12>> <<set $activeSlave.teeth = "normal">> @@ -3025,7 +3025,7 @@ <<if $activeSlave.physicalAge >= 12>> <<set $activeSlave.teeth = "normal">> <</if>> - <<set $activeSlave.intelligence = random(-20,70)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-20,70]})>> <<set $activeSlave.devotion = random(25,45)>> <<set $activeSlave.trust = random(25,45)>> <<set $activeSlave.health = random(50,60)>> @@ -3120,7 +3120,7 @@ <<else>> <<set $activeSlave.intelligenceImplant = 15>> <<set $activeSlave.teeth = "normal">> - <<set $activeSlave.intelligence = random(-30,60)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-30,60]})>> <<set $activeSlave.devotion = random(25,45)>> <<set $activeSlave.trust = random(25,45)>> <</if>> @@ -3248,7 +3248,7 @@ <<set $activeSlave.career = "a slave">> <<set $activeSlave.intelligenceImplant = 30>> <<set $activeSlave.teeth = "normal">> - <<set $activeSlave.intelligence = random(-20,60)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [-20,60]})>> <<set $activeSlave.chem = 20>> <<if $TGA.schoolUpgrade == 1>> <<set $activeSlave.devotion = 100>> @@ -3695,7 +3695,7 @@ <<set $activeSlave.height = Math.trunc(Math.clamp(Height.random($activeSlave, {limitMult: [2, 15], spread: .1}),_minHeight, 274))>> <<set $activeSlave.muscles = random(40,80)>> <<else>> - <<set $activeSlave.height = Math.trunc(Math.clamp(Height.random($activeSlave, {limitMult: [3, 9]}),_minHeight, 274))>> + <<set $activeSlave.height = Math.trunc(Math.clamp(Height.random($activeSlave, {limitMult: [1, 4]}),_minHeight, 274))>> <<set $activeSlave.muscles = random(20,40)>> <</if>> <<if $HA.schoolUpgrade == 3>> @@ -3707,7 +3707,7 @@ <</if>> <<set $activeSlave.shoulders = 0>> <<if $HA.schoolUpgrade == 1>> - <<set $activeSlave.intelligence = random(20,70)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [20,70]})>> <<set $activeSlave.vaginalSkill = either(20,20,40)>> <<set $activeSlave.oralSkill = either(20,20,40)>> <<set $activeSlave.analSkill = either(20,20,40)>> @@ -4424,7 +4424,7 @@ <<set $activeSlave.trust = random(0,60)>> <<set $activeSlave.hStyle = "buzzcut">> <<set $activeSlave.hLength = 0>> - <<set $activeSlave.intelligence = random(0,100)>> + <<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [0,100]})>> <<set $activeSlave.health = random(0,60)>> <<case "rape">> <<set $activeSlave.origin = "You purchased her life at a prison sale. She was locked away for rape.">>