From dadb5b01000666cb1336731601680fddb82d230e Mon Sep 17 00:00:00 2001 From: Jones <Jones> Date: Mon, 11 Mar 2019 19:08:29 +0100 Subject: [PATCH] Cleanup/debug --- devNotes/Useful JS Function Documentation.txt | 2 ++ src/js/economyJS.js | 34 +++++++++++-------- src/uncategorized/clubReport.tw | 1 + src/uncategorized/saServeThePublic.tw | 3 +- src/uncategorized/slaveAssignmentsReport.tw | 3 +- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/devNotes/Useful JS Function Documentation.txt b/devNotes/Useful JS Function Documentation.txt index 53c2eebea66..de09ea6e694 100644 --- a/devNotes/Useful JS Function Documentation.txt +++ b/devNotes/Useful JS Function Documentation.txt @@ -16,6 +16,8 @@ isNotPreg(slave) - Returns if slave has no sizable belly. isPure(slave) - Returns if slave has not been surgically enhanced (to a noticeable degree). +isSurgicallyImproved(slave) - Returns if slave has been surgically enhanced with boob, butt and lip implants and also has a small waist. + PiercingScore(slave) - Returns int representing degree of piercings. Higher means more piercings. TatScore(slave) - Returns int representing degree of tattooing. Higher means more tattoos. diff --git a/src/js/economyJS.js b/src/js/economyJS.js index aaf37ef5fbe..41e70450107 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -894,7 +894,7 @@ window.menialSlaveCost = function(q) { // The function for calculating and storing slave's sexual interaction with citizens/'the outside' window.slaveJobValues = function() { const V = State.variables; - let slaveJobValues = {arcade: 0, club: 0}, clubSpots = 0, beautyMultiplier = 0, toTheClub = 0; + let slaveJobValues = {arcade: 0, club: 0}, clubSpots = 0, beautyMultiplier = 1, toTheClub = 0; // This section is for specific slaves or non-unique slaves adding their values to the whole // Accounting for fuckdolls @@ -949,6 +949,11 @@ window.slaveJobValues = function() { } } + // Checking for space in the club + if(V.club > 0 && V.ClubiIDs.length < V.club) { + clubSpots = V.club - V.ClubiIDs.length; + } + // This loops through every slave, checks their assignment and applies the appropriate value to both slave and the aggregate // The slave value sees use during individual end of the week evaluation // The aggregate is used for determining macro variables like 'prices' for slave goods and services to then be used in end week calculations @@ -956,7 +961,7 @@ window.slaveJobValues = function() { // Arcade and glory hole slaves adding to 'arcade' if(s.assignment === "work a glory hole") { s.sexAmount = Math.trunc((random(160,200) + (20 * (4 - s.anus)) + (10 * (4 - s.vagina)) + Math.trunc(s.health / 5)) * 0.8); - slaveJobValues. arcade += s.sexAmount; + slaveJobValues.arcade += s.sexAmount; } else if(s.assignment === "be confined in the arcade") { s.sexAmount = (random(200,240) + (20 * (4 - (s.anus - 2 * V.arcadeUpgradeInjectors))) + (10 * (4 - (s.vagina - 2 * V.arcadeUpgradeInjectors))) + Math.trunc(s.health / 5)); slaveJobValues.arcade += s.sexAmount; @@ -967,16 +972,15 @@ window.slaveJobValues = function() { // The beauty multiplier beautyMultiplier += V.DJRepBonus2; + if(s.sexualFlaw === "attention whore") { + beautyMultiplier += 0.1; + } if(V.arcologies[0].FSEdoRevivalist !== "unset") { beautyMultiplier += V.arcologies[0].FSEdoRevivalist / (V.FSLockinLevel * 3); } - if(V.club > 0 && V.ClubiIDs.length < V.club) { - clubSpots = V.club - V.ClubiIDs.length; - } if(((V.universalRulesFacilityWork === 1) && (s.assignment === "serve the public") && (clubSpots > 0)) || (s.assignment === "serve in the club")) { if(s.assignment == "serve the public") { - clubSpots -= 1; - toTheClub += 1; + toTheClub = 1; } if(V.clubAdsSpending !== 0) { if(V.clubAdsStacked === 1) { @@ -1063,11 +1067,8 @@ window.slaveJobValues = function() { } // The amount of sexual acts - s.sexAmount = beauty(s) / 2 + 100; - // Why isn't this a beautyMultiplier thing? - if(s.sexualFlaw === "attention whore") { - s.sexAmount *= 1.1; - } + s.sexAmount = Beauty(s) / 2 + 100; + if(s.assignment === "be the DJ") { if((V.clubSlaves + toTheClub > 0) && (V.clubSlaves + toTheClub < 10)) { s.sexAmount *= (10 - V.clubSlaves - toTheClub) / 10; @@ -1084,13 +1085,18 @@ window.slaveJobValues = function() { s.sexQuality += 2; } else if(s.devotion > 50) { s.sexQuality += 1; - } else if(s.trust > -20 && s.devotion <= 20) { + } else if(s.devotion > 20) { + // Nothing happens + } else if(s.trust < -20) { s.sexQuality -= 1; } else { s.sexQuality -= 2; } - if(s.assignment === "serve in the club" || toTheClub === 1) { + if(s.assignment === "serve in the club") { s.sexQuality += 2; + } else if(toTheClub === 1) { + s.sexQuality += 2, + clubSpots -= 1; } slaveJobValues.club += s.sexAmount * s.sexQuality; } diff --git a/src/uncategorized/clubReport.tw b/src/uncategorized/clubReport.tw index cd66a7a46b6..362a66c3752 100644 --- a/src/uncategorized/clubReport.tw +++ b/src/uncategorized/clubReport.tw @@ -97,6 +97,7 @@ <<else>> <<set $slaves[_FLs].skillDJ += random(1,Math.ceil(($DJ.intelligence+$DJ.intelligenceImplant)/15) + 8)>> <</if>> + <<if $cheatMode == 1 || $debugMode == 1>>DJ Bonus: $DJRepBonus ($DJRepBonus2).<</if>> <<if (_DL < 10)>> <<set $slavesGettingHelp = 0>> <<if $universalRulesFacilityWork == 1>> diff --git a/src/uncategorized/saServeThePublic.tw b/src/uncategorized/saServeThePublic.tw index ce0fe270bed..767e35811fa 100644 --- a/src/uncategorized/saServeThePublic.tw +++ b/src/uncategorized/saServeThePublic.tw @@ -201,7 +201,7 @@ the public. <</if>> <<set $beauty = Math.trunc($beauty*$beautyMultiplier)>> -$His appearance attracted $beauty members of the public (<<print Math.trunc($beauty/7)>> a day)<<if $beauty > 160>>, so many that <<if canDoVaginal($slaves[$i]) && canDoAnal($slaves[$i])>>each of $his holes was<<elseif canDoVaginal($slaves[$i]) || canDoAnal($slaves[$i])>>each of $his available holes was<<else>>$his mouth and anywhere else a dick could fit was<</if>> often filled by more than one cock<<elseif $beauty > 140>>, so many that $he spent much of $his time getting gangbanged<<elseif $beauty > 120>>, so many that citizens often <<if canDoAnal($slaves[$i]) || canDoVaginal($slaves[$i])>>spitroasted<<else>>double-teamed<</if>> the slut<<elseif $beauty > 100>>, so many that $he frequently had sex with multiple citizens at once<<elseif $beauty > 70>>, so many that $he occasionally had sex with multiple citizens at once<</if>>. Most of them +$His appearance attracted $beauty <<if $cheatMode == 1 || $debugMode == 1>>($slaves[$i].sexAmount)<</if>> members of the public (<<print Math.trunc($beauty/7)>> a day)<<if $beauty > 160>>, so many that <<if canDoVaginal($slaves[$i]) && canDoAnal($slaves[$i])>>each of $his holes was<<elseif canDoVaginal($slaves[$i]) || canDoAnal($slaves[$i])>>each of $his available holes was<<else>>$his mouth and anywhere else a dick could fit was<</if>> often filled by more than one cock<<elseif $beauty > 140>>, so many that $he spent much of $his time getting gangbanged<<elseif $beauty > 120>>, so many that citizens often <<if canDoAnal($slaves[$i]) || canDoVaginal($slaves[$i])>>spitroasted<<else>>double-teamed<</if>> the slut<<elseif $beauty > 100>>, so many that $he frequently had sex with multiple citizens at once<<elseif $beauty > 70>>, so many that $he occasionally had sex with multiple citizens at once<</if>>. Most of them <<if $FResult > 15>> were putty in $his hands. <<elseif $FResult > 10>> @@ -211,6 +211,7 @@ $His appearance attracted $beauty members of the public (<<print Math.trunc($bea <<else>> liked using $him. <</if>> +<<if $cheatMode == 1 || $debugMode == 1>>Sex quality: $FResult ($slaves[$i].sexQuality).<</if>> <<set _incomeStats.customers = $beauty>> <<if $seeAge == 1>> diff --git a/src/uncategorized/slaveAssignmentsReport.tw b/src/uncategorized/slaveAssignmentsReport.tw index d081760d7a9..cfb6db9c0ff 100644 --- a/src/uncategorized/slaveAssignmentsReport.tw +++ b/src/uncategorized/slaveAssignmentsReport.tw @@ -18,7 +18,8 @@ _UCRent = 1 + (180 - $UCRent) / 900, _upperClassSexDemand = Math.trunc($upperClass * _UCRent) * 200, _TCRent = 1 + (650 - $TCRent) / 3250, _topClassSexDemand = Math.trunc($topClass * _TCRent) * 2000, -_visitorsSexDemand = Math.trunc($visitors) * 20>> +_visitorsSexDemand = Math.trunc($visitors) * 20, +$slaveJobValues = slaveJobValues()>> /*Supply of sexual services*/ <<if ($cheatMode == 1) || ($debugMode == 1)>> -- GitLab