diff --git a/src/facilities/surgery/remoteSurgery.tw b/src/facilities/surgery/remoteSurgery.tw index 985e75e47e01e80dde1ce8de746f9203770d2200..dd3ca84289ac1f0dc0e727d0a02a948d9a8f0d41 100644 --- a/src/facilities/surgery/remoteSurgery.tw +++ b/src/facilities/surgery/remoteSurgery.tw @@ -78,433 +78,7 @@ <div id="upper" class="tab-content"> <div class="content"> - /* 000-250-006 */ - <<if $seeImages == 1>> - <<if $imageChoice == 1>> - <div class="imageRef lrgVector"><div class="mask"> </div><<= SlaveArt(getSlave($AS), 3, 0)>></div> - <<else>> - <div class="imageRef lrgRender"><div class="mask"> </div><<= SlaveArt(getSlave($AS), 3, 0)>></div> - <</if>> - <</if>> - /* 000-250-006 */ - /*Generic boob desc*/ - <h3>Chest:</h3> - <div> - $His - <<if getSlave($AS).boobs < 300>><<print either("androgynous", "flat")>> chest is barely there. - <<elseif getSlave($AS).boobs < 400>><<print either("pointy", "tiny")>>, <<print getSlave($AS).boobs>>cc chest only fill A-cups. - <<elseif getSlave($AS).boobs < 8500>> - <<if $showBoobCCs == 1>> - <<print App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, would fill %ACUP.", getSlave($AS).boobs)>> - <<else>> - <<print App.Desc.boobBits.format("%ADJ %NOUN, would fill %ACUP.", getSlave($AS).boobs)>> - <</if>> - <<else>> - <<print App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, ", getSlave($AS).boobs)>> fill out an enormous custom bra; $his tits dominate $his entire frame. - <</if>> - </div> - - /*Boob implants*/ - <div> - $He has - <<if ["fillable", "advanced fillable", "hyper fillable"].includes(getSlave($AS).boobsImplantType)>> - <<if getSlave($AS).boobsImplantType == "hyper fillable">> - <<if getSlave($AS).boobsImplant < 20000>> - underfilled, - <<else>> - enormous, - <</if>> - <<elseif getSlave($AS).boobsImplantType == "advanced fillable">> - <<if getSlave($AS).boobsImplant <= 1000>> - deflated, - <<elseif getSlave($AS).boobsImplant < 2200>> - underfilled, - <<elseif getSlave($AS).boobsImplant > 10000>> - massively overfilled, - <<else>> - massive, - <</if>> - <<else>> - <<if getSlave($AS).boobsImplant <= 500>> - deflated, - <<elseif getSlave($AS).boobsImplant < 800>> - underfilled, - <<elseif getSlave($AS).boobsImplant > 1800>> - massively overfilled, - <<elseif getSlave($AS).boobsImplant > 1000>> - massive, - <<elseif getSlave($AS).boobsImplant >= 800>> - giant, - <</if>> - <</if>> - <<print getSlave($AS).boobsImplant>>cc <<= getSlave($AS).boobsImplantType>> breast implants. - <<elseif getSlave($AS).boobsImplantType != "none">> - <<if getSlave($AS).boobsImplant > 1000>> - massive, <<print getSlave($AS).boobsImplant>>cc - <<elseif getSlave($AS).boobsImplant > 800>> - giant, <<print getSlave($AS).boobsImplant>>cc - <<elseif getSlave($AS).boobsImplant > 600>> - huge, <<print getSlave($AS).boobsImplant>>cc - <<elseif getSlave($AS).boobsImplant > 400>> - large, <<print getSlave($AS).boobsImplant>>cc - <<elseif getSlave($AS).boobsImplant > 200>> - moderate, <<print getSlave($AS).boobsImplant>>cc - <<elseif getSlave($AS).boobsImplant > 0>> - small, <<print getSlave($AS).boobsImplant>>cc - <</if>> - <<if getSlave($AS).boobsImplantType != "normal">> - <<= getSlave($AS).boobsImplantType>> - <</if>> - breast implants. - <<if getSlave($AS).boobsImplant > 8000 && getSlave($AS).boobsImplantType == "string">> - <span class="yellow">Large string based implants are a risk to a slave's health.</span> - <</if>> - <<else>> - no implants. - <</if>> - <div class="choices"> - <<set _surgeries = App.Medicine.Surgery.sizingProcedures.boobs(getSlave($AS), App.Medicine.Surgery.allSizingOptions())>> - <<set _surgeryLinks = _surgeries.map(s => App.Medicine.Surgery.makeLink("Surgery Degradation", s, getSlave($AS)))>> - <<= _surgeryLinks.join(' | ')>> - </div> - </div> - - <div> - <<if getSlave($AS).boobsImplant != 0>> - The shape of $his breasts is determined by $his implants. - <<else>> - <<if getSlave($AS).boobs <= 250>> - $He's so flat-chested that $his breasts don't have much shape. - <<else>> - <<switch getSlave($AS).boobShape>> - <<case "perky">> - They're perky, with nipples that point slightly upwards. - <<case "downward-facing">> - They're not attractively shaped; $his nipples pointing downward. - <<case "torpedo-shaped">> - They're torpedo-shaped, projecting some way from $his chest. - <<case "wide-set">> - They're wide-set, with nipples pointing away from $his sternum. - <<case "saggy">> - They're not attractively shaped, with $his nipples pointing down. - <<default>> - They're nicely rounded and rest naturally. - <</switch>> - <div class="choices"> - <<if getSlave($AS).indentureRestrictions >= 2>> - <span class="note">$His indenture does not allow breast restructuring</span> - <<elseif getSlave($AS).breastMesh == 1>> - <span class="note">$His supportive mesh implant prevents reconstruction</span> - <<else>> - <<if (getSlave($AS).boobShape == "saggy") || (getSlave($AS).boobShape == "downward-facing")>> - [[Breast lift|Surgery Degradation][getSlave($AS).boobShape = "normal", surgeryDamage(getSlave($AS),20),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "breastLift"]]<<if getSlave($AS).preg > getSlave($AS).pregData.normalBirth/1.42 || (getSlave($AS).boobs >= 5000 && getSlave($AS).boobs < 8000)>> <span class="note">$His current state may result in $his breasts becoming saggy again</span><</if>> - <<else>> - <<if (getSlave($AS).boobShape == "normal")>> - [[Reshape them to be perkier|Surgery Degradation][getSlave($AS).boobShape = "perky",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastReconstruction"]] - | [[Make them torpedo-shaped|Surgery Degradation][getSlave($AS).boobShape = "torpedo-shaped",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastReconstruction"]] - <<else>> - [[Reshape them to be more normal|Surgery Degradation][getSlave($AS).boobShape = "normal",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastReconstruction"]] - <</if>> - <<if (getSlave($AS).boobShape != "saggy") && (getSlave($AS).boobShape != "downward-facing") && (getSlave($AS).boobs >= 2000) && (getSlave($AS).boobsImplant == 0) && ($meshImplants == 1) && ($surgeryUpgrade == 1)>> - | [[Implant a supportive mesh to preserve their shape|Surgery Degradation][getSlave($AS).breastMesh = 1,cashX(forceNeg($surgeryCost*(getSlave($AS).boobs/100)), "slaveSurgery", getSlave($AS)),surgeryDamage(getSlave($AS),10),$surgeryType = "breastShapePreservation"]] - <</if>> - <</if>> - <</if>> - </div> - <</if>> - <</if>> - </div> - - /* Nipples*/ - <div> - <<if $surgeryUpgrade == 1>> - $He has <<= getSlave($AS).nipples>> nipples. - <div class="choices"> - <<if getSlave($AS).indentureRestrictions >= 2>> - <span class="note">$His indenture forbids elective surgery</span> - <<elseif getSlave($AS).indentureRestrictions == 1>> - <span class="note">$His indenture forbids extreme body modification</span> - <<else>> /* split for possible dicknips later on, should lcd wish to attempt it again. */ - <<if getSlave($AS).nipples == "fuckable">> - [[Restore their shape and function|Surgery Degradation][getSlave($AS).nipples = "huge",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - <<else>> - <<if getSlave($AS).boobs-getSlave($AS).boobsMilk < 500>> - <span class="note">$His breasts are too small to support reshaping $his nipples to be penetratable</span> - <<elseif getSlave($AS).boobs-getSlave($AS).boobsImplant-getSlave($AS).boobsMilk < 500>> - <span class="note">$His implants are too large to support reshaping $his nipples to be penetratable</span> - <<elseif getSlave($AS).nipples != "huge">> - <span class="note">$His nipples are too small to be made fuckable</span> - <<else>> - [[Reshape them to support being penetrated|Surgery Degradation][getSlave($AS).nipples = "fuckable",getSlave($AS).nipplesPiercing = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "nippleCunts"]]<<if getSlave($AS).nipplesPiercing > 0>> <span class="note">Will remove piercings.</span><</if>> - <</if>> - <</if>> - <</if>> - </div> - <</if>> - </div> - - /*Areolae*/ - <div> - <<if getSlave($AS).areolae == 0>> - $His areolae are small - <<if getSlave($AS).areolaeShape != "circle">> - and have been surgically altered to be <<= getSlave($AS).areolaeShape>>-shaped. - <<else>> - and fairly normal. - <</if>> - <<elseif getSlave($AS).areolae == 1>> - $His areolae are large - <<if getSlave($AS).areolaeShape != "circle">> - and have been surgically altered to be <<= getSlave($AS).areolaeShape>>-shaped. - <<else>> - but still fairly normal. - <</if>> - <<elseif getSlave($AS).areolae > 1>> - $He has - <<if getSlave($AS).areolae == 2>> - wide - <<elseif getSlave($AS).areolae == 3>> - huge - <<elseif getSlave($AS).areolae == 4>> - massive - <</if>> - areolae<<if getSlave($AS).areolaeShape != "circle">>, which have been surgically altered to be <<= getSlave($AS).areolaeShape>>-shaped<</if>>. - <</if>> - <<if getSlave($AS).indentureRestrictions < 2>> - <<if getSlave($AS).areolaeShape != "circle">> - $His <<= getSlave($AS).areolaeShape>>-shaped areolae can be normalized or reshaped: - <div class="choices"> - [[Normal|Surgery Degradation][getSlave($AS).areolaeShape = "circle",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - <<if getSlave($AS).areolaeShape != "heart">> - | [[Heart-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "heart",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - <</if>> - <<if getSlave($AS).areolaeShape != "star">> - | [[Star-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "star",cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] | - <</if>> - </div> - <</if>> - <<if (getSlave($AS).areolae > 0) && (getSlave($AS).areolaeShape == "circle")>> - They are big enough that they could be reshaped into a pattern. Graft skin to make $his areolae: - <</if>> - <div class="choices"> - <<if (getSlave($AS).areolae > 0) && (getSlave($AS).areolaeShape == "circle")>> - [[Heart-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "heart",getSlave($AS).areolae -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - | [[Star-shaped|Surgery Degradation][getSlave($AS).areolaeShape = "star",getSlave($AS).areolae -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - <</if>> - <<if getSlave($AS).areolae > 0>> - | [[Reduce areolae|Surgery Degradation][getSlave($AS).areolae -= 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - <</if>> - <<if getSlave($AS).areolae > 0>>|<</if>> - <<if getSlave($AS).areolae < 4>> - [[Enlarge areolae|Surgery Degradation][getSlave($AS).areolae += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "areolae"]] - <</if>> - </div> - <</if>> - </div> - - /*Lactation*/ - <div> - <<if getSlave($AS).lactation == 0>> - $He is not lactating. - <<elseif getSlave($AS).lactation == 2>> - $He is implanted with slow-release pro-lactation drugs. - <<else>> - $He is lactating naturally. - <</if>> - <div class="choices"> - <<if getSlave($AS).lactation < 2>> - <<if getSlave($AS).indentureRestrictions < 2>> - [[Implant slow-release pro-lactation drugs|Surgery Degradation][getSlave($AS).lactationDuration = 2, getSlave($AS).induceLactation = 0, getSlave($AS).boobs -= getSlave($AS).boobsMilk, getSlave($AS).boobsMilk = 0, getSlave($AS).rules.lactation = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "lactation"]] <span class="note">This may increase $his natural breast size</span> - <</if>> - <</if>> - <<if getSlave($AS).lactation > 1>> - | [[Remove lactation implant|Surgery Degradation][getSlave($AS).lactation = 0, getSlave($AS).lactationDuration = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "endlac"]] - <</if>> - </div> - </div> - - <h3>Midrif:</h3> - /*Fat*/ - <div> - <<if getSlave($AS).indentureRestrictions >= 2 && getSlave($AS).weight > 30>> - <span class="note">$His indenture forbids elective surgery</span> - <<elseif getSlave($AS).weight > 30>> - <<if getSlave($AS).weight > 190>> - $He is extremely fat. [[Major liposuction|Surgery Degradation][surgeryDamage(getSlave($AS),40), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "liposuction"]] - <<elseif getSlave($AS).weight > 130>> - $He is fat. [[Heavy liposuction|Surgery Degradation][surgeryDamage(getSlave($AS),20), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "liposuction"]] - <<elseif getSlave($AS).weight > 30>> - $He is overweight. [[Liposuction|Surgery Degradation][surgeryDamage(getSlave($AS),10), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "liposuction"]] - <</if>> - <<if $surgeryUpgrade == 1>> - | [[Fat grafting|Fat Grafting][surgeryDamage(getSlave($AS),40), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS))*2, $surgeryType = "fat graft"]] - <</if>> - <</if>> - </div> - - /*Also fat*/ - <div> - $He has - <<if getSlave($AS).waist > 95>>a masculine - <<elseif getSlave($AS).waist > 40>>an ugly - <<elseif getSlave($AS).waist > 10>>an unattractive - <<elseif getSlave($AS).waist >= -10>>an average - <<elseif getSlave($AS).waist >= -40>>a feminine - <<elseif getSlave($AS).waist >= -95>>an hourglass - <<else>>an absurd - <</if>> - waist. - <<if getSlave($AS).waist >= -75>> - <<if getSlave($AS).indentureRestrictions < 2>> - [[Liposuction|Surgery Degradation][getSlave($AS).waist -= 20,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "lipo"]] - <</if>> - <</if>> - <<if (getSlave($AS).waist >= -95) && (getSlave($AS).waist < -75) && ($seeExtreme == 1)>> - <<if getSlave($AS).indentureRestrictions < 1 && (getSlave($AS).breedingMark != 1 || $propOutcome == 0 || $eugenicsFullControl == 1 || $arcologies[0].FSRestart == "unset")>> - [["Remove ribs to severely narrow " + $his + " waist"|Surgery Degradation][getSlave($AS).waist = -100,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "ribs"]] - <</if>> - <</if>> - </div> - - /*Belly*/ - <div> - $He's - <<if getSlave($AS).pregKnown > 0>> - pregnant. - <<elseif getSlave($AS).womb.length == 0 && getSlave($AS).broodmother > 0>> - got a dormant broodmother implant in $his womb. - <<elseif getSlave($AS).preg > 0>> - showing unusual discomfort as $his stomach is inspected. A quick test reveals that <span class="lime">$he is pregnant.</span> - <<set getSlave($AS).pregKnown = 1>> - <<elseif getSlave($AS).bellyImplant > 0>> - got a <<print getSlave($AS).bellyImplant>>cc implant filled implant located in $his abdomen. - <<if getSlave($AS).cervixImplant == 1 >> - $He also has micropump filter installed in $his cervix feeding into the implant. - <<elseif getSlave($AS).cervixImplant == 2>> - $He also has micropump filter installed in $his rectum feeding into the implant. - <<elseif getSlave($AS).cervixImplant == 3>> - $He also has micropump filter installed in both $his holes feeding into the implant. - <</if>> - <<elseif getSlave($AS).bellyFluid >= 1500>> - got a <<print getSlave($AS).inflationType>>-filled implant located in $his abdomen. - <<if getSlave($AS).cervixImplant == 1 >> - $He also has micropump filter installed in $his cervix feeding into the implant. - <<elseif getSlave($AS).cervixImplant == 2>> - $He also has micropump filter installed in $his rectum feeding into the implant. - <<elseif getSlave($AS).cervixImplant == 3>> - $He also has micropump filter installed in both $his holes feeding into the implant. - <</if>> - <<elseif getSlave($AS).bellyImplant == 0>> - got an empty fillable implant located in $his abdomen. - <<if getSlave($AS).cervixImplant == 1 >> - $He also has micropump filter installed in $his cervix feeding into the implant. - <<elseif getSlave($AS).cervixImplant == 2>> - $He also has micropump filter installed in $his rectum feeding into the implant. - <<elseif getSlave($AS).cervixImplant == 3>> - $He also has micropump filter installed in both $his holes feeding into the implant. - <</if>> - <<else>> - got a normal stomach. - <</if>> - <div class="choices"> - <<if getSlave($AS).indentureRestrictions >= 2>> - <span class="note">$His indenture forbids elective surgery</span> - <<elseif getSlave($AS).breedingMark == 1 && $propOutcome == 1 && $eugenicsFullControl != 1 && $arcologies[0].FSRestart != "unset">> - <span class="note">You are forbidden from affecting $his fertility</span> - <<elseif getSlave($AS).preg > 0 || getSlave($AS).inflation > 0 || getSlave($AS).broodmother > 0>> - <span class="note">$He is unable to support an abdominal implant at this time</span> - <<elseif getSlave($AS).bellyImplant >= 750000>> - <span class="note">$His abdominal implant is so far beyond its maximum limit it is at risk of rupturing</span> - <<elseif getSlave($AS).bellyImplant >= 600000>> - <span class="note">$His abdominal implant is greatly beyond its maximum limit</span> - <<elseif getSlave($AS).bellyImplant >= 450000>> - <span class="note">$His abdominal implant is over-filled</span> - <<elseif getSlave($AS).bellyImplant >= 400000>> - <span class="note">$His abdominal implant is at its capacity</span> - <<elseif getSlave($AS).bellyImplant > 130000 && $arcologies[0].FSTransformationFetishistResearch != 1>> - <span class="note">$His abdominal implant is at its capacity</span> - <<elseif getSlave($AS).bellyImplant == -1 && (getSlave($AS).ovaries == 1 || getSlave($AS).mpreg == 1) && $bellyImplants == 1>> - [[Implant fillable abdominal implant|Surgery Degradation][getSlave($AS).bellyImplant = 0,getSlave($AS).preg = -2, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "bellyIn"]] - <<elseif getSlave($AS).bellyImplant == -1 && $bellyImplants == 1>> - [[Implant a fillable abdominal implant|Surgery Degradation][getSlave($AS).bellyImplant = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), getSlave($AS).bellyPain += 2, surgeryDamage(getSlave($AS),50), $surgeryType = "bellyInMale"]] - <<elseif getSlave($AS).bellyPain == 2>> - <span class="note">$His body cannot handle more filler this week</span> - <<elseif getSlave($AS).bellyImplant > -1 && getSlave($AS).bellyPain == 0>> - [[Add inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 200, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10),$surgeryType = "bellyUp"]] - | [[Add a considerable amount of inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 500, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "bellyUp"]] - <<elseif getSlave($AS).bellyImplant > -1 && getSlave($AS).bellyPain == 1>> - [[Add more inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 200, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),30),$surgeryType = "bellyUp"]] - | [[Add a considerable amount of inert filler|Surgery Degradation][getSlave($AS).bellyImplant += 500, getSlave($AS).bellyPain += 1,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),40),$surgeryType = "bellyUp"]]<<if getSlave($AS).health.health < 0>><span class="note red">This may cause severe health issues</span><</if>> - <</if>> - <<if getSlave($AS).bellyImplant > -1>> - | [[Drain implant|Surgery Degradation][getSlave($AS).bellyImplant -= 200,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),5), $surgeryType = "bellyDown"]] - <<if getSlave($AS).bellyImplant >= 500>> - | [[Greatly drain implant|Surgery Degradation][getSlave($AS).bellyImplant -= 500, surgeryDamage(getSlave($AS),5),cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "bellyDown"]] - <</if>> - <<if getSlave($AS).indentureRestrictions < 2>> - | [[Remove implant|Surgery Degradation][getSlave($AS).bellyImplant = -1, getSlave($AS).cervixImplant = 0, cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),10), $surgeryType = "bellyOut"]] - <<if getSlave($AS).cervixImplant != 1 && getSlave($AS).cervixImplant != 3 && $cervixImplants >= 1 && getSlave($AS).vagina > -1>> /* slave should have vagina */ - <div> - [[Install cervix micropump filter|Surgery Degradation][getSlave($AS).cervixImplant = (getSlave($AS).cervixImplant==0?1:3), surgeryDamage(getSlave($AS), 5), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "cervixPump"]] - <span class="note">Will allow $his belly implant to slowly swell as people cum in $his vagina</span> - </div> - <</if>> - <<if getSlave($AS).cervixImplant != 2 && getSlave($AS).cervixImplant != 3 && $cervixImplants == 2>> - <div> - [[Install rectal micropump filter|Surgery Degradation][getSlave($AS).cervixImplant = (getSlave($AS).cervixImplant==0?2:3), surgeryDamage(getSlave($AS), 20), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "cervixPumpA"]] - <span class="note">Will allow $his belly implant to slowly swell as people cum in $his anus</span> - </div> - <</if>> - <</if>> - <</if>> - </div> - </div> - - /* Uterine Implants */ - <div> - <<if getSlave($AS).wombImplant == "none" && ($UterineRestraintMesh == 1) && (getSlave($AS).ovaries == 1 || getSlave($AS).mpreg == 1)>> - $He has a normal uterus<<if getSlave($AS).mpreg == 1>>, though slightly repositioned<</if>>. - <<if getSlave($AS).indentureRestrictions >= 1>> - <span class="note">$His indenture forbids invasive elective surgery</span> - <<elseif getSlave($AS).bellyImplant > 0 || getSlave($AS).preg > 0>> - <span class="note">$His womb is currently in use and unsafe to operate on</span> - <<else>> - <<if $surgeryUpgrade == 1>> - <<if $UterineRestraintMesh == 1>> - [[Install reinforcing organic mesh|Surgery Degradation][getSlave($AS).wombImplant = "restraint", surgeryDamage(getSlave($AS),25), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "womb"]] - <</if>> - <</if>> - <</if>> - <<elseif getSlave($AS).wombImplant == "restraint">> - $He has a mesh reinforced uterus. - <<if getSlave($AS).indentureRestrictions >= 1>> - <span class="note">$His indenture forbids invasive elective surgery</span> - <<elseif getSlave($AS).bellyImplant > 0 || getSlave($AS).preg > 0>> - <span class="note">$His womb is currently in use and unsafe to operate on</span> - <<else>> - [[Remove organic mesh|Surgery Degradation][getSlave($AS).wombImplant = "none", surgeryDamage(getSlave($AS),50), cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), $surgeryType = "womb"]]<<if getSlave($AS).health.health < 0>><span class="note red">This may cause severe health issues</span><</if>> - <</if>> - <</if>> - </div> - - /*Belly sag*/ - <div> - <<if getSlave($AS).bellySagPreg > 0>> - <<if getSlave($AS).belly >= 1500>> - $He has a sagging midriff, ruined from excessive pregnancy. It is currently filled out by $his swollen belly and cannot safely be worked on. - <<else>> - $He has a sagging midriff, ruined from excessive pregnancy. - [[Tummy tuck|Surgery Degradation][getSlave($AS).bellySag = 0,getSlave($AS).bellySagPreg = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "tummyTuck"]] - <</if>> - <<elseif getSlave($AS).bellySag > 0>> - <<if getSlave($AS).belly >= 1500>> - $He has a sagging midriff, ruined from excessive distention. It is currently filled out by $his swollen belly and cannot safely be worked on. - <<else>> - $He has a sagging midriff, ruined from excessive distention. - [[Tummy tuck|Surgery Degradation][getSlave($AS).bellySag = 0,getSlave($AS).bellySagPreg = 0,cashX(forceNeg($surgeryCost), "slaveSurgery", getSlave($AS)), surgeryDamage(getSlave($AS),20),$surgeryType = "tummyTuck"]] - <</if>> - <</if>> - </div> + <<includeDOM App.UI.surgeryPassageUpper(getSlave($AS))>> </div> </div> @@ -688,7 +262,7 @@ <</if>> </div> <</if>> - </div> + </div> /* TODO: add a check for slave's eggType */ /*Fertility*/ @@ -987,7 +561,7 @@ <</if>> <</if>> </div> - <</if>> + <</if>> /*Prostate*/ <div> diff --git a/src/facilities/surgery/surgeryPassageUpper.js b/src/facilities/surgery/surgeryPassageUpper.js new file mode 100644 index 0000000000000000000000000000000000000000..815ed6de5cedac73392f783b795ccf44f1676c38 --- /dev/null +++ b/src/facilities/surgery/surgeryPassageUpper.js @@ -0,0 +1,819 @@ +/** + * UI for performing surgery. Refreshes without refreshing the passage. + * @param {App.Entity.SlaveState} slave + * @param {boolean} [cheat=false] + * @returns {HTMLElement} + */ + +App.UI.surgeryPassageUpper = function(slave, cheat = false) { + const container = document.createElement("span"); + container.append(content()); + return container; + + function content() { + const frag = new DocumentFragment(); + const { + His, He, + his, he + } = getPronouns(slave); + /** @type {HTMLAnchorElement[]} */ + + App.Events.drawEventArt(frag, slave); + + App.UI.DOM.appendNewElement("h3", frag, `Chest:`); + frag.append( + boobDesc(), + boobImplants(), + nipples(), + areolae(), + lactation() + ); + + App.UI.DOM.appendNewElement("h3", frag, `Midrif:`); + + frag.append( + fat(), + moreFat(), + belly(), + wombImplant(), + bellySag() + ); + + return frag; + + function boobDesc() { + const el = new DocumentFragment(); + const r = []; + r.push(`${His}`); + if (slave.boobs < 300) { + r.push(`${either("androgynous", "flat")} chest is barely there.`); + } else if (slave.boobs < 400) { + r.push(`${either("pointy", "tiny")}, ${slave.boobs}cc chest only fill A-cups.`); + } else if (slave.boobs < 8500) { + if (V.showBoobCCs === 1) { + r.push(App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, would fill %ACUP.", slave.boobs)); + } else { + r.push(App.Desc.boobBits.format("%ADJ %NOUN, would fill %ACUP.", slave.boobs)); + } + } else { + r.push(App.Desc.boobBits.format("%ADJ %NOUN, %VOLUME CCs, ", slave.boobs)); + r.push(`fill out an enormous custom bra; ${his} tits dominate ${his} entire frame.`); + } + App.Events.addNode(el, r, "div"); + return el; + } + + function boobImplants() { + const el = new DocumentFragment(); + let r = []; + r.push(`${He} has`); + if (["fillable", "advanced fillable", "hyper fillable"].includes(slave.boobsImplantType)) { + if (slave.boobsImplantType === "hyper fillable") { + if (slave.boobsImplant < 20000) { + r.push(`underfilled,`); + } else { + r.push(`enormous,`); + } + } else if (slave.boobsImplantType === "advanced fillable") { + if (slave.boobsImplant <= 1000) { + r.push(`deflated,`); + } else if (slave.boobsImplant < 2200) { + r.push(`underfilled,`); + } else if (slave.boobsImplant > 10000) { + r.push(`massively overfilled,`); + } else { + r.push(`massive,`); + } + } else { + if (slave.boobsImplant <= 500) { + r.push(`deflated,`); + } else if (slave.boobsImplant < 800) { + r.push(`underfilled,`); + } else if (slave.boobsImplant > 1800) { + r.push(`massively overfilled,`); + } else if (slave.boobsImplant > 1000) { + r.push(`massive,`); + } else if (slave.boobsImplant >= 800) { + r.push(`giant,`); + } + } + r.push(`${slave.boobsImplant}cc ${slave.boobsImplantType} breast implants.`); + } else if (slave.boobsImplantType !== "none") { + if (slave.boobsImplant > 1000) { + r.push(`massive, ${slave.boobsImplant}cc`); + } else if (slave.boobsImplant > 800) { + r.push(`giant, ${slave.boobsImplant}cc`); + } else if (slave.boobsImplant > 600) { + r.push(`huge, ${slave.boobsImplant}cc`); + } else if (slave.boobsImplant > 400) { + r.push(`large, ${slave.boobsImplant}cc`); + } else if (slave.boobsImplant > 200) { + r.push(`moderate, ${slave.boobsImplant}cc`); + } else if (slave.boobsImplant > 0) { + r.push(`small, ${slave.boobsImplant}cc`); + } + if (slave.boobsImplantType !== "normal") { + r.push(`${slave.boobsImplantType}`); + } + r.push(`breast implants.`); + if (slave.boobsImplant > 8000 && slave.boobsImplantType === "string") { + r.push(`<span class="yellow">Large string based implants are a risk to a slave's health.</span>`); + } + } else { + r.push(`no implants.`); + } + App.Events.addNode(el, r, "div"); + const _surgeries = App.Medicine.Surgery.sizingProcedures.boobs(slave, App.Medicine.Surgery.allSizingOptions()); + const _surgeryLinks = _surgeries.map(s => App.Medicine.Surgery.makeLink("Surgery Degradation", s, slave)); + App.UI.DOM.appendNewElement("div", el, (App.UI.DOM.generateLinksStrip(_surgeryLinks)), "choices"); + + r = []; + const linkArray = []; + if (slave.boobsImplant !== 0) { + r.push(`The shape of ${his} breasts is determined by ${his} implants.`); + } else { + if (slave.boobs <= 250) { + r.push(`${He}'s so flat-chested that ${his} breasts don't have much shape.`); + } else { + switch (slave.boobShape) { + case "perky": + r.push(`They're perky, with nipples that point slightly upwards.`); + break; + case "downward-facing": + r.push(`They're not attractively shaped; ${his} nipples pointing downward.`); + break; + case "torpedo-shaped": + r.push(`They're torpedo-shaped, projecting some way from ${his} chest.`); + break; + case "wide-set": + r.push(`They're wide-set, with nipples pointing away from ${his} sternum.`); + break; + case "saggy": + r.push(`They're not attractively shaped, with ${his} nipples pointing down.`); + break; + default: + r.push(`They're nicely rounded and rest naturally.`); + } + if (slave.indentureRestrictions >= 2) { + r.push(`<span class="note">${His} indenture does not allow breast restructuring</span>`); + } else if (slave.breastMesh === 1) { + r.push(`<span class="note">${His} supportive mesh implant prevents reconstruction</span>`); + } else { + if (slave.boobShape === "saggy" || slave.boobShape === "downward-facing") { + linkArray.push(makeLink( + "Breast lift", + "breastLift", + () => { + slave.boobShape = "normal"; + surgeryDamage(slave, 20); + } + )); + if (slave.preg > slave.pregData.normalBirth / 1.42 || (slave.boobs >= 5000 && slave.boobs < 8000)) { + r.push(` <span class="note">${His} current state may result in ${his} breasts becoming saggy again</span>`); + } + } else { + if (slave.boobShape === "normal") { + linkArray.push(makeLink( + "Reshape them to be perkier", + "breastReconstruction", + () => { + slave.boobShape = "perky"; + surgeryDamage(slave, 10); + } + )); + linkArray.push(makeLink( + "Make them torpedo-shaped", + "breastReconstruction", + () => { + slave.boobShape = "torpedo-shaped"; + surgeryDamage(slave, 10); + } + )); + } else { + linkArray.push(makeLink( + "Reshape them to be more normal", + "breastReconstruction", + () => { + slave.boobShape = "normal"; + surgeryDamage(slave, 10); + } + )); + } + if (slave.boobShape !== "saggy" && slave.boobShape !== "downward-facing" && slave.boobs >= 2000 && slave.boobsImplant === 0 && V.meshImplants === 1 && V.surgeryUpgrade === 1) { + linkArray.push(makeLink( + "Implant a supportive mesh to preserve their shape", + "breastShapePreservation", + () => { + slave.breastMesh = 1; + surgeryDamage(slave, 10); + }, + slave.boobs / 100 + )); + } + } + } + } + } + App.Events.addNode(el, r, "div"); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function nipples() { + const el = new DocumentFragment(); + if (V.surgeryUpgrade === 1) { + App.UI.DOM.appendNewElement("div", el, `${He} has ${slave.nipples} nipples.`); + if (slave.indentureRestrictions >= 2) { + App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]); + } else if (slave.indentureRestrictions === 1) { + App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids extreme body modification`, ["choices", "note"]); + } else { /* split for possible dicknips later on, should lcd wish to attempt it again. */ + const linkArray = []; + if (slave.nipples === "fuckable") { + linkArray.push(makeLink( + "Restore their shape and function", + "areolae", + () => { + slave.nipples = "huge"; + surgeryDamage(slave, 10); + } + )); + } else { + if (slave.boobs - slave.boobsMilk < 500) { + App.UI.DOM.appendNewElement("div", el, `${His} breasts are too small to support reshaping ${his} nipples to be penetratable`, ["choices", "note"]); + } else if (slave.boobs - slave.boobsImplant - slave.boobsMilk < 500) { + App.UI.DOM.appendNewElement("div", el, `${His} implants are too large to support reshaping ${his} nipples to be penetratable`, ["choices", "note"]); + } else if (slave.nipples !== "huge") { + App.UI.DOM.appendNewElement("div", el, `${His} nipples are too small to be made fuckable`, ["choices", "note"]); + } else { + linkArray.push(makeLink( + "Reshape them to support being penetrated", + "nippleCunts", + () => { + slave.nipples = "fuckable"; + slave.nipplesPiercing = 0; + surgeryDamage(slave, 20); + }, + 1, + (slave.nipplesPiercing > 0) ? `Will remove piercings` : `` + )); + } + } + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + } + } + return el; + } + + function areolae() { + const el = new DocumentFragment(); + const r = []; + const linkArray = []; + if (slave.areolae === 0) { + r.push(`${His} areolae are small`); + if (slave.areolaeShape !== "circle") { + r.push(`and have been surgically altered to be ${slave.areolaeShape}-shaped.`); + } else { + r.push(`and fairly normal.`); + } + } else if (slave.areolae === 1) { + r.push(`${His} areolae are large`); + if (slave.areolaeShape !== "circle") { + r.push(`and have been surgically altered to be ${slave.areolaeShape}-shaped.`); + } else { + r.push(`but still fairly normal.`); + } + } else if (slave.areolae > 1) { + r.push(`${He} has`); + if (slave.areolae === 2) { + r.push(`wide`); + } else if (slave.areolae === 3) { + r.push(`huge`); + } else if (slave.areolae === 4) { + r.push(`massive`); + } + r.push(`areolae${(slave.areolaeShape !== "circle") ? `, which have been surgically altered to be ${slave.areolaeShape}-shaped` : ``}.`); + } + if (slave.indentureRestrictions < 2) { + if (slave.areolaeShape !== "circle") { + r.push(`${His} ${slave.areolaeShape}-shaped areolae can be normalized or reshaped:`); + linkArray.push(makeLink( + "Normal", + "areolae", + () => { + slave.areolaeShape = "circle"; + surgeryDamage(slave, 10); + } + )); + if (slave.areolaeShape !== "heart") { + linkArray.push(makeLink( + "Heart-shaped", + "areolae", + () => { + slave.areolaeShape = "heart"; + surgeryDamage(slave, 10); + } + )); + } + if (slave.areolaeShape !== "star") { + linkArray.push(makeLink( + "Star-shaped", + "areolae", + () => { + slave.areolaeShape = "star"; + surgeryDamage(slave, 10); + } + )); + } + } else { + if (slave.areolae > 0 && slave.areolaeShape === "circle") { + r.push(`They are big enough that they could be reshaped into a pattern. Graft skin to make ${his} areolae:`); + } + if (slave.areolae > 0 && slave.areolaeShape === "circle") { + linkArray.push(makeLink( + "Heart-shaped", + "areolae", + () => { + slave.areolae -= 1; + slave.areolaeShape = "heart"; + surgeryDamage(slave, 10); + } + )); + linkArray.push(makeLink( + "Star-shaped", + "areolae", + () => { + slave.areolae -= 1; + slave.areolaeShape = "star"; + surgeryDamage(slave, 10); + } + )); + } + } + + if (slave.areolae > 0) { + linkArray.push(makeLink( + "Reduce areolae", + "areolae", + () => { + slave.areolae -= 1; + surgeryDamage(slave, 10); + } + )); + } + if (slave.areolae < 4) { + linkArray.push(makeLink( + "Enlarge areolae", + "areolae", + () => { + slave.areolae += 1; + surgeryDamage(slave, 10); + } + )); + } + } + App.Events.addNode(el, r, "div"); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function lactation() { + const el = new DocumentFragment(); + const r = []; + const linkArray = []; + if (slave.lactation === 0) { + r.push(`${He} is not lactating.`); + } else if (slave.lactation === 2) { + r.push(`${He} is implanted with slow-release pro-lactation drugs.`); + } else { + r.push(`${He} is lactating naturally.`); + } + if (slave.lactation < 2) { + if (slave.indentureRestrictions < 2) { + linkArray.push(makeLink( + "Implant slow-release pro-lactation drugs", + "lactation", + () => { + slave.lactationDuration = 2; + slave.induceLactation = 0; + slave.boobs -= slave.boobsMilk; + slave.boobsMilk = 0; + slave.rules.lactation = "none"; + surgeryDamage(slave, 10); + }, + 1, + `This may increase ${his} natural breast size` + )); + } + } + if (slave.lactation > 1) { + linkArray.push(makeLink( + "Remove lactation implant", + "endlac", + () => { + slave.lactation = 0; + slave.lactationDuration = 0; + surgeryDamage(slave, 10); + } + )); + } + App.Events.addNode(el, r, "div"); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function fat() { + const el = new DocumentFragment(); + const r = []; + const linkArray = []; + if (slave.indentureRestrictions >= 2 && slave.weight > 30) { + App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]); + } else if (slave.weight > 30) { + if (slave.weight > 190) { + r.push(`${He} is extremely fat.`); + linkArray.push(makeLink( + "Major liposuction", + "liposuction", + () => { + slave.weight = 0; + surgeryDamage(slave, 40); + } + )); + } else if (slave.weight > 130) { + r.push(`${He} is fat.`); + linkArray.push(makeLink( + "Heavy liposuction", + "liposuction", + () => { + slave.weight = 0; + surgeryDamage(slave, 20); + } + )); + } else if (slave.weight > 30) { + r.push(`${He} is overweight.`); + linkArray.push(makeLink( + "Liposuction", + "liposuction", + () => { + slave.weight = 0; + surgeryDamage(slave, 10); + } + )); + } + if (V.surgeryUpgrade === 1) { + linkArray.push( + App.UI.DOM.link( + "Fat grafting", + () => { + surgeryDamage(slave, 40); + cashX(forceNeg(V.surgeryCost * 2), "slaveSurgery", slave); + V.surgeryType = "fat graft"; + }, + [], + "Fat Grafting" + ) + ); + } + } + App.Events.addNode(el, r, "div"); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function moreFat() { + const el = new DocumentFragment(); + const r = []; + const linkArray = []; + r.push(`${He} has`); + if (slave.waist > 95) { + r.push(`a masculine`); + } else if (slave.waist > 40) { + r.push(`an ugly`); + } else if (slave.waist > 10) { + r.push(`an unattractive`); + } else if (slave.waist >= -10) { + r.push(`an average`); + } else if (slave.waist >= -40) { + r.push(`a feminine`); + } else if (slave.waist >= -95) { + r.push(`an hourglass`); + } else { + r.push(`an absurd`); + } + r.push(`waist.`); + App.Events.addNode(el, r, "div"); + if (slave.waist >= -75) { + if (slave.indentureRestrictions < 2) { + linkArray.push(makeLink( + "Liposuction", + "lipo", + () => { + slave.waist -= 20; + surgeryDamage(slave, 10); + } + )); + } + } + if (slave.waist >= -95 && slave.waist < -75 && V.seeExtreme === 1) { + if (slave.indentureRestrictions < 1 && (slave.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { + linkArray.push(makeLink( + `Remove ribs to severely narrow ${his} waist`, + "ribs", + () => { + slave.waist = -100; + surgeryDamage(slave, 40); + } + )); + } + } + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function belly() { + const el = new DocumentFragment(); + const r = []; + const linkArray = []; + r.push(`${He}'s`); + if (slave.pregKnown > 0) { + r.push(`pregnant.`); + } else if (slave.womb.length === 0 && slave.broodmother > 0) { + r.push(`got a dormant broodmother implant in ${his} womb.`); + } else if (slave.preg > 0) { + r.push(`showing unusual discomfort as ${his} stomach is inspected. A quick test reveals that <span class="lime">${he} is pregnant.</span>`); + slave.pregKnown = 1; + } else if (slave.bellyImplant > 0) { + r.push(`got a ${slave.bellyImplant}cc implant filled implant located in ${his} abdomen.`); + if (slave.cervixImplant === 1) { + r.push(`${He} also has micropump filter installed in ${his} cervix feeding into the implant.`); + } else if (slave.cervixImplant === 2) { + r.push(`${He} also has micropump filter installed in ${his} rectum feeding into the implant.`); + } else if (slave.cervixImplant === 3) { + r.push(`${He} also has micropump filter installed in both ${his} holes feeding into the implant.`); + } + } else if (slave.bellyFluid >= 1500) { + r.push(`got a ${slave.inflationType}-filled implant located in ${his} abdomen.`); + if (slave.cervixImplant === 1) { + r.push(`${He} also has micropump filter installed in ${his} cervix feeding into the implant.`); + } else if (slave.cervixImplant === 2) { + r.push(`${He} also has micropump filter installed in ${his} rectum feeding into the implant.`); + } else if (slave.cervixImplant === 3) { + r.push(`${He} also has micropump filter installed in both ${his} holes feeding into the implant.`); + } + } else if (slave.bellyImplant === 0) { + r.push(`got an empty fillable implant located in ${his} abdomen.`); + if (slave.cervixImplant === 1) { + r.push(`${He} also has micropump filter installed in ${his} cervix feeding into the implant.`); + } else if (slave.cervixImplant === 2) { + r.push(`${He} also has micropump filter installed in ${his} rectum feeding into the implant.`); + } else if (slave.cervixImplant === 3) { + r.push(`${He} also has micropump filter installed in both ${his} holes feeding into the implant.`); + } + } else { + r.push(`got a normal stomach.`); + } + App.Events.addNode(el, r, "div"); + if (slave.indentureRestrictions >= 2) { + App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]); + } else if (slave.breedingMark === 1 && V.propOutcome === 1 && V.eugenicsFullControl !== 1 && V.arcologies[0].FSRestart !== "unset") { + App.UI.DOM.appendNewElement("div", el, `You are forbidden from affecting ${his} fertility`, ["choices", "note"]); + } else if (slave.preg > 0 || slave.inflation > 0 || slave.broodmother > 0) { + App.UI.DOM.appendNewElement("div", el, `${He} is unable to support an abdominal implant at this time`, ["choices", "note"]); + } else if (slave.bellyImplant >= 750000) { + App.UI.DOM.appendNewElement("div", el, `${His} abdominal implant is so far beyond its maximum limit it is at risk of rupturing`, ["choices", "note"]); + } else if (slave.bellyImplant >= 600000) { + App.UI.DOM.appendNewElement("div", el, `${His} abdominal implant is greatly beyond its maximum limit`, ["choices", "note"]); + } else if (slave.bellyImplant >= 450000) { + App.UI.DOM.appendNewElement("div", el, `${His} abdominal implant is over-filled`, ["choices", "note"]); + } else if (slave.bellyImplant >= 400000) { + App.UI.DOM.appendNewElement("div", el, `${His} abdominal implant is at its capacity`, ["choices", "note"]); + } else if (slave.bellyImplant > 130000 && V.arcologies[0].FSTransformationFetishistResearch !== 1) { + App.UI.DOM.appendNewElement("div", el, `${His} abdominal implant is at its capacity`, ["choices", "note"]); + } else if (slave.bellyImplant === -1 && V.bellyImplants === 1) { + if (slave.ovaries === 1 || slave.mpreg === 1) { + linkArray.push(makeLink( + `Implant fillable abdominal implant`, + "bellyIn", + () => { + slave.bellyImplant = 0; + slave.preg = -2; + slave.bellyPain += 1; + surgeryDamage(slave, 10); + } + )); + } else { + linkArray.push(makeLink( + `Implant a fillable abdominal implant`, + "bellyInMale", + () => { + slave.bellyImplant = 0; + slave.bellyPain += 2; + surgeryDamage(slave, 50); + } + )); + } + } else if (slave.bellyPain === 2) { + App.UI.DOM.appendNewElement("div", el, `${His} body cannot handle more filler this week`, ["choices", "note"]); + } else if (slave.bellyImplant > -1) { + linkArray.push(makeLink( + `Add inert filler`, + "bellyUp", + () => { + slave.bellyImplant += 200; + slave.bellyPain += 1; + surgeryDamage(slave, (slave.bellyPain) ? 30 : 10); + }, + 1, + (slave.bellyPain && slave.health.health < 0) ? "This may cause severe health issues" : "" + )); + linkArray.push(makeLink( + `Add a considerable amount of inert filler`, + "bellyUp", + () => { + slave.bellyImplant += 500; + slave.bellyPain += 1; + surgeryDamage(slave, (slave.bellyPain) ? 40 : 20); + }, + 1, + (slave.bellyPain && slave.health.health < 0) ? "This may cause severe health issues" : "" + )); + } + if (slave.bellyImplant > -1) { + linkArray.push(makeLink( + `Drain implant`, + "bellyDown", + () => { + slave.bellyImplant -= 200; + surgeryDamage(slave, 5); + } + )); + if (slave.bellyImplant >= 500) { + linkArray.push(makeLink( + `Greatly drain implant`, + "bellyDown", + () => { + slave.bellyImplant -= 500; + surgeryDamage(slave, 5); + } + )); + } + if (slave.indentureRestrictions < 2) { + linkArray.push(makeLink( + `Remove implant`, + "bellyOut", + () => { + slave.bellyImplant = -1; + slave.cervixImplant = 0; + surgeryDamage(slave, 10); + } + )); + if (slave.cervixImplant !== 1 && slave.cervixImplant !== 3 && V.cervixImplants >= 1 && slave.vagina > -1) { /* slave should have vagina */ + linkArray.push(makeLink( + `Install cervix micropump filter`, + "cervixPump", + () => { + slave.cervixImplant = (slave.cervixImplant === 0 ? 1 : 3); + surgeryDamage(slave, 10); + }, + 1, + `Will allow ${his} belly implant to slowly swell as people cum in ${his} vagina` + )); + } + if (slave.cervixImplant !== 2 && slave.cervixImplant !== 3 && V.cervixImplants === 2) { + linkArray.push(makeLink( + `Install rectal micropump filter`, + "cervixPumpA", + () => { + slave.cervixImplant = (slave.cervixImplant === 0 ? 2 : 3); + surgeryDamage(slave, 20); + }, + 1, + `Will allow ${his} belly implant to slowly swell as people cum in ${his} anus` + )); + } + } + } + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function wombImplant() { + const el = new DocumentFragment(); + const linkArray = []; + if (slave.wombImplant === "none" && (V.UterineRestraintMesh === 1) && (slave.ovaries === 1 || slave.mpreg === 1)) { + App.UI.DOM.appendNewElement("div", el, `${He} has a normal uterus${(slave.mpreg === 1) ? `, though slightly repositioned` : ``}.`); + if (slave.indentureRestrictions >= 1) { + App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]); + } else if (slave.bellyImplant > 0 || slave.preg > 0) { + App.UI.DOM.appendNewElement("div", el, `${His} womb is currently in use and unsafe to operate on`, ["choices", "note"]); + } else { + if (V.surgeryUpgrade === 1) { + if (V.UterineRestraintMesh === 1) { + App.UI.DOM.appendNewElement("div", el, ``, ["choices", "note"]); + linkArray.push(makeLink( + `Install reinforcing organic mesh`, + "womb", + () => { + slave.wombImplant = "restraint"; + surgeryDamage(slave, 25); + } + )); + } + } + } + } else if (slave.wombImplant === "restraint") { + App.UI.DOM.appendNewElement("div", el, `${He} has a mesh reinforced uterus.`); + if (slave.indentureRestrictions >= 1) { + App.UI.DOM.appendNewElement("div", el, `${His} indenture forbids elective surgery`, ["choices", "note"]); + } else if (slave.bellyImplant > 0 || slave.preg > 0) { + App.UI.DOM.appendNewElement("div", el, `${His} womb is currently in use and unsafe to operate on`, ["choices", "note"]); + } else { + linkArray.push(makeLink( + `Remove organic mesh`, + "womb", + () => { + slave.wombImplant = "none"; + surgeryDamage(slave, 50); + }, + 1, + (slave.health.health < 0) ? `This may cause severe health issues` : "" + )); + } + } + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + + function bellySag() { + const el = new DocumentFragment(); + const r = []; + const linkArray = []; + if (slave.bellySagPreg > 0) { + if (slave.belly >= 1500) { + r.push(`${He} has a sagging midriff, ruined from excessive pregnancy. It is currently filled out by ${his} swollen belly and cannot safely be worked on.`); + } else { + r.push(`${He} has a sagging midriff, ruined from excessive pregnancy.`); + linkArray.push(makeLink( + `Tummy tuck`, + "tummyTuck", + () => { + slave.bellySag = 0; + slave.bellySagPreg = 0; + surgeryDamage(slave, 20); + } + )); + } + } else if (slave.bellySag > 0) { + if (slave.belly >= 1500) { + r.push(`${He} has a sagging midriff, ruined from excessive distention. It is currently filled out by ${his} swollen belly and cannot safely be worked on.`); + } else { + r.push(`${He} has a sagging midriff, ruined from excessive distention.`); + linkArray.push(makeLink( + `Tummy tuck`, + "tummyTuck", + () => { + slave.bellySag = 0; + slave.bellySagPreg = 0; + surgeryDamage(slave, 20); + } + )); + } + } + App.Events.addNode(el, r, "div"); + App.UI.DOM.appendNewElement("div", el, App.UI.DOM.generateLinksStrip(linkArray), "choices"); + return el; + } + } + + /** + * + * @param {string} title + * @param {string} surgeryType + * @param {function(void):void} [func] + * @param {number} [costMult=1] + * @param {string} [note=""] + * @returns {HTMLAnchorElement} + */ + function makeLink(title, surgeryType, func, costMult = 1, note = "") { + const cost = Math.trunc(V.surgeryCost * costMult); + return App.UI.DOM.link( + title, + () => { + if (typeof func === "function") { + func(); + } + if (cheat) { + jQuery(container).empty().append(content()); + } else { + V.surgeryType = surgeryType; + // TODO: pass if it affected health or not? + cashX(forceNeg(cost), "slaveSurgery", slave); + Engine.play("Surgery Degradation"); + } + }, + [], + "", + `Costs ${cashFormat(cost)}.${(note) ? ` ${note}.` : ''}` + ); + } +}; diff --git a/src/npc/surgery/surgery.js b/src/npc/surgery/surgery.js index 4777bc268a2e2e0c4e56966a2663940ffbacd767..6c7ab79e59fa35ed9de98f477bf12fd3a6816431 100644 --- a/src/npc/surgery/surgery.js +++ b/src/npc/surgery/surgery.js @@ -90,11 +90,11 @@ App.Medicine.Surgery.commit = function(surgery, slave, cheat = false) { * @param {FC.Medicine.Surgery.Procedure} surgery * @param {App.Entity.SlaveState} slave * @param {boolean} [cheat] - * @returns {string} + * @returns {HTMLElement} */ App.Medicine.Surgery.makeLink = function(passage, surgery, slave, cheat = false) { if (surgery.action === undefined) { - return App.UI.disabledLink(surgery.label, [surgery.description]); + return App.UI.DOM.disabledLink(surgery.label, [surgery.description]); } function healthCosts() { @@ -111,7 +111,7 @@ App.Medicine.Surgery.makeLink = function(passage, surgery, slave, cheat = false) return 'insignificant'; } - return App.UI.link(surgery.label, App.Medicine.Surgery.commit, [surgery, slave], passage, + return App.UI.DOM.link(surgery.label, App.Medicine.Surgery.commit, [surgery, slave], passage, `${capFirstChar(surgery.description)}.${cheat ? `` : `\nSurgery costs: ${cashFormat(surgery.costs)}.\nProjected health damage: ${healthCosts()}.`}`); }; diff --git a/src/npc/surgery/surgeryDegradation.js b/src/npc/surgery/surgeryDegradation.js index 55b5340b919123b22d515153570d8446999511b1..f35ee75ca22c58ee78e8db2e8bb2dd32668a6aa6 100644 --- a/src/npc/surgery/surgeryDegradation.js +++ b/src/npc/surgery/surgeryDegradation.js @@ -2106,7 +2106,6 @@ App.UI.SlaveInteract.surgeryDegradation = function(slave) { r.push(`Due to the large amount of fat removed from ${his} midsection, it droops noticeably after the surgery.`); slave.bellySag = 5; } - slave.weight = 0; break; case "fat graft": slave.boobs += (boobFat * 100);