From 3823c47450e3cf2b22f9a38c61758bef837edadc Mon Sep 17 00:00:00 2001 From: rraumberger Date: Fri, 25 Oct 2024 23:58:46 +0200 Subject: [PATCH 1/2] adjust rep requirement for promotion when company server is backdoored --- work-for-factions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work-for-factions.js b/work-for-factions.js index 8048703a..4bbd6841 100644 --- a/work-for-factions.js +++ b/work-for-factions.js @@ -1109,7 +1109,7 @@ export async function workForMegacorpFactionInvite(ns, factionName, waitForInvit const nextJob = nextJobName == "it" ? itJob : softwareJob; const requiredHack = nextJob.reqHack[nextJobTier] === 0 ? 0 : nextJob.reqHack[nextJobTier] + statModifier; // Stat modifier only applies to non-zero reqs const requiredCha = nextJob.reqCha[nextJobTier] === 0 ? 0 : nextJob.reqCha[nextJobTier] + statModifier; // Stat modifier only applies to non-zero reqs - const requiredRep = nextJob.reqRep[nextJobTier]; // No modifier on rep requirements + const requiredRep = nextJob.reqRep[nextJobTier] * (backdoored ? 0.75 : 1); // Rep requirement is decreased when company server is backdoored let status = `Next promotion ('${nextJobName}' #${nextJobTier}) at Hack:${requiredHack} Cha:${requiredCha} Rep:${requiredRep?.toLocaleString('en')}` + (repRequiredForFaction > nextJob.reqRep[nextJobTier] ? '' : `, but we won't need it, because we'll sooner hit ${repRequiredForFaction.toLocaleString('en')} reputation to unlock company faction "${factionName}"!`); // Monitor that we are still performing the expected work From c6bf2005a005775b1dccfc6279f38d3b370a5f7f Mon Sep 17 00:00:00 2001 From: rraumberger Date: Sat, 26 Oct 2024 00:41:35 +0200 Subject: [PATCH 2/2] use adjusted value in status message --- work-for-factions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work-for-factions.js b/work-for-factions.js index 4bbd6841..1a8e0336 100644 --- a/work-for-factions.js +++ b/work-for-factions.js @@ -1111,7 +1111,7 @@ export async function workForMegacorpFactionInvite(ns, factionName, waitForInvit const requiredCha = nextJob.reqCha[nextJobTier] === 0 ? 0 : nextJob.reqCha[nextJobTier] + statModifier; // Stat modifier only applies to non-zero reqs const requiredRep = nextJob.reqRep[nextJobTier] * (backdoored ? 0.75 : 1); // Rep requirement is decreased when company server is backdoored let status = `Next promotion ('${nextJobName}' #${nextJobTier}) at Hack:${requiredHack} Cha:${requiredCha} Rep:${requiredRep?.toLocaleString('en')}` + - (repRequiredForFaction > nextJob.reqRep[nextJobTier] ? '' : `, but we won't need it, because we'll sooner hit ${repRequiredForFaction.toLocaleString('en')} reputation to unlock company faction "${factionName}"!`); + (repRequiredForFaction > requiredRep ? '' : `, but we won't need it, because we'll sooner hit ${repRequiredForFaction.toLocaleString('en')} reputation to unlock company faction "${factionName}"!`); // Monitor that we are still performing the expected work let currentWork = await getCurrentWorkInfo(ns); // We should only study at university if every other requirement is met but Charisma