From 79369dd235f013988b494c832d53ac4dd04d6e09 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Mon, 12 Sep 2022 19:33:51 -0400 Subject: [PATCH] Neighbor adoption influenced by difficulty: easier gives the player more chances to spread FSes, harder gives the rival more chances to spread FSes. --- src/endWeek/economics/neighborsDevelopment.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index 6c9faae48cc..c43f32f124e 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -2554,7 +2554,27 @@ App.EndWeek.neighborsDevelopment = function() { for (const candidate of validFSes) { if (arc2[candidate] > random(0, 200) - influenceBonus) { + // equal weight by default (at normal difficulty, or the arc is neither player nor rival) usableCandidates.push({arc2, candidate}); + if (arc2.direction === 0) { + // easier than normal: player FS gets bonus chance + if (V.baseDifficulty < 3) { + usableCandidates.push({arc2, candidate}); + } + // very easy: player FS gets another bonus chance + if (V.baseDifficulty < 2) { + usableCandidates.push({arc2, candidate}); + } + } else if (arc2.rival > 0) { + // harder than normal: rival FS gets bonus chance + if (V.baseDifficulty > 3) { + usableCandidates.push({arc2, candidate}); + } + // nightmare: rival FS gets another bonus chance + if (V.baseDifficulty > 4) { + usableCandidates.push({arc2, candidate}); + } + } } } } -- GitLab