fix: cap nemesis rank
This commit is contained in:
parent
20c4092dfe
commit
3e6448d80b
@ -153,15 +153,15 @@ export const nemesisController: RequestHandler = async (req, res) => {
|
|||||||
if (passcode[body.position] != body.guess) {
|
if (passcode[body.position] != body.guess) {
|
||||||
res.end();
|
res.end();
|
||||||
} else {
|
} else {
|
||||||
|
const manifest = getNemesisManifest(inventory.Nemesis!.manifest);
|
||||||
|
if (inventory.Nemesis!.Rank + 1 < manifest.systemIndexes.length) {
|
||||||
inventory.Nemesis!.Rank += 1;
|
inventory.Nemesis!.Rank += 1;
|
||||||
inventory.Nemesis!.InfNodes = getInfNodes(
|
inventory.Nemesis!.InfNodes = getInfNodes(manifest, inventory.Nemesis!.Rank);
|
||||||
getNemesisManifest(inventory.Nemesis!.manifest),
|
|
||||||
inventory.Nemesis!.Rank
|
|
||||||
);
|
|
||||||
await inventory.save();
|
await inventory.save();
|
||||||
res.json({ RankIncrease: 1 });
|
res.json({ RankIncrease: 1 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} 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
|
||||||
const inventory = await getInventory(account._id.toString(), "Nemesis");
|
const inventory = await getInventory(account._id.toString(), "Nemesis");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user