From 0001cfbbc5ab790138748ed58e8fa4061c672d96 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Mon, 30 Nov 2020 11:07:13 -0500 Subject: [PATCH] piercing work --- .../bodyModification/bodyModification.js | 1434 ++++------------- .../bodyModification/bodyModification.tw | 2 + 2 files changed, 276 insertions(+), 1160 deletions(-) diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js index 2db2da2b332..ed41050f65c 100644 --- a/src/facilities/bodyModification/bodyModification.js +++ b/src/facilities/bodyModification/bodyModification.js @@ -1,1210 +1,324 @@ App.UI.bodyModification = function(slave, cheat = false) { const el = new DocumentFragment(); + const { + He, His, + he, his, him, himself + } = getPronouns(slave); + Enunciate(slave); + let piercingLevel; + let modReaction; + let scarApplied; + let brandApplied; + + if (V.seeImages > 0) { + App.Events.drawEventArt(el, slave); + } + el.append(intro()); + el.append(reaction()); + el.append(piercings()); - return el; - -App.Utils.setLocalPronouns(slave); -Enunciate(slave); + return el; -<h1>Body Modification Studio</h1> -<p class="scene-intro"> - r.push(`${V.SlaveFullName(slave)}`); - r.push(` is lying strapped down on the table in your body modification studio. ${He} is entirely at your mercy.`); + function intro() { + const el = new DocumentFragment(); + App.UI.DOM.appendNewElement("h1", el, "Body Modification Studio"); + App.UI.DOM.appendNewElement("div", el, `${SlaveFullName(slave)} is lying strapped down on the table in your body modification studio. ${He} is entirely at your mercy.`); + return el; + } - if (V.brandApplied || V.degradation || V.scarApplied || V.modReaction) { - if (slave.fuckdoll === 0) { - if (canSee(slave)) { - r.push(`There's a mirror on the ceiling, so ${he} can see`); -} else { - r.push(`${He} can't see, so `); -if (canHear(slave)) { - r.push(`you're careful to describe`); -} else { - r.push(`${he} must, by ${himself}, get a feel for`); -} -} - r.push(` ${his} new appearance.`); - } - if (V.brandApplied) { - r.push(`The smell of burnt flesh hangs in the air. Being branded <span class="health.dec">has hurt ${his} health a little.</span>`); - healthDamage(slave, 10); - delete V.brandApplied; - } - if (V.scarApplied) { - if (V.scarTarget.local === "entire body") { - switch (V.scarDesign.local) { - case "burn": - r.push(`Your goal wasn't to make the distinct shape of a brand, but rather to permanently mar the skin with an open flame.`); - case "surgical": - if (V.PC.skill.medicine >= 100) { - r.push(`Your medical mastery is perfect, so creating Frankenstein's monster was a deliberate work of art.`); - } else if (V.PC.skill.medicine > 0) { - r.push(`Your medical skills are progressing, and the Frankenstein effect reminds you of your earliest attempts.`); - } else { - r.push(`You really slashed away with your knife, but were careful not to allow ${him} to bleed out.`); - } - default: - r.push(`The best way to apply scarring to the entire body is with a good old fashioned whip. ${His} body is a mess of crisscrossed lines`); -if (hasAnyNaturalLimbs(slave)) { - r.push(`, and ${his} `); -if (getLimbCount(slave, 1) > 1) { - r.push(`limbs twisted so violently in their restraints that they too have`); -} else { - r.push(`only limb twists so violently in its restraints that it too has`); -} - r.push(` become scarred`); -} - r.push(`.`); - } - r.push(`No matter how you chose to apply it, scarring so much of ${his} body has <span class="health.dec"> hurt ${his} health.</span>`); - healthDamage(slave, 20); - } else { - if (slave.scar[V.scarTarget.local][V.scarDesign.local] > 0) { - r.push(`This is not the first time ${he} was scarred like this.`); + function reaction() { + const el = new DocumentFragment(); + let r = []; + if (brandApplied || V.degradation || scarApplied || modReaction) { + if (slave.fuckdoll === 0) { + if (canSee(slave)) { + r.push(`There's a mirror on the ceiling, so ${he} can see`); + } else { + r.push(`${He} can't see, so `); + if (canHear(slave)) { + r.push(`you're careful to describe`); + } else { + r.push(`${he} must, by ${himself}, get a feel for`); + } } - switch (V.scarDesign.local) { - case "whip": - r.push(`Targeting a single area with a whip is not easy. You set the mood by carefully arranging candles dripping on to a whimpering `); -V.slave.slaveName - r.push(`, then got ${his} attention with a quick`); - if (canSee(slave)) { - r.push(`wave`); - } else if (canHear(slave)) { - r.push(`crack`); - } else { - r.push(`tap`); - } - r.push(`of the whip. One by one, you carefully snuffed out the candles, flicking hot wax as you went. After pausing a moment, you prepared to leave your mark.`); - if (["penis", "vagina"].includes(V.scarTarget.local)) { - if (slave.dick > 4 && V.seeDicks) { - r.push(`${His} dick was large enough that it was not too difficult to hit,`); - } else if (slave.dick > 0 && V.seeDicks) { - r.push(`${His} dick was a challengingly small target,`); + r.push(`${his} new appearance.`); + } + if (brandApplied) { + r.push(`The smell of burnt flesh hangs in the air. Being branded <span class="health.dec">has hurt ${his} health a little.</span>`); + healthDamage(slave, 10); + brandApplied = false; + } + if (scarApplied) { + if (V.scarTarget.local === "entire body") { + switch (V.scarDesign.local) { + case "burn": + r.push(`Your goal wasn't to make the distinct shape of a brand, but rather to permanently mar the skin with an open flame.`); + break; + case "surgical": + if (V.PC.skill.medicine >= 100) { + r.push(`Your medical mastery is perfect, so creating Frankenstein's monster was a deliberate work of art.`); + } else if (V.PC.skill.medicine > 0) { + r.push(`Your medical skills are progressing, and the Frankenstein effect reminds you of your earliest attempts.`); } else { - if (slave.clit > 0) { - r.push(`${His} clit was a difficult target,`); + r.push(`You really slashed away with your knife, but were careful not to allow ${him} to bleed out.`); + } + break; + default: + r.push(`The best way to apply scarring to the entire body is with a good old fashioned whip. ${His} body is a mess of crisscrossed lines`); + if (hasAnyNaturalLimbs(slave)) { + r.push(`, and ${his} `); + if (getLimbCount(slave, piercingLevel) > 1) { + r.push(`limbs twisted so violently in their restraints that they too have`); } else { - r.push(`${His} clit was an impossibly tiny target,`); + r.push(`only limb twists so violently in its restraints that it too has`); } + r.push(` become scarred`); } - r.push(`but the end was never in doubt. The tip connected with ${his} most intimate place on the first try, and plunged ${him} into absolute agony.`); - } else { - r.push(`The end was never in doubt. A few strokes of the whip plunged ${him} into agony ${his} body will not allow ${him} to forget.`); - } - case "burn": - r.push(`Your goal wasn't to make the distinct shape of a brand, but rather to permanently mar the `); -V.slave.skin - r.push(` skin of ${his} ${V.scarTarget.local} with an open flame.`); - case "surgical": - if (V.PC.skill.medicine >= 100) { - r.push(`Your medical mastery is perfect, so creating such a scar was a deliberate act of degradation.`); - } else if (V.PC.skill.medicine > 0) { - r.push(`Your medical skills are progressing, and the sloppy scar reminds you of your earliest attempts.`); - } else { - r.push(`You really slashed away at ${V.scarTarget.local} with your knife, but were careful not to allow ${him} to bleed out.`); - } - default: - r.push(`You had no shortage of kinky and medical tools for applying scars. ${His} `); -V.slave.skin - r.push(` ${V.scarTarget.local} is bleeding profusely.`); - } - - r.push(`No matter how you chose to apply it, being scarred <span class="health.dec"> hurt ${his} health a little.</span>`); - healthDamage(slave, 10); - } - r.push(`Afterwards you seal the wounds with a white medical spray. Infection is no risk to `); -V.slave.slaveName - r.push(` thanks to your curatives, but in order to form obvious scar tissue you had to keep air out and delay normal healing as long as possible.`); - delete V.scarApplied; - } - if (slave.fetish !== "mindbroken" && slave.fuckdoll === 0) { - if (V.degradation > 1) { - if (V.degradation > 5) { - if (slave.devotion <= 50 && slave.trust < -50) { - r.push(`${He} is appalled by the whorish spectacle you have made of ${him}. ${He} <span class="gold">fears</span> you all the more for this but is so terrified of you it does not affect ${his} submission.`); - slave.trust -= 10; - } else if (slave.devotion <= 50) { - r.push(`${He} is appalled by the whorish spectacle you have made of ${him}. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for this.`); - slave.devotion -= 10, slave.trust -= 10; - } else { - r.push(`${He} is shocked by the whorish spectacle you have made of ${him}. However, ${he} is so submissive to your will that ${he} <span class="hotpink">accepts</span> that the slave `); -if (canSee(slave)) { - r.push(`in the mirror`); -} else { - r.push(`${he} pictures`); -} - r.push(` is who ${he} is now.`); - slave.devotion += 4; + r.push(`.`); } - <br><br> + r.push(`No matter how you chose to apply it, scarring so much of ${his} body has <span class="health.dec"> hurt ${his} health.</span>`); + healthDamage(slave, 20); } else { - if (slave.devotion < -20 && slave.trust < 20) { - r.push(`${He} is <span class="gold">afraid</span> that ${he} has been permanently altered against ${his} will, but is also scared of your reaction to any objection and suppresses ${his} disgust.`); - slave.trust -= 5; - } else if (slave.devotion < -20) { - r.push(`${He} is <span class="mediumorchid">angry</span> and <span class="gold">afraid</span> that ${he} has been permanently altered against ${his} will.`); - slave.devotion -= 5, slave.trust -= 5; - } else { - r.push(`${He} is saddened to have been altered against ${his} will. However, ${he} realizes that ${he} is a slave, so ${he} <span class="hotpink">accepts</span> your work.`); - slave.devotion += 2; + if (slave.scar[V.scarTarget.local][V.scarDesign.local] > 0) { + r.push(`This is not the first time ${he} was scarred like this.`); + } + switch (V.scarDesign.local) { + case "whip": + r.push(`Targeting a single area with a whip is not easy. You set the mood by carefully arranging candles dripping on to a whimpering ${slave.slaveName}, then got ${his} attention with a quick`); + if (canSee(slave)) { + r.push(`wave`); + } else if (canHear(slave)) { + r.push(`crack`); + } else { + r.push(`tap`); + } + r.push(`of the whip. One by one, you carefully snuffed out the candles, flicking hot wax as you went. After pausing a moment, you prepared to leave your mark.`); + if (["penis", "vagina"].includes(V.scarTarget.local)) { + if (slave.dick > 4 && V.seeDicks) { + r.push(`${His} dick was large enough that it was not too difficult to hit,`); + } else if (slave.dick > 0 && V.seeDicks) { + r.push(`${His} dick was a challengingly small target,`); + } else { + if (slave.clit > 0) { + r.push(`${His} clit was a difficult target,`); + } else { + r.push(`${His} clit was an impossibly tiny target,`); + } + } + r.push(`but the end was never in doubt. The tip connected with ${his} most intimate place on the first try, and plunged ${him} into absolute agony.`); + } else { + r.push(`The end was never in doubt. A few strokes of the whip plunged ${him} into agony ${his} body will not allow ${him} to forget.`); + } + break; + case "burn": + r.push(`Your goal wasn't to make the distinct shape of a brand, but rather to permanently mar the ${slave.skin} skin of ${his} ${V.scarTarget.local} with an open flame.`); + break; + case "surgical": + if (V.PC.skill.medicine >= 100) { + r.push(`Your medical mastery is perfect, so creating such a scar was a deliberate act of degradation.`); + } else if (V.PC.skill.medicine > 0) { + r.push(`Your medical skills are progressing, and the sloppy scar reminds you of your earliest attempts.`); + } else { + r.push(`You really slashed away at ${V.scarTarget.local} with your knife, but were careful not to allow ${him} to bleed out.`); + } + break; + default: + r.push(`You had no shortage of kinky and medical tools for applying scars. ${His} ${slave.skin} ${V.scarTarget.local} is bleeding profusely.`); } - } - V.degradation = 0; - } - if (V.modReaction) { - r.push(`${V.V.modReaction}`); - delete V.modReaction; - } - } - } - - /* 000-250-006 */ - if (V.seeImages === 1) { - if (V.imageChoice === 1) { - <div class="imageRef lrgVector"><div class="mask"> </div> -V.SlaveArt(slave, 3, 0)</div> - } else { - <div class="imageRef lrgRender"><div class="mask"> </div> -V.SlaveArt(slave, 3, 0)</div> - } - } - /* 000-250-006 */ -</p> - -/* PIERCINGS */ - -_piercingCount =(slave.earPiercing + slave.nosePiercing + slave.eyebrowPiercing + slave.lipsPiercing + slave.tonguePiercing + slave.nipplesPiercing + slave.areolaePiercing + slave.corsetPiercing + slave.navelPiercing + slave.clitPiercing + slave.vaginaPiercing + slave.dickPiercing + slave.anusPiercing); - -/*DESCRIPTIONS */ - -<h2>Piercings</h2> - -<div class="indent"> - <div style="padding-bottom:1em"> - if (_piercingCount === 0) { - r.push(`${His} smooth `); -V.slave.skin - r.push(` skin is completely unpierced.`); - } - <div> -V.App.Desc.piercing(slave, "ear")</div> - <div> -V.App.Desc.piercing(slave, "nose")</div> - <div> -V.App.Desc.piercing(slave, "eyebrow")</div> - <div> -V.App.Desc.piercing(slave, "lips")</div> - <div> -V.App.Desc.piercing(slave, "tongue")</div> - <div> -V.App.Desc.piercing(slave, "nipple")</div> - <div> -V.App.Desc.piercing(slave, "areolae")</div> - <div> -V.App.Desc.piercing(slave, "navel")</div> - <div> -V.App.Desc.piercing(slave, "corset")</div> - <div> -V.App.Desc.piercing(slave, "clit")</div> - <div> -V.App.Desc.piercing(slave, "vagina")</div> - <div> -V.App.Desc.piercing(slave, "dick")</div> - <div> -V.App.Desc.piercing(slave, "anus")</div> - - <div> -V.App.Desc.piercing(slave, "chastity")</div> - </div> - - /* Apply piercings */ - - <div> - r.push(`Choose piercing style:`); - if (V.piercingLevel !== 1) {[[Light|Body Modification][V.piercingLevel = 1]] -} else { - r.push(`Light`); -} - if (V.piercingLevel !== 2) {| [[Heavy|Body Modification][V.piercingLevel = 2]] -} else {| Heavy -} - if (V.piercingLevel !== 3) {| [[Smart|Body Modification][V.piercingLevel = 3]] -} else {| Smart -} - if (V.piercingLevel !== 0) {| [[Remove|Body Modification][V.piercingLevel = 0]] -} else {| Remove -} - </div> - - <div> - if (V.piercingLevel === 1) { - //Lightly// pierce ${his}: - - <<link "Entire body">> - V.modReaction = ""; - if (slave.earPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "ear", 1); -} - if (slave.nosePiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "nose", 1); -} - if (slave.eyebrowPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "eyebrow", 1); -} - if (slave.lipsPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "lips", 1); -} - if (slave.tonguePiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "tongue", 1); -} - if (slave.nipples !== "fuckable") { - if (slave.nipplesPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "nipples", 1); -} - } - if (slave.areolaePiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "areolae", 1); -} - if (slave.corsetPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "corset", 1); -} - if (slave.navelPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "navel", 1); -} - if (slave.vagina !== -1) || (slave.dick !== 0) { - if (slave.clitPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "clit", 1); -} - } - if (slave.vagina !== -1) { - if (slave.vaginaPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "vagina", 1); -} - } - if (slave.dick > 0) { - if (slave.dickPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "dick", 1); -} - } - if (slave.anusPiercing !== 1) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "anus", 1); -} - <<goto "Body Modification">> - <</link>> - - if (slave.earPiercing !== 1) { | [[Ear|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "ear", 1)]] -} - if (slave.nosePiercing !== 1) { | [[Nose|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "nose", 1)]] -} - if (slave.eyebrowPiercing !== 1) { | [[Eyebrow|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "eyebrow", 1)]] -} - if (slave.lipsPiercing !== 1) { | [[Lips|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "lips", 1)]] -} - if (slave.tonguePiercing !== 1) { | [[Tongue|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "tongue", 1)]] -} - if (slave.nipples !== "fuckable") { - if (slave.nipplesPiercing !== 1) { | [[Nipples|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "nipples", 1)]] -} - } - if (slave.areolaePiercing !== 1) { | [[Areolae|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "areolae", 1)]] -} - if (slave.corsetPiercing !== 1) { | [[Corset|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "corset", 1)]] -} - if (slave.navelPiercing !== 1) { | [[Navel|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "navel", 1)]] -} - if (slave.vagina !== -1) || (slave.dick !== 0) { - if (slave.vagina !== -1) { - if (slave.clitPiercing !== 1) { | [[Clit|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "clit", 1)]] -} - } else { - if (slave.clitPiercing !== 1) { | [[Dickhead|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "clit", 1)]] -} - } - } - if (slave.vagina !== -1) { - if (slave.vaginaPiercing !== 1) { - r.push(` | [[Vagina|Body Modification][${V.modReaction} = App.Medicine.Modification.setPiercing(slave, "vagina", 1)]]`); -} - } - if (slave.dick > 0) { - if (slave.dickPiercing !== 1) { | [[Dick|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "dick", 1)]] -} - } - if (slave.anusPiercing !== 1) { | [[Anus|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "anus", 1)]] -} - } else if (V.piercingLevel === 2) { - r.push(`''Heavily'' pierce ${his}:`); - - <<link "Entire body">> - V.modReaction = ""; - if (slave.earPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "ear", 2), V.degradation += 1; -} - if (slave.nosePiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "nose", 2), V.degradation += 1; -} - if (slave.eyebrowPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "eyebrow", 2), V.degradation += 1; -} - if (slave.lipsPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "lips", 2), V.degradation += 1; -} - if (slave.tonguePiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "tongue", 2), V.degradation += 1; -} - if (slave.nipples !== "fuckable") { - if (slave.nipplesPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "nipples", 2), V.degradation += 1; -} - } - if (slave.areolaePiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "areolae", 2), V.degradation += 1; -} - if (slave.corsetPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "corset", 2), V.degradation += 1; -} - if (slave.navelPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "navel", 2), V.degradation += 1; -} - if (slave.vagina !== -1) || (slave.dick !== 0) { - if (slave.clitPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "clit", 2), V.degradation += 1; -} - } - if (slave.vagina !== -1) { - if (slave.vaginaPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "vagina", 2), V.degradation += 1; -} - } - if (slave.dick > 0) { - if (slave.dickPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "dick", 2), V.degradation += 1; -} - } - if (slave.anusPiercing !== 2) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "anus", 2), V.degradation += 1; -} - <<goto "Body Modification">> - <</link>> - if (slave.earPiercing !== 2) { | [[Ear|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "ear", 2),V.degradation += 1]] -} - if (slave.nosePiercing !== 2) { | [[Nose|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "nose", 2),V.degradation += 1]] -} - if (slave.eyebrowPiercing !== 2) { | [[Eyebrow|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "eyebrow", 2),V.degradation += 1]] -} - if (slave.lipsPiercing !== 2) { | [[Lips|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "lips", 2),V.degradation += 1]] -} - if (slave.tonguePiercing !== 2) { | [[Tongue|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "tongue", 2),V.degradation += 1]] -} - if (slave.nipples !== "fuckable") { - if (slave.nipplesPiercing !== 2) { | [[Nipples|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "nipples", 2),V.degradation += 1]] -} - } - if (slave.areolaePiercing !== 2) { | [[Areolae|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "areolae", 2),V.degradation += 1]] -} - if (slave.corsetPiercing !== 2) { | [[Corset|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "corset", 2),V.degradation += 1]] -} - if (slave.navelPiercing !== 2) { | [[Navel|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "navel", 2),V.degradation += 1]] -} - if (slave.vagina !== -1) || (slave.dick !== 0) { - if (slave.vagina !== -1) { - if (slave.clitPiercing !== 2) { - r.push(` | [[Clit|Body Modification][${V.modReaction} = App.Medicine.Modification.setPiercing(slave, "clit", 2),V.degradation += 1]]`); -} - } else { - if (slave.clitPiercing !== 2) { - r.push(` | [[Dickhead|Body Modification][${V.modReaction} = App.Medicine.Modification.setPiercing(slave, "clit", 2),V.degradation += 1]]`); -} + r.push(`No matter how you chose to apply it, being scarred <span class="health.dec"> hurt ${his} health a little.</span>`); + healthDamage(slave, 10); } + r.push(`Afterwards you seal the wounds with a white medical spray. Infection is no risk to `); + slave.slaveName; + r.push(` thanks to your curatives, but in order to form obvious scar tissue you had to keep air out and delay normal healing as long as possible.`); + scarApplied = false; } - if (slave.vagina !== -1) { - if (slave.vaginaPiercing !== 2) { - r.push(` | [[Vagina|Body Modification][${V.modReaction} = App.Medicine.Modification.setPiercing(slave, "vagina", 2),V.degradation += 1]]`); -} - } - if (slave.dick > 0) { - if (slave.dickPiercing !== 2) { | [[Dick|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "dick", 2),V.degradation += 1]] -} - } - if (slave.anusPiercing !== 2) { | [[Anus|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "anus", 2),V.degradation += 1]] -} - } else if (V.piercingLevel === 3) { - if (slave.vagina !== -1) || (slave.dick !== 0) { - if (slave.clitPiercing !== 3) { - r.push(`Give ${him} a [[smart piercing?|Body Modification][${V.modReaction} = App.Medicine.Modification.setPiercing(slave, "clit", 3),slave.clitSetting = "all",V.degradation += 1]] //Costs `); -V.cashFormat(V.SPcost) - r.push(`, unlocks options to mold sexuality//`); - } else { - r.push(`${He} already has a smart piercing!`); - } - } - } else if (V.piercingLevel === 0) { - r.push(`Remove piercings from:`); - - /* no dick/vagina checks in 'remove' so stealth piercings can be cleaned. Check only for piercings. */ - <<link "Everywhere">> - V.modReaction = ""; - if (slave.earPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "ear", 0); -} - if (slave.nosePiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "nose", 0); -} - if (slave.eyebrowPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "eyebrow", 0); -} - if (slave.lipsPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "lips", 0); -} - if (slave.tonguePiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "tongue", 0); -} - if (slave.nipplesPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "nipples", 0); -} - if (slave.areolaePiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "areolae", 0); -} - if (slave.corsetPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "corset", 0); -} - if (slave.navelPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "navel", 0); -} - if (slave.clitPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "clit", 0); -} - if (slave.vaginaPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "vagina", 0); -} - if (slave.dickPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "dick", 0); -} - if (slave.anusPiercing > 0) { -V.modReaction += App.Medicine.Modification.setPiercing(slave, "anus", 0); -} - <<goto "Body Modification">> - <</link>> - - if (slave.earPiercing > 0) { | [[Ear|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "ear", 0)]] -} - if (slave.nosePiercing > 0) { | [[Nose|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "nose", 0)]] -} - if (slave.eyebrowPiercing > 0) { | [[Eyebrow|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "eyebrow", 0)]] -} - if (slave.lipsPiercing > 0) { | [[Lips|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "lips", 0)]] -} - if (slave.tonguePiercing > 0) { | [[Tongue|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "tongue", 0)]] -} - if (slave.nipplesPiercing > 0) { | [[Nipples|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "nipples", 0)]] -} - if (slave.areolaePiercing > 0) { | [[Areolae|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "areolae", 0)]] -} - if (slave.corsetPiercing > 0) { | [[Corset|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "corset", 0)]] -} - if (slave.navelPiercing > 0) { | [[Navel|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "navel", 0)]] -} - if (slave.vagina !== -1) { - if (slave.clitPiercing > 0) { | [[Clit|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "clit", 0)]] -} - } else { - if (slave.clitPiercing > 0) { | [[Dickhead|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "clit", 0)]] -} - } - if (slave.vaginaPiercing > 0) { | [[Vagina|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "vagina", 0)]] -} - if (slave.dickPiercing > 0) { | [[Dick|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "dick", 0)]] -} - if (slave.anusPiercing > 0) { | [[Anus|Body Modification][V.modReaction = App.Medicine.Modification.setPiercing(slave, "anus", 0)]] -} - } - </div> -</div> /* indent */ - -/* TATTOOS */ - -<h2>Tattoos</h2> -<div class="indent"> - <div style="padding-bottom:1em"> - if (slave.shouldersTat !== 0) {<div> -V.App.Desc.tattoo(slave, "shoulder")</div> -_hasTat = 1; -} - if (slave.lipsTat !== 0) {<div> -V.App.Desc.tattoo(slave, "lips")</div> -_hasTat = 1; -} - if (slave.boobsTat !== 0) {<div> -V.App.Desc.tattoo(slave, "breast")</div> -_hasTat = 1; -} - if (slave.armsTat !== 0 && hasAnyNaturalArms(slave)) {<div> -V.App.Desc.tattoo(slave, "upper arm")</div> -_hasTat = 1; -} - if (slave.backTat !== 0) {<div> -V.App.Desc.tattoo(slave, "back")</div> -_hasTat = 1; -} - if (slave.stampTat !== 0) {<div> -V.App.Desc.tattoo(slave, "lower back")</div> -_hasTat = 1; -} - if (slave.buttTat !== 0) {<div> -V.App.Desc.tattoo(slave, "buttock")</div> -_hasTat = 1; -} - if (slave.vaginaTat !== 0) {<div> -V.App.Desc.tattoo(slave, "vagina")</div> -_hasTat = 1; -} - if (slave.dickTat !== 0 && slave.dick > 0) {<div> -V.App.Desc.tattoo(slave, "dick")</div> -_hasTat = 1; -} - if (slave.anusTat !== 0) {<div> -V.App.Desc.tattoo(slave, "anus")</div> -_hasTat = 1; -} - if (slave.legsTat !== 0 && hasAnyNaturalLegs(slave)) {<div> -V.App.Desc.tattoo(slave, "thigh")</div> -_hasTat = 1; -} - </div> - - <div> - r.push(`Choose a tattoo style:`); - /* if/else is here so a "highlighted" option is never a link. */ - if (V.tattooChoice !== "tribal patterns") {[[Tribal patterns|Body Modification][V.tattooChoice = "tribal patterns"]] -} else { - r.push(`Tribal patterns`); -} - if (V.tattooChoice !== "flowers") { - r.push(` | [[Flowers|Body Modification][${V.tattooChoice} = "flowers"]]`); -} else {| Flowers -} - if (V.tattooChoice !== "counting") { - r.push(` | [[Counting|Body Modification][${V.tattooChoice} = "counting"]]`); -} else {| Counting -} - if (V.tattooChoice !== "advertisements") { - r.push(` | [[Advertisements|Body Modification][${V.tattooChoice} = "advertisements"]]`); -} else {| Advertisements -} - if (V.tattooChoice !== "rude words") { - r.push(` | [[Rude words|Body Modification][${V.tattooChoice} = "rude words"]]`); -} else {| Rude words -} - if (V.tattooChoice !== "degradation") { - r.push(` | [[Degradation|Body Modification][${V.tattooChoice} = "degradation"]]`); -} else {| Degradation -} - if (V.tattooChoice !== "Asian art") { - r.push(` | [[Asian art|Body Modification][${V.tattooChoice} = "Asian art"]] `); -} else {| Asian art -} - if (V.tattooChoice !== "scenes") { - r.push(` | [[Scenes|Body Modification][${V.tattooChoice} = "scenes"]]`); -} else {| Scenes -} - if (V.tattooChoice !== "bovine patterns") { - r.push(` | [[Bovine|Body Modification][${V.tattooChoice} = "bovine patterns"]]`); -} else {| Bovine -} - if (V.tattooChoice !== "permanent makeup") { - r.push(` | [[Permanent makeup|Body Modification][${V.tattooChoice} = "permanent makeup"]]`); -} else {| Permanent makeup -} - if (V.tattooChoice !== "sacrilege") { - r.push(` | [[Sacrilege|Body Modification][${V.tattooChoice} = "sacrilege"]]`); -} else {| Sacrilege -} - if (V.tattooChoice !== "sacrament") { - r.push(` | [[Sacrament|Body Modification][${V.tattooChoice} = "sacrament"]]`); -} else {| Sacrament -} - if (V.tattooChoice !== "possessive") { - r.push(` | [[Possessive|Body Modification][${V.tattooChoice} = "possessive"]]`); -} else {| Possessive -} - if (V.tattooChoice !== "paternalist") { - r.push(` | [[Paternalist|Body Modification][${V.tattooChoice} = "paternalist"]]`); -} else {| Paternalist -} - - if (slave.anusTat === 0) { - if (V.tattooChoice !== "bleached") {| [[Bleach|Body Modification][V.tattooChoice = "bleached"]] -} else {| Bleach -} - } - - if (_hasTat === 1) { - if (V.tattooChoice !== 0) { - r.push(` | //[[Remove a tattoo|Body Modification][${V.tattooChoice} = 0]]//`); -} else {| Remove a tattoo -} - } - </div> - - <div> - if (def V.tattooChoice) { - if (V.tattooChoice === 0) { - r.push(`Clean the ink off of ${him}:`); - } else if (V.tattooChoice === "counting") { - r.push(`Add tallies of ${his} sexual exploits to ${him}:`); - } else if (V.tattooChoice === "bleached") { - r.push(`Bleach ${his}:`); - } else { - r.push(`Add ${V.tattooChoice} to ${his}:`); - } - - if (V.tattooChoice !== "bleached") && (V.tattooChoice !== "permanent makeup") { - <<link "Entire body">> - _degradationTemp = 0, V.modReaction = ""; - if (slave.boobsTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "boobs", V.tattooChoice); - _degradationTemp += 1; - } - - if (slave.buttTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "butt", V.tattooChoice); - _degradationTemp += 1; - } - - if (slave.vaginaTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "vagina", V.tattooChoice); - _degradationTemp += 1; - } - - if (slave.dick > 0) { - if (slave.dickTat !== V.tattooChoice && V.tattooChoice !== "scenes") { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "dick", V.tattooChoice); - _degradationTemp += 1; - } - } - - if (slave.lipsTat !== V.tattooChoice) { - if (V.tattooChoice === "scenes") { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "lips", "permanent makeup"); + if (slave.fetish !== "mindbroken" && slave.fuckdoll === 0) { + if (V.degradation > 1) { + if (V.degradation > 5) { + if (slave.devotion <= 50 && slave.trust < -50) { + r.push(`${He} is appalled by the whorish spectacle you have made of ${him}. ${He} <span class="gold">fears</span> you all the more for this but is so terrified of you it does not affect ${his} submission.`); + slave.trust -= 10; + } else if (slave.devotion <= 50) { + r.push(`${He} is appalled by the whorish spectacle you have made of ${him}. ${He} <span class="mediumorchid">hates</span> and <span class="gold">fears</span> you for this.`); + slave.devotion -= 10; + slave.trust -= 10; } else { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "lips", V.tattooChoice); - } - _degradationTemp += 1; - } - - if (V.tattooChoice === "Asian art" || V.tattooChoice === "scenes") && slave.anusTat === "bleached" { - /* leave existing bleached anus alone */ - } else if (slave.anusTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "anus", V.tattooChoice); - _degradationTemp += 1; - } - - if (slave.shouldersTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "shoulders", V.tattooChoice); - _degradationTemp += 1; - } - - if (slave.backTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "back", V.tattooChoice); - _degradationTemp += 1; - } - - if (hasAnyNaturalArms(slave)) { - if (slave.armsTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "arms", V.tattooChoice); - _degradationTemp += 1; + r.push(`${He} is shocked by the whorish spectacle you have made of ${him}. However, ${he} is so submissive to your will that ${he} <span class="hotpink">accepts</span> that the slave `); + if (canSee(slave)) { + r.push(`in the mirror`); + } else { + r.push(`${he} pictures`); + } + r.push(`is who ${he} is now.`); + slave.devotion += 4; } - } - if (hasAnyNaturalLegs(slave)) { - if (slave.legsTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "legs", V.tattooChoice); - _degradationTemp += 1; + } else { + if (slave.devotion < -20 && slave.trust < 20) { + r.push(`${He} is <span class="gold">afraid</span> that ${he} has been permanently altered against ${his} will, but is also scared of your reaction to any objection and suppresses ${his} disgust.`); + slave.trust -= 5; + } else if (slave.devotion < -20) { + r.push(`${He} is <span class="mediumorchid">angry</span> and <span class="gold">afraid</span> that ${he} has been permanently altered against ${his} will.`); + slave.devotion -= 5; + slave.trust -= 5; + } else { + r.push(`${He} is saddened to have been altered against ${his} will. However, ${he} realizes that ${he} is a slave, so ${he} <span class="hotpink">accepts</span> your work.`); + slave.devotion += 2; } } - - if (slave.stampTat !== V.tattooChoice) { - V.modReaction += App.Medicine.Modification.setTattoo(slave, "stamp", V.tattooChoice); - _degradationTemp += 1; - } - - if (!["flowers", "paternalist", "tribal patterns", 0].includes(V.tattooChoice)) { - V.degradation += _degradationTemp; - } - - <<goto "Body Modification">> - <</link>> - } - - if (V.tattooChoice === "permanent makeup") { - [[Face|Body Modification][V.modReaction = App.Medicine.Modification.setTattoo(slave, "lips", V.tattooChoice)]] - } else if (V.tattooChoice === "bleached") { - [[Asshole|Body Modification][V.modReaction = App.Medicine.Modification.setTattoo(slave, "anus", V.tattooChoice)]] - } else { - if (slave.shouldersTat !== V.tattooChoice) { - r.push(` | [[Shoulders|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "shoulders", V.tattooChoice)]]`); -} - if (V.tattooChoice !== "scenes") { - if (slave.lipsTat !== V.tattooChoice) { - r.push(` | [[Face|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "lips", V.tattooChoice)]]`); -} + V.degradation = 0; } - if (slave.boobsTat !== V.tattooChoice) { - r.push(` | [[Boobs|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "boobs", V.tattooChoice)]]`); -} - if (hasAnyNaturalArms(slave)) { - if (slave.armsTat !== V.tattooChoice) { - r.push(` | [[Arms|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "arms", V.tattooChoice)]]`); -} - } - if (slave.backTat !== V.tattooChoice) { - r.push(` | [[Upper back|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "back", V.tattooChoice)]]`); -} - if (slave.stampTat !== V.tattooChoice) { - r.push(` | [[Lower back|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "stamp", V.tattooChoice)]]`); -} - if (slave.buttTat !== V.tattooChoice) { - r.push(` | [[Buttock|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "butt", V.tattooChoice)]]`); -} - if (slave.vaginaTat !== V.tattooChoice) { - r.push(` | [[Vagina|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "vagina", V.tattooChoice)]]`); -} - if (slave.dick > 0 && V.tattooChoice !== "scenes") { - if (slave.dickTat !== V.tattooChoice) { - r.push(` | [[Dick|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "dick", V.tattooChoice)]]`); -} - } - if (V.tattooChoice !== "Asian art") && (V.tattooChoice !== "scenes") { - if (slave.anusTat !== V.tattooChoice) { - r.push(` | [[Anus|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "anus", V.tattooChoice)]]`); -} - } - if (hasAnyNaturalLegs(slave)) { - if (slave.legsTat !== V.tattooChoice) { - r.push(` | [[Legs|Body Modification][${V.modReaction} = App.Medicine.Modification.setTattoo(slave, "legs", V.tattooChoice)]]`); -} + if (modReaction) { + r.push(modReaction); + modReaction = false; } } } - </div> + App.Events.addNode(el, r, "p"); + return el; + } - <div> - if (slave.belly >= 10000 && slave.bellyPreg < 450000 && slave.bellyFluid < 5000) { - if (slave.bellyTat === 0) { - r.push(`${He} has no navel tattoos.`); - } else { - r.push(`${His} navel is tattooed with `); -V.slave.bellyTat - r.push(`.`); - } - if (slave.bellyTat === 0) { - <div> - [[Heart|Body Modification][V.modReaction = App.Medicine.Modification.setTattoo(slave, "belly", "a heart")]] - | [[Star|Body Modification][V.modReaction = App.Medicine.Modification.setTattoo(slave, "belly", "a star")]] - | [[Butterfly|Body Modification][V.modReaction = App.Medicine.Modification.setTattoo(slave, "belly", "a butterfly")]] - </div> - } - if (slave.bellyTat !== 0) { - //[[Remove tattoos|Body Modification][V.modReaction = App.Medicine.Modification.setTattoo(slave, "belly", 0)]]// - } - } else if (slave.bellyPreg >= 450000) { - r.push(`${His} middle is large and taut enough to be a suitable canvas for a navel focused tattoo, but ${his} brood is too active to permit the needle to do its work.`); - } else if (slave.bellyFluid >= 10000) { - r.push(`${His} middle is large and taut enough to be a suitable canvas for a navel focused tattoo, but the pressure applied to ${his} stomach will likely force ${him} to release its contents.`); - } else { - r.push(`${His} middle isn't large enough to be a suitable canvas for a navel focused tattoo.`); - } - </div> + function piercings() { + const el = new DocumentFragment(); + let r = []; + // const _piercingCount = (slave.earPiercing + slave.nosePiercing + slave.eyebrowPiercing + slave.lipsPiercing + slave.tonguePiercing + slave.nipplesPiercing + slave.areolaePiercing + slave.corsetPiercing + slave.navelPiercing + slave.clitPiercing + slave.vaginaPiercing + slave.dickPiercing + slave.anusPiercing); + const piercingLocations = ["ear", "nose", "eyebrow", "lips", "tongue", "nipples", "areolae", "navel", "corset", "clit", "vagina", "dick", "anus"]; + const _piercingCount = piercingLocations.reduce((acc, cur) => acc += slave[`${cur}Piercing`]); + /* DESCRIPTIONS */ + App.UI.DOM.appendNewElement("h2", el, "Piercings"); - <div> - if (slave.birthsTat > 0) { - if (slave.birthsTat > 1) { - r.push(`${He} has a series of `); -V.num(slave.birthsTat) - r.push(` baby-shaped tattoos adorning ${his} stomach; one for each successful pregnancy`); -if (slave.pregKnown === 1) { - r.push(` and a temporary one for ${his} current pregnancy`); -} - r.push(`.`); - } else { - r.push(`${He} has a single baby-shaped tattoo`); -if (slave.pregKnown === 1) { - r.push(`, and one temporary one,`); -} - r.push(` adorning ${his} stomach.`); - } - //[[Remove tattoos|Body Modification][slave.birthsTat = -1, cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave)]]// - } else if (slave.birthsTat === 0) { - if (slave.pregKnown === 1) { - r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); - //[[Remove it|Body Modification][slave.birthsTat = -1]]// - if (slave.abortionTat > -1) { - r.push(` //This will only remove birth tracking//`); -} - } else { - r.push(`${He} is scheduled to receive a tattoo each time ${he} gives birth.`); - //[[Cancel|Body Modification][slave.birthsTat = -1]]// - } + if (_piercingCount === 0) { + App.UI.DOM.appendNewElement("div", el, `${His} smooth ${slave.skin} skin is completely unpierced.`, "indent"); } else { - r.push(`Have ${him} receive a tattoo each time ${he} gives birth.`); - //[[Begin keeping track|Body Modification][slave.birthsTat = 0]]// + for (const piercing of piercingLocations.concat(["chastity"])) { + App.UI.DOM.appendNewElement("div", el, App.Desc.piercing(slave, piercing), "indent"); + } } - </div> - <div> - if (slave.abortionTat > 0) { - if (slave.abortionTat > 1) { - r.push(`${He} has a series of `); -V.num(slave.abortionTat) - r.push(` crossed out baby-shaped tattoos`); -if (slave.pregKnown === 1) { - r.push(`, and one uncrossed one,`); -} - r.push(` adorning ${his} stomach.`); - } else { - r.push(`${He} has a single crossed out baby-shaped tattoo`); -if (slave.pregKnown === 1) { - r.push(`, and one uncrossed one,`); -} - r.push(` adorning ${his} stomach.`); - } - //[[Remove tattoos|Body Modification][slave.abortionTat = -1, cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave)]]// - } else if (slave.abortionTat === 0) { - if (slave.pregKnown === 1) { - r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); - //[[Remove it|Body Modification][slave.abortionTat = -1]]// - if (slave.birthsTat > -1) { - r.push(` //This will only remove abortion tracking//`); -} + /* Apply piercings */ + r.push(`Choose piercing style:`); + const piercingLevelNames = new Map([ + ["Remove", 0], + ["Light", 1], + ["Heavy", 2], + ["Smart", 3] + ]); + let linkArray = []; + for (const [weight, i] of piercingLevelNames) { + if (piercingLevel === i) { + linkArray.push(App.UI.DOM.disabledLink(weight, ["Currently selected"])); } else { - r.push(`${He} is scheduled to receive a tattoo each time ${he} gets an abortion or miscarries.`); - //[[Cancel|Body Modification][slave.abortionTat = -1]]// + linkArray.push( + App.UI.DOM.link( + weight, + () => { + piercingLevel = i; + refresh(); + } + ) + ); } - } else { - r.push(`Have ${him} receive a tattoo for each abortion or miscarriage ${he} has.`); - //[[Begin keeping track|Body Modification][slave.abortionTat = 0]]// - } - </div> -</div>/* indent */ - -<h3>Custom Tattoos</h3> -<div class="indent"> - //Use complete sentences, make a description of it// - <div class="grid-2columns-auto"> - if (slave.lipsTat === 0) { - <div>Give ${him} a custom face tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].lipsTat" V.slaves[V.slaveIndices[V.AS]].lipsTat "Slave Interact">></div> - } - - if (slave.shouldersTat === 0) { - <div>Give ${him} a custom shoulder tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].shouldersTat" V.slaves[V.slaveIndices[V.AS]].shouldersTat "Slave Interact">></div> - } - - if (slave.armsTat === 0 && hasAnyNaturalArms(slave)) { - <div>Give ${him} a custom arm tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].armsTat" V.slaves[V.slaveIndices[V.AS]].armsTat "Slave Interact">></div> - } - - if (slave.boobsTat === 0) { - <div>Give ${him} a custom tit tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].boobsTat" V.slaves[V.slaveIndices[V.AS]].boobsTat "Slave Interact">></div> - } - - if (slave.backTat === 0) { - <div>Give ${him} a custom back tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].backTat" V.slaves[V.slaveIndices[V.AS]].backTat "Slave Interact">></div> - } - - if (slave.stampTat === 0) { - <div>Give ${him} a custom tramp stamp (lower back tattoo):</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].stampTat" V.slaves[V.slaveIndices[V.AS]].stampTat "Slave Interact">></div> - } - - if (slave.buttTat === 0) { - <div>Give ${him} a custom butt tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].buttTat" V.slaves[V.slaveIndices[V.AS]].buttTat "Slave Interact">></div> } + r.push(App.UI.DOM.generateLinksStrip(linkArray)); + App.Events.addNode(el, r, "div", "indent"); + r = []; - if (slave.dickTat === 0 && slave.dick !== 0) { - <div>Give ${him} a custom dick tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].dickTat" V.slaves[V.slaveIndices[V.AS]].dickTat "Slave Interact">></div> - } + // Determine parts that cannot be pierced + let validPiercingLocations = Array.from(piercingLocations); - if (slave.vaginaTat === 0) { - <div>Give ${him} a custom pubic tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].vaginaTat" V.slaves[V.slaveIndices[V.AS]].vaginaTat "Slave Interact">></div> + if (slave.nipples !== "fuckable") { + removePiercingLocation("nipples"); } - if (slave.anusTat === 0) { - <div>Give ${him} a custom anus tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].anusTat" V.slaves[V.slaveIndices[V.AS]].anusTat "Slave Interact">></div> + if (slave.vagina !== -1 || slave.dick !== 0) { + removePiercingLocation("clit"); + if (slave.vagina !== -1) { + removePiercingLocation("vagina"); + } } - if (slave.legsTat === 0 && hasAnyNaturalLegs(slave)) { - <div>Give ${him} a custom leg tattoo:</div> - <div> -<<textbox "V.slaves[V.slaveIndices[V.AS]].legsTat" V.slaves[V.slaveIndices[V.AS]].legsTat "Slave Interact">></div> + if (!(slave.dick > 0)) { + removePiercingLocation("dick"); } - </div> /* grid */ - <div> - if (slave.custom.tattoo === "") { - r.push(`Give ${him} a custom tattoo: `); -<<textbox "V.slaves[V.slaveIndices[V.AS]].custom.tattoo" V.slaves[V.slaveIndices[V.AS]].custom.tattoo "Slave Interact">> - } else { - r.push(`${He} `); -if (_hasTat === 1) { - r.push(`also`); -} - r.push(` has a custom tattoo: `); -V.slave.custom.tattoo - r.push(`Change it here: `); -<<textbox "V.slaves[V.slaveIndices[V.AS]].custom.tattoo" V.slaves[V.slaveIndices[V.AS]].custom.tattoo "Slave Interact">> + function removePiercingLocation(location) { + const index = validPiercingLocations.indexOf(location); + validPiercingLocations.splice(index, 1); } - if (slave.custom.tattoo !== "") { - //[[Remove custom tattoo|Body Modification][slave.custom.tattoo = "",cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave)]]// - } - </div> - -</div> /* indent */ - -/* Branding */ - -<h2>Branding</h2> -<span id="brand-selection"></span> -<script> - r.push(`App.Medicine.Modification.Select.brand(getSlave(${V.AS))}`); -</script> - - -if (slave.breedingMark === 1 && (V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")) { - <div class="indent"> - r.push(`${He} has an intricate tattoo on ${his} lower belly that suggests ${he} was made to be bred. [[Remove it|Body Modification][getSlave(${V.AS).breedingMark} = 0]]`); - </div> -} - -/* Scars */ - -<h2>Scars</h2> -<div class="indent"> -<div style="padding-bottom:1em"> -<<for _scarName, _scar range slave.scar>> - <div> - r.push(`${His}${ _scarName} is marked with `); -V.App.Desc.expandScarString(slave, _scarName): - <<capture _scarName>> - <<link "Remove Scar">> - V.scarApplied = 0; - delete slave.scar[_scarName]; - cashX(forceNeg(V.surgeryCost), "slaveSurgery", slave); - V.degradation -= 10; - <<goto "Body Modification">> - <</link>> - <</capture>> - </div> -<</for>> -if (jQuery.isEmptyObject(slave.scar)) { - <div> - r.push(`${His} skin is not scarred.`); - </div> -} -</div> - -<div> -Use ''V.scarDesign.local'' or choose another scar: - -[[Whip|Body Modification][V.scarDesign.local = "whip"]] -| [[Burns|Body Modification][V.scarDesign.local = "burn"]] -| [[Surgical|Body Modification][V.scarDesign.local = "surgical"]] -| [[Menacing|Body Modification][V.scarDesign.local = "menacing"]] -| [[Exotic|Body Modification][V.scarDesign.local = "exotic"]] -/* Other common scars might be battle scars or c-Section but it makes little sense to include them here */ -</div> - -<div> -Or design your own: -<<textbox "V.scarDesign.local" V.scarDesign.local "Body Modification">> -</div> -<div> -Choose a site for scaring: - -if (["exotic", "menacing"].includes(V.scarDesign.local)) { - [[Cheeks|Body Modification][V.scarTarget.local = "cheek"]] -} else { - /* Sorted head to toe */ - - [[Entire body|Body Modification][V.scarTarget.local = "entire body"]] - - /* Head */ - if (slave.earShape !== "none") { - | [[Ears|Body Modification][V.scarTarget.local = "ear"]] - } - | [[Cheeks|Body Modification][V.scarTarget.local = "cheek"]] - | [[Neck|Body Modification][V.scarTarget.local = "neck"]] - - /* Torso */ - | [[Chest|Body Modification][V.scarTarget.local = "chest"]] - | [[Breasts|Body Modification][V.scarTarget.local = "breast"]] - | [[Back|Body Modification][V.scarTarget.local = "back"]] - | [[Lower Back|Body Modification][V.scarTarget.local = "lower back"]] - | [[Belly|Body Modification][V.scarTarget.local = "belly"]] - | [[Pubic Mound|Body Modification][V.scarTarget.local = "pubic mound"]] - if (slave.dick > 0) { - | [[Penis|Body Modification][V.scarTarget.local = "penis"]] - } - if (slave.balls > 0 && slave.scrotum > 0) { - | [[Testicles|Body Modification][V.scarTarget.local = "testicle"]] - } - - /* Arms*/ - | [[Shoulders|Body Modification][V.scarTarget.local = "shoulder"]] - if (hasAnyNaturalArms(slave)) { - | [[Arm, upper|Body Modification][V.scarTarget.local = "upper arm"]] - | [[Arm, lower|Body Modification][V.scarTarget.local = "lower arm"]] - | [[Wrists|Body Modification][V.scarTarget.local = "wrist"]] - | [[Hands|Body Modification][V.scarTarget.local = "hand"]] - } - - /* Legs */ - | [[Buttocks|Body Modification][V.scarTarget.local = "buttock"]] - if (hasAnyNaturalLegs(slave)) { - | [[Thighs|Body Modification][V.scarTarget.local = "thigh"]] - | [[Calves|Body Modification][V.scarTarget.local = "calf"]] - | [[Ankles|Body Modification][V.scarTarget.local = "ankle"]] - | [[Feet|Body Modification][V.scarTarget.local = "foot"]] - } -} -</div> - -<div> -Or a custom site: -<<textbox "V.scarTarget.local" V.scarTarget.local "Body Modification">> -</div> - -/* Correct some "bad" choices" */ -if (["exotic", "menacing"].includes(V.scarDesign.local)) { - if (V.scarTarget.local !== "cheek") { - V.scarTarget.local = "cheek"; - } -} - -<div> -if (["ankle", "breast", "buttock", "calf", "cheek", "ear", "foot", "hand", "lower arm", "shoulder", "testicle", "thigh", "upper arm", "wrist"].includes(V.scarTarget.local)) { - _leftTarget = ("left " + V.scarTarget.local); - _rightTarget = ("right " + V.scarTarget.local); - if (slave.scar[_leftTarget]) { - r.push(`${His}${ _leftTarget} is already marked with `); -V.App.Desc.expandScarString(slave, _leftTarget) - r.push(`.`); - } - if (slave.scar[_rightTarget]) { - r.push(`${His}${ _rightTarget} is already marked with `); -V.App.Desc.expandScarString(slave, _rightTarget) - r.push(`.`); - } - r.push(`Scar ${him} now with ''${V.scarDesign.local}'' on the`); - _left = 0, _right = 0; - r.push(` /* overwrite brand */`); - - if (!(["upper arm", "lower arm", "wrist", "hand"].includes(V.scarTarget.local) && getLeftArmID(slave) !== 1) && !(["thigh", "calf", "ankle", "foot"].includes(V.scarTarget.local) && getLeftLegID(slave) !== 1)) { - _left = 1; - r.push(` /* make next checks easier */`); - <<link "left">> - V.scarTarget.local = _leftTarget; - V.scarApplied = 1; - App.Medicine.Modification.addScar(slave, _leftTarget, V.scarDesign.local); - cashX(forceNeg(V.modCost), "slaveMod", slave); - V.degradation += 10; - <<goto "Body Modification">> - <</link>> - } - if (!(["upper arm", "lower arm", "wrist", "hand"].includes(V.scarTarget.local) && getRightArmID(slave) !== 1) && !(["thigh", "calf", "ankle", "foot"].includes(V.scarTarget.local) && getRightLegID(slave) !== 1)) { - _right = 1; - r.push(` /* make next checks easier */`); - } - if (_left && _right) { - r.push(`${V.scarTarget.local}, or the`); - } - if (_right) { - <<link "right">> - V.scarTarget.local = _rightTarget; - V.scarApplied = 1; - App.Medicine.Modification.addScar(slave, _rightTarget, V.scarDesign.local); - cashX(forceNeg(V.modCost), "slaveMod", slave); - V.degradation += 10; - <<goto "Body Modification">> - <</link>> - } -if (!_left || !_right) { - r.push(` ${V.scarTarget.local}`); -}? -} else { - if (slave.scar.hasOwnProperty(V.scarTarget.local)) { - if (slave.scar[V.scarTarget.local][V.scarDesign.local]) { - r.push(`${He} already has ${V.scarDesign.local} scars on ${his} V.scarTarget.local. You can make it worse.`); - } else { - r.push(` /* check how much scarring is on this part */`); - _scarTotalValue = (Object.values(slave.scar[V.scarTarget.local])).reduce((a, b) => a + b, 0); - if (_scarTotalValue) { - r.push(`That would be a new kind of scar to add to the growing collection on ${his} ${V.scarTarget.local}. Life can always be worse for a slave.`); - } + if (piercingLevel === 0) { + r.push(`Remove piercings from:`); + } else if (piercingLevel === 1) { + r.push(`Lightly pierce ${his}:`); + } else if (piercingLevel === 2) { + r.push(`Heavily pierce ${his}:`); } - } - <<link "Scar">> - if (V.scarTarget.local === "entire body" && V.scarDesign.local.includes("whip")) { - /* Special case for whipping scene, produces two kinds of scars */ - App.Medicine.Modification.addScourged(slave); - } else { - /* Normal entire body scarring */ - if (V.scarTarget.local === "entire body") { - _scarArray = ["left breast", "right breast", "back", "lower back", "left buttock", "right buttock"]; - if (getLeftArmID(slave) === 0) { - _scarArray.push("left upper arm"); - } - if (getRightArmID(slave) === 0) { - _scarArray.push("right upper arm"); - } - if (getLeftLegID(slave) === 0) { - _scarArray.push("left thigh"); + if (piercingLevel < 3) { + linkArray = []; + linkArray.push( + App.UI.DOM.link( + "Entire body", + () => { + modReaction = ""; + for (const location of validPiercingLocations) { + if (slave[`${location}Piercing`] !== piercingLevel) { + modReaction += App.Medicine.Modification.setPiercing(slave, location, piercingLevel); + if (piercingLevel > 1) { + V.degradation += 1; + } + } + } + refresh(); + } + ) + ); + + for (const location of validPiercingLocations) { + if (slave[`${location}Piercing`] !== piercingLevel) { + App.UI.DOM.link( + location, + () => { + modReaction = ""; + modReaction += App.Medicine.Modification.setPiercing(slave, location, piercingLevel); + if (piercingLevel > 1) { + V.degradation += 1; + } + refresh(); + } + ); } - if (getRightLegID(slave) === 0) { - _scarArray.push("right thigh"); + } + r.push(App.UI.DOM.generateLinksStrip(linkArray)); + } else if (piercingLevel === 3) { + if (slave.vagina !== -1 || slave.dick !== 0) { + if (slave.clitPiercing !== 3) { + r.push(`Give ${him} a`); + r.push( + App.UI.DOM.link( + "smart piercing", + () => { + modReaction = App.Medicine.Modification.setPiercing(slave, "clit", 3); + slave.clitSetting = "all"; + V.degradation += 1; + refresh(); + }, + [], + "", + `Costs ${cashFormat(V.SPcost)}, unlocks options to mold sexuality` + ) + ); + } else { + r.push(`${He} already has a smart piercing!`); } - /* Single scar */ - } else { - _scarArray = [V.scarTarget.local]; } - <<for _i to 0; _i < _scarArray.length; _i++>> - App.Medicine.Modification.addScar(slave, _scarArray[_i], V.scarDesign.local); - V.degradation += 10; - <</for>> } - cashX(forceNeg(V.modCost), "slaveMod", slave); - V.scarApplied = 1; - V.degradation += 10; - <<goto "Body Modification">> - <</link>> - r.push(`with ${V.scarDesign.local} on the V.scarTarget.local`); -if (slave.scar[V.scarTarget.local]) { - r.push(`, adding to the scars that are already there?`); -} else { - r.push(`.`); -} -} -</div> -</div> /* indent */ + App.Events.addNode(el, r, "div", "indent"); + return el; + } + function refresh() { + App.UI.reload(); + } }; diff --git a/src/facilities/bodyModification/bodyModification.tw b/src/facilities/bodyModification/bodyModification.tw index ecf4ae9e6b3..74cbfe0d644 100644 --- a/src/facilities/bodyModification/bodyModification.tw +++ b/src/facilities/bodyModification/bodyModification.tw @@ -1,3 +1,5 @@ :: Body Modification [nobr jump-from-safe] <<set $nextButton = "Confirm changes", $nextLink = "Slave Interact", $encyclopedia = "The Studio">> + +<<includeDOM App.UI.bodyModification(getSlave($AS))>> \ No newline at end of file -- GitLab