From e67ef63b775c05ce66595b7e2b8a8580d2772016 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Sat, 4 Oct 2025 04:18:21 -0700 Subject: [PATCH] fix: avoid using assassination node for an earlier sortie mission (#2838) Closes #2837 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2838 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/services/worldStateService.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/services/worldStateService.ts b/src/services/worldStateService.ts index 4ee06990..144698e9 100644 --- a/src/services/worldStateService.ts +++ b/src/services/worldStateService.ts @@ -280,6 +280,14 @@ export const getSortie = (day: number): ISortie => { } } + const willHaveAssassination = boss != "SORTIE_BOSS_CORRUPTED_VOR" && rng.randomInt(0, 2) == 2; + if (willHaveAssassination) { + const index = nodes.indexOf(sortieBossNode[boss]); + if (index != -1) { + nodes.splice(index, 1); + } + } + const selectedNodes: ISortieMission[] = []; const missionTypes = new Set(); @@ -309,7 +317,7 @@ export const getSortie = (day: number): ISortie => { "SORTIE_MODIFIER_BOW_ONLY" ]; - if (i == 2 && boss != "SORTIE_BOSS_CORRUPTED_VOR" && rng.randomInt(0, 2) == 2) { + if (i == 2 && willHaveAssassination) { const tileset = sortieTilesets[sortieBossNode[boss] as keyof typeof sortieTilesets] as TSortieTileset; pushTilesetModifiers(modifiers, tileset);