From def218553a4b0a81c8c7c9aa721f2bfa13706ae2 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Wed, 25 Dec 2019 16:37:05 -0800 Subject: [PATCH] Fixes (mostly to health stuff, but also some tag symmetry fixes for the heading stuff). --- src/004-base/organFarmBase.js | 1 - src/SecExp/attackHandler.tw | 16 ++++++++-------- src/SecExp/rebellionReport.tw | 2 +- src/endWeek/healthFunctions.js | 4 ++-- src/endWeek/saWorkAGloryHole.js | 10 +++++----- src/endWeek/saWorkTheFarm.js | 2 +- src/pregmod/widgets/seBirthWidgets.tw | 2 +- src/uncategorized/bodyModification.tw | 4 ++-- src/uncategorized/reFSAcquisition.tw | 2 +- src/uncategorized/reMalefactor.tw | 2 +- src/uncategorized/reRecruit.tw | 2 +- src/uncategorized/remoteSurgery.tw | 2 +- src/uncategorized/resFailure.tw | 2 +- src/uncategorized/saDrugs.tw | 2 +- src/uncategorized/saLongTermEffects.tw | 2 +- src/utility/saRulesWidgets.tw | 2 +- 16 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/004-base/organFarmBase.js b/src/004-base/organFarmBase.js index f38973632a3..1bcdf377c17 100644 --- a/src/004-base/organFarmBase.js +++ b/src/004-base/organFarmBase.js @@ -99,5 +99,4 @@ App.Medicine.OrganFarm.OrganImplantAction = class { autoImplantError(slave) { return this.implantError(slave); } - }; diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw index a990001b56d..0e73e19e20c 100644 --- a/src/SecExp/attackHandler.tw +++ b/src/SecExp/attackHandler.tw @@ -318,17 +318,17 @@ <<set _i = $slaveIndices[$Bodyguard.ID]>> <<if $woundType == 1>> <<set $slaves[_i].voice = 0>> - <<run healthDamage($slaves[$i], 60>> + <<run healthDamage($slaves[$i], 60)>> <<elseif $woundType == 2>> <<run eyeSurgery($slaves[_i], "both", "blind"), healthDamage($slaves[$i], 30)>> <<elseif $woundType == 3>> <<run removeLimbs($slaves[_i], "all")>> - <<run healthDamage($slaves[$i], 80>> + <<run healthDamage($slaves[$i], 80)>> <<elseif $woundType >= 4>> <<if $slaves[_i].health.health >= -60>> - <<run healthDamage($slaves[$i], 30>> + <<run healthDamage($slaves[$i], 30)>> <<else>> - <<run healthDamage($slaves[$i], -90 - $slaves[$i].health.health>> + <<run healthDamage($slaves[$i], -90 - $slaves[$i].health.health)>> <</if>> <</if>> <</if>> @@ -443,17 +443,17 @@ <<set _i = $slaveIndices[$HeadGirl.ID]>> <<if $woundType == 1>> <<set $slaves[_i].voice = 0>> - <<run healthDamage($slaves[$i], 60>> + <<run healthDamage($slaves[$i], 60)>> <<elseif $woundType == 2>> <<set eyeSurgery($slaves[_i], "both", "blind"), healthDamage($slaves[$i], 30)>> <<elseif $woundType == 3>> <<run removeLimbs($slaves[_i], "all")>> - <<run healthDamage($slaves[$i], 80>> + <<run healthDamage($slaves[$i], 80)>> <<elseif $woundType >= 4>> <<if $slaves[_i].health.health >= -60>> - <<run healthDamage($slaves[$i], 30>> + <<run healthDamage($slaves[$i], 30)>> <<else>> - <<run healthDamage($slaves[$i], -90 - $slaves[$i].health.health>> + <<run healthDamage($slaves[$i], -90 - $slaves[$i].health.health)>> <</if>> <</if>> <</if>> diff --git a/src/SecExp/rebellionReport.tw b/src/SecExp/rebellionReport.tw index 1a9986522ee..b35e466172a 100644 --- a/src/SecExp/rebellionReport.tw +++ b/src/SecExp/rebellionReport.tw @@ -616,7 +616,7 @@ <<elseif $woundType >= 4>> a stray shot severely wounded $him. <<if $Concubine.health.health >= -60>> - <<run healthDamage($Concubine, 30>> + <<run healthDamage($Concubine, 30)>> <<else>> <<run healthDamage($Concubine, 90)>> <</if>> diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index 713acc25353..a2117713ca0 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -23,7 +23,7 @@ Carcinogens illness > 5 -- 3 11.6% illness > 4 -- 4 2.8% illness = 3 or 4 -- 5 1.8% - Carcinogens substract Math.trunc(chem / 150) from the dice rolls for a max of -6 at >= 90 + Carcinogens subtract Math.trunc(chem / 150) from the dice rolls for a max of -6 at >= 90 There should be a natural decay of carcinogens every week of 10% of the level. But at the price of 0.2 short term damage per point of chem. Add carcinogen damage to serious medical procedures due to use of potent pharmaceuticals during them. @@ -60,7 +60,7 @@ window.illness = function illness(slave) { const random = jsRandom(1, 100); // high rolls are good const H = slave.health; let assignBonus = 0; // bonus for healthy assignments - // On the macro side of things disease could also happen to the acrology's population as the arcology becomes crowded, killing citizens and putting slaves at greater risk of getting ill. Again with upgrades/policies to mitigate the issue made availble TODO? + // On the macro side of things disease could also happen to the acrology's population as the arcology becomes crowded, killing citizens and putting slaves at greater risk of getting ill. Again with upgrades/policies to mitigate the issue made available TODO? if (slave.assignment !== "live with your agent" || slave.assignment !== "be your agent") { // Let's make sure agents don't get sick and accidentally die, they should take care of themselves if (slave.assignment === "rest" || slave.assignment === "rest in the spa" || slave.assignment === "get treatment in the clinic" || slave.assignment === "serve in the master suite" || slave.assignment === "please you") { assignBonus += 10; diff --git a/src/endWeek/saWorkAGloryHole.js b/src/endWeek/saWorkAGloryHole.js index c875fa0bacd..54fc0d8bcea 100644 --- a/src/endWeek/saWorkAGloryHole.js +++ b/src/endWeek/saWorkAGloryHole.js @@ -107,25 +107,25 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() { r += ` protect ${his} health from the stress of being used as a sexual appliance.`; } else if (slave.health.condition < -50) { r += ` The stress of being used while very in terrible condition <span class="red">damaged ${his} health.</span>`; - damageHealth(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); + healthDamage(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); } else if (slave.health.condition < -10) { if (jsRandom(1, 100) < 10) { r += ` The stress of being used while weak has <span class="red">damaged ${his} health.</span>`; - damageHealth(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); + healthDamage(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); } } else if (!canDoVaginal(slave) && !canDoAnal(slave)) { if (jsRandom(1, 100) < 75) { r += ` The stress of being used repeatedly in only one hole has <span class="red">damaged ${his} health.</span>`; - damageHealth(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); + healthDamage(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); } } else if (!canDoVaginal(slave)) { if (jsRandom(1, 100) < 50) { r += ` The stress of being used in only two holes has <span class="red">damaged ${his} health.</span>`; - damageHealth(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); + healthDamage(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); } } else if (jsRandom(1, 100) < 25) { r += ` The stress of being used has <span class="red">damaged ${his} health.</span>`; - damageHealth(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); + healthDamage(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); } if (slave.health.illness > 0 || slave.health.tired > 50) { diff --git a/src/endWeek/saWorkTheFarm.js b/src/endWeek/saWorkTheFarm.js index 1ddacaa8be4..a2b0eaccde3 100644 --- a/src/endWeek/saWorkTheFarm.js +++ b/src/endWeek/saWorkTheFarm.js @@ -495,7 +495,7 @@ window.saWorkTheFarm = function saWorkTheFarm(slave) { improveCondition(slave, 2 * vignette.effect); } else if (vignette.effect < 0) { t += ` <span class="red">affecting ${his} health.</span> `; - damageHealth(slave, 2 * vignette.effect); + healthDamage(slave, 2 * vignette.effect); } else { t += ` an incident without lasting effect. `; } diff --git a/src/pregmod/widgets/seBirthWidgets.tw b/src/pregmod/widgets/seBirthWidgets.tw index c940f1ef6a4..7df289a8be3 100644 --- a/src/pregmod/widgets/seBirthWidgets.tw +++ b/src/pregmod/widgets/seBirthWidgets.tw @@ -728,7 +728,7 @@ All in all, <<run healthDamage($slaves[$i], Math.round(($birthDamage/2)*10))>> <<if $birthDamage > 5 && _compoundCondition == 1 && _curBabies > 1>> Or it would have been, were $he only having one. With each additional child that needed to be birthed, @@.red;the damage to $his health was compounded.@@ - <<run healthDamage($slaves[$i], _curBabies>> + <<run healthDamage($slaves[$i], _curBabies)>> <</if>> <</if>> <</if>> diff --git a/src/uncategorized/bodyModification.tw b/src/uncategorized/bodyModification.tw index 679df555f64..d4e995c66be 100644 --- a/src/uncategorized/bodyModification.tw +++ b/src/uncategorized/bodyModification.tw @@ -1179,7 +1179,7 @@ Or a custom site: <<textbox "$brandTarget.local" $brandTarget.local "Body Modifi </div> <<if $activeSlave.breedingMark == 1 && ($propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>> - </div> + <div> $He has an intricate tattoo on $his lower belly that suggests $he was made to be bred. [[Remove it|Body Modification][$activeSlave.breedingMark = 0]] </div> <</if>> @@ -1376,5 +1376,5 @@ Or a custom site: <<textbox "$scarTarget.local" $scarTarget.local "Body Modifica <</link>> with $scarDesign.local on the $scarTarget.local<<if $activeSlave.scar[$scarTarget.local]>>, adding to the scars that are already there?<<else>>.<</if>> <</if>> -<div> +</div> </div> /* indent */ diff --git a/src/uncategorized/reFSAcquisition.tw b/src/uncategorized/reFSAcquisition.tw index 3437f240c7b..aff87a370ec 100644 --- a/src/uncategorized/reFSAcquisition.tw +++ b/src/uncategorized/reFSAcquisition.tw @@ -126,7 +126,7 @@ <<set $fixedRace = $arcologies[0].FSSubjugationistRace>> <<set $activeSlave = GenerateNewSlave()>> <<set $activeSlave.origin = "$He came to your arcology to be enslaved out of a sense of self-loathing for $his kind.">> -<<run setHealth($activeSlave, jsRandom(-70, -60)>> +<<run setHealth($activeSlave, jsRandom(-70, -60))>> <<set $activeSlave.trust = random(-25,-15)>> <<set $activeSlave.devotion = random(-45,-25)>> <<set $activeSlave.anus = random(1,2)>> diff --git a/src/uncategorized/reMalefactor.tw b/src/uncategorized/reMalefactor.tw index dcb7c149b96..48b482ffa0c 100644 --- a/src/uncategorized/reMalefactor.tw +++ b/src/uncategorized/reMalefactor.tw @@ -521,7 +521,7 @@ $He is easily taken into custody and $his contraband confiscated once the jeerin <</if>> <<if $seeExtreme > 0>> <br><<link "Punitively amputate $his limbs, and then enslave $him">> - <<run damageHealth($activeSlave, 20)>> + <<run healthDamage($activeSlave, 20)>> <<run removeLimbs($activeSlave, "all")>> <<set $activeSlave.behavioralFlaw = "odd">> <<run cashX(forceNeg($contractCost), "slaveTransfer", $activeSlave)>> diff --git a/src/uncategorized/reRecruit.tw b/src/uncategorized/reRecruit.tw index c6356381c7b..85a64350017 100644 --- a/src/uncategorized/reRecruit.tw +++ b/src/uncategorized/reRecruit.tw @@ -1599,7 +1599,7 @@ <<set $activeSlave.origin = "$He offered to sell you $his body and you graciously accepted.">> <<set $activeSlave.devotion = random(-45,-25)>> <<set $activeSlave.trust = random(-15,0)>> -<<run setHealth($activeSlave))>> +<<run setHealth($activeSlave)>> <<set $activeSlave.weight = -70>> <<set $activeSlave.boobs = 100>> <<set $activeSlave.origHColor = "silver">> diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw index c113e27bc19..4ebc7c8ce8b 100644 --- a/src/uncategorized/remoteSurgery.tw +++ b/src/uncategorized/remoteSurgery.tw @@ -1437,7 +1437,7 @@ <<if $activeSlave.geneticQuirks.pFace == 2>> [[Prevent passing of perfect faces|Surgery Degradation][$activeSlave.geneticQuirks.pFace = 0,cashX(forceNeg($surgeryCost*4), "slaveSurgery", $activeSlave), healthDamage($activeSlave,40), $activeSlave.chem += 100,$surgeryType = "gene treatment"]] <</if>> - <div> + </div> <div class="indent"> <<if $activeSlave.geneticQuirks.uFace == 2>> diff --git a/src/uncategorized/resFailure.tw b/src/uncategorized/resFailure.tw index 3ce6396411d..a6e833027fa 100644 --- a/src/uncategorized/resFailure.tw +++ b/src/uncategorized/resFailure.tw @@ -172,7 +172,7 @@ <<set $activeSlave.trust = random(-25,-45)>> <<set $activeSlave.chem = 100>> <<if $GRI.schoolUpgrade == 1>> - <<run setHealth($activeSlave, 200), 0, 0, 0)>> + <<run setHealth($activeSlave, 200, 0, 0, 0)>> <<else>> <<run setHealth($activeSlave, jsRandom(-70, 100), 0)>> <</if>> diff --git a/src/uncategorized/saDrugs.tw b/src/uncategorized/saDrugs.tw index 423737ff246..c6cd541c9e5 100644 --- a/src/uncategorized/saDrugs.tw +++ b/src/uncategorized/saDrugs.tw @@ -1363,7 +1363,7 @@ <<else>> and does $his best to continue with $his duties out of dedication to you, despite being sick. <</if>> -<<elseif $slaves[$i].illness > 1 && $slaves.assignment == "get treatment in the clinic">> +<<elseif $slaves[$i].illness > 1 && $slaves[$i].assignment == "get treatment in the clinic">> $He is<<if $slaves[$i].illness > 4>> deathly<<elseif $slaves[$i].illness > 3>> seriously<</if>> ill and receiving appropriate treatment. $He is @@.hotpink;grateful@@ you help $him get well. <<set $slaves[$i].devotion += 2>> <<elseif $slaves[$i].illness == 1>> diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 85272b27d06..e8de9b28280 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -6573,7 +6573,7 @@ $He is not allowed to get off as frequently as $his aphrodisiac fueled sex drive demands, and the constant frustration <<if $slaves[$i].fuckdoll == 0 && $slaves[$i].fetish != "mindbroken">> @@.red;stresses $his body considerably.@@ - <<run healthDamage($slaves[$i], 1+Math.trunc($slaves[$i].need/20)>> + <<run healthDamage($slaves[$i], 1+Math.trunc($slaves[$i].need/20))>> <<else>> drives $him mad with lust. $He @@.mediumorchid;blames you@@ for this @@.gold;cruelty.@@ <<set _decay = 1+Math.trunc($slaves[$i].need/20)>> diff --git a/src/utility/saRulesWidgets.tw b/src/utility/saRulesWidgets.tw index 9875b5bdd95..8238b0f8336 100644 --- a/src/utility/saRulesWidgets.tw +++ b/src/utility/saRulesWidgets.tw @@ -486,7 +486,7 @@ and rapes the poor slave's face<<if !canAchieveErection($slaves[$i])>> with <<if (hasAnyArms($slaves[$i]))>>$his fingers<<else>>a strap-on<</if>><</if>>. _rival.slaveName hates oral <<elseif _rival.sexualFlaw == "hates penetration" && canDoVaginal(_rival)>> rapes the poor slave's pussy<<if !canAchieveErection($slaves[$i])>> with <<if (hasAnyArms($slaves[$i]))>>$his fingers<<else>>a strap-on<</if>><</if>>. _rival.slaveName hates penetration - <<elseif (_rival.sexualFlaw == "hates anal" || _rival.sexualFlaw == "hates penetration") && canDoAnal(_rival>> + <<elseif (_rival.sexualFlaw == "hates anal" || _rival.sexualFlaw == "hates penetration") && canDoAnal(_rival)>> rapes the poor slave's ass<<if !canAchieveErection($slaves[$i])>> with <<if (hasAnyArms($slaves[$i]))>>$his fingers<<else>>a strap-on<</if>><</if>>. _rival.slaveName hates anal <<elseif _rival.sexualFlaw == "shamefast">> rapes the poor slave in public. _rival.slaveName is terribly shamefast -- GitLab