diff --git a/src/events/PE/concubineInterview.js b/src/events/PE/concubineInterview.js index 85cfcb42e6f45ae36de2eb82cebac75db225804a..e356177791939d4e7580a3344b5b75ed1ab49b5e 100644 --- a/src/events/PE/concubineInterview.js +++ b/src/events/PE/concubineInterview.js @@ -26,10 +26,6 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. const belly = bellyAdjective(eventSlave); const fluid = eventSlave.inflationType; const arcology = V.arcologies[0]; - const oldRep = V.rep; - - const rep = val => repX(val, "concubine", eventSlave); - const speak = string => Spoken(eventSlave, string); V.nextLink = "RIE Eligibility Check"; @@ -47,11 +43,16 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. ]); function accept() { + const frag = document.createDocumentFragment(); + let repSum = 0; // just tally here...we'll run the whole sum through repX in one go to avoid rep-scaling problems + const rep = val => repSum += val; + const speak = string => Spoken(eventSlave, string); + t = []; t.push(`The show is broadcast live; you head out onto a balcony to watch it on a big screen. It's been impossible to hide, and many of your citizens have taken a proprietary attitude towards your fame: they see your success as their success, too, and want to see ${eventSlave.slaveName} do well. The show introduction plays, introducing the host, a swishy, rail-thin gentleman with impeccable sartorial style and a close-cropped salt-and-pepper beard. He reviews who you are, giving equal time to your accomplishments and the inevitable criticisms from old world antislavery activists, and then calls ${eventSlave.slaveName} out.`); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -121,7 +122,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. } t.push(`They seat themselves in comfortable leather chairs and the interview begins in earnest.`); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -138,13 +139,13 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. t.push(`${He} recovers quickly and responds that ${he} loves you.`); } - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; t.push(`The host glances at the camera. "Wow." He presses on. "But you're ${hisP} slave, ${eventSlave.slaveName}. ${HeP} owns you. Isn't that hard for you?"`); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -326,7 +327,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. } } - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); t = []; @@ -414,7 +415,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. t.push(`in a matter-of-fact tone of voice.`); } - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); if (eventSlave.intelligence + eventSlave.intelligenceImplant > 50) { t = []; @@ -527,7 +528,7 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. rep(1500); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); if (PC.title === 0) { t = []; @@ -541,25 +542,26 @@ App.Events.PEConcubineInterview = class PEConcubineInterview extends App.Events. rep(500); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); } } t = []; t.push(`At the conclusion, the host`); - if (V.rep - oldRep > 200) { + if (repSum > 200) { t.push(`seems <span class="green">impressed</span> and says sincerely,`); - } else if (V.rep - oldRep < 0) { + } else if (repSum < 0) { t.push(`seems <span class="red">unimpressed</span> and says mockingly,`); } else { t.push(`says jokingly,`); } t.push(`"My dear it's been a pleasure. If all Free Cities ${girl}s are like you I might have to look into immigrating. Ladies and gentlemen, good night!"`); + repX(repSum, "concubine", eventSlave); - App.Events.addParagraph(node, t); + App.Events.addParagraph(frag, t); - return t; + return frag; } function decline() {