XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix: handle assassination-only nodes in sortie generation (#3064)

Closes #3063 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3064 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

11a5c2ce
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +7 -2
Modified src/services/worldStateService.ts +7 -2
@@ -115,6 +115,8 @@ const sortieBossNode: Record<Exclude<TSortieBoss, "SORTIE_BOSS_CORRUPTED_VOR">,
115 115 SORTIE_BOSS_VOR: "SolNode108"
116 116 };
117 117
118 const sortieAssassinationOnlyNodes: string[] = ["SolNode193", "SolNode105", "SolNode108"];
119
118 120 const configAlerts: Record<string, IAlert> = {
119 121 voidCorruption2025Week1: {
120 122 _id: { $oid: "677d452e2f324ee7b90f8ccf" },
@@ -381,8 +383,11 @@ export const getSortie = (day: number): ISortie => {
381 383 }
382 384
383 385 for (let i = 0; i < 3; i++) {
384 const randomIndex = rng.randomInt(0, nodes.length - 1);
385 const node = nodes[randomIndex];
386 let randomIndex, node;
387 do {
388 randomIndex = rng.randomInt(0, nodes.length - 1);
389 node = nodes[randomIndex];
390 } while (sortieAssassinationOnlyNodes.indexOf(node) != -1);
386 391
387 392 const modifiers = [
388 393 "SORTIE_MODIFIER_LOW_ENERGY",