fix: cap nemesis rank (#2122)
Re #2121 Reviewed-on: #2122 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
be02435661
commit
0997f9567f
@ -150,17 +150,17 @@ export const nemesisController: RequestHandler = async (req, res) => {
|
|||||||
res.json(response);
|
res.json(response);
|
||||||
} else {
|
} else {
|
||||||
const passcode = getNemesisPasscode(inventory.Nemesis!);
|
const passcode = getNemesisPasscode(inventory.Nemesis!);
|
||||||
|
let RankIncrease: number | undefined;
|
||||||
if (passcode[body.position] != body.guess) {
|
if (passcode[body.position] != body.guess) {
|
||||||
res.end();
|
const manifest = getNemesisManifest(inventory.Nemesis!.manifest);
|
||||||
} else {
|
if (inventory.Nemesis!.Rank + 1 < manifest.systemIndexes.length) {
|
||||||
inventory.Nemesis!.Rank += 1;
|
inventory.Nemesis!.Rank += 1;
|
||||||
inventory.Nemesis!.InfNodes = getInfNodes(
|
RankIncrease = 1;
|
||||||
getNemesisManifest(inventory.Nemesis!.manifest),
|
}
|
||||||
inventory.Nemesis!.Rank
|
inventory.Nemesis!.InfNodes = getInfNodes(manifest, inventory.Nemesis!.Rank);
|
||||||
);
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({ RankIncrease: 1 });
|
|
||||||
}
|
}
|
||||||
|
res.json({ RankIncrease });
|
||||||
}
|
}
|
||||||
} else if ((req.query.mode as string) == "rs") {
|
} else if ((req.query.mode as string) == "rs") {
|
||||||
// report spawn; POST but no application data in body
|
// report spawn; POST but no application data in body
|
||||||
|
Loading…
x
Reference in New Issue
Block a user