From 7e13bcf8a9777ff25c91550484fa39d753354dc1 Mon Sep 17 00:00:00 2001 From: AlexisinGit <136088944+AlexisinGit@users.noreply.github.com> Date: Thu, 4 Sep 2025 00:57:18 +0800 Subject: [PATCH] cheat: nemesisAlwaysCorrect fix where previous guess would conflict the cheat --- src/controllers/api/nemesisController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/nemesisController.ts b/src/controllers/api/nemesisController.ts index 158b5b5f..c371a653 100644 --- a/src/controllers/api/nemesisController.ts +++ b/src/controllers/api/nemesisController.ts @@ -82,6 +82,8 @@ export const nemesisController: RequestHandler = async (req, res) => { const inventory = await getInventory(account._id.toString(), "Nemesis"); const body = getJSONfromString(String(req.body)); const passcode = getNemesisPasscode(inventory.Nemesis!); + const alwaysCorrectCheat = (await getInventory(account._id.toString(), "nemesisAlwaysCorrect")) + .nemesisAlwaysCorrect; let guessResult = 0; if (inventory.Nemesis!.Faction == "FC_INFESTATION") { for (let i = 0; i != 3; ++i) { @@ -92,7 +94,7 @@ export const nemesisController: RequestHandler = async (req, res) => { } } else { for (let i = 0; i != 3; ++i) { - if (body.guess[i] == passcode[i] || body.guess[i] == GUESS_WILDCARD) { + if (body.guess[i] == passcode[i] || body.guess[i] == GUESS_WILDCARD || alwaysCorrectCheat) { ++guessResult; } }