From f1793b187bfe4bcb946c6dc92b52c8f194319548 Mon Sep 17 00:00:00 2001 From: David Walker Date: Mon, 27 Feb 2023 17:41:42 -0800 Subject: [PATCH] SOURCEFILE: Fix calculation of decMult (#385) Changed SF1 to apply a 1/incMult multiplier to hacknet costs to match how NFG, SF12, etc. handle it. Previously was calculated as a %reduction. Changed wording on SF9 to include a %reduction in hacknet costs. Buffed SF9 effect to 12% base from 8%, to make up for weaker hacknet cost mults from SF1. --- doc/source/guidesandtips/recommendedbitnodeorder.rst | 8 ++++---- src/BitNode/BitNode.tsx | 8 ++++---- src/SourceFile/SourceFiles.tsx | 8 ++++---- src/SourceFile/applySourceFile.ts | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/source/guidesandtips/recommendedbitnodeorder.rst b/doc/source/guidesandtips/recommendedbitnodeorder.rst index 2513541df..5052040ed 100644 --- a/doc/source/guidesandtips/recommendedbitnodeorder.rst +++ b/doc/source/guidesandtips/recommendedbitnodeorder.rst @@ -306,11 +306,11 @@ Source-File (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations.) - This Source-File also increases your hacknet multipliers by: + This Source-File also increases hacknet production and reduces hacknet costs by: - * Level 1: 8% - * Level 2: 12% - * Level 3: 14% + * Level 1: 12% + * Level 2: 18% + * Level 3: 21% Difficulty Hard diff --git a/src/BitNode/BitNode.tsx b/src/BitNode/BitNode.tsx index 7c2952475..2678ddc6f 100644 --- a/src/BitNode/BitNode.tsx +++ b/src/BitNode/BitNode.tsx @@ -322,13 +322,13 @@ export function initBitNodes() { Augmentations)

- This Source-File also increases your hacknet multipliers by: + This Source-File also increases hacknet production and reduces hacknet costs by:
- Level 1: 8% + Level 1: 12%
- Level 2: 12% + Level 2: 18%
- Level 3: 14% + Level 3: 21% ), ); diff --git a/src/SourceFile/SourceFiles.tsx b/src/SourceFile/SourceFiles.tsx index 086a58abd..2eead89e6 100644 --- a/src/SourceFile/SourceFiles.tsx +++ b/src/SourceFile/SourceFiles.tsx @@ -173,13 +173,13 @@ export function initSourceFiles() { Augmentations)

- This Source-File also increases your hacknet multipliers by: + This Source-File also increases hacknet production and reduces hacknet costs by:
- Level 1: 8% + Level 1: 12%
- Level 2: 12% + Level 2: 18%
- Level 3: 14% + Level 3: 21% ), ); diff --git a/src/SourceFile/applySourceFile.ts b/src/SourceFile/applySourceFile.ts index 5f10ce17b..b37abac20 100644 --- a/src/SourceFile/applySourceFile.ts +++ b/src/SourceFile/applySourceFile.ts @@ -19,7 +19,7 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void { mult += 16 / Math.pow(2, i); } const incMult = 1 + mult / 100; - const decMult = 1 - mult / 100; + const decMult = 1 / incMult; Player.mults.hacking_chance *= incMult; Player.mults.hacking_speed *= incMult; Player.mults.hacking_money *= incMult; @@ -135,7 +135,7 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void { // Hacktocracy let mult = 0; for (let i = 0; i < srcFile.lvl; ++i) { - mult += 8 / Math.pow(2, i); + mult += 12 / Math.pow(2, i); } const incMult = 1 + mult / 100; const decMult = 1 - mult / 100;