diff --git a/src/005-passages/eventsPassages.js b/src/005-passages/eventsPassages.js index 040a03f06145fc905a8652d27498aaf173ad8ea5..c1e1167990006448620fde1720fdf1e94ba1bb91 100644 --- a/src/005-passages/eventsPassages.js +++ b/src/005-passages/eventsPassages.js @@ -52,6 +52,12 @@ new App.DomPassage("SE raiding", () => App.Events.SERaiding()); /* ### Non Random Events ### */ +new App.DomPassage("Murder Attempt", + () => { + return nonRandomEvent(); + } +); + new App.DomPassage("Murder Attempt", () => { if (V.event === "slave trade") { diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js index 84ca9ea45ae85425f0d5096ea37e529511a8d788..1d6df25f9b715a89952601ec1a16fffa3b8e131a 100644 --- a/src/events/nonRandomEvent.js +++ b/src/events/nonRandomEvent.js @@ -248,4 +248,6 @@ globalThis.nonRandomEvent = function() { Engine.play("Random Nonindividual Event"); } } + // never reached, just for typing + return new DocumentFragment(); }; diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw deleted file mode 100644 index 78744e2634a590102b644a80a5e6f605d4b4814f..0000000000000000000000000000000000000000 --- a/src/uncategorized/nonRandomEvent.tw +++ /dev/null @@ -1,257 +0,0 @@ -:: Nonrandom Event - -<<set $activeSlave = 0, $eventSlave = 0>> - -<<if $plot>> - -<<set _effectiveWeek = $week-$nationHate>> -<<if (_effectiveWeek == 4) && ($arcologies[0].name.indexOf("Arcology ") != -1)>> - <<set $Event = "arcology naming">> - <<goto "Generic Plot Events">> -<<elseif (_effectiveWeek >= 5 && $FCTV.receiver == -1)>> - <<goto "SE FCTV Install">> -<<elseif ($projectN.status == 1)>> - <<set $projectN.status = 2>> - <<set $projectN.phase1 = _effectiveWeek>> - <<goto "SE projectNInitialized">> -<<elseif ($bodyPuristRiot == 1) && ($puristRiotDone == 0) && (_effectiveWeek >= $projectN.phase1+1) && ($projectN.status != 9)>> - <<goto "SE bodypuristprotest">> - <<set $puristRiotDone = 1>> -<<elseif ($projectN.status == 2) && ($projectN.public == 0) && (_effectiveWeek >= $projectN.phase1+3)>> - <<goto "SE projectNmomoney">> - <<set $projectN.phase2 = _effectiveWeek>> -<<elseif ($projectN.status == 2) && ($projectN.public == 1) && (_effectiveWeek >= $projectN.phase1+5)>> - <<goto "SE projectNmomoney">> - <<set $projectN.phase2 = _effectiveWeek>> -<<elseif ($projectN.status == 3) && ($projectN.wellFunded == 1) && (_effectiveWeek >= $projectN.phase2+4)>> - <<goto "SE projectNbubbles">> - <<set $projectN.status = 4>> - <<set $projectN.phase3 = _effectiveWeek>> -<<elseif ($projectN.status == 3) && ($projectN.wellFunded != 1) && (_effectiveWeek >= $projectN.phase2+6)>> - <<goto "SE projectNbubbles">> - <<set $projectN.status = 4>> - <<set $projectN.phase3 = _effectiveWeek>> -<<elseif ($projectN.status == 4) && ($projectN.poorlyFunded != 1) && (_effectiveWeek >= $projectN.phase3+4)>> - <<goto "SE projectNsaboteur">> - <<set $projectN.phase4 = _effectiveWeek>> -<<elseif ($projectN.status == 4) && ($projectN.public == 1) && ($projectN.poorlyFunded == 1) && (_effectiveWeek >= $projectN.phase3+6)>> - <<goto "SE projectNsaboteur">> - <<set $projectN.phase4 = _effectiveWeek>> -<<elseif ($projectN.status == 4) && ($projectN.public == 0) && ($projectN.poorlyFunded == 1) && (_effectiveWeek >= $projectN.phase3+6)>> - <<goto "SE projectNblowingthelid">> - <<set $projectN.phase4 = _effectiveWeek>> -<<elseif ($puristsFurious == 1) && ($puristRiotDone == 0) && (_effectiveWeek >= $projectN.phase4+1 && ($projectN.status != 9))>> - <<goto "SE bodypuristriot">> - <<set $puristRiotDone = 1>> -<<elseif ($projectN.status == 5) && (_effectiveWeek >= $projectN.phase4+4)>> - <<goto "SE projectNcomplete">> -<<elseif ($projectN.status >= 6) && ($projectN.status != 9) && $projectN.decisionMade != 1 && (_effectiveWeek >= $projectN.phase4+5)>> - <<goto "SE projectNtechrelease">> -<<elseif ($projectN.status == 7) && ($growingNewCat == 0)>> - <<goto "SE vatcatgirl">> -<<elseif ($projectN.status == 8) && ($growingNewCat == 0)>> - <<goto "SE vatcatboy">> -<<elseif (_effectiveWeek == 6)>> - <<set $Event = "strip club closing">> - <<goto "Generic Plot Events">> -<<elseif (_effectiveWeek == 8)>> - <<set $Event = "strip club aftermath">> - <<goto "Generic Plot Events">> -<<elseif (_effectiveWeek == 11)>> - <<set $Event = "assistant">> - <<goto "Assistant Events">> -<<elseif (_effectiveWeek == 12) && $raped == -1 && $arcologyUpgrade.drones != 1 && $BodyguardID == 0 && $PC.career != "arcology owner">> - <<goto "P raped">> -<<elseif (_effectiveWeek == 14) && $badC != 1>> - <<set _valid = $slaves.find(function(s) { return s.curatives > 1 || s.inflationType == "curative"; })>> - <<if def _valid>> - <<set $badC = 1, $Event = "bad curatives">> - <<goto "Generic Plot Events">> - <<else>> - <<set $badC = 1>> - <<goto "Nonrandom Event">> - <</if>> -<<elseif (_effectiveWeek >= 15) && ($arcologies[0].FSNeoImperialistLaw1 == 1) && $assholeKnight != 1>> - <<set $assholeKnight = 1>> - <<set $imperialEventweek = _effectiveWeek>> - <<goto "SE assholeknight">> -<<elseif (_effectiveWeek == 17)>> - <<set $Event = "shoot invitation">> - <<goto "Generic Plot Events">> -<<elseif (_effectiveWeek == 20)>> - <<set $Event = "slave food">> - <<goto "Generic Plot Events">> -<<elseif (_effectiveWeek == 24)>> - <<set $Event = "militia">> - <<goto "Generic Plot Events">> -<<elseif ($week == 29)>> - <<set $Event = "aid invitation">> - <<goto "Generic Plot Events">> -<<elseif (_effectiveWeek == 31) && ($mercenaries == 0)>> - <<goto "P mercenaries">> -<<elseif (_effectiveWeek == 35) && ($mercenaries > 0)>> - <<goto "P snatch and grab">> -<<elseif (_effectiveWeek == 43)>> - <<goto "P invasion">> -<<elseif (_effectiveWeek == 44) && ($mercenaries > 0) && $mercRomeo != 1>> - <<set _valid = $slaves.find(function(s) { return (["serve the public", "serve in the club", "whore", "work in the brothel"].includes(s.assignment) || s.counter.publicUse >= 50) && s.fetish != "mindbroken" && s.fuckdoll == 0; })>> - <<set $mercRomeo = 1>> - <<if def _valid>> - <<goto "P mercenary romeo">> - <<else>> - <<goto "Nonrandom Event">> - <</if>> -<<elseif (_effectiveWeek == 46) && ($mercenaries > 0)>> - <<goto "P raid invitation">> -<<elseif (_effectiveWeek == 48) && ($experimental.food == 1)>> - <<set $foodCrisis = 1>> - <<goto "P food crisis">> -<<elseif (_effectiveWeek == 50) && ($rations > 0)>> - <<set $foodCrisis = 2>> - <<goto "P food crisis">> -<<elseif (_effectiveWeek == 52) && ($seeHyperPreg == 1) && $seePreg != 0 && $badB != 1>> - <<set _valid = $slaves.find(function(s) { return s.drugs == "breast injections" || s.drugs == "hyper breast injections" || s.drugs == "intensive breast injections"; })>> - <<if def _valid>> - <<set $badB = 1, $Event = "bad breasts">> - <<goto "Generic Plot Events">> - <<else>> - <<set $badB = 1>> - <<goto "Nonrandom Event">> - <</if>> -<<elseif _effectiveWeek == 54 && (def $peacekeepers) && $peacekeepers.attitude >= 0>> - <<goto "P peacekeepers deficit">> -<<elseif (_effectiveWeek == 56)>> - <<set $collaboration = 0>> - <<set $traitor = 0>> - <<set $hackerSupport = 0>> - <<goto "P underground railroad">> -<<elseif (_effectiveWeek == 58) && ($traitor == 0)>> - <<goto "P bombing">> -<<elseif (_effectiveWeek == 60) && ($rations > 0)>> - <<set $foodCrisis = 3>> - <<goto "P food crisis">> -<<elseif (_effectiveWeek == 61) && ($traitor != 0)>> - <<goto "P traitor message">> -<<elseif (_effectiveWeek == 62) && ($mercenaries < 3)>> - <<goto "P defense fears">> -<<elseif (_effectiveWeek == 65) && ($mercenaries >= 3)>> - <<goto "P citizens and civilians">> -<<elseif (_effectiveWeek == 67) && ($traitor != 0)>> - <<goto "P collaboration choice">> -<<elseif (_effectiveWeek == 69)>> - <<goto "P hacker support">> -<<elseif (_effectiveWeek == 70) && ($collaboration == 1) && $traitorType != "trapper">> - <<goto "P coup collaboration">> -<<elseif (_effectiveWeek == 71)>> - <<if $traitorType != "agent" && $traitorType != "trapper">> - <<set _doubleAgent = 0>> - <<else>> - <<set _doubleAgent = 1>> - <</if>> - <<if $traitorType == "trapper">> - <<goto "P coup betrayal">> - <<elseif $mercenaries + $personalArms + $hackerSupport + _doubleAgent < 5>> - <<goto "P coup loss">> - <<else>> - <<goto "P coup attempt">> - <</if>> -<<elseif (_effectiveWeek == 72)>> - <<goto "P coup aftermath">> -<<elseif $SF.Toggle && $SF.Active === -1 && _effectiveWeek >= 72>> - <<goto "Security Force Proposal">> -<<elseif $arcologies[0].FSRestart != "unset" && $failedElite > 300 && $eugenicsFullControl != 1>> - <<goto "eliteTakeOver">> -<<elseif (_effectiveWeek > 5) && ($rep > 3000) && ($FSAnnounced == 0)>> - <<goto "P FS Announcement">> -<<elseif _effectiveWeek > 18 && $assistant.personality > 0 && !$assistant.options>> - <<set $Event = "assistant SP">> - <<goto "Assistant Events">> -<<elseif (_effectiveWeek > 45) && ($bodyswapAnnounced == 0) && ($surgeryUpgrade == 1)>> - <<goto "P Bodyswap Reveal">> -<<elseif _effectiveWeek > 48 && $invasionVictory > 0 && $peacekeepers == 0 && $peacekeepersGone != 1>> - <<goto "P peacekeepers intro">> -<<elseif ($arcologies[0].prosperity > 80) && (App.Utils.schoolCounter() == 0) && ($schoolSuggestion == 0)>> - <<goto "P school suggestion">> -<<elseif ($assistant.fsOptions !== 1) && $assistant.personality > 0 && $assistant.appearance != "normal" && FutureSocieties.HighestDecoration() >= 40>> - <<set $Event = "assistant FS">> - <<goto "Assistant Events">> -<<elseif $assistant.personality > 0 && !$assistant.announcedName && $assistant.power > 0>> - <<set $Event = "assistant name">> - <<goto "Assistant Events">> -<<elseif !$assistant.market && $assistant.power > 1>> - <<set $Event = "market assistant">> - <<goto "Assistant Events">> -<<elseif (_effectiveWeek > 70) && ($corp.Incorporated > 0) && ($rivalOwnerEnslaved > 0) && ($mercenaries >= 3) && ($mercenariesHelpCorp == 0) && ($corp.DivExtra > 0)>> - <<goto "P Mercs Help Corp">> -<<elseif _effectiveWeek > 75 && (def $peacekeepers) && $peacekeepers.strength < 50 && $rivalOwner == 0 && $peacekeepersFate != 1>> - <<goto "P peacekeepers independence">> -<<elseif (def $peacekeepers) && $peacekeepers.strength >= 50 && $peacekeepers.influenceAnnounced == 0>> - <<goto "P peacekeepers influence">> -<<elseif ($cash > 120000) && ($rep > 4000) && ($corp.Announced == 0)>> - <<goto "P Corp Announcement">> -<<elseif ($rivalOwner > 0)>> - <<if $hostageAnnounced == 0 && $rivalSet != 0>> - <<goto "P rivalry hostage">> - <<elseif ($rivalOwner-$rivalryPower+10)/$arcologies[0].prosperity < 0.5>> - <<goto "P rivalry victory">> - <<elseif $peacekeepers.attitude > 5 && $rivalryDuration > 1>> - <<goto "P rivalry peacekeepers">> - <<else>> - <<goto "P rivalry actions">> - <</if>> -<<elseif ($arcologies[0].FSPaternalistDecoration == 100) && ($swanSong == 2) && ($week-$swanSongWeek >= 3)>> - <<goto "RE The Siren Strikes Back">> -<<elseif ($eventResults.shoot == 1)>> - <<set $Event = "shoot result">> - <<goto "Generic Plot Events">> -<<elseif ($eventResults.snatch == 1)>> - <<goto "P snatch and grab result">> -<<elseif ($eventResults.raid == 1)>> - <<goto "P raid result">> -<<elseif ($eventResults.aid == 1)>> - <<set $Event = "aid result">> - <<goto "Generic Plot Events">> -<<elseif ($eventResults.slaveMedic > 0)>> - <<goto "P slave medic">> -<<elseif ($eventResults.pit == 1) && ($BodyguardID != 0)>> - <<goto "PE pit fight">> -<<elseif (_effectiveWeek >= 37) && ($arcologies[0].FSNeoImperialistLaw1 == 1) && ($arcologies[0].FSNeoImperialistLaw2 == 1) && $poorKnight != 1 && _effectiveWeek >= $imperialEventWeek+3>> - <<set $poorKnight = 1>> - <<set $imperialEventweek = _effectiveWeek>> - <<goto "SE poorknight">> -<<elseif (_effectiveWeek >= 40) && ($arcologies[0].prosperity > 80) && ($arcologies[0].FSNeoImperialistLaw2 == 1) && $newBaron != 1 && _effectiveWeek >= $imperialEventWeek+3>> - <<set $newBaron = 1>> - <<set $imperialEventweek = _effectiveWeek>> - <<goto "SE newBaron">> -<<elseif $rivalOwner == 0 && $secExpEnabled > 0 && (_effectiveWeek >= 74 && $SecExp.smilingMan.progress === 0 || _effectiveWeek >= 77 && $SecExp.smilingMan.progress === 1 || _effectiveWeek >= 82 && $SecExp.smilingMan.progress === 2 || $SecExp.smilingMan.progress === 3)>> - <<goto "secExpSmilingMan">> -<<elseif ($rivalOwner == 0) && ($seeFCNN == 1) && ($FCNNstation == 0) && ($week > 95) && ($cash > 200000) && ($rep > 7500)>> - <<goto "SE FCNN Station">> -<<elseif _effectiveWeek >= $murderAttemptWeek>> - <<goto "Murder Attempt">> -<<elseif $illegalDeals.slave !== 0 && $illegalDeals.slave !== -1>> - <<set $event = "slave trade">> - <<goto "Murder Attempt">> -<<elseif $illegalDeals.trade !== 0 && $illegalDeals.trade !== -1 && _effectiveWeek >= $illegalDeals.trade.week>> - <<set $event = "trade deal">> - <<goto "Murder Attempt">> -<<elseif $illegalDeals.military !== 0 && $illegalDeals.military !== -1 && _effectiveWeek >= $illegalDeals.military.week>> - <<set $event = "military deal">> - <<goto "Murder Attempt">> -<<else>> - <<if random(1,100) > _effectiveWeek+25>> - <<goto "RIE Eligibility Check">> - <<else>> - <<goto "Random Nonindividual Event">> - <</if>> -<</if>> - -<<else>> - -<<if random(1,200) > _effectiveWeek+100 || $hostageRescued == 1>> - <<goto "RIE Eligibility Check">> -<<else>> - <<goto "Random Nonindividual Event">> -<</if>> - -<</if>>