From d50c8dd5a7841bd5ae6fc74e6daddcdb3a1e769f Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 11 Jan 2020 00:15:36 -0500 Subject: [PATCH] unify costwidget and getslavecost --- src/js/economyJS.js | 223 ++++++++---- src/uncategorized/costsWidgets.tw | 586 +++++------------------------- 2 files changed, 256 insertions(+), 553 deletions(-) diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 08dbf711dbe..843386cddde 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -582,12 +582,14 @@ window.calculateCosts = (function() { * @param {App.Entity.SlaveState} s * @returns {number} */ -window.getSlaveCost = function(s) { +window.getSlaveCostArray = function(s) { if (!s) { return 0; } // Data duplicated from Cost Report let cost = 0; + let retval = []; + let t = ""; const rulesCost = State.variables.rulesCost; const foodCost = State.variables.foodCost; const drugsCost = State.variables.drugsCost; @@ -676,180 +678,261 @@ window.getSlaveCost = function(s) { break; } + retval.push({text: "Living Expenses", value: cost}); + cost = 0; + // Food - cost += foodCost * 4; + retval.push({text: "Basic slave food cost", value: foodCost * 4}); + switch (s.diet) { case 'fattening': case 'muscle building': - cost += foodCost; + retval.push({text: "Heavy diet", value: foodCost}); break; case 'restricted': case 'slimming': - cost -= foodCost; + retval.push({text: "Light diet, reduced by", value: -Math.abs(foodCost)}); break; } - if (s.geneticQuirks.fertility === 2 && s.geneticQuirks.hyperFertility === 2 && s.preg === 0 && (s.ovaries === 1 || s.mpreg === 1)) { - cost += foodCost * 0.5; - } if (s.weight > 130) { - cost += foodCost * 2; + retval.push({text: "Heavy weight", value: foodCost * 2}); } else if (s.weight > 50) { - cost += foodCost; + retval.push({text: "High weight", value: foodCost}); } else if (s.weight < -50) { - cost -= foodCost; + retval.push({text: "Light weight, reduced by", value: -Math.abs(foodCost)}); + } + if (s.geneticQuirks.fertility === 2 && s.geneticQuirks.hyperFertility === 2 && s.preg === 0 && (s.ovaries === 1 || s.mpreg === 1)) { + if (V.geneticMappingUpgrade >= 1) { + retval.push({text: "Additional dietary supplements due to genetic hyper-fertility", value: foodCost * 0.5}); + } else { + retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.5}); + } } if (s.geneticQuirks.rearLipedema === 2) { - cost += foodCost * 0.2; + if (V.geneticMappingUpgrade >= 1) { + retval.push({text: "Additional dietary supplements due to lipedema", value: foodCost * 0.2}); + } else { + retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + } } if (s.geneticQuirks.macromastia === 2) { - cost += foodCost * 0.2; + if (V.geneticMappingUpgrade >= 1) { + retval.push({text: "Additional dietary supplements due to lipedema", value: foodCost * 0.2}); + } else { + retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + } } if (s.geneticQuirks.gigantomastia === 2) { - cost += foodCost * 0.2; + if (V.geneticMappingUpgrade >= 1) { + retval.push({text: "Additional dietary supplements due to gigantomastia", value: foodCost * 0.2}); + } else { + retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + } } if (s.geneticQuirks.mGain === 2 && s.geneticQuirks.mLoss !== 2) { - cost += foodCost * 0.2; + if (V.geneticMappingUpgrade >= 1) { + retval.push({text: "Additional dietary supplements due to muscle loss", value: foodCost * 0.2}); + } else { + retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + } } if (s.geneticQuirks.wGain === 2 && s.geneticQuirks.wLoss !== 2) { - cost += foodCost * 0.2; + if (V.geneticMappingUpgrade >= 1) { + retval.push({text: "Additional dietary supplements due to weight loss", value: foodCost * 0.2}); + } else { + retval.push({text: "Adjustment for unusual dietary deficiencies", value: foodCost * 0.2}); + } } if (s.drugs === 'appetite suppressors') { - cost -= foodCost; + retval.push({text: "Food saved via supressed appetite", value: -Math.abs(foodCost)}); } if (s.lactation > 0) { - cost += foodCost * s.lactation * (1 + Math.trunc(s.boobs / 10000)); + t = "Food to support "; + if (s.lactation > 1) { + t += "heavy "; + } else { + t += "natural "; + } + t += "lactation from "; + if (Math.trunc(s.boobs/10000) > 2) { + t += "absurd udders"; + } else if (Math.trunc(s.boobs/10000) > 1) { + t += "enormous boobs"; + } else { + t += "reasonable breasts"; + } + retval.push({text: t, value: foodCost * s.lactation * (1 + Math.trunc(s.boobs / 10000))}); } if (s.preg > s.pregData.normalBirth / 8) { if (s.assignment === Job.DAIRY && State.variables.dairyFeedersSetting > 0) { // Extra feeding costs to support pregnancy are covered by dairy feeders. // TODO: Include them here anyway? + retval.push({text: ">Extra feeding costs to support pregnancy are covered by dairy feeders", value: 0}); } else if ((s.assignment === Job.MASTER_SUITE || s.assignment === Job.CONCUBINE) && State.variables.masterSuiteUpgradePregnancy === 1) { // Extra feeding costs to support pregnancy are covered by master suite luxuries. // TODO: Include them here anyway? + retval.push({text: ">Extra feeding costs to support pregnancy are covered by $masterSuiteName luxuries", value: 0}); } else { - cost += foodCost * s.pregType * (s.pregControl === 'speed up' ? 3 : 1); + t = "Extra feeding to support "; + if (s.pregControl === "speed up") { + t += "accelerated "; + } + t += "pregnancy"; + retval.push({ + text: t, + value: foodCost * s.pregType * (s.pregControl === 'speed up' ? 3 : 1) + }); + if (s.pregType >= 100) { - cost += foodCost * 5 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1); + retval.push({ + text: "Specialized dietary requirements and feeding methods to support absurd multiples", + value: foodCost * 5 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1) + }); } else if (s.pregType >= 50) { - cost += foodCost * 3 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1); + retval.push({ + text: "Specialized dietary adjustments and concentrated, quick to digest food required to support absurd multiples", + value: foodCost * 3 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1) + }); } else if (s.pregType >= 30) { - cost += foodCost * 2 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1); + retval.push({ + text: "Concentrated, quick to digest food blend to support extreme multiples", + value: foodCost * 2 * s.pregType * (s.pregControl === 'speed up' ? 3 : 1) + }); } else if (s.pregType >= 10) { - cost += foodCost * s.pregType * (s.pregControl === 'speed up' ? 3 : 1); + retval.push({ + text: "Specialized food blend to support multiples", + value: foodCost * s.pregType * (s.pregControl === 'speed up' ? 3 : 1) + }); } } } - if (s.diet === 'XX' || s.diet === 'XY' || s.diet === 'fertility') { - cost += 25; + if (s.diet === 'XX' || s.diet === 'XY') { + retval.push({text: "Hormone enriched diet", value: 25}); + } else if (s.diet === 'fertility') { + retval.push({text: "Specialized fertility diet", value: 25}); } else if (s.diet === 'cleansing') { - cost += 50; + retval.push({text: "Chemical cleansing diet", value: 50}); } else if (s.diet === 'XXY') { - cost += 75; + retval.push({text: "Specialized hermaphrodite diet", value: 75}); } // Accessibility costs if (State.variables.boobAccessibility !== 1 && s.boobs > 20000 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 50; + retval.push({text: "Increased living expenses due to inconveniently huge boobs", value: 50}); } if (State.variables.pregAccessibility !== 1 && (s.belly >= 60000) && s.assignment !== Job.BABY_FACTORY && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 100; + retval.push({text: "Increased living expenses due to an inconveniently huge belly", value: 100}); } if (State.variables.dickAccessibility !== 1 && s.dick > 45 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 50; + retval.push({text: "Increased living expenses due to an inconveniently huge penis", value: 50}); } if (State.variables.ballsAccessibility !== 1 && s.balls > 90 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 50; + retval.push({text: "Increased living expenses due to inconveniently huge balls", value: 50}); } if (State.variables.buttAccessibility !== 1 && s.butt > 15 && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 50; + retval.push({text: "Increased living expenses due to an inconveniently huge butt", value: 50}); } if (!canSee(s) && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 50; + retval.push({text: "Increased living expenses due to lack of sight", value: 50}); } else if (!canSeePerfectly(s)) { - cost += 25; + if (getBestVision(s) < 2) { + retval.push({text: "Increased living expenses due to poor vision", value: 25}); + } else { + retval.push({text: "Increased living expenses due to blurred vision", value: 25}); + } } if (!canHear(s) && (s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { - cost += 40; + retval.push({text: "Increased living expenses due to lack of hearing", value: 40}); } else if (s.hears <= -1 && s.earwear !== 'hearing aids') { - cost += 15; + retval.push({text: "Increased living expenses due to poor hearing", value: 15}); } else if (s.earwear === 'muffling ear plugs') { - cost += 15; + retval.push({text: "Increased living expenses due to muffled hearing", value: 15}); } if ((s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { if (!canWalk) { - cost += rulesCost; + retval.push({text: "Increased living expenses due to immobility", value: rulesCost}); } else { - cost += getLimbCount(s, 0) * 0.25 * rulesCost; - cost += (getLimbCount(s, 102) * 0.125 * rulesCost); + if (!hasAllLimbs(s)) { + retval.push({ + text: "Increased living expenses due to limblessness", + value: getLimbCount(s, 0) * 0.25 * rulesCost + }); + } + if (hasAnyProstheticLimbs(s)) { + retval.push({ + text: "Increased living expenses due to prosthetics", + value: (getLimbCount(s, 102) * 0.125 * rulesCost) + }); + } } } // Maintenance if (s.boobs > 10000 && s.boobsImplantType === 1) { - cost += 50; + retval.push({text: "Maintenance cost for oversized string implants", value: 50}); } if (s.butt > 10 && s.buttImplantType === 1) { - cost += 50; + retval.push({text: "Maintenance cost for oversized string implants", value: 50}); } if ((s.assignment !== Job.DAIRY || State.variables.dairyRestraintsSetting < 2) && (s.assignment !== Job.ARCADE)) { if (s.preg > s.pregData.minLiveBirth && State.variables.universalRulesBirthing === 1) { - cost += 50; + retval.push({text: "Coverage cost for daily pregnancy scanning", value: 50}); } } // Retirement account if (State.variables.citizenRetirementMenials === 1 && State.variables.CitizenRetirement === 0) { - cost += 2; + retval.push({text: "Retirement account payments for menials", value: 2}); } if (State.variables.CitizenRetirement === 1) { - cost += 250; + retval.push({text: "Retirement account payments", value: 250}); } // Enemas if (s.inflation === 3) { switch (s.inflationType) { case 'water': - cost += 100; + retval.push({text: "Costs of specially formulated water for enemas; 2 gallons", value: 100}); break; case 'food': - cost += (foodCost * 4); + retval.push({text: "Costs of filler food for slave stuffing; 2 gallons", value: (foodCost * 4)}); break; case 'curative': case 'aphrodisiac': case 'tightener': - cost += (100 + (drugsCost * 2)); + retval.push({text: "Costs of specially formulated drug mixtures for enemas; 2 gallons", value: (100 + (drugsCost * 2))}); break; } } else if (s.inflation === 2) { switch (s.inflationType) { case 'water': - cost += 50; + retval.push({text: "Costs of specially formulated water for enemas; 1 gallon", value: 50}); break; case 'food': - cost += (foodCost * 2); + retval.push({text: "Costs of filler food for slave stuffing; 1 gallon", value: foodCost * 2}); break; case 'curative': case 'aphrodisiac': case 'tightener': - cost += (50 + (drugsCost * 2)); + retval.push({text: "Costs of specially formulated drug mixtures for enemas", value: (50 + (drugsCost * 2))}); break; } } else if (s.inflation === 1) { switch (s.inflationType) { case 'water': - cost += 25; + retval.push({text: "Costs of specially formulated water for enemas; 2 quarts", value: 25}); break; case 'food': - cost += (foodCost); + retval.push({text: "Costs of filler food for slave stuffing; 2 quarts", value: foodCost}); break; case 'curative': case 'aphrodisiac': case 'tightener': - cost += (25 + (drugsCost * 2)); + retval.push({text: "Costs of specially formulated drug mixtures for enemas", value: (25 + (drugsCost * 2))}); break; } } @@ -857,10 +940,12 @@ window.getSlaveCost = function(s) { // Drugs switch (s.drugs) { case 'anti-aging cream': - cost += drugsCost * 10; + retval.push({text: "Anti-aging creams", value: drugsCost * 10}); break; case 'female hormone injections': case 'male hormone injections': + retval.push({text: "Hormonal injections", value: drugsCost * 5}); + break; case 'intensive breast injections': case 'intensive butt injections': case 'intensive penis enhancement': @@ -871,51 +956,59 @@ window.getSlaveCost = function(s) { case 'hyper penis enhancement': case 'hyper testicle enhancement': case 'hyper lip injections': + retval.push({text: "Intensive drugs", value: drugsCost * 5}); + break; case 'growth stimulants': + retval.push({text: "Growth stimulants", value: drugsCost * 5}); + break; case 'psychostimulants': - cost += drugsCost * 5; + retval.push({text: "Mental stimulants", value: drugsCost * 5}); break; case 'sag-B-gone': - cost += Math.trunc(drugsCost * 0.1); + retval.push({text: "Questionable infomercial creams", value: Math.trunc(drugsCost * 0.1)}); break; case 'no drugs': case 'none': break; default: - cost += drugsCost * 2; + retval.push({text: "Standard drugs", value: drugsCost * 2}); break; } if (s.curatives > 0 && assignmentVisible(s)) { - cost += drugsCost * s.curatives; + retval.push({text: "Health drugs", value: drugsCost * s.curatives}); } if (s.aphrodisiacs !== 0) { - cost += Math.trunc(drugsCost * Math.abs(s.aphrodisiacs)); + retval.push({text: "Aphrodisiacs/Anaphrodisiacs", value: Math.trunc(drugsCost * Math.abs(s.aphrodisiacs))}); } if (s.hormones !== 0) { - cost += Math.trunc((drugsCost * Math.abs(s.hormones) * 0.5)); + retval.push({text: "Hormones", value: Math.trunc((drugsCost * Math.abs(s.hormones) * 0.5))}); } if (s.bodySwap > 0) { - cost += Math.trunc((drugsCost * s.bodySwap * 10)); + retval.push({text: "JS-Suppressants", value: Math.trunc((drugsCost * s.bodySwap * 10))}); } if (s.preg === -1 && isFertile(s)) { - cost += Math.trunc((drugsCost * 0.5)); + retval.push({text: "Contraceptives", value: Math.trunc((drugsCost * 0.5))}); } if ((Job.CONCUBINE === s.assignment || s.relationship === -3) && State.variables.arcologies[0].FSPetiteAdmirationLaw === 1) { - cost -= 200; + retval.push({text: "Big & Small Subsidy", value: -200}); } // Promotion costs if (State.variables.studio === 1) { if (s.porn.spending > 0) { - cost += (s.porn.spending / State.variables.PCSlutContacts); + retval.push({text: "Publicity", value: (s.porn.spending / State.variables.PCSlutContacts)}); } } if (isNaN(cost)) { throw new Error(`Cost calculation for slave ${s.slaveName} (${s.ID}) failed.`); } - return cost; + return retval; +}; + +window.getSlaveCost = function(s) { + return getSlaveCostArray(s).reduce((result, {value})=>result + value, 0); }; // Supply and Demand for slaves (linear, simple) diff --git a/src/uncategorized/costsWidgets.tw b/src/uncategorized/costsWidgets.tw index 770bc699e2e..fd36c351165 100644 --- a/src/uncategorized/costsWidgets.tw +++ b/src/uncategorized/costsWidgets.tw @@ -3,519 +3,129 @@ <<widget "SlaveExpenses">> <<set _individualCosts = 0>> <<setLocalPronouns $args[0]>> - <<switch $args[0].assignment>> - <<case "be confined in the arcade">> - <<set _livingExpense = ($rulesCost*.75)>> - <<case "work in the dairy">> - <<if $dairyRestraintsSetting >= 2>> - <<set _livingExpense = ($rulesCost*.75)>> - <<elseif $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*1.5)>> - <<elseif $dairyDecoration == "Degradationist">> - <<set _livingExpense = ($rulesCost*.9)>> - <<else>> - <<set _livingExpense = $rulesCost>> - <</if>> - <<case "work as a farmhand">> - <<if $args[0].rules.living == "luxurious">> - <<set _livingExpense = ($rulesCost)>> - <<elseif $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*2)>> - <<else>> - <<set _livingExpense = ($rulesCost*.9)>> - <</if>> - <<case "work in the brothel">> - <<if $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*1.5)>> - <<else>> - <<set _livingExpense = $rulesCost>> - <</if>> - <<case "serve in the club" "learn in the schoolroom">> - <<set _livingExpense = ($rulesCost*1.5)>> - <<case "get treatment in the clinic">> - <<if $args[0].rules.living == "luxurious">> - <<set _livingExpense = ($rulesCost*2)>> - <<elseif $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*1.5)>> - <<else>> - <<set _livingExpense = $rulesCost>> - <</if>> - <<case "rest in the spa" "work as a nanny">> - <<if $args[0].rules.living == "luxurious">> - <<set _livingExpense = ($rulesCost*1.75)>> - <<elseif $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*1.5)>> - <<else>> - <<set _livingExpense = $rulesCost>> - <</if>> - <<case "be a servant">> - <<if $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*1.5)>> - <<else>> - <<if $servantsQuartersDecoration == "Degradationist">> - <<set _livingExpense = ($rulesCost*.9)>> - <<else>> - <<set _livingExpense = $rulesCost>> - <</if>> - <</if>> - <<case "be confined in the cellblock">> - <<if $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*1.25)>> - <<else>> - <<set _livingExpense = ($rulesCost*.9)>> - <</if>> - <<case "be the Madam" "be the DJ" "be the Nurse" "be the Wardeness" "be the Attendant" "be the Matron" "be the Schoolteacher" "be the Stewardess" "be the Milkmaid" "be the Farmer">> - <<set _livingExpense = ($rulesCost*2)>> - <<default>> - <<if $args[0].rules.living == "luxurious">> - <<if $args[0].relationship >= 4>> - <<set _livingExpense = ($rulesCost*3)>> - <<else>> - <<set _livingExpense = ($rulesCost*4)>> - <</if>> - <<elseif $args[0].rules.living == "normal">> - <<set _livingExpense = ($rulesCost*2)>> - <<else>> - <<set _livingExpense = $rulesCost>> - <</if>> - <</switch>> - <br> <i>Living expenses:</i> @@.yellowgreen;<<print cashFormat(_livingExpense)>>@@ - <<set _individualCosts += _livingExpense>> - - <br> <i>Basic slave food cost:</i> @@.yellowgreen;<<print cashFormat($foodCost*4)>>@@ - <<set _individualCosts += $foodCost*4>> - <<switch $args[0].diet>> - <<case "fattening" "muscle building">> - <br> <i>Heavy diet:</i> @@.yellowgreen;<<print cashFormat($foodCost)>>@@ - <<set _individualCosts += $foodCost>> - <<case "restricted" "slimming">> - <br> <i>Light diet: //reduced by//</i> @@.yellowgreen;<<print cashFormat($foodCost)>>@@ - <<set _individualCosts -= $foodCost>> - <</switch>> - <<if $args[0].weight > 130 || $args[0].weight > 50 || $args[0].weight < -50>> - <br> <i>Caloric adjustment for</i> - <<if $args[0].weight > 130>> - <i>heavy weight:</i> @@.yellowgreen;<<print cashFormat($foodCost*2)>>@@ - <<set _individualCosts += $foodCost*2>> - <<elseif $args[0].weight > 50>> - <i>high weight:</i> @@.yellowgreen;<<print cashFormat($foodCost)>>@@ - <<set _individualCosts += $foodCost>> - <<elseif $args[0].weight < -50>> - <i>light weight:</i> //reduced by// @@.yellowgreen;<<print cashFormat($foodCost)>>@@ - <<set _individualCosts -= $foodCost>> - <</if>> - <</if>> - <<if ($args[0].geneticQuirks.fertility == 2 && $args[0].geneticQuirks.hyperFertility == 2 && $args[0].preg == 0 && ($args[0].ovaries == 1 || $args[0].mpreg == 1))>> - <br> - <<if $geneticMappingUpgrade >= 1>> - <i>Additional dietary supplements due to genetic hyper-fertility:</i> @@.yellowgreen;<<print cashFormat($foodCost/2)>>@@ - <<else>> - <i>Adjustment for unusual dietary deficiencies:</i> @@.yellowgreen;<<print cashFormat($foodCost/2)>>@@ - <</if>> - <<set _individualCosts += $foodCost/2>> - <</if>> - <<if ($args[0].geneticQuirks.rearLipedema == 2)>> - <br> - <<if $geneticMappingUpgrade >= 1>> - <i>Additional dietary supplements due to lipedema:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@ - <<else>> - <i>Adjustment for unusual dietary deficiencies:</i> @@.yellowgreen;<<print cashFormat($foodCost/5)>>@@ - <</if>> - <<set _individualCosts += $foodCost/5>> - <</if>> - <<if $args[0].drugs == "appetite suppressors">> - <br> <i>Food saved via suppressed appetite:</i> //reduced by// @@.yellowgreen;<<print cashFormat($foodCost)>>@@ - <<set _individualCosts -= $foodCost>> - <</if>> - <<if $args[0].lactation > 0>> - <br> <i>Food to support - <<if $args[0].lactation > 1>>heavy<<else>>natural<</if>> lactation from - <<if Math.trunc($args[0].boobs/10000) > 2>>absurd udders<<elseif Math.trunc($args[0].boobs/10000) > 1>>enormous boobs<<else>>reasonable breasts<</if>>:</i> - @@.yellowgreen;<<print cashFormat($foodCost*$args[0].lactation*(1+Math.trunc($args[0].boobs/10000)))>>@@ - <<set _individualCosts += $foodCost*$args[0].lactation*(1+Math.trunc($args[0].boobs/10000))>> - <</if>> - <<if $args[0].preg > $args[0].pregData.normalBirth/8>> - <<if $args[0].assignment == "work in the dairy" && $dairyFeedersSetting > 0>> - <br> <i>Extra feeding costs to support pregnancy are covered by dairy feeders.</i> - <<elseif ($args[0].assignment == "serve in the master suite" || $args[0].assignment == "be your concubine") && $masterSuiteUpgradePregnancy == 1>> - <br> <i>Extra feeding costs to support pregnancy are covered by $masterSuiteName luxuries.</i> - <<else>> - <<set _pAccMult = 1>> - <br> <i>Extra feeding to support <<if $args[0].pregControl == "speed up">>accelerated <<set _pAccMult = 3>><</if>>pregnancy:</i> - @@.yellowgreen;<<print cashFormat($foodCost*$args[0].pregType*_pAccMult)>>@@ - <<set _individualCosts += $foodCost*$args[0].pregType*_pAccMult>> - <<if $args[0].pregType >= 10>> - <br> <i>Specialized food blend to support multiples:</i> - @@.yellowgreen;<<print cashFormat($foodCost*$args[0].pregType*2*_pAccMult)>>@@ - <<set _individualCosts += $foodCost*$args[0].pregType*_pAccMult>> - <<elseif $args[0].pregType >= 30>> - <br> <i>Concentrated, quick to digest food blend to support extreme multiples:</i> @@.yellowgreen;<<print cashFormat($foodCost*$args[0].pregType*_pAccMult)>>@@ - <<set _individualCosts += $foodCost*2*$args[0].pregType*_pAccMult>> - <<elseif $args[0].pregType >= 50>> - <br> <i>Specialized dietary adjustments and concentrated, quick to digest food required to support absurd multiples:</i> <<print cashFormat($foodCost*$args[0].pregType*3*_pAccMult)>> - <<set _individualCosts += $foodCost*$args[0].pregType*3*_pAccMult>> - <<elseif $args[0].pregType >= 100>> - <br> <i>Specialized dietary requirements and feeding methods to support absurd multiples:</i> - @@.yellowgreen;<<print cashFormat($foodCost*$args[0].pregType*5*_pAccMult)>>@@ - <<set _individualCosts += $foodCost*$args[0].pregType*5*_pAccMult>> - <</if>> - <</if>> - <</if>> - <<switch $args[0].diet>> - <<case "XX" "XY">> - <br> <i>Hormone enriched diet:</i> - @@.yellowgreen;<<print cashFormat(25)>>@@ - <<set _individualCosts += 25>> - <<case "XXY">> - <br> <i>Specialized hermaphrodite diet:</i> - @@.yellowgreen;<<print cashFormat(75)>>@@ - <<set _individualCosts += 75>> - <<case "cleansing">> - <br> <i>Chemical cleansing diet:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <<case "fertility">> - <br> <i>Specialized fertility diet:</i> - @@.yellowgreen;<<print cashFormat(25)>>@@ - <<set _individualCosts += 50>> - <</switch>> - <<if $boobAccessibility != 1>> - <<if ($args[0].boobs > 20000)>> - <<if ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to inconveniently huge boobs:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <</if>> - <<if $pregAccessibility != 1>> - <<if ($args[0].belly >= 60000)>> - <<if ($args[0].assignment != "labor in the production line") && ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to an inconveniently huge belly:</i> - @@.yellowgreen;<<print cashFormat(100)>>@@ - <<set _individualCosts += 100>> - <</if>> - <</if>> - <</if>> - <<if $dickAccessibility != 1>> - <<if ($args[0].dick > 45)>> - <<if ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to an inconveniently huge penis:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <</if>> - <<if $ballsAccessibility != 1>> - <<if ($args[0].balls > 90)>> - <<if ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to inconveniently huge balls:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <</if>> - <<if $buttAccessibility != 1>> - <<if ($args[0].butt > 15)>> - <<if ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to an inconveniently huge butt:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <</if>> - <<if !canSee($args[0]) && ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to lack of sight:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <<elseif !canSeePerfectly($args[0])>> - <<if (getBestVision($args[0]) < 2)>> - <br> <i>Increased living expenses due to poor vision:</i> - <<else>> - <br> <i>Increased living expenses due to blurred vision:</i> - <</if>> - @@.yellowgreen;<<print cashFormat(25)>>@@ - <<set _individualCosts += 25>> - <</if>> - <<if !canHear($args[0]) && ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <br> <i>Increased living expenses due to lack of hearing:</i> - @@.yellowgreen;<<print cashFormat(20)>>@@ - <<set _individualCosts += 20>> - <<elseif $args[0].hears <= -1 && $args[0].earwear != "hearing aids">> - <br> <i>Increased living expenses due to poor hearing:</i> - @@.yellowgreen;<<print cashFormat(5)>>@@ - <<set _individualCosts += 5>> - <<elseif ($args[0].earwear == "muffling ear plugs")>> - <br> <i>Increased living expenses due to muffled hearing:</i> - @@.yellowgreen;<<print cashFormat(5)>>@@ - <<set _individualCosts += 5>> - <</if>> - <<if ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2) && ($args[0].assignment != "be confined in the arcade")>> - <<if !canWalk($args[0])>> - <br> <i>Increased living expenses due to immobility:</i> - @@.yellowgreen;<<print cashFormat($rulesCost)>>@@ - <<set _individualCosts += $rulesCost>> - <<else>> - <<if !hasAllLimbs($args[0])>> - <br> <i>Increased living expenses due to limblessness:</i> - @@.yellowgreen;<<print cashFormat($rulesCost * 0.25 * getLimbCount($args[0], 0))>>@@ - <<set _individualCosts += $rulesCost * 0.25 * getLimbCount($args[0], 0)>> - <</if>> - <<if hasAnyProstheticLimbs($args[0])>> - <br> <i>Increased living expenses due to prosthetics:</i> - @@.yellowgreen;<<print cashFormat($rulesCost * 0.125 * getLimbCount($args[0], 102))>>@@ - <<set _individualCosts += $rulesCost * 0.125 * getLimbCount($args[0], 102)>> - <</if>> - <</if>> - <</if>> - <<if $args[0].boobs > 10000>> - <<if $args[0].boobsImplantType == 1>> - <br> <i>Maintenance cost for oversized string implants:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <<if $args[0].butt > 10>> - <<if $args[0].buttImplantType == 1>> - <br> <i>Maintenance cost for oversized string implants:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <<if $args[0].preg > $args[0].pregData.minLiveBirth>> - <<if $universalRulesBirthing == 1>> - <<if ($args[0].assignment != "work in the dairy" || $dairyRestraintsSetting < 2)>> - <br> <i>Coverage cost for daily pregnancy scanning:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <</if>> - <</if>> - <</if>> - <<if $CitizenRetirement == 1>> - <br> <i>Retirement account payments:</i> - @@.yellowgreen;<<print cashFormat(250)>>@@ - <<set _individualCosts += 250>> - <</if>> - <<if ($args[0].inflation == 3)>> - <<switch $args[0].inflationType>> - <<case "water">> - <br> <i>Costs of specially formulated water for enemas; 2 gallons:</i> - @@.yellowgreen;<<print cashFormat(100)>>@@ - <<set _individualCosts += 100>> - <<case "food">> - <br> <i>Costs of filler food for slave stuffing; 2 gallons:</i> - @@.yellowgreen;<<print cashFormat(($foodCost*4))>>@@ - <<set _individualCosts += ($foodCost*4)>> - <<case "curative" "aphrodisiac" "tightener">> - <br> <i>Costs of specially formulated drug mixtures for enemas; 2 gallons:</i> - @@.yellowgreen;<<print cashFormat((100+($drugsCost*2)))>>@@ - <<set _individualCosts += (100+($drugsCost*2))>> - <</switch>> - <<elseif ($args[0].inflation == 2)>> - <<switch $args[0].inflationType>> - <<case "water">> - <br> <i>Costs of specially formulated water for enemas; 1 gallon:</i> - @@.yellowgreen;<<print cashFormat(50)>>@@ - <<set _individualCosts += 50>> - <<case "food">> - <br> <i>Costs of filler food for slave stuffing; 1 gallon:</i> - @@.yellowgreen;<<print cashFormat(($foodCost*2))>>@@ - <<set _individualCosts += ($foodCost*4)>> - <<case "curative" "aphrodisiac" "tightener">> - <br> <i>Costs of specially formulated drug mixtures for enemas; 1 gallon:</i> - @@.yellowgreen;<<print cashFormat((50+($drugsCost*2)))>>@@ - <<set _individualCosts += (50+($drugsCost*2))>> - <</switch>> - <<elseif ($args[0].inflation == 1)>> - <<switch $args[0].inflationType>> - <<case "water">> - <br> <i>Costs of specially formulated water for enemas; 2 liters:</i> - @@.yellowgreen;<<print cashFormat(25)>>@@ - <<set _individualCosts += 25>> - <<case "food">> - <br> <i>Costs of filler food for slave stuffing; 2 liters:</i> - <<print cashFormat(($foodCost))>> - <<set _individualCosts += ($foodCost)>> - <<case "curative" "aphrodisiac" "tightener">> - <br> <i>Costs of specially formulated drug mixtures for enemas; 2 liters:</i> - @@.yellowgreen;<<print cashFormat((25+($drugsCost*2)))>>@@ - <<set _individualCosts += (25+($drugsCost*2))>> - <</switch>> - <</if>> - <<switch $args[0].drugs>> - <<case "anti-aging cream">> - <br> <i>Anti-aging creams:</i> - <<print cashFormat(($drugsCost*10))>> - <<set _individualCosts += ($drugsCost*10)>> - <<case "female hormone injections" "male hormone injections">> - <br> <i>Hormonal injections:</i> - @@.yellowgreen;<<print cashFormat(($drugsCost*5))>>@@ - <<set _individualCosts += ($drugsCost*5)>> - <<case "growth stimulants">> - <br> <i>Growth stimulants:</i> - @@.yellowgreen;<<print cashFormat(($drugsCost*5))>>@@ - <<set _individualCosts += ($drugsCost*5)>> - <<case "psychostimulants">> - <br> <i>Mental stimulants:</i> - @@.yellowgreen;<<print cashFormat(($drugsCost*5))>>@@ - <<set _individualCosts += ($drugsCost*5)>> - <<case "intensive breast injections" "intensive butt injections" "intensive penis enhancement" "intensive testicle enhancement" "intensive lip injections" "hyper breast injections" "hyper butt injections" "hyper penis enhancement" "hyper testicle enhancement" "hyper lip injections">> - <br> <i>Intensive drugs:</i> - @@.yellowgreen;<<print cashFormat($drugsCost*5)>>@@ - <<set _individualCosts += $drugsCost*5>> - <<case "sag-B-gone">> - <br> <i>Questionable infomercial creams:</i> - @@.yellowgreen;<<print cashFormat(Math.trunc($drugsCost/10))>>@@ - <<set _individualCosts += ($drugsCost/10)>> - <<case "no drugs" "none">> - <<default>> - <br> <i>Standard drugs:</i> - @@.yellowgreen;<<print cashFormat(($drugsCost*2))>>@@ - <<set _individualCosts += ($drugsCost*2)>> - <</switch>> - <<if $args[0].curatives > 0>> - <br> <i>Health drugs:</i> - @@.yellowgreen;<<print cashFormat($args[0].curatives*$drugsCost)>>@@ - <<set _individualCosts += $drugsCost+($args[0].curatives*$drugsCost)>> - <</if>> - <<if ($args[0].aphrodisiacs !== 0)>> - <br> <i>Aphrodisiacs/Anaphrodisiacs:</i> - @@.yellowgreen;<<print cashFormat(Math.trunc($drugsCost*Math.abs($args[0].aphrodisiacs)))>>@@ - <<set _individualCosts += $drugsCost*Math.abs($args[0].aphrodisiacs)>> - <</if>> - <<if ($args[0].hormones != 0)>> - <br> <i>Hormones:</i> - @@.yellowgreen;<<print cashFormat((Math.trunc($drugsCost*Math.abs($args[0].hormones)*0.5)))>>@@ - <<set _individualCosts += Math.trunc($drugsCost*Math.abs($args[0].hormones)*0.5)>> - <</if>> - <<if ($args[0].bodySwap > 0)>> - <br> <i>JS-Suppressants:</i> - @@.yellowgreen;<<print cashFormat(($drugsCost*10*$args[0].bodySwap))>>@@ - <<set _individualCosts += Math.trunc($drugsCost*10*$args[0].bodySwap)>> - <</if>> - <<if ($args[0].preg == -1) && isFertile($args[0])>> - <br> <i>Contraceptives:</i> - @@.yellowgreen;<<print cashFormat((Math.trunc($drugsCost*0.5)))>>@@ - <<set _individualCosts += Math.trunc($drugsCost*0.5)>> - <</if>> - <<if ($studio == 1)>> - <<if ($args[0].porn.spending > 0)>> - <br> <i>Publicity:</i> - @@.yellowgreen;<<print cashFormat($args[0].porn.spending/$PCSlutContacts)>>@@ - <<set _individualCosts += ($args[0].porn.spending/$PCSlutContacts)>> - <</if>> - <</if>> - <<if (($args[0].assignment == "be your Concubine" ||$args[0].relationship == -3) && $arcologies[0].FSPetiteAdmirationLaw == 1)>> - <br> <i>Big & Small Subsidy:</i> - @@.yellowgreen;<<print cashFormat(-200)>>@@ - <<set _individualCosts -= 200>> - <</if>> - <<set _total += Math.trunc(_individualCosts)>> - <br> __Predicted expense__: @@.red;<<print cashFormat(Math.trunc(_individualCosts))>>@@ + <<for _line range getSlaveCostArray($activeSlave)>> + <div class="indent"> + <<= _line.text>>: <<=cashFormatColor(_line.value)>> + </div> + <</for>> + <<set _individualCosts = Math.trunc(getSlaveCost($args[0]))>> + <div class = "double-indent"> + __Predicted expense__: @@.red;<<print cashFormat(Math.trunc(_individualCosts))>>@@ + </div> <<if $assistantPower > 0>> <<if $args[0].lastWeeksCashIncome > 0>> - <br> Income: @@.yellowgreen;<<print cashFormat($args[0].lastWeeksCashIncome)>>@@ + <div class = "indent"> + Income: <<print cashFormatColor($args[0].lastWeeksCashIncome)>> + </div> <<set _total = (Math.trunc($args[0].lastWeeksCashIncome - _individualCosts))>> - <br> __Total__: - <<if _total > 0>> - @@.yellowgreen;<<print cashFormat(Math.trunc(_total))>>@@ - <<else>> - @@.red;<<print cashFormat(Math.trunc(_total))>>@@ - <</if>> + <div class="double-indent"> + __Total__: <<print cashFormatColor(Math.trunc(_total))>> + </div> <</if>> <</if>> - <br> <<if $args[0].origin != 0>> - $args[0].origin<br> - <</if>> - <<if $args[0].slaveCost < 0>> - You bought $him for: @@.red;<<print cashFormat($args[0].slaveCost)>>.@@ - <<set _Cost = $args[0].slaveCost>> - <<elseif $args[0].slaveCost == 0>> - You spent nothing to acquire $him. - <<set _Cost = $args[0].slaveCost>> - <<else>> - You have no record of how much <<if $args[0].origin != 0>>this<<else>>$he originally<</if>> cost. - <<set _Cost = 0>> + <div class = "indent"> + $args[0].origin + </div> <</if>> - - <<if $assistantPower > 0>> - <<set _weeksOwned = $week - $args[0].weekAcquired>> - <br> - <<if $args[0].lifetimeCashExpenses < 0>> - In $his <<if _weeksOwned > 0>>_weeksOwned <<if _weeksOwned == 1>>week<<else>>weeks<</if>><<else>>time<</if>> with you, $he has cost @@.red;<<print cashFormat($args[0].lifetimeCashExpenses)>>.@@ - <<set _Expense = $args[0].lifetimeCashExpenses>> + <div class = "indent"> + <<if $args[0].slaveCost < 0>> + You bought $him for: @@.red;<<print cashFormat($args[0].slaveCost)>>.@@ + <<set _Cost = $args[0].slaveCost>> + <<elseif $args[0].slaveCost == 0>> + You spent nothing to acquire $him. + <<set _Cost = $args[0].slaveCost>> <<else>> - You have no record of $him costing you any ¤. - <<set _Expense = 0>> + You have no record of how much <<if $args[0].origin != 0>>this<<else>>$he originally<</if>> cost. + <<set _Cost = 0>> <</if>> + </div> - <br> - <<if $args[0].lifetimeCashIncome > 0>> - In $his <<if _weeksOwned > 0>>_weeksOwned <<if _weeksOwned == 1>>week<<else>>weeks<</if>><<else>>time<</if>> with you, $he has earned @@.yellowgreen;<<print cashFormat($args[0].lifetimeCashIncome)>>.@@ - <<set _Income = $args[0].lifetimeCashIncome>> - <<else>> - You have no record of $him making you any ¤. - <<set _Income = 0>> - <</if>> + <<if $assistantPower > 0>> + <<set _weeksOwned = $week - $args[0].weekAcquired>> + <div class = "indent"> + <<if $args[0].lifetimeCashExpenses < 0>> + In $his <<if _weeksOwned > 0>>_weeksOwned <<if _weeksOwned == 1>>week<<else>>weeks<</if>><<else>>time<</if>> with you, $he has cost @@.red;<<print cashFormat($args[0].lifetimeCashExpenses)>>.@@ + <<set _Expense = $args[0].lifetimeCashExpenses>> + <<else>> + You have no record of $him costing you any ¤. + <<set _Expense = 0>> + <</if>> + </div> - <br> - Overall, - <<if (_Income + _Cost + _Expense) > 0>> - you have made @@.yellowgreen;<<print cashFormat(_Income + _Cost + _Expense)>>@@ net from $his labors. - <<elseif (_Income + _Cost + _Expense) == 0>> - $he is even in cost and income. - <<else>> - $he has cost you @@.red;<<print cashFormat(_Income + _Cost + _Expense)>>.@@ - <</if>> + <div class = "indent"> + <<if $args[0].lifetimeCashIncome > 0>> + In $his <<if _weeksOwned > 0>>_weeksOwned <<if _weeksOwned == 1>>week<<else>>weeks<</if>><<else>>time<</if>> with you, $he has earned @@.yellowgreen;<<print cashFormat($args[0].lifetimeCashIncome)>>.@@ + <<set _Income = $args[0].lifetimeCashIncome>> + <<else>> + You have no record of $him making you any ¤. + <<set _Income = 0>> + <</if>> + </div> + + <div class = "indent"> + Overall, + <<if (_Income + _Cost + _Expense) > 0>> + you have made @@.yellowgreen;<<print cashFormat(_Income + _Cost + _Expense)>>@@ net from $his labors. + <<elseif (_Income + _Cost + _Expense) == 0>> + $he is even in cost and income. + <<else>> + $he has cost you @@.red;<<print cashFormat(_Income + _Cost + _Expense)>>.@@ + <</if>> + </div> /* Reputation: */ + <div> <<if ($args[0].lifetimeRepIncome != 0 || $args[0].lifetimeRepExpenses != 0)>> - <br> <<set _repTotal = ($args[0].lifetimeRepIncome + $args[0].lifetimeRepExpenses)>> <<if ($cheatMode == 1 || $debugMode == 1)>> <<if $args[0].lifetimeRepIncome != 0>> - <br> - This week $he has - <<if $args[0].lastWeeksRepIncome == 0>> - had no positive effect on your reputation, but - <<else>> - improved your reputation by @@.green;<<print num($args[0].lastWeeksRepIncome)>>@@ and - <</if>> - over $his entire time with you, $he gained @@.green;<<print num($args[0].lifetimeRepIncome)>>.@@ + <div class = "indent"> + This week $he has + <<if $args[0].lastWeeksRepIncome == 0>> + had no positive effect on your reputation, but + <<else>> + improved your reputation by @@.green;<<print num($args[0].lastWeeksRepIncome)>>@@ and + <</if>> + over $his entire time with you, $he gained @@.green;<<print num($args[0].lifetimeRepIncome)>>.@@ + </div> <</if>> <<if $args[0].lifetimeRepExpenses != 0>> - <br> - This week $he has - <<if $args[0].lastWeeksRepExpenses == 0>> - had no negative effect on your reputation, but + <div class = "indent"> + This week $he has + <<if $args[0].lastWeeksRepExpenses == 0>> + had no negative effect on your reputation, but + <<else>> + lowered your reputation by @@.red;<<print num($args[0].lastWeeksRepExpenses)>>@@ and + <</if>> + over $his entire time with you, $he cost @@.red;<<print num($args[0].lifetimeRepExpenses)>>.@@ + </div> + <</if>> + <div class = "indent"> + Overall then, $he has changed your reputation by + <<if _repTotal > 0>> + @@.green;<<print num(_repTotal)>>@@ + <<elseif _repTotal < 0>> + @@.red;<<print num(_repTotal)>>@@ <<else>> - lowered your reputation by @@.red;<<print num($args[0].lastWeeksRepExpenses)>>@@ and + <<print num(_repTotal)>> <</if>> - over $his entire time with you, $he cost @@.red;<<print num($args[0].lifetimeRepExpenses)>>.@@ - <</if>> - <br> - Overall then, $he has changed your reputation by - <<if _repTotal > 0>> - @@.green;<<print num(_repTotal)>>@@ - <<elseif _repTotal < 0>> - @@.red;<<print num(_repTotal)>>@@ - <<else>> - <<print num(_repTotal)>> - <</if>> + </div> <<else>> /* lowercasedonkey: TODO: I don't like how vague my placeholder is. Probably need to set up some kind of sliding scale to describe how much rep (roughly) she has made or lost. Need to get a sense of common ranges. */ - <br> - Overall, $he has - <<if _repTotal == 0>> - had no impact on your reputation. - <<elseif _repTotal > 0>> - @@.green;increased@@ your reputation. - <<elseif _repTotal < 0>> - @@.red;decreased@@ your reputation. - <</if>> + <div class = "indent"> + Overall, $he has + <<if _repTotal == 0>> + had no impact on your reputation. + <<elseif _repTotal > 0>> + @@.green;increased@@ your reputation. + <<elseif _repTotal < 0>> + @@.red;decreased@@ your reputation. + <</if>> + </div> <</if>> <</if>> + </div> <</if>> <</widget>> -- GitLab