From 09405b95e09d43bcc48e43e66f1b4e1291f5f185 Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Fri, 3 Jul 2020 12:10:51 +0200 Subject: [PATCH] enable murder attempt event --- js/003-data/gameVariableData.js | 2 ++ src/events/scheduled/murderAttempt.js | 10 ++++++---- src/uncategorized/nonRandomEvent.tw | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index 89ca3686b26..ea1f11f96a2 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -1468,6 +1468,8 @@ App.Data.resetOnNGPlus = { ("...from the Free Cities have become increasingly common clientele for the black market..."), ("...a risky gamble on the three-hour-long hardcore sex scene, but the box office figures for just..."), ], + + murderAttemptWeek: 80, }; App.Data.ignoreGameStateVariables = [ diff --git a/src/events/scheduled/murderAttempt.js b/src/events/scheduled/murderAttempt.js index d8becef0de6..893a4cbdb4e 100644 --- a/src/events/scheduled/murderAttempt.js +++ b/src/events/scheduled/murderAttempt.js @@ -1,12 +1,14 @@ App.Events.murderAttempt = function() { - V.nextButton = " "; // disable Continue - const nextPassage = "Main"; // TODO + // setup next time, 2-4 months + V.murderAttemptWeek += 8 + Math.floor(Math.random() * 8); + // disable Continue + V.nextButton = " "; + const nextPassage = "Random Nonindividual Event"; const perceptiveCareers = ["mercenary", "gang"]; // event unique const variation = jsEither(["trade", "slave", "drug", "military"]); const companyName = "RealTec"; // TODO generate name const isSincere = Math.random() > 0.6; - const {he, his, him, woman: man, himself} = getPronouns(V.arcologies[0].FSGenderRadicalist === "unset" ? {pronoun: App.Data.Pronouns.Kind.male} : {pronoun: App.Data.Pronouns.Kind.female}); @@ -284,7 +286,7 @@ App.Events.murderAttempt = function() { /** * @param {string} [argument] - * @returns {function(): Array<string>} + * @returns {function(): DocumentFragment} */ function accept(argument) { return function() { diff --git a/src/uncategorized/nonRandomEvent.tw b/src/uncategorized/nonRandomEvent.tw index 65e8e6899b2..035ea4631da 100644 --- a/src/uncategorized/nonRandomEvent.tw +++ b/src/uncategorized/nonRandomEvent.tw @@ -181,6 +181,8 @@ <<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">> <<else>> <<if random(1,100) > _effectiveWeek+25>> <<goto "RIE Eligibility Check">> -- GitLab