diff --git a/src/events/nonRandom/daughters/pCoupAftermath.js b/src/events/nonRandom/daughters/pCoupAftermath.js new file mode 100644 index 0000000000000000000000000000000000000000..acd2027fc66fa844e270bade4ef03016d799a8c4 --- /dev/null +++ b/src/events/nonRandom/daughters/pCoupAftermath.js @@ -0,0 +1,171 @@ +App.Events.PCoupAftermath = class REShippingContainer extends App.Events.BaseEvent { + execute(node) { + let r = []; + + V.nextButton = " "; // hide button until user makes a selection + V.rivalOwner = 0; + V.rivalryPower = 0; + const _num = random(0, 99); + if (_num <= V.seeDicks) { + V.rivalGender = 2; + } else { + V.rivalGender = 1; + } + const { + HeR, + heR, himR, + } = getPronouns({ pronoun: (V.rivalGender === 2) ? App.Data.Pronouns.Kind.male : App.Data.Pronouns.Kind.female }).appendSuffix("R"); + const { + HeA, heA, hisA, himA, girlA, himselfA, womanA, loliA + } = getPronouns(assistant.pronouns().main).appendSuffix("A"); + V.fcnn.push("...evidence also suggests that the Daughters of Liberty had also planned a terrorist attack on..."); + + if (V.mercenaries > 3) { + r.push(`Your ${V.mercenariesTitle}`); + } else if (V.mercenaries > 0) { + r.push(`Your mercenaries`); + } else if (V.arcologyUpgrade.drones > 0) { + r.push(`Your security drones`); + } else { + r.push(`Private security teams`); + } + r.push(`perform the grisly task of disposing of the bodies of the Daughters killed in the assault. They strip them of anything that might be of use in cleaning up after the attempted coup — communication devices, PDAs, computers, even handwritten notes. The raw intel is scanned and passed to ${V.assistant.name}. Most of it is rubbish.`); + App.Events.addParagraph(node, r); + r = []; + r.push(`Some of it is not. There is evidence of payments from a`); + if (V.rivalSet === 0) { + r.push(`nearby Free City`); + } else { + r.push(`neighboring arcology`); + } + r.push(`to the leadership of the Daughters. ${capFirstChar(V.assistant.name)} is silent for a long time, crosschecking records to assemble a complete picture despite your enemies' attempts to disguise the transactions. Finally, ${V.assistant.name} finishes and displays a picture, using nearly the entire surface of your desk for effect.`); + if (V.assistant.personality > 0) { + r.push(`"This," ${heA} says in a tone of satisfaction, "is the`); + if (V.rivalGender === 2) { + r.push(`bastard`); + } else if (V.rivalGender === 1) { + r.push(`bitch`); + } else { + r.push(`cunt`); + } + r.push(`you want, ${properTitle()}."`); + } else { + r.push(`"This," _heA says neutrally, "is the culprit, ${properTitle()}."`); + } + + r.push(`The face is vigorous, determined, and`); + if (V.rivalGender === 2) { + r.push(`masculine. The very stereotype of the male arcology owner`); + } else if ((V.rivalGender === 1)) { + r.push(`feminine. The very stereotype of the female arcology owner`); + } else { + r.push(`androgynous. The very stereotype of the dissolute arcology owner`); + } + r.push(`.`); + if (V.rivalSet !== 0) { + r.push(`And, as you suspected, it's one of your neighbors. It's the individual who owns`); + for (let V.i = 0; V.i < V.arcologies.length; V.i++) { + if (V.arcologies[V.i].rival === 1) { + r.push(`''${V.arcologies[V.i].name}.''`); + break; + } + } + App.Events.addParagraph(node, r); + r = []; + } + + r.push(`Your assistant continues, "${HeR} came into an arcology about when you did, ${properTitle()}. It seems the Daughters originally planned to attack ${himR}, but ${heR} bought them off and sent them after you, instead."`); + if (V.assistant.personality > 0) { + r.push(`"I wonder," ${heA} teases, "if ${heR} thinks you're cute, or what?"`); + } + App.Events.addParagraph(node, r); + r = []; + r.push(`You inquire as to whether there's any identifiable cause for the evident dislike.`); + if (V.rivalryFS !== 0) { + r.push(`"Definitely," says your assistant. "The most cursory review of the recent history of this Free City shows that divergence began with your selection of V.rivalryFS as a society model for the future. They immediately went the opposite direction."`); + } else { + r.push(`"No," says your assistant. "It may be that giving the Daughters an alternative target was necessary and you were simply unlucky. Alternatively, this may be envy of your success; of rising arcology owners, you have come farthest, fastest."`); + } + + App.Events.addParagraph(node, r); + + App.Events.addResponses(node, [ + new App.Events.Result(`Contact the culprit privately and discuss the matter`, privately), + new App.Events.Result(`Reveal the evidence publicly`, publicly), + new App.Events.Result(`Devote funds to tracing the evidence`, trace, `This will cost ${cashFormat(20000)}`) + ]); + + function privately() { + const frag = new DocumentFragment(); + let r = []; + V.nextButton = "Continue"; + App.Utils.updateUserButton();/* unlock Continue button */ + r.push(`Your fellow arcology owner proves very receptive to your missive, as well they might. Your defeat of the Daughters has made a major impact on the willingness of slaveowners to discuss slave revolts in public, and any arcology owner who was proved to be funding anti-slaver violence, even under duress, would be shunned. With very little prompting, ${heR} forwards a <span class="yellowgreen">huge indemnity payment.</span> It's nowhere near enough to cause bankruptcy, but it's enough to give you a massive advantage should you find yourselves at odds again.`); + cashX(100000, "war"); + App.Events.addParagraph(frag, r); + return frag; + } + + function publicly() { + const frag = new DocumentFragment(); + let r = []; + V.nextButton = "Continue"; + App.Utils.updateUserButton();/* unlock Continue button */ + r.push(`Free Cities society is understandably reluctant to condemn, never mind depose, arcology owners. The precedent of removing one would be bad, even if the public brought enough strength together to accomplish it. Your evidence looks quite bad, but isn't so incontrovertible as to cause your fellow aristocrats to take such a drastic measure. Nonetheless, the public is aghast at the spectacle of an arcology owner funding an attack on another. Opinion <span class="green">rallies</span> around you, and you even receive some discreet <span class="yellowgreen">donations,</span> delivered with the intimation that they are to be used against your enemy. There is stony silence from the Daughters' backer; today, you began a real inter-arcology war.`); + repX(1000, "war"); + cashX(10000, "war"); + V.rivalryPower = 1; + if (V.rivalSet !== 0) { + for (let V.i = 0; V.i < V.arcologies.length; V.i++) { + if (V.arcologies[V.i].rival === 1) { + V.arcologies[V.i].embargo = 2; + V.arcologies[V.i].embargoTarget = 0; + V.arcologies[V.i].influenceTarget = 0; + V.rivalOwner = V.arcologies[V.i].prosperity; + break; + } + } + } else { + V.rivalOwner = V.arcologies[0].prosperity; + } + App.Events.addParagraph(frag, r); + return frag; + } + + function trace() { + const frag = new DocumentFragment(); + let r = []; + V.nextButton = "Continue"; + App.Utils.updateUserButton();/* unlock Continue button */ + r.push(`The money flows out, and the information flows in. You are rewarded with a reasonably complete picture of your rival's operations. The intelligence will be extremely useful going forward, since by gathering it, you sent an unmistakable signal that you do not consider the matter closed. There is stony silence from the Daughters' backer; today, you began a real inter-arcology war. But, with this information, you can maintain it from a position of advantage.`); + cashX(-20000, "war"); + V.rivalryPower = 5; + if (V.rivalSet !== 0) { + for (let V.i = 0; V.i < V.arcologies.length; V.i++) { + if (V.arcologies[V.i].rival === 1) { + V.arcologies[V.i].embargo = 3; + V.arcologies[V.i].embargoTarget = 0; + V.arcologies[V.i].influenceTarget = 0; + V.rivalOwner = V.arcologies[V.i].prosperity; + break; + } + } + } else { + V.rivalOwner = V.arcologies[0].prosperity; + } + App.Events.addParagraph(frag, r); + return frag; + } + + //<<link "Reveal the evidence publicly">> + + //<</replace>> + //<</link>> + //<br> + //<<link "Devote funds to tracing the evidence">> + + //<</replace>> + //<</link>> + //</span> + } +}; diff --git a/src/events/nonRandom/daughters/pCoupAftermath.tw b/src/events/nonRandom/daughters/pCoupAftermath.tw deleted file mode 100644 index 9e3f8c86d2248d0955867f82b3f55fb0450bb8dc..0000000000000000000000000000000000000000 --- a/src/events/nonRandom/daughters/pCoupAftermath.tw +++ /dev/null @@ -1,98 +0,0 @@ -:: P coup aftermath [nobr] - -<<set $nextButton = " ", $rivalOwner = 0, $rivalryPower = 0, _num = random(0,99)>> /* hide button until user makes a selection */ -<<if _num <= $seeDicks>> - <<set $rivalGender = 2>> -<<else>> - <<set $rivalGender = 1>> -<</if>> -<<if $rivalGender == 2>> - <<set _heR = "he">> - <<set _himR = "him">> - <<set _HeR = capFirstChar(_heR)>> -<<else>> - <<set _heR = "she">> - <<set _himR = "her">> - <<set _HeR = capFirstChar(_heR)>> -<</if>> -<<setAssistantPronouns>> -<<set $fcnn.push("...evidence also suggests that the Daughters of Liberty had also planned a terrorist attack on...")>> - -<<if $mercenaries > 3>>Your $mercenariesTitle<<elseif $mercenaries > 0>>Your mercenaries<<elseif $arcologyUpgrade.drones > 0>>Your security drones<<else>>Private security teams<</if>> perform the grisly task of disposing of the bodies of the Daughters killed in the assault. They strip them of anything that might be of use in cleaning up after the attempted coup — communication devices, PDAs, computers, even handwritten notes. The raw intel is scanned and passed to $assistant.name. Most of it is rubbish. -<br><br> -Some of it is not. There is evidence of payments from a <<if $rivalSet == 0>>nearby Free City<<else>>neighboring arcology<</if>> to the leadership of the Daughters. <<= capFirstChar($assistant.name)>> is silent for a long time, crosschecking records to assemble a complete picture despite your enemies' attempts to disguise the transactions. Finally, $assistant.name finishes and displays a picture, using nearly the entire surface of your desk for effect. <<if $assistant.personality > 0>>"This," _heA says in a tone of satisfaction, "is the <<if $rivalGender == 2>>bastard<<elseif $rivalGender == 1>>bitch<<else>>cunt<</if>> you want, <<= properTitle()>>."<<else>>"This," _heA says neutrally, "is the culprit, <<= properTitle()>>."<</if>> - -The face is vigorous, determined, and <<if $rivalGender == 2>>masculine. The very stereotype of the male arcology owner<<elseif ($rivalGender == 1)>>feminine. The very stereotype of the female arcology owner<<else>>androgynous. The very stereotype of the dissolute arcology owner<</if>>. -<<if $rivalSet != 0>> - And, as you suspected, it's one of your neighbors. It's the individual who owns - <<for $i = 0; $i < $arcologies.length; $i++>> - <<if $arcologies[$i].rival == 1>> - ''$arcologies[$i].name.'' - <<break>> - <</if>> - <</for>> - <br><br> -<</if>> -Your assistant continues, "_HeR came into an arcology about when you did, <<= properTitle()>>. It seems the Daughters originally planned to attack _himR, but _heR bought them off and sent them after you, instead."<<if $assistant.personality > 0>> "I wonder," _heA teases, "if _heR thinks you're cute, or what?"<</if>> -<br><br> -You inquire as to whether there's any identifiable cause for the evident dislike. -<<if $rivalryFS != 0>> - "Definitely," says your assistant. "The most cursory review of the recent history of this Free City shows that divergence began with your selection of $rivalryFS as a society model for the future. They immediately went the opposite direction." -<<else>> - "No," says your assistant. "It may be that giving the Daughters an alternative target was necessary and you were simply unlucky. Alternatively, this may be envy of your success; of rising arcology owners, you have come farthest, fastest." -<</if>> - -<br><br> - -<span id="result"> -<<link "Contact the culprit privately and discuss the matter">> - <<set $nextButton = "Continue">><<run App.Utils.updateUserButton()>> /* unlock Continue button */ - <<replace "#result">> - Your fellow arcology owner proves very receptive to your missive, as well they might. Your defeat of the Daughters has made a major impact on the willingness of slaveowners to discuss slave revolts in public, and any arcology owner who was proved to be funding anti-slaver violence, even under duress, would be shunned. With very little prompting, _heR forwards a @@.yellowgreen;huge indemnity payment.@@ It's nowhere near enough to cause bankruptcy, but it's enough to give you a massive advantage should you find yourselves at odds again. - <<run cashX(100000, "war")>> - <</replace>> -<</link>> -<br><<link "Reveal the evidence publicly">> - <<set $nextButton = "Continue">><<run App.Utils.updateUserButton()>> /* unlock Continue button */ - <<replace "#result">> - Free Cities society is understandably reluctant to condemn, never mind depose, arcology owners. The precedent of removing one would be bad, even if the public brought enough strength together to accomplish it. Your evidence looks quite bad, but isn't so incontrovertible as to cause your fellow aristocrats to take such a drastic measure. Nonetheless, the public is aghast at the spectacle of an arcology owner funding an attack on another. Opinion @@.green;rallies@@ around you, and you even receive some discreet @@.yellowgreen;donations,@@ delivered with the intimation that they are to be used against your enemy. There is stony silence from the Daughters' backer; today, you began a real inter-arcology war. - <<run repX(1000, "war")>> - <<run cashX(10000, "war")>> - <<set $rivalryPower = 1>> - <<if $rivalSet != 0>> - <<for $i = 0; $i < $arcologies.length; $i++>> - <<if $arcologies[$i].rival == 1>> - <<set $arcologies[$i].embargo = 2>> - <<set $arcologies[$i].embargoTarget = 0>> - <<set $arcologies[$i].influenceTarget = 0>> - <<set $rivalOwner = $arcologies[$i].prosperity>> - <<break>> - <</if>> - <</for>> - <<else>> - <<set $rivalOwner = $arcologies[0].prosperity>> - <</if>> - <</replace>> -<</link>> -<br><<link "Devote funds to tracing the evidence">> - <<set $nextButton = "Continue">><<run App.Utils.updateUserButton()>> /* unlock Continue button */ - <<replace "#result">> - The money flows out, and the information flows in. You are rewarded with a reasonably complete picture of your rival's operations. The intelligence will be extremely useful going forward, since by gathering it, you sent an unmistakable signal that you do not consider the matter closed. There is stony silence from the Daughters' backer; today, you began a real inter-arcology war. But, with this information, you can maintain it from a position of advantage. - <<run cashX(-20000, "war")>> - <<set $rivalryPower = 5>> - <<if $rivalSet != 0>> - <<for $i = 0; $i < $arcologies.length; $i++>> - <<if $arcologies[$i].rival == 1>> - <<set $arcologies[$i].embargo = 3>> - <<set $arcologies[$i].embargoTarget = 0>> - <<set $arcologies[$i].influenceTarget = 0>> - <<set $rivalOwner = $arcologies[$i].prosperity>> - <<break>> - <</if>> - <</for>> - <<else>> - <<set $rivalOwner = $arcologies[0].prosperity>> - <</if>> - <</replace>> -<</link>> //This will cost <<print cashFormat(20000)>>// -</span> diff --git a/src/events/timeGatedPlotEvent.js b/src/events/timeGatedPlotEvent.js index d6ccb46266fc47aff674dce4780ddb72532c6367..e8cc1358f0952e3fe526916d58c4501aa01a844e 100644 --- a/src/events/timeGatedPlotEvent.js +++ b/src/events/timeGatedPlotEvent.js @@ -51,7 +51,7 @@ App.Events.TimeGatedPlotEvent = class TimeGatedPlotEvent extends App.Events.Base } else { this.events[71] = new App.Events.TwineEvent().wrapPassage([], "P coup attempt"); } - this.events[72] = new App.Events.TwineEvent().wrapPassage([], "P coup aftermath"); + this.events[72] = new App.Events.PCoupAftermath(); // events with complex prerequisites don't belong here...they're just normal scheduled events and need their own chain controller or result flags for (let week = 0; week < this.events.length; ++week) {