From 282dc28c8de733a21ee561c3694406872bfd5a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=B6ffl?= Date: Mon, 29 Aug 2022 02:35:39 +0200 Subject: [PATCH] INFILTRATION: Corrected ns formula for infiltration rewards In commit 7c5097ee83d9e2d185960a9c96739a78981bd600 the author extracted the functionality for infiltration rewards into a NS function and made it accessible via formulas. The exposed function does however not use the same input parameters as the Victory screen after infiltration since he uses the difficulty and not the starting difficulty. Difficulty is clamped to [0;3], so the formulas api showed for high difficulty servers a vastly lower result. --- src/NetscriptFunctions/Infiltration.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NetscriptFunctions/Infiltration.ts b/src/NetscriptFunctions/Infiltration.ts index 63f2703a5..51325a4ab 100644 --- a/src/NetscriptFunctions/Infiltration.ts +++ b/src/NetscriptFunctions/Infiltration.ts @@ -38,9 +38,9 @@ export function NetscriptInfiltration(): InternalAPI { return { location: JSON.parse(JSON.stringify(location)), reward: { - tradeRep: calculateTradeInformationRepReward(player, reward, maxLevel, difficulty), - sellCash: calculateSellInformationCashReward(player, reward, maxLevel, difficulty), - SoARep: calculateInfiltratorsRepReward(player, Factions[FactionNames.ShadowsOfAnarchy], difficulty), + tradeRep: calculateTradeInformationRepReward(player, reward, maxLevel, startingSecurityLevel), + sellCash: calculateSellInformationCashReward(player, reward, maxLevel, startingSecurityLevel), + SoARep: calculateInfiltratorsRepReward(player, Factions[FactionNames.ShadowsOfAnarchy], startingSecurityLevel), }, difficulty: difficulty, };