diff --git a/src/js/rulesAssistantOptions.tw b/src/js/rulesAssistantOptions.tw index 9b761b0560d252076f3d2b1282c17d203e881061..820d0ba0145a3c15378e22aef61d86b0b294bb72 100644 --- a/src/js/rulesAssistantOptions.tw +++ b/src/js/rulesAssistantOptions.tw @@ -798,8 +798,12 @@ window.rulesAssistantOptions = (function() { class EffectEditor extends Element { constructor() { super() - this.appendChild(new ClothesList()) - this.appendChild(new CollarList()) + this.appendChild(new AppearanceSection()) + this.appendChild(new CosmeticSection()) + this.appendChild(new BodyModSection()) + this.appendChild(new AutosurgerySection()) + this.appendChild(new RegimenSection()) + this.appendChild(new BehaviourSection()) } render() { @@ -808,6 +812,30 @@ window.rulesAssistantOptions = (function() { } } + class AppearanceSection extends Element { + constructor() { + super() + this.appendChild(new ClothesList()) + this.appendChild(new CollarList()) + this.appendChild(new ShoeList()) + this.appendChild(new CorsetList()) + this.appendChild(new VagAccVirginsList()) + this.appendChild(new VagAccAVirginsList()) + this.appendChild(new VagAccOtherList()) + this.appendChild(new DickAccVirginsList()) + this.appendChild(new DickAccOtherList()) + this.appendChild(new ButtplugsVirginsList()) + this.appendChild(new ButtplugsOtherList()) + this.appendChild(new ImplantVolumeList()) + this.appendChild(new AutosurgerySwitch()) + + } + + render() { + return document.createElement("div") + } + } + class ClothesList extends List { constructor() { super("Clothes") @@ -936,5 +964,53 @@ window.rulesAssistantOptions = (function() { } } + class ShoeList extends List { + constructor() { + super("Shoes") + setup.shoes.forEach(shoes => this.appendChild(new ListItem(shoes))) + this.selectValue(V.currentRule.set.shoes) + this.onchange = (label, value) => V.currentRule.set.shoes = value + } + } + + class CorsetList extends List { + constructor() { + super("Corsetage") + const bellies = [] + setup.bellyAccessories.forEach(acc => { + if (acc.fs === undefined && acc.rs === undefined) + bellies.push([acc.name, acc.value]) + else if (acc.fs === "repopulation" && V.arcologies[0].FSRepopulationFocus !== "unset") + bellies.push([acc.name + " (FS)", acc.value]) + else if (acc.rs === "boughtBelly" && V.clothesBoughtBelly === 1) + bellies.push([acc.name + " (Purchased)", acc.value]) + }) + bellies.forEach(pair => this.appendChild(new ListItem(...pair))) + this.selectValue(V.currentRule.set.bellyAccessory) + this.onchange = (label, value) => V.currentRule.set.bellyAccessory + } + } + + class VagAccVirginsList extends List { + constructor() { + super("Vaginal Accessories for Virgins") + const accs = [] + setup.vaginalAccessories.forEach(acc => { + if (acc.fs === undefined && acc.rs === undefined) + accs.push([acc.name, acc.value]) + else if (acc.rs === "buyBigDildos" && V.toysBoughtDildos === 1) + accs.push([acc.name + " (Purchased)", acc.value]) + }) + accs.forEach(pair => this.appendChild(new ListItem(...pair))) + this.selectValue(V.currentRule.set.virginAccessory) + this.onchange = (label, value) => V.currentRule.set.virginAccessory = value + } + } + + class VagAccAVirginsList extends List { + constructor() { + } + } + return rulesAssistantOptions })() diff --git a/src/js/rulesAutosurgery.tw b/src/js/rulesAutosurgery.tw index 5d518f25af09813380b8a5e34fd54bfc2ed78533..09694357a3a674039b80a01c760d8a87c83ca760 100644 --- a/src/js/rulesAutosurgery.tw +++ b/src/js/rulesAutosurgery.tw @@ -143,103 +143,125 @@ window.rulesAutosurgery = (function() { surgeries.push("surgery to correct her vision") slave.eyes = 1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.eyes == 1) && (thisSurgery.eyes == -1)) { surgeries.push("surgery to blur her vision") slave.eyes = -1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.lactation == 2) && (thisSurgery.lactation == 0)) { surgeries.push("surgery to remove her lactation implants") slave.lactation = 0 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if (slave.lactation != 2 && (thisSurgery.lactation == 1)) { surgeries.push("lactation inducing implanted drugs") slave.lactation = 2 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.prostate == 2) && (thisSurgery.prostate == 0)) { surgeries.push("surgery to remove her prostate implant") slave.prostate = 0 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if (slave.prostate == 1 && (thisSurgery.prostate == 1)) { surgeries.push("a precum production enhancing drug implant") slave.prostate = 2 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.anus > 3) && (thisSurgery.cosmetic > 0)) { surgeries.push("a restored anus") slave.anus = 3 - if (slave.analSkill > 10) { + if (slave.analSkill > 10) slave.analSkill -= 10 - } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.vagina > 3) && (thisSurgery.cosmetic > 0)) { surgeries.push("a restored pussy") slave.vagina = 3 - if (slave.vaginalSkill > 10) { + if (slave.vaginalSkill > 10) slave.vaginalSkill -= 10 - } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.faceImplant <= 15) && (slave.face <= 95) && (thisSurgery.cosmetic > 0)) { surgeries.push("a nicer face") if (slave.faceShape == "masculine") {slave.faceShape = "androgynous"} slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/100)-5*V.surgeryUpgrade slave.face = Math.clamp(slave.face+20,-100,100) V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.faceImplant <= 15) && (slave.ageImplant != 1) && (slave.visualAge >= 25) && (thisSurgery.cosmetic > 0)) { surgeries.push("an age lift") slave.ageImplant = 1 slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/100)-5*V.surgeryUpgrade - if (slave.visualAge > 80) { - slave.visualAge -= 40 - } else if (slave.visualAge >= 70) { - slave.visualAge -= 30 - } else if (slave.visualAge > 50) { - slave.visualAge -= 20 - } else if (slave.visualAge > 36) { - slave.visualAge -= 10 - } else { - slave.visualAge -= 5 - } - V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (slave.visualAge > 80) slave.visualAge -= 40 + else if (slave.visualAge >= 70) slave.visualAge -= 30 + else if (slave.visualAge > 50) slave.visualAge -= 20 + else if (slave.visualAge > 36) slave.visualAge -= 10 + else slave.visualAge -= 5 + V.cash -= V.surgeryCost + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if (((slave.underArmHStyle != "bald" && slave.underArmHStyle != "hairless") || (slave.pubicHStyle != "bald" && slave.pubicHStyle != "hairless")) && (thisSurgery.bodyhair == 2)) { surgeries.push("body hair removal") if (slave.underArmHStyle != "hairless") {slave.underArmHStyle = "bald"} if (slave.pubicHStyle != "hairless") {slave.pubicHStyle = "bald"} V.cash -= V.surgeryCost + } else if ((slave.bald == 0 || slave.hStyle != "bald") && (thisSurgery.hair == 2)) { surgeries.push("hair removal") slave.hStyle = "bald" slave.bald = 1 V.cash -= V.surgeryCost + } else if ((slave.weight >= 10) && (thisSurgery.cosmetic > 0)) { surgeries.push("liposuction") slave.weight -= 50 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.voice == 1) && (slave.voiceImplant == 0) && (thisSurgery.cosmetic > 0)) { surgeries.push("a feminine voice") slave.voice += 1 slave.voiceImplant += 1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) slave.health -= 5 + else slave.health -= 10 + } else if ((slave.waist >= -10) && (thisSurgery.cosmetic > 0)) { surgeries.push("a narrower waist") slave.waist -= 20 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if (((slave.boobShape == "saggy") || (slave.boobShape == "downward-facing")) && (thisSurgery.cosmetic > 0) && (slave.breastMesh != 1)) { surgeries.push("a breast lift") slave.boobShape = "normal" V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if (((slave.boobShape == "normal") || (slave.boobShape == "wide-set")) && (thisSurgery.cosmetic > 0) && (slave.breastMesh != 1)) { if (slave.boobs > 800) { slave.boobShape = "torpedo-shaped" @@ -248,7 +270,9 @@ window.rulesAutosurgery = (function() { } surgeries.push("more interestingly shaped breasts") V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((thisSurgery.lips == 0) && (slave.lipsImplant > 0)) { surgeries.push("surgery to remove her lip implants") slave.lips -= slave.lipsImplant @@ -257,31 +281,38 @@ window.rulesAutosurgery = (function() { slave.oralSkill -= 10 } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.lips <= 95) && (slave.lips < thisSurgery.lips)) { if (thisSurgery.lips !== "no default setting") { surgeries.push("bigger lips") slave.lipsImplant += 10 slave.lips += 10 - if (slave.oralSkill > 10) { + if (slave.oralSkill > 10) slave.oralSkill -= 10 - } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } + } else if ((slave.faceImplant <= 45) && (slave.face <= 95) && (thisSurgery.cosmetic == 2)) { surgeries.push("a nicer face") if (slave.faceShape == "masculine") {slave.faceShape = "androgynous"} slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/100)-5*V.surgeryUpgrade slave.face = Math.clamp(slave.face+20,-100,100) V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.hips < 1) && (slave.hips < thisSurgery.hips) && (V.surgeryUpgrade == 1)) { surgeries.push("wider hips") slave.hips++ slave.hipsImplant++ V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.faceImplant <= 45) && (slave.ageImplant != 1) && (slave.visualAge >= 25) && (thisSurgery.cosmetic == 2)) { surgeries.push("an age lift") slave.ageImplant = 1 @@ -298,25 +329,33 @@ window.rulesAutosurgery = (function() { } slave.faceImplant += 25-5*Math.trunc(V.PC.medicine/100)-5*V.surgeryUpgrade V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.waist >= -95) && (thisSurgery.cosmetic == 2) && (V.seeExtreme == 1)) { surgeries.push("a narrower waist") slave.waist = Math.clamp(slave.waist-20,-100,100) V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.voice < 3) && (slave.voiceImplant == 0) && (thisSurgery.cosmetic == 2)) { surgeries.push("a bimbo's voice") slave.voice += 1 slave.voiceImplant += 1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((thisSurgery.butt == 0) && (slave.buttImplant > 0)) { surgeries.push("surgery to remove her butt implants") slave.butt -= slave.buttImplant slave.buttImplant = 0 slave.buttImplantType = 0 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((thisSurgery.boobs == 0) && (slave.boobsImplant > 0)) { surgeries.push("surgery to remove her boob implants") slave.boobs -= slave.boobsImplant @@ -330,7 +369,8 @@ window.rulesAutosurgery = (function() { slave.buttImplant = 1 slave.butt += 1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } } else if ((slave.boobs <= 600) && (slave.lactation < 2) && (slave.boobs+400 <= thisSurgery.boobs)) { if (thisSurgery.boobs !== "no default setting") { @@ -338,8 +378,8 @@ window.rulesAutosurgery = (function() { slave.boobsImplant += 400 slave.boobs += 400 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) { - slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } } else if ((slave.boobs <= 600) && (slave.lactation < 2) && (slave.boobs+200 <= thisSurgery.boobs)) { if (thisSurgery.boobs !== "no default setting") { @@ -347,24 +387,30 @@ window.rulesAutosurgery = (function() { slave.boobsImplant += 200 slave.boobs += 200 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } + } else if ((slave.butt <= 5) && (slave.butt < thisSurgery.butt)) { if (thisSurgery.butt !== "no default setting") { surgeries.push("a bigger butt") slave.buttImplant = 1 slave.butt += 1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } + } else if ((slave.boobs <= 2000) && (slave.lactation < 2) && (slave.boobs+400 < thisSurgery.boobs)) { if (thisSurgery.boobs !== "no default setting") { surgeries.push("bigger boobs") slave.boobsImplant += 400 slave.boobs += 400 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } + } else if ((slave.anus > 0) && (V.surgeryUpgrade == 1) && (thisSurgery.holes == 2)) { surgeries.push("a virgin anus") slave.anus = 0 @@ -372,21 +418,26 @@ window.rulesAutosurgery = (function() { slave.analSkill -= 10 } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.vagina > 0) && (V.surgeryUpgrade == 1) && (thisSurgery.holes == 2)) { surgeries.push("a virgin pussy") slave.vagina = 0 - if (slave.vaginalSkill > 10) { + if (slave.vaginalSkill > 10) slave.vaginalSkill -= 10 - } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.hips < 2) && (slave.hips < thisSurgery.hips) && (V.surgeryUpgrade == 1)) { surgeries.push("wider hips") slave.hips++ slave.hipsImplant++ V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.anus > 1) && (thisSurgery.holes == 1)) { surgeries.push("a tighter anus") slave.anus = 1 @@ -394,7 +445,9 @@ window.rulesAutosurgery = (function() { slave.analSkill -= 10 } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.vagina > 1) && (thisSurgery.holes == 1)) { surgeries.push("a tighter pussy") slave.vagina = 1 @@ -402,29 +455,37 @@ window.rulesAutosurgery = (function() { slave.vaginalSkill -= 10 } V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if ((slave.butt <= 8) && (slave.butt < thisSurgery.butt)) { if (thisSurgery.butt !== "no default setting") { surgeries.push("a bigger butt") slave.buttImplant = 1 slave.butt += 1 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } + } else if ((slave.boobs <= 9000) && (slave.lactation < 2) && (slave.boobs < thisSurgery.boobs)) { if (thisSurgery.boobs !== "no default setting") { surgeries.push("bigger boobs") slave.boobsImplant += 200 slave.boobs += 200 V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } + } else if ((slave.hips < 3) && (slave.hips < thisSurgery.hips) && (V.surgeryUpgrade == 1)) { surgeries.push("wider hips") slave.hips++ slave.hipsImplant++ V.cash -= V.surgeryCost - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} + } else if (slave.bellyImplant < 0 && V.bellyImplants > 0 && thisSurgery.bellyImplant == "install" && slave.womb.length == 0 && slave.broodmother == 0) { slave.bellyImplant = 100 slave.preg = -2 @@ -432,39 +493,26 @@ window.rulesAutosurgery = (function() { if (V.activeSlave.ovaries == 1 || V.activeSlave.mpreg == 1) { surgeries.push("belly implant") V.surgeryType = "bellyIn" - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) {slave.health -= 5} + else {slave.health -= 10} } else { surgeries.push("male belly implant") V.surgeryType = "bellyInMale" - if (V.PC.medicine >= 100) {slave.health -= 25} else {slave.health -= 50} + if (V.PC.medicine >= 100) {slave.health -= 25} + else {slave.health -= 50} } - // TODO - /* - <<silently>> - _tmpNextL = V.nextLink - _tmpNextB = V.nextButton - <<include "Surgery Degradation">> - V.nextLink = _tmpNextL - V.nextButton = _tmpNextB - <</silently>> - */ + bellyIn(slave) + } else if (slave.bellyImplant >= 0 && thisSurgery.bellyImplant == "remove") { surgeries.push("belly implant removal") V.surgeryType = "bellyOut" - if (V.PC.medicine >= 100) {slave.health -= 5} else {slave.health -= 10} + if (V.PC.medicine >= 100) + slave.health -= 5 + else + slave.health -= 10 slave.preg = 0 slave.bellyImplant = -1 V.cash -= V.surgeryCost - // TODO - /* - <<silently>> - _tmpNextL = V.nextLink - _tmpNextB = V.nextButton - <<include "Surgery Degradation">> - V.nextLink = _tmpNextL - V.nextButton = _tmpNextB - <</silently>> - */ } } @@ -478,4 +526,16 @@ window.rulesAutosurgery = (function() { } r += `${V.assistantName === "your personal assistant" ? "Your personal assistant" : V.assistantName}, ordered to apply surgery, gives ${slave.slaveName} <span class="lime">${surgeriesDisplay}.</span>` } + + function bellyIn(slave) { + // less hacky version of calling surgery degradation silently + if (slave.devotion > 50) + slave.devotion += 4 + else if (slave.devotion >= -20) + slave.trust -= 5 + else { + slave.trust -= 5 + slave.devotion -= 5 + } + } })()