diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index 5fd1d142a9cd0ed543a79434daa538a289c7fb78..4b617e5c407ce72f9a0625519226c7befef70791 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -772,10 +772,10 @@ App.Desc.scar = function(slave, surface) { } } } else if (surface) { /* describes a single scarred body part */ - if (surface === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.scar.belly) { - r += `${His} fake belly has the same scar, ${slave.scar.belly}, as ${his} real one. `; + surface = App.Desc.oppositeSides(surface); + if (surface.center === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.scar.hasOwnProperty("belly")) { + r += `${His} fake belly has the same scar, ${App.Desc.expandScarString(slave, surface.center)}, as ${his} real one. `; } else { - surface = App.Desc.oppositeSides(surface); if (slave.scar[surface.center]) { // center defined, body part has no mirror. r += `${He} has ${App.Desc.expandScarString(slave, surface.center)} on ${his} ${surface.center}. `; } else { // Center not defined, body part has a mirror. @@ -804,7 +804,7 @@ App.Desc.scar = function(slave, surface) { if (r === ``) { r += `${He} has `; } - if (key === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.scar.belly) { + if (key === "belly" && setup.fakeBellies.includes(bellyAccessory) && slave.scar.hasOwnProperty("belly")) { r += `${value} scared on both ${his} real belly and ${his} fake one, `; } else { r += `${value} on ${his} ${key}, `; diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js index 0191abfdec6bf7406fb0999e66d6ed42ef6d7e5d..ea109a6efb2c610d57e27dde4432471957350aa4 100644 --- a/src/js/rulesAutosurgery.js +++ b/src/js/rulesAutosurgery.js @@ -359,7 +359,7 @@ window.rulesAutosurgery = (function() { slave.skill.oral -= 10; } }); - } else if (slave.scar["belly"]["c-section"] > 0 && thisSurgery.cosmetic > 0) { + } else if (slave.scar.hasOwnProperty("belly") && slave.scar.belly["c-section"] > 0 && thisSurgery.cosmetic > 0) { commitProcedure("surgery to remove a c-section scar", s => { s.scar["belly"]["c-section"] = 0; }); } else if (slave.faceImplant <= 45 && slave.face <= 95 && thisSurgery.cosmetic === 2) { commitProcedure("a nicer face", slave => { diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 7283a2a51836742b38f43a592cb6e536fa50024a..c082910a6c2aefa9c0f13177d260dd6f38518f41 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -5618,15 +5618,24 @@ /* pregmod */ <<if !(jQuery.isEmptyObject($slaves[$i].scar))>> - <<for _scarName, _scar range $slaves[$i].scar>> - <<if $slaves[$i].scar[_scar].exotic > 0>> - <<if $arcologies[0].FSDegradationist != "unset">> - Society @@.green;mildly approves@@ of your slave's scarring; this encourages the further abuse of slaves. - <<= FutureSocieties.ChangePorn("Degradationist", 1)>> - <<elseif $arcologies[0].FSPaternalist != "unset">> - Society @@.red;mildly disapproves@@ of your scarred slaves, viewing them as a sign of mistreatment. - <<= FutureSocieties.ChangePorn("Paternalist", -1)>> - <</if>> + <<set _hasScar = 0>> + <<for _scarPlace, _scar range $slaves[$i].scar>> /* loop through all body parts */ + <<for _scarType, _scar range $slaves[$i].scar[_scarPlace]>> /* loop through all scar types */ + <<if _scarPlace === "exotic">> /* exotic scars don't count */ + <<continue>> + <<elseif _scar>> /*any other scar greater than 0 does */ + <<if $arcologies[0].FSDegradationist != "unset">> + Society @@.green;mildly approves@@ of your slave's scarring; this encourages the further abuse of slaves. + <<= FutureSocieties.ChangePorn("Degradationist", 1)>> + <<elseif $arcologies[0].FSPaternalist != "unset">> + Society @@.red;mildly disapproves@@ of your scarred slaves, viewing them as a sign of mistreatment. + <<= FutureSocieties.ChangePorn("Paternalist", -1)>> + <</if>> + <<set _hasScar = 1>> + <<break>> + <</if>> + <</for>> + <<if _hasScar>> <<break>> <</if>> <</for>>