cheat: nemesisAlwaysCorrect

fix where previous guess would conflict the cheat
This commit is contained in:
AlexisinGit 2025-09-04 00:57:18 +08:00
parent 16d6af1420
commit 7e13bcf8a9

View File

@ -82,6 +82,8 @@ export const nemesisController: RequestHandler = async (req, res) => {
const inventory = await getInventory(account._id.toString(), "Nemesis");
const body = getJSONfromString<INemesisPrespawnCheckRequest>(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;
}
}