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: 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
yhhkevin <235+yhhkevin@noreply.localhost>
提交于

代码差异

1 个文件 +7 -1
Modified src/services/missionInventoryUpdateService.ts +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 }