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.
This commit is contained in:
David Walker 2023-02-27 17:41:42 -08:00 committed by GitHub
parent 33f0150d25
commit f1793b187b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 14 deletions

@ -306,11 +306,11 @@ Source-File
(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT
when installing Augmentations.) 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 1: 12%
* Level 2: 12% * Level 2: 18%
* Level 3: 14% * Level 3: 21%
Difficulty Difficulty
Hard Hard

@ -322,13 +322,13 @@ export function initBitNodes() {
Augmentations) Augmentations)
<br /> <br />
<br /> <br />
This Source-File also increases your hacknet multipliers by: This Source-File also increases hacknet production and reduces hacknet costs by:
<br /> <br />
Level 1: 8% Level 1: 12%
<br /> <br />
Level 2: 12% Level 2: 18%
<br /> <br />
Level 3: 14% Level 3: 21%
</> </>
), ),
); );

@ -173,13 +173,13 @@ export function initSourceFiles() {
Augmentations) Augmentations)
<br /> <br />
<br /> <br />
This Source-File also increases your hacknet multipliers by: This Source-File also increases hacknet production and reduces hacknet costs by:
<br /> <br />
Level 1: 8% Level 1: 12%
<br /> <br />
Level 2: 12% Level 2: 18%
<br /> <br />
Level 3: 14% Level 3: 21%
</> </>
), ),
); );

@ -19,7 +19,7 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 16 / Math.pow(2, i); mult += 16 / Math.pow(2, i);
} }
const incMult = 1 + mult / 100; const incMult = 1 + mult / 100;
const decMult = 1 - mult / 100; const decMult = 1 / incMult;
Player.mults.hacking_chance *= incMult; Player.mults.hacking_chance *= incMult;
Player.mults.hacking_speed *= incMult; Player.mults.hacking_speed *= incMult;
Player.mults.hacking_money *= incMult; Player.mults.hacking_money *= incMult;
@ -135,7 +135,7 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
// Hacktocracy // Hacktocracy
let mult = 0; let mult = 0;
for (let i = 0; i < srcFile.lvl; ++i) { 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 incMult = 1 + mult / 100;
const decMult = 1 - mult / 100; const decMult = 1 - mult / 100;