返回提交历史
Modified
src/services/missionInventoryUpdateService.ts
+7
-1
XFEstudio/SpaceNinjaServer
fix: provide nemesis hints in random order (#4236)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4236 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: yhhkevin <235+yhhkevin@noreply.localhost> Co-committed-by: yhhkevin <235+yhhkevin@noreply.localhost>
f1ed5dc7
代码差异
1 个文件
+7
-1
@@ -296,7 +296,13 @@ export const addMissionInventoryUpdates = async (
296
296
if (inventory.Nemesis.HintProgress >= progressNeeded) {
297
297
inventory.Nemesis.HintProgress -= progressNeeded;
298
298
const passcode = getNemesisPasscode(inventory.Nemesis);
299
inventory.Nemesis.Hints.push(passcode[inventory.Nemesis.Hints.length]);
299
const Hints = inventory.Nemesis.Hints;
300
const rng = new SRng(inventory.Nemesis.fp);
301
inventory.Nemesis.Hints.push(
302
passcode.filter(code => !Hints.includes(code))[
303
rng.randomInt(0, 2 - inventory.Nemesis.Hints.length)
304
]
305
);
300
306
}
301
307
}
302
308
}