diff --git a/slave variables documentation - Pregmod.txt b/slave variables documentation - Pregmod.txt index 23b8bd603f3497404a168baa086044f7e25d0526..b737cf777b33ad6f600efaf9cd40969f5632c350 100644 --- a/slave variables documentation - Pregmod.txt +++ b/slave variables documentation - Pregmod.txt @@ -3528,7 +3528,7 @@ Has the slave gone through male puberty. scar: is an object -keys include any place on a slave body that can receive a scar, values are a string for the scar. +keys include any place on a slave body that can receive a scar, values are an object. This sub-object's keys are the kind of scar, and the property is an int showing how bad it is. breedingMark: diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index 9dc8105b05c418f4317c5812d953b3bda2860b56..e27cea03b73d570577c0912c88cc67c206fbdbd1 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -901,7 +901,7 @@ App.Desc.expandScarString = function(slave, surface) { // scars can sometimes be r += "an exotic scar"; break; case "surgical": - if (surface === "left breast" || surface === "right breast" ) { + if (surface === "left breast" || surface === "right breast") { if (slave.boobsImplant > 0) { r += "scars from "; if (scar > 3) { @@ -923,7 +923,7 @@ App.Desc.expandScarString = function(slave, surface) { // scars can sometimes be } r += "surgery to remove implants"; } - } else if (surface === "left buttock" || surface === "right buttock" ) { + } else if (surface === "left buttock" || surface === "right buttock") { if (slave.buttImplant > 0) { r += "scars from "; if (scar > 3) { @@ -969,6 +969,16 @@ App.Desc.expandScarString = function(slave, surface) { // scars can sometimes be } r += "unsightly c-section scar"; break; + case "cutting": + if (["left wrist", "right wrist", "neck"].includes(surface)) { + r += "some scars as though $he attempted self harm"; + } else { + r += "some cuts as though from a razor"; + } + break; + case "battle": + r += "battles scars"; + break; default: if (scar > 2) { r += "serious "; diff --git a/src/js/rulesAutosurgery.js b/src/js/rulesAutosurgery.js index 5c2d38e1bb8579334584827a58a7b96601ba2707..0191abfdec6bf7406fb0999e66d6ed42ef6d7e5d 100644 --- a/src/js/rulesAutosurgery.js +++ b/src/js/rulesAutosurgery.js @@ -359,8 +359,8 @@ window.rulesAutosurgery = (function() { slave.skill.oral -= 10; } }); - } else if (slave.scar["belly"] === "c-section" && thisSurgery.cosmetic > 0) { - commitProcedure("surgery to remove a c-section scar", s => { delete s.scar["belly"]; }); + } else if (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 => { if (slave.faceShape === "masculine") { slave.faceShape = "androgynous"; } diff --git a/src/uncategorized/remoteSurgery.tw b/src/uncategorized/remoteSurgery.tw index 10f87c02c6ae64323e468e54f954af33f22e2695..720df83812b2acefe4201b625cbe12b52bd785ed 100644 --- a/src/uncategorized/remoteSurgery.tw +++ b/src/uncategorized/remoteSurgery.tw @@ -839,15 +839,17 @@ $He's <</if>> <</if>> -<<if ($activeSlave.scar["belly"] == "c-section")>> - <br> - $He has an unsightly c-section scar. - <<link "Remove Caesarean scar">> - <<run delete $activeSlave.scar["belly"]>> - <<run cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave)>> - <<set $activeSlave.health -= 10,$surgeryType = "bellyscar">> - <<goto "Surgery Degradation">> - <</link>> +<<if ($activeSlave.scar.hasOwnProperty("belly") && $activeSlave.scar.belly.hasOwnProperty("c-section"))>> + <<if $activeSlave.scar.belly["c-section"] > 0>> + <br> + $He has an unsightly c-section scar. + <<link "Remove Caesarean scar">> + <<set $activeSlave.scar["belly"]["c-section"] = 0>> + <<run cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave)>> + <<set $activeSlave.health -= 10,$surgeryType = "bellyscar">> + <<goto "Surgery Degradation">> + <</link>> + <</if>> <</if>> <br><br>