diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js index 5866aabe3a9ac0b7a04d1ff9696cae223ddc5e05..7f0fd5514f2b1898e67b1caf3b349cae0d173353 100644 --- a/src/facilities/bodyModification/bodyModification.js +++ b/src/facilities/bodyModification/bodyModification.js @@ -24,7 +24,7 @@ App.UI.bodyModification = function(slave, cheat = false) { function createPage() { const el = new DocumentFragment(); if (!cheat) { - if (V.seeImages > 0 ) { + if (V.seeImages > 0) { App.Events.drawEventArt(el, slave); } el.append(intro()); @@ -497,6 +497,8 @@ App.UI.bodyModification = function(slave, cheat = false) { r.push(App.UI.DOM.generateLinksStrip(linkArray)); App.Events.addNode(el, r, "div"); + el.append(oddTattoos()); + const customEl = document.createElement("div"); customEl.id = "custom-el"; customEl.append( @@ -519,6 +521,195 @@ App.UI.bodyModification = function(slave, cheat = false) { } } + function oddTattoos() { + const el = new DocumentFragment(); + let linkArray; + let r = []; + 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 ${slave.bellyTat}.`); + } + if (slave.bellyTat === 0) { + const bellyTats = new Map([ + ["Heart", "a heart"], + ["Star", "a star"], + ["Butterfly", "a butterfly"], + ]); + linkArray = []; + for (const [title, value] of bellyTats) { + linkArray.push( + App.UI.DOM.link( + title, + () => { + tattooChoice = value; + applyTat("belly"); + refresh(); + } + ) + ); + } + } + if (slave.bellyTat !== 0) { + linkArray.push( + App.UI.DOM.link( + "Remove tattoos", + () => { + tattooChoice = 0; + applyTat("belly"); + refresh(); + } + ) + ); + } + r.push(App.UI.DOM.generateLinksStrip(linkArray)); + } 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.`); + } + App.Events.addNode(el, r, "div"); + + r = []; + linkArray = []; + if (slave.birthsTat > 0) { + if (slave.birthsTat > 1) { + r.push(`${He} has a series of ${num(slave.birthsTat)} baby-shaped tattoos adorning ${his} stomach; one for each successful`); + if (slave.pregKnown === 1) { + r.push(`pregnancy and a temporary one for ${his} current pregnancy.`); + } else { + r.push(`pregnancy.`); + } + } else { + r.push(`${He} has a single baby-shaped tattoo${(slave.pregKnown === 1) ? `, and one temporary one,` : ``} adorning ${his} stomach.`); + } + if (slave.bellyTat !== 0) { + linkArray.push( + App.UI.DOM.link( + "Remove tattoos", + () => { + slave.birthsTat = -1; + if (!cheat) { + cashX(forceNeg(V.modCost), "slaveMod", slave); + } + refresh(); + } + ) + ); + } + } else if (slave.birthsTat === 0) { + if (slave.pregKnown === 1) { + r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); + r.push( + App.UI.DOM.link( + "Remove it", + () => { + slave.birthsTat = -1; + refresh(); + } + ) + ); + 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.`); + r.push( + App.UI.DOM.link( + "Cancel", + () => { + slave.birthsTat = -1; + refresh(); + } + ) + ); + } + } else { + r.push(`Have ${him} receive a tattoo each time ${he} gives birth.`); + r.push( + App.UI.DOM.link( + "Begin keeping track", + () => { + slave.birthsTat = 0; + refresh(); + } + ) + ); + } + App.Events.addNode(el, r, "div"); + + r = []; + + if (slave.abortionTat > 0) { + if (slave.abortionTat > 1) { + r.push(`${He} has a series of ${num(slave.abortionTat)} 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.`); + } + r.push( + App.UI.DOM.link( + "Remove tattoos", + () => { + slave.abortionTat = -1; + cashX(forceNeg(V.modCost), "slaveMod", slave); + refresh(); + } + ) + ); + } else if (slave.abortionTat === 0) { + if (slave.pregKnown === 1) { + r.push(`${He} has a single baby-shaped temporary tattoo adorning ${his} stomach.`); + r.push( + App.UI.DOM.link( + "Remove it", + () => { + slave.abortionTat = -1; + refresh(); + } + ) + ); + if (slave.birthsTat > -1) { + r.push(`//This will only remove abortion tracking//`); + } + } else { + r.push(`${He} is scheduled to receive a tattoo each time ${he} gets an abortion or miscarries.`); + r.push( + App.UI.DOM.link( + "Cancel", + () => { + slave.abortionTat = -1; + refresh(); + } + ) + ); + } + } else { + r.push(`Have ${him} receive a tattoo for each abortion or miscarriage ${he} has.`); + r.push( + App.UI.DOM.link( + "Begin keeping track", + () => { + slave.abortionTat = 0; + refresh(); + } + ) + ); + } + App.Events.addNode(el, r, "div"); + return el; + } + function customTats() { const el = new DocumentFragment(); App.UI.DOM.appendNewElement("h3", el, "Custom Tattoos"); @@ -856,7 +1047,7 @@ App.UI.bodyModification = function(slave, cheat = false) { } ) ); - r.push(`with ${V.scarDesign.local} on the ${V.scarTarget.local}${(slave.scar[V.scarTarget.local]) ? `, adding to the scars that are already there?`: `.`}`); + r.push(`with ${V.scarDesign.local} on the ${V.scarTarget.local}${(slave.scar[V.scarTarget.local]) ? `, adding to the scars that are already there?` : `.`}`); } App.Events.addNode(el, r, "div"); @@ -867,7 +1058,10 @@ App.UI.bodyModification = function(slave, cheat = false) { const el = new DocumentFragment(); let p = document.createElement('p'); let div = document.createElement('div'); - const {his, His, him, He} = getPronouns(slave); + const { + him, He, + his, His + } = getPronouns(slave); App.UI.DOM.appendNewElement("h2", el, "Branding"); @@ -1192,9 +1386,9 @@ App.UI.bodyModification = function(slave, cheat = false) { } function check(brand) { - switch(brand) { + switch (brand) { case "a big helping of your favorite food": - return "a big helping of " + V.PC.refreshment; + return "a big helping of " + V.PC.refreshment; default: return brand; }