From 1ce8b6433f0e6dec4be5e3c5050c4524a466cde4 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Wed, 7 Apr 2021 18:44:48 -0400 Subject: [PATCH] aid invitation --- src/events/nonRandomEvent.js | 4 +- src/events/scheduled/aidInvitation.js | 137 +++++++++++++++++++++++++ src/uncategorized/genericPlotEvents.tw | 89 ---------------- 3 files changed, 138 insertions(+), 92 deletions(-) create mode 100644 src/events/scheduled/aidInvitation.js diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js index c3b1c775308..291abc3bce1 100644 --- a/src/events/nonRandomEvent.js +++ b/src/events/nonRandomEvent.js @@ -53,6 +53,7 @@ App.Events.getNonrandomEvents = function() { new App.Events.assistantBody(), new App.Events.badCuratives(), new App.Events.badBreasts(), + new App.Events.aidInvitation(), new App.Events.TwineEvent().wrapPassage([ () => V.RecruiterID !== 0, () => V.recruiterProgress >= (13 + (V.recruiterEugenics === 1 ? policies.countEugenicsSMRs() * 6 : 0)) @@ -246,9 +247,6 @@ globalThis.nonRandomEvent = function() { } else if (effectiveWeek === 24) { V.Event = "militia"; setTimeout(() => Engine.play("Generic Plot Events"), Engine.minDomActionDelay); - } else if (V.week === 29) { - V.Event = "aid invitation"; - setTimeout(() => Engine.play("Generic Plot Events"), Engine.minDomActionDelay); } else if (effectiveWeek === 31 && V.mercenaries === 0) { setTimeout(() => Engine.play("P mercenaries"), Engine.minDomActionDelay); } else if (effectiveWeek === 35 && V.mercenaries > 0) { diff --git a/src/events/scheduled/aidInvitation.js b/src/events/scheduled/aidInvitation.js new file mode 100644 index 00000000000..4c13e75f51d --- /dev/null +++ b/src/events/scheduled/aidInvitation.js @@ -0,0 +1,137 @@ +App.Events.aidInvitation = class aidInvitation extends App.Events.BaseEvent { + constructor(actors, params) { + super(actors, params); + } + + actorPrerequisites() { + return []; + } + + eventPrerequisites() { + return [ + () => V.week === 29 + ]; + } + + execute(node) { + const _trapped = []; + let r = []; + if (V.seeDicks <= 75) { + _trapped.push("convent"); + _trapped.push("school"); + _trapped.push("housewives"); + _trapped.push("volleyballTeam"); + if (V.seePreg !== 0) { + _trapped.push("maternity"); + if (V.continent === "Africa") { + _trapped.push("seizedMission"); + } + } + } + if (V.seeDicks >= 25) { + _trapped.push("conversion"); + } + _trapped.push("gradeSchool"); + V.eventResults.aidTarget = _trapped.random(); + + r.push(`A small old world country near the arcology is experiencing serious unrest. Its corrupt government is doing an even poorer job than most of addressing chronic joblessness and general malaise. Thus far, it's been a fertile source of people in poverty for slavers to target, and little else. Lately, though, it's been showing signs worse may be to come. You've instructed ${V.assistant.name} to flag communications from the area; there's always a possibility that business opportunities may arise from the benighted country, and the situation is becoming so unstable it's prudent to keep a personal eye on it anyway. You receive just such a call from`); + if (V.eventResults.aidTarget === "convent") { + r.push(`the leader of a female-oriented religious retreat`); + } else if (V.eventResults.aidTarget === "school") { + r.push(`the principal of a preparatory school for girls`); + } else if (V.eventResults.aidTarget === "housewives") { + r.push(`the queen bee of a small group of suburban housewives`); + } else if (V.eventResults.aidTarget === "maternity") { + r.push(`the maternity ward of a hospital`); + } else if (V.eventResults.aidTarget === "conversion") { + r.push(`the owner of a religious sexual orientation therapy camp`); + } else if (V.eventResults.aidTarget === "gradeSchool") { + r.push(`a student stranded`); + } else if (V.eventResults.aidTarget === "volleyballTeam") { + r.push(`a student athlete`); + } else if (V.eventResults.aidTarget === "seizedMission") { + r.push(`the leader of a group of missionaries`); + } + r.push(`in the capital city.`); + App.Events.addParagraph(node, r); + r = []; + if (V.eventResults.aidTarget !== "seizedMission") { + r.push(`They are deeply worried by the situation. There have been large riots over the past week, and yesterday they became seriously violent. The unrest is targeting`); + if (V.eventResults.aidTarget === "convent") { + r.push(`better-off citizens, including the caller. Though most of the nuns have already left, the leader and a few of her women are now stuck in the area and are running out of options as the riots lock down transportation.`); + } else if (V.eventResults.aidTarget === "school") { + r.push(`better-off citizens, including the caller. Though most of the students and faculty have already made it out, the principal and a few students are now stuck in the area and are running out of options as the riots lock down transportation.`); + } else if (V.eventResults.aidTarget === "housewives") { + r.push(`better-off citizens, including the caller. Though most of them have taken flights out, the leader and a few of them are now stuck in the area and are running out of options as the riots lock down transportation.`); + } else if (V.eventResults.aidTarget === "maternity") { + r.push(`better-off citizens, including the caller. Though most of the patients have already left, several of the most pregnant are now stuck in the area and are running out of options as the riots lock down transportation.`); + } else if (V.eventResults.aidTarget === "conversion") { + r.push(`better-off citizens, including the caller. Though most of the camp's inmates have already left, a few of them and the owner are now stuck in the area and are running out of options as the riots lock down transportation.`); + } else if (V.eventResults.aidTarget === "gradeSchool") { + r.push(`better-off citizens, including the caller. Though most of the other students and faculty escaped, a few of the students are now stuck in the school and are running out of options as the riots steadily creep closer to the grounds.`); + } else if (V.eventResults.aidTarget === "volleyballTeam") { + r.push(`vulnerable citizens, including the caller. Their bus broke down on the way to the championship game and all those that have left to get help have not returned. She and her several remaining teammates are running out of options as those looking for easy targets creep ever closer.`); + } + } else { + r.push(`After years of constant rape and abuse, an opening finally arrived for escape when a rival faction raided the decaying church they were stored in, however the situation outside isn't much better. Violent riots are taking place and the mobs are eagerly snatching up what ever loot and women they can get their hands on. She and the remaining women are trapped and in no condition to run; most particularly the youngest of the group who is ripe with child, though she herself and one of the others are also carrying their rapists' babies. They are completely out of options as the looters work their way down the city streets.`); + } + r.push(`They beg you to help evacuate them, and promise to pay you once they're out.`); + App.Events.addParagraph(node, r); + V.eventResults.aid = 0; + const price = 10000; + + App.Events.addResponses(node, [ + new App.Events.Result(`Agree`, agree), + new App.Events.Result(`Do it for free`, free), + new App.Events.Result(`Airlift them into slavery`, enslave, `This will cost ${cashFormat(price)}`), + ]); + + function agree() { + const r = []; + const el = new DocumentFragment(); + cashX(2000, "event"); + repX(1000, "event"); + r.push(`You dispatch your personal VTOL bird immediately. It lands `); + if (V.eventResults.aidTarget === "volleyballTeam") { + r.push(`beside the bus`); + } else { + r.push(`on the roof of the building`); + } + r.push(`they're sheltering in, and brings them across the closest border and into a more functional country. You receive a call expressing their heartfelt thanks and promising to <span class="green">spread the word</span> about how you helped them escape, and a wire transfer of their <span class="yellowgreen">payment</span> for the airlift.`); + App.Events.addParagraph(el, r); + return el; + } + + function free() { + const r = []; + const el = new DocumentFragment(); + repX(2500, "event"); + r.push(`You dispatch your personal VTOL bird immediately. It lands `); + if (V.eventResults.aidTarget === "volleyballTeam") { + r.push(`beside the bus`); + } else { + r.push(`on the roof of the building`); + } + r.push(` they're sheltering in, and brings them across the closest border and into a more functional country. You receive a call expressing their heartfelt thanks, and when you refuse their payment for the airlift, they tearfully promise to tell the story of how you <span class="green">extended charity</span> to those in need, belying the rumors about slaveowners.`); + App.Events.addParagraph(el, r); + return el; + } + + function enslave() { + const r = []; + const el = new DocumentFragment(); + r.push(`You send your personal VTOL bird to the shop for some immediate and very expensive modifications to its cargo and passenger area. Since this will take several days, you stall the supplicants.`); + if (V.eventResults.aidTarget === "volleyballTeam") { + r.push(`A few of the girls decide to leave, but the sight of them pushed against the wall of a nearby building, toned bodies glistening with sweat and seed as their captors rape them into submission, keep the rest happy to stay on the bus. Those that remained`); + } else { + r.push(`Their situation isn't truly dire yet, and they can wait. They`); + } + r.push(`are extremely grateful, though they would be less hopeful if they knew the true nature of the aircraft coming to retrieve them.`); + V.eventResults.aid = 1; + cashX(forceNeg(price), "event"); + App.Events.addParagraph(el, r); + return el; + } + return node; + } +}; diff --git a/src/uncategorized/genericPlotEvents.tw b/src/uncategorized/genericPlotEvents.tw index f0f222db2a3..9aa02c6b1d0 100644 --- a/src/uncategorized/genericPlotEvents.tw +++ b/src/uncategorized/genericPlotEvents.tw @@ -94,66 +94,6 @@ He leads the party towards a broad lawn with a long table along one side, and indicates the handsome single-barrel shotguns lined up on the table. He continues, "In a few moments, some really choice livestock are going to be led up onto this lawn. They have been told that if they can run from one side to the other, they'll be freed." He winks. "Those guns are loaded with taser slugs, of course. Whatever you drop and fuck, you get to take home." <br><br> The crowd of nude slaves led up to the lawn and chained to rings along one edge all have pale skin — the better to show impacts, perhaps. But besides that, they are extremely varied, and all physically extraordinary in some way. After you and your fellow partiers are ready, your host fires an old-fashioned revolver in the air and the chained slaves are all released at once. You could easily hit any of them, but you only have one shot. -<<case "aid invitation">> - <<set _trapped = []>> - <<if ($seeDicks <= 75)>> - <<set _trapped.push("convent")>> - <<set _trapped.push("school")>> - <<set _trapped.push("housewives")>> - <<set _trapped.push("volleyballTeam")>> - <<if $seePreg !== 0>> - <<set _trapped.push("maternity")>> - <<if $continent === "Africa">> - <<set _trapped.push("seizedMission")>> - <</if>> - <</if>> - <</if>> - <<if ($seeDicks >= 25)>> - <<set _trapped.push("conversion")>> - <</if>> - <<set _trapped.push("gradeSchool")>> - <<set $eventResults.aidTarget = _trapped.random()>> - A small old world country near the arcology is experiencing serious unrest. Its corrupt government is doing an even poorer job than most of addressing chronic joblessness and general malaise. Thus far, it's been a fertile source of people in poverty for slavers to target, and little else. Lately, though, it's been showing signs worse may be to come. You've instructed $assistant.name to flag communications from the area; there's always a possibility that business opportunities may arise from the benighted country, and the situation is becoming so unstable it's prudent to keep a personal eye on it anyway. You receive just such a call from - <<if $eventResults.aidTarget === "convent">> - the leader of a female-oriented religious retreat - <<elseif $eventResults.aidTarget === "school">> - the principal of a preparatory school for girls - <<elseif $eventResults.aidTarget === "housewives">> - the queen bee of a small group of suburban housewives - <<elseif $eventResults.aidTarget === "maternity">> - the maternity ward of a hospital - <<elseif $eventResults.aidTarget === "conversion">> - the owner of a religious sexual orientation therapy camp - <<elseif $eventResults.aidTarget === "gradeSchool">> - a student stranded - <<elseif $eventResults.aidTarget === "volleyballTeam">> - a student athlete - <<elseif $eventResults.aidTarget === "seizedMission">> - the leader of a group of missionaries - <</if>> - in the capital city. - <br><br> - <<if $eventResults.aidTarget !== "seizedMission">> - They are deeply worried by the situation. There have been large riots over the past week, and yesterday they became seriously violent. The unrest is targeting - <<if $eventResults.aidTarget === "convent">> - better-off citizens, including the caller. Though most of the nuns have already left, the leader and a few of her women are now stuck in the area and are running out of options as the riots lock down transportation. - <<elseif $eventResults.aidTarget === "school">> - better-off citizens, including the caller. Though most of the students and faculty have already made it out, the principal and a few students are now stuck in the area and are running out of options as the riots lock down transportation. - <<elseif $eventResults.aidTarget === "housewives">> - better-off citizens, including the caller. Though most of them have taken flights out, the leader and a few of them are now stuck in the area and are running out of options as the riots lock down transportation. - <<elseif $eventResults.aidTarget === "maternity">> - better-off citizens, including the caller. Though most of the patients have already left, several of the most pregnant are now stuck in the area and are running out of options as the riots lock down transportation. - <<elseif $eventResults.aidTarget === "conversion">> - better-off citizens, including the caller. Though most of the camp's inmates have already left, a few of them and the owner are now stuck in the area and are running out of options as the riots lock down transportation. - <<elseif $eventResults.aidTarget === "gradeSchool">> - better-off citizens, including the caller. Though most of the other students and faculty escaped, a few of the students are now stuck in the school and are running out of options as the riots steadily creep closer to the grounds. - <<elseif $eventResults.aidTarget === "volleyballTeam">> - vulnerable citizens, including the caller. Their bus broke down on the way to the championship game and all those that have left to get help have not returned. She and her several remaining teammates are running out of options as those looking for easy targets creep ever closer. - <</if>> - <<else>> - After years of constant rape and abuse, an opening finally arrived for escape when a rival faction raided the decaying church they were stored in, however the situation outside isn't much better. Violent riots are taking place and the mobs are eagerly snatching up what ever loot and women they can get their hands on. She and the remaining women are trapped and in no condition to run; most particularly the youngest of the group who is ripe with child, though she herself and one of the others are also carrying their rapists' babies. They are completely out of options as the looters work their way down the city streets. - <</if>> - They beg you to help evacuate them, and promise to pay you once they're out. <<case "aid result">> <<set $eventResults.aid = 0>> <<set $nationHate += 2>> @@ -1034,35 +974,6 @@ <</link>> <</if>> <<= IncreasePCSkills('warfare', 2)>> -<<case "aid invitation">> - <<set $eventResults.aid = 0>> - <<set _price = 10000>> - <<link "Agree">> - <<replace "#result">> - You dispatch your personal VTOL bird immediately. It lands <<if $eventResults.aidTarget === "volleyballTeam">>beside the bus<<else>>on the roof of the building<</if>> they're sheltering in, and brings them across the closest border and into a more functional country. You receive a call expressing their heartfelt thanks and promising to @@.green;spread the word@@ about how you helped them escape, and a wire transfer of their @@.yellowgreen;payment@@ for the airlift. - <<run cashX(2000, "event")>> - <<run repX(1000, "event")>> - <</replace>> - <</link>> - <br><<link "Do it for free">> - <<replace "#result">> - You dispatch your personal VTOL bird immediately. It lands <<if $eventResults.aidTarget === "volleyballTeam">>beside the bus<<else>>on the roof of the building<</if>> they're sheltering in, and brings them across the closest border and into a more functional country. You receive a call expressing their heartfelt thanks, and when you refuse their payment for the airlift, they tearfully promise to tell the story of how you @@.green;extended charity@@ to those in need, belying the rumors about slaveowners. - <<run repX(2500, "event")>> - <</replace>> - <</link>> - <br><<link "Airlift them into slavery">> - <<replace "#result">> - You send your personal VTOL bird to the shop for some immediate and very expensive modifications to its cargo and passenger area. Since this will take several days, you stall the supplicants. - <<if $eventResults.aidTarget === "volleyballTeam">> - A few of the girls decide to leave, but the sight of them pushed against the wall of a nearby building, toned bodies glistening with sweat and seed as their captors rape them into submission, keep the rest happy to stay on the bus. Those that remained - <<else>> - Their situation isn't truly dire yet, and they can wait. They - <</if>> - are extremely grateful, though they would be less hopeful if they knew the true nature of the aircraft coming to retrieve them. - <<set $eventResults.aid = 1>> - <<run cashX(forceNeg(_price), "event")>> - <</replace>> - <</link>> //This will cost <<print cashFormat(_price)>>// <<case "aid result">> <<set $eventResults.aid = 0>> <<link "Sell your captures immediately">> -- GitLab