From 165be7f6c0a5996385d20fa2eff7ada1eb3eb24a Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 10 Jul 2021 15:18:07 -0400 Subject: [PATCH] loss.jpeg --- src/events/nonRandom/daughters/pCoupLoss.js | 92 ++++++++++----------- src/events/timeGatedPlotEvent.js | 2 +- 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/src/events/nonRandom/daughters/pCoupLoss.js b/src/events/nonRandom/daughters/pCoupLoss.js index 454f875acbe..38fa73c1a19 100644 --- a/src/events/nonRandom/daughters/pCoupLoss.js +++ b/src/events/nonRandom/daughters/pCoupLoss.js @@ -1,35 +1,37 @@ - :: P coup loss [nobr] +App.Events.PCoupLoss = class PCoupLoss extends App.Events.BaseEvent { + execute(node) { + let r = []; if (V.traitor !== 0) { - _weeks = V.traitorWeeks, _pregWeeks = V.traitorWeeks, V.traitorWeeks = 0; - <<setLocalPronouns V.traitor>> + const _pregWeeks = V.traitorWeeks; + V.traitorWeeks = 0; - WombProgress(V.traitor, _pregWeeks, _pregWeeks); - r.push(`/* In all cases should be done */`); + WombProgress(V.traitor, _pregWeeks, _pregWeeks); /* In all cases should be done */ WombUpdatePregVars(V.traitor); - if (WombBirthReady(V.traitor, V.traitor.pregData.normalBirth) > 0 ) { - r.push(`/* normal birth case, partial birthers not supported*/`); - V.traitor.preg = -1, V.traitor.counter.birthsTotal += WombBirthReady(V.traitor, V.traitor.pregData.normalBirth); + if (WombBirthReady(V.traitor, V.traitor.pregData.normalBirth) > 0 ) { /* normal birth case, partial birthers not supported*/ + V.traitor.preg = -1; + V.traitor.counter.birthsTotal += WombBirthReady(V.traitor, V.traitor.pregData.normalBirth); WombFlush(V.traitor); - } else {/* still pregnant slave */ - V.traitor.preg = WombMaxPreg(V.traitor); - r.push(`/*most ready fetus is a base*/`); - V.traitor.pregWeek = WombMaxPreg(V.traitor); - r.push(`/*most ready fetus is a base*/`); + } else { /* still pregnant slave */ + V.traitor.preg = WombMaxPreg(V.traitor); /* most ready fetus is a base*/ + V.traitor.pregWeek = WombMaxPreg(V.traitor); /* most ready fetus is a base*/ } - SetBellySize(V.traitor); - r.push(`/*In any case it's useful to do.*/`); + SetBellySize(V.traitor); /* In any case it's useful to do.*/ } - You are awakened in the middle of the night by a jolt that shakes the entire arcology, accompanied by a distant boom. It is followed by another, and another, and then the wail of the arcology's alarm systems, and then finally by a faint crackle that grows to a constant chatter of gunfire. Main power goes out, and you claw your way in the darkness to the video feeds, running on emergency backup. + r.push(`You are awakened in the middle of the night by a jolt that shakes the entire arcology, accompanied by a distant boom. It is followed by another, and another, and then the wail of the arcology's alarm systems, and then finally by a faint crackle that grows to a constant chatter of gunfire. Main power goes out, and you claw your way in the darkness to the video feeds, running on emergency backup.`); - <br><br> + App.Events.addParagraph(node, r); + r = []; if (V.mercenaries > 0) { r.push(`Sheets of flame are pouring from your mercenaries' quarters; it seems they were among the first targets for bombs.`); } - r.push(`Heavy gunfire is bringing down security drones by the scores. The attackers seem to have figured out where the drone hangars are, and are laying down fire on the exits the drones must use to get into action.`); + r.push(`Heavy gunfire is bringing down security drones by the scores. The attackers seem to have figured out where the drone hangars are, and are laying down fire on the exits the drones must use to get into action.`); if (V.traitor !== 0 && V.traitorType !== "hostage") { + const { + his, he, + } = getPronouns(V.traitor ? V.traitor : {pronoun: App.Data.Pronouns.Kind.neutral}); r.push(`You can see`); if (V.traitor.bellyPreg >= 100000) { r.push(`the staggeringly pregnant`); @@ -45,42 +47,29 @@ r.push(`trying to sabotage a stockpile of explosives.`); } else if (V.traitorType === "horror") { r.push(`encouraging ${his} fellow fighters`); - if (canTalk(V.traitor)) { - r.push(`with yells`); - } - r.push(`from the back lines.`); + if (canTalk(V.traitor)) { + r.push(`with yells`); + } + r.push(`from the back lines.`); } else if (V.traitorType === "defiant") { r.push(`encouraging ${his} fellow fighters`); - if (canTalk(V.traitor)) { - r.push(`with yells`); - } - r.push(`and spearheading the charge`); - if (V.traitor.bellyPreg >= 15000) { - r.push(`as best ${he} can`); - } - r.push(`.`); + if (canTalk(V.traitor)) { + r.push(`with yells`); + } + r.push(`and spearheading the charge${(V.traitor.bellyPreg >= 15000) ? ` as best ${he} can` : ""}.`); } else { - r.push(`encouraging ${his} fellow fighters`); - if (canTalk(V.traitor)) { - r.push(`with yells`); - } - r.push(`, and when that fails, leading them by example`); - if (V.traitor.bellyPreg >= 15000) { - r.push(`as best ${he} can`); - } - r.push(`.`); + r.push(`encouraging ${his} fellow fighters${(canTalk(V.traitor)) ? " with yells" : ""}, and when that fails, leading them by example${(V.traitor.bellyPreg >= 15000) ? ` as best ${he} can` : ""}.`); } } - In areas already controlled by your enemies, slaveowners are being summarily shot in the streets. - if (V.hackerSupport === 1) {" - V.properTitle() - r.push(`," ${V.assistant.name} says, "the Daughters of Liberty are attempting a coup. They appear to have smuggled a significant quantity of arms and explosives into the arcology.`); - } else {" - V.properTitle() - r.push(`," ${V.assistant.name} says, "the Daughters of Liberty are attempting a coup. They appear to have smuggled a significant qua — zzzt —" There is nothing more from the computer systems.`); + r.push(`In areas already controlled by your enemies, slaveowners are being summarily shot in the streets.`); + if (V.hackerSupport === 1) { + r.push(`"${properTitle()}," ${V.assistant.name} says, "the Daughters of Liberty are attempting a coup. They appear to have smuggled a significant quantity of arms and explosives into the arcology.`); + } else { + r.push(`"${properTitle()}," ${V.assistant.name} says, "the Daughters of Liberty are attempting a coup. They appear to have smuggled a significant qua — zzzt —" There is nothing more from the computer systems.`); } - <br><br> + App.Events.addParagraph(node, r); + r = []; if (V.traitor !== 0) { r.push(`If this were a movie,`); @@ -91,10 +80,13 @@ } r.push(`after a desperate struggle in your office. Reality does not have such a refined sense of drama.`); } - If the Daughters had any plans to take you alive, they are lost to the exigencies of combat. Your penthouse remains locked down, forcing them to use breaching charges to make an entrance. These prove entirely too effective, and your last impression is of the floor heaving bodily up toward the ceiling. + r.push(`If the Daughters had any plans to take you alive, they are lost to the exigencies of combat. Your penthouse remains locked down, forcing them to use breaching charges to make an entrance. These prove entirely too effective, and your last impression is of the floor heaving bodily up toward the ceiling.`); - <br><br> + App.Events.addParagraph(node, r); - ''GAME OVER'' + App.UI.DOM.appendNewElement("p", node, "GAME OVER", "bold"); V.ui = "start"; + } +}; + diff --git a/src/events/timeGatedPlotEvent.js b/src/events/timeGatedPlotEvent.js index 34ce73bebd1..a9a4503aee0 100644 --- a/src/events/timeGatedPlotEvent.js +++ b/src/events/timeGatedPlotEvent.js @@ -42,7 +42,7 @@ App.Events.TimeGatedPlotEvent = class TimeGatedPlotEvent extends App.Events.Base if (V.traitorType === "trapper") { this.events[71] = new App.Events.TwineEvent().wrapPassage([], "P coup betrayal"); } else if (V.mercenaries + V.personalArms + V.hackerSupport + doubleAgent < 5) { - this.events[71] = new App.Events.TwineEvent().wrapPassage([], "P coup loss"); + this.events[71] = new App.Events.PCoupLoss(); } else { this.events[71] = new App.Events.TwineEvent().wrapPassage([], "P coup attempt"); } -- GitLab