extract multipliers in its own type

This commit is contained in:
Olivier Gagnon 2022-07-14 18:43:33 -04:00
parent 0550bc188c
commit 5629c16def
44 changed files with 1250 additions and 1505 deletions

@ -16,6 +16,7 @@ import { StaticAugmentations } from "./StaticAugmentations";
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
import { getBaseAugmentationPriceMultiplier, getGenericAugmentationPriceMultiplier } from "./AugmentationHelpers";
import { initSoAAugmentations } from "./data/AugmentationCreator";
import { Multipliers, defaultMultipliers } from "../PersonObjects/Multipliers";
export interface AugmentationCosts {
moneyCost: number;
@ -32,48 +33,48 @@ export interface IConstructorParams {
repCost: number;
factions: string[];
hacking_mult?: number;
strength_mult?: number;
defense_mult?: number;
dexterity_mult?: number;
agility_mult?: number;
charisma_mult?: number;
hacking_exp_mult?: number;
strength_exp_mult?: number;
defense_exp_mult?: number;
dexterity_exp_mult?: number;
agility_exp_mult?: number;
charisma_exp_mult?: number;
hacking_chance_mult?: number;
hacking_speed_mult?: number;
hacking_money_mult?: number;
hacking_grow_mult?: number;
company_rep_mult?: number;
faction_rep_mult?: number;
crime_money_mult?: number;
crime_success_mult?: number;
work_money_mult?: number;
hacknet_node_money_mult?: number;
hacknet_node_purchase_cost_mult?: number;
hacknet_node_ram_cost_mult?: number;
hacknet_node_core_cost_mult?: number;
hacknet_node_level_cost_mult?: number;
bladeburner_max_stamina_mult?: number;
bladeburner_stamina_gain_mult?: number;
bladeburner_analysis_mult?: number;
bladeburner_success_chance_mult?: number;
hacking?: number;
strength?: number;
defense?: number;
dexterity?: number;
agility?: number;
charisma?: number;
hacking_exp?: number;
strength_exp?: number;
defense_exp?: number;
dexterity_exp?: number;
agility_exp?: number;
charisma_exp?: number;
hacking_chance?: number;
hacking_speed?: number;
hacking_money?: number;
hacking_grow?: number;
company_rep?: number;
faction_rep?: number;
crime_money?: number;
crime_success?: number;
work_money?: number;
hacknet_node_money?: number;
hacknet_node_purchase_cost?: number;
hacknet_node_ram_cost?: number;
hacknet_node_core_cost?: number;
hacknet_node_level_cost?: number;
bladeburner_max_stamina?: number;
bladeburner_stamina_gain?: number;
bladeburner_analysis?: number;
bladeburner_success_chance?: number;
infiltration_base_rep_increase?: number;
infiltration_rep_mult?: number;
infiltration_trade_mult?: number;
infiltration_sell_mult?: number;
infiltration_timer_mult?: number;
infiltration_damage_reduction_mult?: number;
infiltration_rep?: number;
infiltration_trade?: number;
infiltration_sell?: number;
infiltration_timer?: number;
infiltration_damage_reduction?: number;
startingMoney?: number;
programs?: string[];
}
function generateStatsDescription(mults: IMap<number>, programs?: string[], startingMoney?: number): JSX.Element {
function generateStatsDescription(mults: Multipliers, programs?: string[], startingMoney?: number): JSX.Element {
const f = (x: number, decimals = 0): string => {
// look, I don't know how to make a "smart decimals"
// todo, make it smarter
@ -84,323 +85,278 @@ function generateStatsDescription(mults: IMap<number>, programs?: string[], star
let desc = <>Effects:</>;
if (
mults.hacking_mult &&
mults.hacking_mult == mults.strength_mult &&
mults.hacking_mult == mults.defense_mult &&
mults.hacking_mult == mults.dexterity_mult &&
mults.hacking_mult == mults.agility_mult &&
mults.hacking_mult == mults.charisma_mult
mults.hacking !== 1 &&
mults.hacking == mults.strength &&
mults.hacking == mults.defense &&
mults.hacking == mults.dexterity &&
mults.hacking == mults.agility &&
mults.hacking == mults.charisma
) {
desc = (
<>
{desc}
<br />+{f(mults.hacking_mult - 1)} all skills
<br />+{f(mults.hacking - 1)} all skills
</>
);
} else {
if (mults.hacking_mult)
if (mults.hacking !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacking_mult - 1)} hacking skill
<br />+{f(mults.hacking - 1)} hacking skill
</>
);
if (
mults.strength_mult &&
mults.strength_mult == mults.defense_mult &&
mults.strength_mult == mults.dexterity_mult &&
mults.strength_mult == mults.agility_mult
mults.strength !== 1 &&
mults.strength == mults.defense &&
mults.strength == mults.dexterity &&
mults.strength == mults.agility
) {
desc = (
<>
{desc}
<br />+{f(mults.strength_mult - 1)} combat skills
<br />+{f(mults.strength - 1)} combat skills
</>
);
} else {
if (mults.strength_mult)
if (mults.strength !== 1)
desc = (
<>
{desc}
<br />+{f(mults.strength_mult - 1)} strength skill
<br />+{f(mults.strength - 1)} strength skill
</>
);
if (mults.defense_mult)
if (mults.defense !== 1)
desc = (
<>
{desc}
<br />+{f(mults.defense_mult - 1)} defense skill
<br />+{f(mults.defense - 1)} defense skill
</>
);
if (mults.dexterity_mult)
if (mults.dexterity !== 1)
desc = (
<>
{desc}
<br />+{f(mults.dexterity_mult - 1)} dexterity skill
<br />+{f(mults.dexterity - 1)} dexterity skill
</>
);
if (mults.agility_mult)
if (mults.agility !== 1)
desc = (
<>
{desc}
<br />+{f(mults.agility_mult - 1)} agility skill
<br />+{f(mults.agility - 1)} agility skill
</>
);
}
if (mults.charisma_mult)
if (mults.charisma !== 1)
desc = (
<>
{desc}
<br />+{f(mults.charisma_mult - 1)} charisma skill
<br />+{f(mults.charisma - 1)} charisma skill
</>
);
}
if (
mults.hacking_exp_mult &&
mults.hacking_exp_mult === mults.strength_exp_mult &&
mults.hacking_exp_mult === mults.defense_exp_mult &&
mults.hacking_exp_mult === mults.dexterity_exp_mult &&
mults.hacking_exp_mult === mults.agility_exp_mult &&
mults.hacking_exp_mult === mults.charisma_exp_mult
mults.hacking_exp !== 1 &&
mults.hacking_exp === mults.strength_exp &&
mults.hacking_exp === mults.defense_exp &&
mults.hacking_exp === mults.dexterity_exp &&
mults.hacking_exp === mults.agility_exp &&
mults.hacking_exp === mults.charisma_exp
) {
desc = (
<>
{desc}
<br />+{f(mults.hacking_exp_mult - 1)} exp for all skills
<br />+{f(mults.hacking_exp - 1)} exp for all skills
</>
);
} else {
if (mults.hacking_exp_mult)
if (mults.hacking_exp !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacking_exp_mult - 1)} hacking exp
<br />+{f(mults.hacking_exp - 1)} hacking exp
</>
);
if (
mults.strength_exp_mult &&
mults.strength_exp_mult === mults.defense_exp_mult &&
mults.strength_exp_mult === mults.dexterity_exp_mult &&
mults.strength_exp_mult === mults.agility_exp_mult
mults.strength_exp !== 1 &&
mults.strength_exp === mults.defense_exp &&
mults.strength_exp === mults.dexterity_exp &&
mults.strength_exp === mults.agility_exp
) {
desc = (
<>
{desc}
<br />+{f(mults.strength_exp_mult - 1)} combat exp
<br />+{f(mults.strength_exp - 1)} combat exp
</>
);
} else {
if (mults.strength_exp_mult)
if (mults.strength_exp !== 1)
desc = (
<>
{desc}
<br />+{f(mults.strength_exp_mult - 1)} strength exp
<br />+{f(mults.strength_exp - 1)} strength exp
</>
);
if (mults.defense_exp_mult)
if (mults.defense_exp !== 1)
desc = (
<>
{desc}
<br />+{f(mults.defense_exp_mult - 1)} defense exp
<br />+{f(mults.defense_exp - 1)} defense exp
</>
);
if (mults.dexterity_exp_mult)
if (mults.dexterity_exp !== 1)
desc = (
<>
{desc}
<br />+{f(mults.dexterity_exp_mult - 1)} dexterity exp
<br />+{f(mults.dexterity_exp - 1)} dexterity exp
</>
);
if (mults.agility_exp_mult)
if (mults.agility_exp !== 1)
desc = (
<>
{desc}
<br />+{f(mults.agility_exp_mult - 1)} agility exp
<br />+{f(mults.agility_exp - 1)} agility exp
</>
);
}
if (mults.charisma_exp_mult)
if (mults.charisma_exp !== 1)
desc = (
<>
{desc}
<br />+{f(mults.charisma_exp_mult - 1)} charisma exp
<br />+{f(mults.charisma_exp - 1)} charisma exp
</>
);
}
if (mults.hacking_speed_mult)
if (mults.hacking_speed !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacking_speed_mult - 1)} faster hack(), grow(), and weaken()
<br />+{f(mults.hacking_speed - 1)} faster hack(), grow(), and weaken()
</>
);
if (mults.hacking_chance_mult)
if (mults.hacking_chance !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacking_chance_mult - 1)} hack() success chance
<br />+{f(mults.hacking_chance - 1)} hack() success chance
</>
);
if (mults.hacking_money_mult)
if (mults.hacking_money !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacking_money_mult - 1)} hack() power
<br />+{f(mults.hacking_money - 1)} hack() power
</>
);
if (mults.hacking_grow_mult)
if (mults.hacking_grow !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacking_grow_mult - 1)} grow() power
<br />+{f(mults.hacking_grow - 1)} grow() power
</>
);
if (mults.faction_rep_mult && mults.faction_rep_mult === mults.company_rep_mult) {
if (mults.faction_rep !== 1 && mults.faction_rep === mults.company_rep) {
desc = (
<>
{desc}
<br />+{f(mults.faction_rep_mult - 1)} reputation from factions and companies
<br />+{f(mults.faction_rep - 1)} reputation from factions and companies
</>
);
} else {
if (mults.faction_rep_mult)
if (mults.faction_rep !== 1)
desc = (
<>
{desc}
<br />+{f(mults.faction_rep_mult - 1)} reputation from factions
<br />+{f(mults.faction_rep - 1)} reputation from factions
</>
);
if (mults.company_rep_mult)
if (mults.company_rep !== 1)
desc = (
<>
{desc}
<br />+{f(mults.company_rep_mult - 1)} reputation from companies
<br />+{f(mults.company_rep - 1)} reputation from companies
</>
);
}
if (mults.crime_money_mult)
if (mults.crime_money !== 1)
desc = (
<>
{desc}
<br />+{f(mults.crime_money_mult - 1)} crime money
<br />+{f(mults.crime_money - 1)} crime money
</>
);
if (mults.crime_success_mult)
if (mults.crime_success !== 1)
desc = (
<>
{desc}
<br />+{f(mults.crime_success_mult - 1)} crime success rate
<br />+{f(mults.crime_success - 1)} crime success rate
</>
);
if (mults.work_money_mult)
if (mults.work_money !== 1)
desc = (
<>
{desc}
<br />+{f(mults.work_money_mult - 1)} work money
<br />+{f(mults.work_money - 1)} work money
</>
);
if (mults.hacknet_node_money_mult)
if (mults.hacknet_node_money !== 1)
desc = (
<>
{desc}
<br />+{f(mults.hacknet_node_money_mult - 1)} hacknet production
<br />+{f(mults.hacknet_node_money - 1)} hacknet production
</>
);
if (mults.hacknet_node_purchase_cost_mult)
if (mults.hacknet_node_purchase_cost !== 1)
desc = (
<>
{desc}
<br />-{f(-(mults.hacknet_node_purchase_cost_mult - 1))} hacknet nodes cost
<br />-{f(-(mults.hacknet_node_purchase_cost - 1))} hacknet nodes cost
</>
);
if (mults.hacknet_node_level_cost_mult)
if (mults.hacknet_node_level_cost !== 1)
desc = (
<>
{desc}
<br />-{f(-(mults.hacknet_node_level_cost_mult - 1))} hacknet nodes upgrade cost
<br />-{f(-(mults.hacknet_node_level_cost - 1))} hacknet nodes upgrade cost
</>
);
if (mults.bladeburner_max_stamina_mult)
if (mults.bladeburner_max_stamina !== 1)
desc = (
<>
{desc}
<br />+{f(mults.bladeburner_max_stamina_mult - 1)} Bladeburner Max Stamina
<br />+{f(mults.bladeburner_max_stamina - 1)} Bladeburner Max Stamina
</>
);
if (mults.bladeburner_stamina_gain_mult)
if (mults.bladeburner_stamina_gain !== 1)
desc = (
<>
{desc}
<br />+{f(mults.bladeburner_stamina_gain_mult - 1)} Bladeburner Stamina gain
<br />+{f(mults.bladeburner_stamina_gain - 1)} Bladeburner Stamina gain
</>
);
if (mults.bladeburner_analysis_mult)
if (mults.bladeburner_analysis !== 1)
desc = (
<>
{desc}
<br />+{f(mults.bladeburner_analysis_mult - 1)} Bladeburner Field Analysis effectiveness
<br />+{f(mults.bladeburner_analysis - 1)} Bladeburner Field Analysis effectiveness
</>
);
if (mults.bladeburner_success_chance_mult)
if (mults.bladeburner_success_chance !== 1)
desc = (
<>
{desc}
<br />+{f(mults.bladeburner_success_chance_mult - 1)} Bladeburner Contracts and Operations success chance
<br />+{f(mults.bladeburner_success_chance - 1)} Bladeburner Contracts and Operations success chance
</>
);
if (mults.infiltration_base_rep_increase)
desc = (
<>
{desc}
<br />+{f(mults.infiltration_base_rep_increase - 1)} Infiltration {FactionNames.ShadowsOfAnarchy} Reputation
base reward
</>
);
if (mults.infiltration_rep_mult)
desc = (
<>
{desc}
<br />+{f(mults.infiltration_rep_mult - 1)} Infiltration {FactionNames.ShadowsOfAnarchy} Reputation reward
</>
);
if (mults.infiltration_trade_mult)
desc = (
<>
{desc}
<br />+{f(mults.infiltration_trade_mult - 1)} Infiltration Reputation for trading information
</>
);
if (mults.infiltration_sell_mult)
desc = (
<>
{desc}
<br />+{f(mults.infiltration_sell_mult - 1)} Infiltration cash reward for selling information
</>
);
if (mults.infiltration_timer_mult)
desc = (
<>
{desc}
<br />+{f(mults.infiltration_timer_mult - 1)} Infiltration time per minigame
</>
);
if (mults.infiltration_damage_reduction_mult)
desc = (
<>
{desc}
<br />
{f(mults.infiltration_damage_reduction_mult - 1)} Infiltration health lost per failed minigame
</>
);
if (startingMoney)
desc = (
<>
@ -445,7 +401,7 @@ export class Augmentation {
// Multipliers given by this Augmentation. Must match the property name in
// The Player/Person classes
mults: IMap<number> = {};
mults: Multipliers = defaultMultipliers();
// Factions that offer this aug.
factions: string[] = [];
@ -474,114 +430,95 @@ export class Augmentation {
}
// Set multipliers
if (params.hacking_mult) {
this.mults.hacking_mult = params.hacking_mult;
if (params.hacking) {
this.mults.hacking = params.hacking;
}
if (params.strength_mult) {
this.mults.strength_mult = params.strength_mult;
if (params.strength) {
this.mults.strength = params.strength;
}
if (params.defense_mult) {
this.mults.defense_mult = params.defense_mult;
if (params.defense) {
this.mults.defense = params.defense;
}
if (params.dexterity_mult) {
this.mults.dexterity_mult = params.dexterity_mult;
if (params.dexterity) {
this.mults.dexterity = params.dexterity;
}
if (params.agility_mult) {
this.mults.agility_mult = params.agility_mult;
if (params.agility) {
this.mults.agility = params.agility;
}
if (params.charisma_mult) {
this.mults.charisma_mult = params.charisma_mult;
if (params.charisma) {
this.mults.charisma = params.charisma;
}
if (params.hacking_exp_mult) {
this.mults.hacking_exp_mult = params.hacking_exp_mult;
if (params.hacking_exp) {
this.mults.hacking_exp = params.hacking_exp;
}
if (params.strength_exp_mult) {
this.mults.strength_exp_mult = params.strength_exp_mult;
if (params.strength_exp) {
this.mults.strength_exp = params.strength_exp;
}
if (params.defense_exp_mult) {
this.mults.defense_exp_mult = params.defense_exp_mult;
if (params.defense_exp) {
this.mults.defense_exp = params.defense_exp;
}
if (params.dexterity_exp_mult) {
this.mults.dexterity_exp_mult = params.dexterity_exp_mult;
if (params.dexterity_exp) {
this.mults.dexterity_exp = params.dexterity_exp;
}
if (params.agility_exp_mult) {
this.mults.agility_exp_mult = params.agility_exp_mult;
if (params.agility_exp) {
this.mults.agility_exp = params.agility_exp;
}
if (params.charisma_exp_mult) {
this.mults.charisma_exp_mult = params.charisma_exp_mult;
if (params.charisma_exp) {
this.mults.charisma_exp = params.charisma_exp;
}
if (params.hacking_chance_mult) {
this.mults.hacking_chance_mult = params.hacking_chance_mult;
if (params.hacking_chance) {
this.mults.hacking_chance = params.hacking_chance;
}
if (params.hacking_speed_mult) {
this.mults.hacking_speed_mult = params.hacking_speed_mult;
if (params.hacking_speed) {
this.mults.hacking_speed = params.hacking_speed;
}
if (params.hacking_money_mult) {
this.mults.hacking_money_mult = params.hacking_money_mult;
if (params.hacking_money) {
this.mults.hacking_money = params.hacking_money;
}
if (params.hacking_grow_mult) {
this.mults.hacking_grow_mult = params.hacking_grow_mult;
if (params.hacking_grow) {
this.mults.hacking_grow = params.hacking_grow;
}
if (params.company_rep_mult) {
this.mults.company_rep_mult = params.company_rep_mult;
if (params.company_rep) {
this.mults.company_rep = params.company_rep;
}
if (params.faction_rep_mult) {
this.mults.faction_rep_mult = params.faction_rep_mult;
if (params.faction_rep) {
this.mults.faction_rep = params.faction_rep;
}
if (params.crime_money_mult) {
this.mults.crime_money_mult = params.crime_money_mult;
if (params.crime_money) {
this.mults.crime_money = params.crime_money;
}
if (params.crime_success_mult) {
this.mults.crime_success_mult = params.crime_success_mult;
if (params.crime_success) {
this.mults.crime_success = params.crime_success;
}
if (params.work_money_mult) {
this.mults.work_money_mult = params.work_money_mult;
if (params.work_money) {
this.mults.work_money = params.work_money;
}
if (params.hacknet_node_money_mult) {
this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult;
if (params.hacknet_node_money) {
this.mults.hacknet_node_money = params.hacknet_node_money;
}
if (params.hacknet_node_purchase_cost_mult) {
this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult;
if (params.hacknet_node_purchase_cost) {
this.mults.hacknet_node_purchase_cost = params.hacknet_node_purchase_cost;
}
if (params.hacknet_node_ram_cost_mult) {
this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult;
if (params.hacknet_node_ram_cost) {
this.mults.hacknet_node_ram_cost = params.hacknet_node_ram_cost;
}
if (params.hacknet_node_core_cost_mult) {
this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult;
if (params.hacknet_node_core_cost) {
this.mults.hacknet_node_core_cost = params.hacknet_node_core_cost;
}
if (params.hacknet_node_level_cost_mult) {
this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult;
if (params.hacknet_node_level_cost) {
this.mults.hacknet_node_level_cost = params.hacknet_node_level_cost;
}
if (params.bladeburner_max_stamina_mult) {
this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult;
if (params.bladeburner_max_stamina) {
this.mults.bladeburner_max_stamina = params.bladeburner_max_stamina;
}
if (params.bladeburner_stamina_gain_mult) {
this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult;
if (params.bladeburner_stamina_gain) {
this.mults.bladeburner_stamina_gain = params.bladeburner_stamina_gain;
}
if (params.bladeburner_analysis_mult) {
this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult;
if (params.bladeburner_analysis) {
this.mults.bladeburner_analysis = params.bladeburner_analysis;
}
if (params.bladeburner_success_chance_mult) {
this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult;
}
if (params.infiltration_base_rep_increase) {
this.mults.infiltration_base_rep_increase = params.infiltration_base_rep_increase;
}
if (params.infiltration_rep_mult) {
this.mults.infiltration_rep_mult = params.infiltration_rep_mult;
}
if (params.infiltration_trade_mult) {
this.mults.infiltration_trade_mult = params.infiltration_trade_mult;
}
if (params.infiltration_sell_mult) {
this.mults.infiltration_sell_mult = params.infiltration_sell_mult;
}
if (params.infiltration_timer_mult) {
this.mults.infiltration_timer_mult = params.infiltration_timer_mult;
}
if (params.infiltration_damage_reduction_mult) {
this.mults.infiltration_damage_reduction_mult = params.infiltration_damage_reduction_mult;
if (params.bladeburner_success_chance) {
this.mults.bladeburner_success_chance = params.bladeburner_success_chance;
}
if (params.stats === undefined)

@ -21,6 +21,7 @@ import {
initUnstableCircadianModulator,
} from "./data/AugmentationCreator";
import { Router } from "../ui/GameRoot";
import { mergeMultipliers } from "../PersonObjects/Multipliers";
export function AddToStaticAugmentations(aug: Augmentation): void {
const name = aug.name;
@ -74,10 +75,7 @@ function applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void
const staticAugmentation = StaticAugmentations[aug.name];
// Apply multipliers
for (const mult of Object.keys(staticAugmentation.mults)) {
const v = Player.getMult(mult) * staticAugmentation.mults[mult];
Player.setMult(mult, v);
}
Player.mults = mergeMultipliers(Player.mults, staticAugmentation.mults);
// Special logic for Congruity Implant
if (aug.name === AugmentationNames.CongruityImplant && !reapply) {

File diff suppressed because it is too large Load Diff

@ -4,6 +4,7 @@
import { DoubleArrow } from "@mui/icons-material";
import { List, ListItem, ListItemText, Paper, Typography } from "@mui/material";
import * as React from "react";
import { Multipliers, defaultMultipliers, mergeMultipliers } from "../../PersonObjects/Multipliers";
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
import { Player } from "../../Player";
import { Settings } from "../../Settings/Settings";
@ -14,14 +15,11 @@ interface IAugmentedStats {
[index: string]: number;
}
function calculateAugmentedStats(): IAugmentedStats {
const augP: IAugmentedStats = {};
function calculateAugmentedStats(): Multipliers {
let augP: Multipliers = defaultMultipliers();
for (const aug of Player.queuedAugmentations) {
const augObj = StaticAugmentations[aug.name];
for (const mult of Object.keys(augObj.mults)) {
const v = augP[mult] ? augP[mult] : 1;
augP[mult] = v * augObj.mults[mult];
}
augP = mergeMultipliers(augP, augObj.mults);
}
return augP;
}
@ -98,35 +96,35 @@ export function PlayerMultipliers(): React.ReactElement {
...[
{
mult: "Hacking Chance",
current: Player.hacking_chance_mult,
augmented: Player.hacking_chance_mult * mults.hacking_chance_mult,
current: Player.mults.hacking_chance,
augmented: Player.mults.hacking_chance * mults.hacking_chance,
},
{
mult: "Hacking Speed",
current: Player.hacking_speed_mult,
augmented: Player.hacking_speed_mult * mults.hacking_speed_mult,
current: Player.mults.hacking_speed,
augmented: Player.mults.hacking_speed * mults.hacking_speed,
},
{
mult: "Hacking Money",
current: Player.hacking_money_mult,
augmented: Player.hacking_money_mult * mults.hacking_money_mult,
current: Player.mults.hacking_money,
augmented: Player.mults.hacking_money * mults.hacking_money,
bnMult: BitNodeMultipliers.ScriptHackMoney,
},
{
mult: "Hacking Growth",
current: Player.hacking_grow_mult,
augmented: Player.hacking_grow_mult * mults.hacking_grow_mult,
current: Player.mults.hacking_grow,
augmented: Player.mults.hacking_grow * mults.hacking_grow,
},
{
mult: "Hacking Level",
current: Player.hacking_mult,
augmented: Player.hacking_mult * mults.hacking_mult,
current: Player.mults.hacking,
augmented: Player.mults.hacking * mults.hacking,
bnMult: BitNodeMultipliers.HackingLevelMultiplier,
},
{
mult: "Hacking Experience",
current: Player.hacking_exp_mult,
augmented: Player.hacking_exp_mult * mults.hacking_exp_mult,
current: Player.mults.hacking_exp,
augmented: Player.mults.hacking_exp * mults.hacking_exp,
bnMult: BitNodeMultipliers.HackExpGain,
},
].map((data: MultiplierListItemData) =>
@ -137,47 +135,47 @@ export function PlayerMultipliers(): React.ReactElement {
...[
{
mult: "Strength Level",
current: Player.strength_mult,
augmented: Player.strength_mult * mults.strength_mult,
current: Player.mults.strength,
augmented: Player.mults.strength * mults.strength,
bnMult: BitNodeMultipliers.StrengthLevelMultiplier,
},
{
mult: "Strength Experience",
current: Player.strength_exp_mult,
augmented: Player.strength_exp_mult * mults.strength_exp_mult,
current: Player.mults.strength_exp,
augmented: Player.mults.strength_exp * mults.strength_exp,
},
{
mult: "Defense Level",
current: Player.defense_mult,
augmented: Player.defense_mult * mults.defense_mult,
current: Player.mults.defense,
augmented: Player.mults.defense * mults.defense,
bnMult: BitNodeMultipliers.DefenseLevelMultiplier,
},
{
mult: "Defense Experience",
current: Player.defense_exp_mult,
augmented: Player.defense_exp_mult * mults.defense_exp_mult,
current: Player.mults.defense_exp,
augmented: Player.mults.defense_exp * mults.defense_exp,
},
{
mult: "Dexterity Level",
current: Player.dexterity_mult,
augmented: Player.dexterity_mult * mults.dexterity_mult,
current: Player.mults.dexterity,
augmented: Player.mults.dexterity * mults.dexterity,
bnMult: BitNodeMultipliers.DexterityLevelMultiplier,
},
{
mult: "Dexterity Experience",
current: Player.dexterity_exp_mult,
augmented: Player.dexterity_exp_mult * mults.dexterity_exp_mult,
current: Player.mults.dexterity_exp,
augmented: Player.mults.dexterity_exp * mults.dexterity_exp,
},
{
mult: "Agility Level",
current: Player.agility_mult,
augmented: Player.agility_mult * mults.agility_mult,
current: Player.mults.agility,
augmented: Player.mults.agility * mults.agility,
bnMult: BitNodeMultipliers.AgilityLevelMultiplier,
},
{
mult: "Agility Experience",
current: Player.agility_exp_mult,
augmented: Player.agility_exp_mult * mults.agility_exp_mult,
current: Player.mults.agility_exp,
augmented: Player.mults.agility_exp * mults.agility_exp,
},
].map((data: MultiplierListItemData) =>
Object.defineProperty(data, "color", {
@ -186,73 +184,73 @@ export function PlayerMultipliers(): React.ReactElement {
),
{
mult: "Charisma Level",
current: Player.charisma_mult,
augmented: Player.charisma_mult * mults.charisma_mult,
current: Player.mults.charisma,
augmented: Player.mults.charisma * mults.charisma,
bnMult: BitNodeMultipliers.CharismaLevelMultiplier,
color: Settings.theme.cha,
},
{
mult: "Charisma Experience",
current: Player.charisma_exp_mult,
augmented: Player.charisma_exp_mult * mults.charisma_exp_mult,
current: Player.mults.charisma_exp,
augmented: Player.mults.charisma_exp * mults.charisma_exp,
color: Settings.theme.cha,
},
];
const rightColData: MultiplierListItemData[] = [
{
mult: "Hacknet Node Production",
current: Player.hacknet_node_money_mult,
augmented: Player.hacknet_node_money_mult * mults.hacknet_node_money_mult,
current: Player.mults.hacknet_node_money,
augmented: Player.mults.hacknet_node_money * mults.hacknet_node_money,
bnMult: BitNodeMultipliers.HacknetNodeMoney,
},
{
mult: "Hacknet Node Purchase Cost",
current: Player.hacknet_node_purchase_cost_mult,
augmented: Player.hacknet_node_purchase_cost_mult * mults.hacknet_node_purchase_cost_mult,
current: Player.mults.hacknet_node_purchase_cost,
augmented: Player.mults.hacknet_node_purchase_cost * mults.hacknet_node_purchase_cost,
},
{
mult: "Hacknet Node RAM Upgrade Cost",
current: Player.hacknet_node_ram_cost_mult,
augmented: Player.hacknet_node_ram_cost_mult * mults.hacknet_node_ram_cost_mult,
current: Player.mults.hacknet_node_ram_cost,
augmented: Player.mults.hacknet_node_ram_cost * mults.hacknet_node_ram_cost,
},
{
mult: "Hacknet Node Core Purchase Cost",
current: Player.hacknet_node_core_cost_mult,
augmented: Player.hacknet_node_core_cost_mult * mults.hacknet_node_core_cost_mult,
current: Player.mults.hacknet_node_core_cost,
augmented: Player.mults.hacknet_node_core_cost * mults.hacknet_node_core_cost,
},
{
mult: "Hacknet Node Level Upgrade Cost",
current: Player.hacknet_node_level_cost_mult,
augmented: Player.hacknet_node_level_cost_mult * mults.hacknet_node_level_cost_mult,
current: Player.mults.hacknet_node_level_cost,
augmented: Player.mults.hacknet_node_level_cost * mults.hacknet_node_level_cost,
},
{
mult: "Company Reputation Gain",
current: Player.company_rep_mult,
augmented: Player.company_rep_mult * mults.company_rep_mult,
current: Player.mults.company_rep,
augmented: Player.mults.company_rep * mults.company_rep,
},
{
mult: "Faction Reputation Gain",
current: Player.faction_rep_mult,
augmented: Player.faction_rep_mult * mults.faction_rep_mult,
current: Player.mults.faction_rep,
augmented: Player.mults.faction_rep * mults.faction_rep,
bnMult: BitNodeMultipliers.FactionWorkRepGain,
},
{
mult: "Salary",
current: Player.work_money_mult,
augmented: Player.work_money_mult * mults.work_money_mult,
current: Player.mults.work_money,
augmented: Player.mults.work_money * mults.work_money,
bnMult: BitNodeMultipliers.CompanyWorkMoney,
color: Settings.theme.money,
},
{
mult: "Crime Success Chance",
current: Player.crime_success_mult,
augmented: Player.crime_success_mult * mults.crime_success_mult,
current: Player.mults.crime_success,
augmented: Player.mults.crime_success * mults.crime_success,
color: Settings.theme.combat,
},
{
mult: "Crime Money",
current: Player.crime_money_mult,
augmented: Player.crime_money_mult * mults.crime_money_mult,
current: Player.mults.crime_money,
augmented: Player.mults.crime_money * mults.crime_money,
bnMult: BitNodeMultipliers.CrimeMoney,
color: Settings.theme.money,
},
@ -262,23 +260,23 @@ export function PlayerMultipliers(): React.ReactElement {
rightColData.push(
{
mult: "Bladeburner Success Chance",
current: Player.bladeburner_success_chance_mult,
augmented: Player.bladeburner_success_chance_mult * mults.bladeburner_success_chance_mult,
current: Player.mults.bladeburner_success_chance,
augmented: Player.mults.bladeburner_success_chance * mults.bladeburner_success_chance,
},
{
mult: "Bladeburner Max Stamina",
current: Player.bladeburner_max_stamina_mult,
augmented: Player.bladeburner_max_stamina_mult * mults.bladeburner_max_stamina_mult,
current: Player.mults.bladeburner_max_stamina,
augmented: Player.mults.bladeburner_max_stamina * mults.bladeburner_max_stamina,
},
{
mult: "Bladeburner Stamina Gain",
current: Player.bladeburner_stamina_gain_mult,
augmented: Player.bladeburner_stamina_gain_mult * mults.bladeburner_stamina_gain_mult,
current: Player.mults.bladeburner_stamina_gain,
augmented: Player.mults.bladeburner_stamina_gain * mults.bladeburner_stamina_gain,
},
{
mult: "Bladeburner Field Analysis",
current: Player.bladeburner_analysis_mult,
augmented: Player.bladeburner_analysis_mult * mults.bladeburner_analysis_mult,
current: Player.mults.bladeburner_analysis,
augmented: Player.mults.bladeburner_analysis * mults.bladeburner_analysis,
},
);
}

@ -274,7 +274,7 @@ export class Action implements IAction {
}
// Augmentation multiplier
competence *= Player.bladeburner_success_chance_mult;
competence *= Player.mults.bladeburner_success_chance;
if (isNaN(competence)) {
throw new Error("Competence calculated as NaN in Action.getSuccessChance()");

@ -1469,10 +1469,10 @@ export class Bladeburner implements IBladeburner {
}
case ActionTypes["Training"]: {
this.stamina -= 0.5 * BladeburnerConstants.BaseStaminaLoss;
const strExpGain = 30 * person.strength_exp_mult,
defExpGain = 30 * person.defense_exp_mult,
dexExpGain = 30 * person.dexterity_exp_mult,
agiExpGain = 30 * person.agility_exp_mult,
const strExpGain = 30 * person.mults.strength_exp,
defExpGain = 30 * person.mults.defense_exp,
dexExpGain = 30 * person.mults.dexterity_exp,
agiExpGain = 30 * person.mults.agility_exp,
staminaGain = 0.04 * this.skillMultipliers.stamina;
retValue.str = strExpGain;
retValue.def = defExpGain;
@ -1504,12 +1504,12 @@ export class Bladeburner implements IBladeburner {
0.04 * Math.pow(person.hacking, 0.3) +
0.04 * Math.pow(person.intelligence, 0.9) +
0.02 * Math.pow(person.charisma, 0.3);
eff *= person.bladeburner_analysis_mult;
eff *= person.mults.bladeburner_analysis;
if (isNaN(eff) || eff < 0) {
throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");
}
const hackingExpGain = 20 * person.hacking_exp_mult;
const charismaExpGain = 20 * person.charisma_exp_mult;
const hackingExpGain = 20 * person.mults.hacking_exp;
const charismaExpGain = 20 * person.mults.charisma_exp;
const rankGain = 0.1 * BitNodeMultipliers.BladeburnerRank;
retValue.hack = hackingExpGain;
retValue.cha = charismaExpGain;
@ -1647,7 +1647,7 @@ export class Bladeburner implements IBladeburner {
if (bladeburnerFac.isMember) {
const favorBonus = 1 + bladeburnerFac.favor / 100;
bladeburnerFac.playerReputation +=
BladeburnerConstants.RankToFactionRepFactor * change * person.faction_rep_mult * favorBonus;
BladeburnerConstants.RankToFactionRepFactor * change * person.mults.faction_rep * favorBonus;
}
}
@ -1695,7 +1695,7 @@ export class Bladeburner implements IBladeburner {
const effAgility = player.agility * this.skillMultipliers.effAgi;
const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;
const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);
return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);
return gain * (this.skillMultipliers.stamina * player.mults.bladeburner_stamina_gain);
}
calculateMaxStamina(player: IPlayer): void {
@ -1703,7 +1703,7 @@ export class Bladeburner implements IBladeburner {
const maxStamina =
(Math.pow(effAgility, 0.8) + this.staminaBonus) *
this.skillMultipliers.stamina *
player.bladeburner_max_stamina_mult;
player.mults.bladeburner_max_stamina;
if (this.maxStamina !== maxStamina) {
const oldMax = this.maxStamina;
this.maxStamina = maxStamina;

@ -173,13 +173,13 @@ export function Stats(props: IProps): React.ReactElement {
<Typography>Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}</Typography>
<br />
<Typography>
Aug. Success Chance mult: {formatNumber(props.player.bladeburner_success_chance_mult * 100, 1)}%
Aug. Success Chance mult: {formatNumber(props.player.mults.bladeburner_success_chance * 100, 1)}%
<br />
Aug. Max Stamina mult: {formatNumber(props.player.bladeburner_max_stamina_mult * 100, 1)}%
Aug. Max Stamina mult: {formatNumber(props.player.mults.bladeburner_max_stamina * 100, 1)}%
<br />
Aug. Stamina Gain mult: {formatNumber(props.player.bladeburner_stamina_gain_mult * 100, 1)}%
Aug. Stamina Gain mult: {formatNumber(props.player.mults.bladeburner_stamina_gain * 100, 1)}%
<br />
Aug. Field Analysis mult: {formatNumber(props.player.bladeburner_analysis_mult * 100, 1)}%
Aug. Field Analysis mult: {formatNumber(props.player.mults.bladeburner_analysis * 100, 1)}%
</Typography>
</Box>
</Paper>

@ -38,7 +38,7 @@ export class StaneksGift implements IStaneksGift {
}
const cotmg = Factions[FactionNames.ChurchOfTheMachineGod];
cotmg.playerReputation += (player.faction_rep_mult * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;
cotmg.playerReputation += (player.mults.faction_rep * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;
}
inBonus(): boolean {
@ -146,66 +146,66 @@ export class StaneksGift implements IStaneksGift {
const power = this.effect(aFrag);
switch (fragment.type) {
case FragmentType.HackingChance:
p.hacking_chance_mult *= power;
p.mults.hacking_chance *= power;
break;
case FragmentType.HackingSpeed:
p.hacking_speed_mult *= power;
p.mults.hacking_speed *= power;
break;
case FragmentType.HackingMoney:
p.hacking_money_mult *= power;
p.mults.hacking_money *= power;
break;
case FragmentType.HackingGrow:
p.hacking_grow_mult *= power;
p.mults.hacking_grow *= power;
break;
case FragmentType.Hacking:
p.hacking_mult *= power;
p.hacking_exp_mult *= power;
p.mults.hacking *= power;
p.mults.hacking_exp *= power;
break;
case FragmentType.Strength:
p.strength_mult *= power;
p.strength_exp_mult *= power;
p.mults.strength *= power;
p.mults.strength_exp *= power;
break;
case FragmentType.Defense:
p.defense_mult *= power;
p.defense_exp_mult *= power;
p.mults.defense *= power;
p.mults.defense_exp *= power;
break;
case FragmentType.Dexterity:
p.dexterity_mult *= power;
p.dexterity_exp_mult *= power;
p.mults.dexterity *= power;
p.mults.dexterity_exp *= power;
break;
case FragmentType.Agility:
p.agility_mult *= power;
p.agility_exp_mult *= power;
p.mults.agility *= power;
p.mults.agility_exp *= power;
break;
case FragmentType.Charisma:
p.charisma_mult *= power;
p.charisma_exp_mult *= power;
p.mults.charisma *= power;
p.mults.charisma_exp *= power;
break;
case FragmentType.HacknetMoney:
p.hacknet_node_money_mult *= power;
p.mults.hacknet_node_money *= power;
break;
case FragmentType.HacknetCost:
p.hacknet_node_purchase_cost_mult /= power;
p.hacknet_node_ram_cost_mult /= power;
p.hacknet_node_core_cost_mult /= power;
p.hacknet_node_level_cost_mult /= power;
p.mults.hacknet_node_purchase_cost /= power;
p.mults.hacknet_node_ram_cost /= power;
p.mults.hacknet_node_core_cost /= power;
p.mults.hacknet_node_level_cost /= power;
break;
case FragmentType.Rep:
p.company_rep_mult *= power;
p.faction_rep_mult *= power;
p.mults.company_rep *= power;
p.mults.faction_rep *= power;
break;
case FragmentType.WorkMoney:
p.work_money_mult *= power;
p.mults.work_money *= power;
break;
case FragmentType.Crime:
p.crime_success_mult *= power;
p.crime_money_mult *= power;
p.mults.crime_success *= power;
p.mults.crime_money *= power;
break;
case FragmentType.Bladeburner:
p.bladeburner_max_stamina_mult *= power;
p.bladeburner_stamina_gain_mult *= power;
p.bladeburner_analysis_mult *= power;
p.bladeburner_success_chance_mult *= power;
p.mults.bladeburner_max_stamina *= power;
p.mults.bladeburner_stamina_gain *= power;
p.mults.bladeburner_analysis *= power;
p.mults.bladeburner_success_chance *= power;
break;
}
}

@ -124,7 +124,7 @@ export class Crime {
CONSTANTS.IntelligenceCrimeWeight * p.intelligence;
chance /= CONSTANTS.MaxSkillLevel;
chance /= this.difficulty;
chance *= p.crime_success_mult;
chance *= p.mults.crime_success;
chance *= p.getIntelligenceBonus(1);
return Math.min(chance, 1);

@ -9,36 +9,36 @@ export function applyExploit(): void {
const inc = Math.pow(1.001, Player.exploits.length);
const dec = Math.pow(0.999, Player.exploits.length);
Player.hacking_chance_mult *= inc;
Player.hacking_speed_mult *= inc;
Player.hacking_money_mult *= inc;
Player.hacking_grow_mult *= inc;
Player.hacking_mult *= inc;
Player.mults.hacking_chance *= inc;
Player.mults.hacking_speed *= inc;
Player.mults.hacking_money *= inc;
Player.mults.hacking_grow *= inc;
Player.mults.hacking *= inc;
Player.strength_mult *= inc;
Player.defense_mult *= inc;
Player.dexterity_mult *= inc;
Player.agility_mult *= inc;
Player.charisma_mult *= inc;
Player.mults.strength *= inc;
Player.mults.defense *= inc;
Player.mults.dexterity *= inc;
Player.mults.agility *= inc;
Player.mults.charisma *= inc;
Player.hacking_exp_mult *= inc;
Player.strength_exp_mult *= inc;
Player.defense_exp_mult *= inc;
Player.dexterity_exp_mult *= inc;
Player.agility_exp_mult *= inc;
Player.charisma_exp_mult *= inc;
Player.mults.hacking_exp *= inc;
Player.mults.strength_exp *= inc;
Player.mults.defense_exp *= inc;
Player.mults.dexterity_exp *= inc;
Player.mults.agility_exp *= inc;
Player.mults.charisma_exp *= inc;
Player.company_rep_mult *= inc;
Player.faction_rep_mult *= inc;
Player.mults.company_rep *= inc;
Player.mults.faction_rep *= inc;
Player.crime_money_mult *= inc;
Player.crime_success_mult *= inc;
Player.mults.crime_money *= inc;
Player.mults.crime_success *= inc;
Player.hacknet_node_money_mult *= inc;
Player.hacknet_node_purchase_cost_mult *= dec;
Player.hacknet_node_ram_cost_mult *= dec;
Player.hacknet_node_core_cost_mult *= dec;
Player.hacknet_node_level_cost_mult *= dec;
Player.mults.hacknet_node_money *= inc;
Player.mults.hacknet_node_purchase_cost *= dec;
Player.mults.hacknet_node_ram_cost *= dec;
Player.mults.hacknet_node_core_cost *= dec;
Player.mults.hacknet_node_level_cost *= dec;
Player.work_money_mult *= inc;
Player.mults.work_money *= inc;
}

@ -133,7 +133,7 @@ export function processPassiveFactionRepGain(numCycles: number): void {
const fRep = getFactionFieldWorkRepGain(Player, faction);
const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);
faction.playerReputation += rate * numCycles * Player.faction_rep_mult * BitNodeMultipliers.FactionPassiveRepGain;
faction.playerReputation += rate * numCycles * Player.mults.faction_rep * BitNodeMultipliers.FactionPassiveRepGain;
}
}

@ -2,5 +2,5 @@ import { CONSTANTS } from "../../Constants";
import { IPlayer } from "../../PersonObjects/IPlayer";
export function repFromDonation(amt: number, player: IPlayer): number {
return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;
return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.mults.faction_rep;
}

@ -132,7 +132,7 @@ export class Gang implements IGang {
}
const favorMult = 1 + fac.favor / 100;
fac.playerReputation += (player.faction_rep_mult * gain * favorMult) / GangConstants.GangRespectToReputationRatio;
fac.playerReputation += (player.mults.faction_rep * gain * favorMult) / GangConstants.GangRespectToReputationRatio;
// Keep track of respect gained per member
for (let i = 0; i < this.members.length; ++i) {

@ -12,7 +12,7 @@ export function calculateHackingChance(server: Server, player: IPlayer): number
const skillMult = hackFactor * player.hacking;
const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;
const chance =
skillChance * difficultyMult * player.hacking_chance_mult * calculateIntelligenceBonus(player.intelligence, 1);
skillChance * difficultyMult * player.mults.hacking_chance * calculateIntelligenceBonus(player.intelligence, 1);
if (chance > 1) {
return 1;
}
@ -36,7 +36,7 @@ export function calculateHackingExpGain(server: Server, player: IPlayer): number
let expGain = baseExpGain;
expGain += server.baseDifficulty * diffFactor;
return expGain * player.hacking_exp_mult * BitNodeMultipliers.HackExpGain;
return expGain * player.mults.hacking_exp * BitNodeMultipliers.HackExpGain;
}
/**
@ -50,7 +50,7 @@ export function calculatePercentMoneyHacked(server: Server, player: IPlayer): nu
const difficultyMult = (100 - server.hackDifficulty) / 100;
const skillMult = (player.hacking - (server.requiredHackingSkill - 1)) / player.hacking;
const percentMoneyHacked =
(difficultyMult * skillMult * player.hacking_money_mult * BitNodeMultipliers.ScriptHackMoney) / balanceFactor;
(difficultyMult * skillMult * player.mults.hacking_money * BitNodeMultipliers.ScriptHackMoney) / balanceFactor;
if (percentMoneyHacked < 0) {
return 0;
}
@ -77,7 +77,7 @@ export function calculateHackingTime(server: Server, player: IPlayer): number {
const hackTimeMultiplier = 5;
const hackingTime =
(hackTimeMultiplier * skillFactor) /
(player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1));
(player.mults.hacking_speed * calculateIntelligenceBonus(player.intelligence, 1));
return hackingTime;
}

@ -66,7 +66,7 @@ export function purchaseHacknet(player: IPlayer): number {
// Auto generate a name for the Node
const name = "hacknet-node-" + numOwned;
const node = new HacknetNode(name, player.hacknet_node_money_mult);
const node = new HacknetNode(name, player.mults.hacknet_node_money);
player.loseMoney(cost, "hacknet_expenses");
player.hacknetNodes.push(node);
@ -80,11 +80,11 @@ export function hasMaxNumberHacknetServers(player: IPlayer): boolean {
}
export function getCostOfNextHacknetNode(player: IPlayer): number {
return calculateNodeCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);
return calculateNodeCost(player.hacknetNodes.length + 1, player.mults.hacknet_node_purchase_cost);
}
export function getCostOfNextHacknetServer(player: IPlayer): number {
return calculateServerCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);
return calculateServerCost(player.hacknetNodes.length + 1, player.mults.hacknet_node_purchase_cost);
}
// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level
@ -97,14 +97,14 @@ export function getMaxNumberLevelUpgrades(
throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);
}
if (player.money < nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult)) {
if (player.money < nodeObj.calculateLevelUpgradeCost(1, player.mults.hacknet_node_level_cost)) {
return 0;
}
let min = 1;
let max = maxLevel - 1;
const levelsToMax = maxLevel - nodeObj.level;
if (player.money > nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult)) {
if (player.money > nodeObj.calculateLevelUpgradeCost(levelsToMax, player.mults.hacknet_node_level_cost)) {
return levelsToMax;
}
@ -112,13 +112,13 @@ export function getMaxNumberLevelUpgrades(
const curr = ((min + max) / 2) | 0;
if (
curr !== maxLevel &&
player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult) &&
player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult)
player.money > nodeObj.calculateLevelUpgradeCost(curr, player.mults.hacknet_node_level_cost) &&
player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.mults.hacknet_node_level_cost)
) {
return Math.min(levelsToMax, curr);
} else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {
} else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.mults.hacknet_node_level_cost)) {
max = curr - 1;
} else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {
} else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.mults.hacknet_node_level_cost)) {
min = curr + 1;
} else {
return Math.min(levelsToMax, curr);
@ -137,7 +137,7 @@ export function getMaxNumberRamUpgrades(
throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);
}
if (player.money < nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult)) {
if (player.money < nodeObj.calculateRamUpgradeCost(1, player.mults.hacknet_node_ram_cost)) {
return 0;
}
@ -147,13 +147,13 @@ export function getMaxNumberRamUpgrades(
} else {
levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));
}
if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult)) {
if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.mults.hacknet_node_ram_cost)) {
return levelsToMax;
}
//We'll just loop until we find the max
for (let i = levelsToMax - 1; i >= 0; --i) {
if (player.money > nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult)) {
if (player.money > nodeObj.calculateRamUpgradeCost(i, player.mults.hacknet_node_ram_cost)) {
return i;
}
}
@ -170,14 +170,14 @@ export function getMaxNumberCoreUpgrades(
throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);
}
if (player.money < nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult)) {
if (player.money < nodeObj.calculateCoreUpgradeCost(1, player.mults.hacknet_node_core_cost)) {
return 0;
}
let min = 1;
let max = maxLevel - 1;
const levelsToMax = maxLevel - nodeObj.cores;
if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult)) {
if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.mults.hacknet_node_core_cost)) {
return levelsToMax;
}
@ -186,13 +186,13 @@ export function getMaxNumberCoreUpgrades(
const curr = ((min + max) / 2) | 0;
if (
curr != maxLevel &&
player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult) &&
player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult)
player.money > nodeObj.calculateCoreUpgradeCost(curr, player.mults.hacknet_node_core_cost) &&
player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.mults.hacknet_node_core_cost)
) {
return Math.min(levelsToMax, curr);
} else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {
} else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.mults.hacknet_node_core_cost)) {
max = curr - 1;
} else if (player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {
} else if (player.money > nodeObj.calculateCoreUpgradeCost(curr, player.mults.hacknet_node_core_cost)) {
min = curr + 1;
} else {
return Math.min(levelsToMax, curr);
@ -242,7 +242,7 @@ export function getMaxNumberCacheUpgrades(player: IPlayer, nodeObj: HacknetServe
export function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {
const sanitizedLevels = Math.round(levels);
const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);
const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.mults.hacknet_node_level_cost);
if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {
return false;
}
@ -266,14 +266,14 @@ export function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | Hackne
}
player.loseMoney(cost, "hacknet_expenses");
node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);
node.upgradeLevel(sanitizedLevels, player.mults.hacknet_node_money);
return true;
}
export function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {
const sanitizedLevels = Math.round(levels);
const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);
const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.mults.hacknet_node_ram_cost);
if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {
return false;
}
@ -305,14 +305,14 @@ export function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetS
}
player.loseMoney(cost, "hacknet_expenses");
node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);
node.upgradeRam(sanitizedLevels, player.mults.hacknet_node_money);
return true;
}
export function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {
const sanitizedLevels = Math.round(levels);
const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);
const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.mults.hacknet_node_core_cost);
if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {
return false;
}
@ -336,7 +336,7 @@ export function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | Hacknet
}
player.loseMoney(cost, "hacknet_expenses");
node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);
node.upgradeCore(sanitizedLevels, player.mults.hacknet_node_money);
return true;
}
@ -415,7 +415,7 @@ function processAllHacknetServerEarnings(player: IPlayer, numCycles: number): nu
if (ip instanceof HacknetNode) throw new Error(`player nodes should not be HacketNode`);
const hserver = GetServer(ip);
if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`);
hserver.updateHashRate(player.hacknet_node_money_mult);
hserver.updateHashRate(player.mults.hacknet_node_money);
const h = hserver.process(numCycles);
hashes += h;
}

@ -125,7 +125,7 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
updateRamUsed(ram: number, player: IPlayer): void {
super.updateRamUsed(ram, player);
this.updateHashRate(player.hacknet_node_money_mult);
this.updateHashRate(player.mults.hacknet_node_money);
}
updateHashCapacity(): void {

@ -54,13 +54,13 @@ export function HacknetNodeElem(props: IProps): React.ReactElement {
multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel);
} else {
const levelsToMax = HacknetNodeConstants.MaxLevel - node.level;
multiplier = Math.min(levelsToMax, purchaseMult );
multiplier = Math.min(levelsToMax, purchaseMult);
}
const increase =
calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.hacknet_node_money_mult) -
calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.mults.hacknet_node_money) -
node.moneyGainRatePerSecond;
const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);
const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.mults.hacknet_node_level_cost);
upgradeLevelButton = (
<Tooltip
title={
@ -94,7 +94,7 @@ export function HacknetNodeElem(props: IProps): React.ReactElement {
multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam);
} else {
const levelsToMax = Math.round(Math.log2(HacknetNodeConstants.MaxRam / node.ram));
multiplier = Math.min(levelsToMax, purchaseMult );
multiplier = Math.min(levelsToMax, purchaseMult);
}
const increase =
@ -102,9 +102,9 @@ export function HacknetNodeElem(props: IProps): React.ReactElement {
node.level,
node.ram * Math.pow(2, multiplier),
node.cores,
props.player.hacknet_node_money_mult,
props.player.mults.hacknet_node_money,
) - node.moneyGainRatePerSecond;
const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);
const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.mults.hacknet_node_ram_cost);
upgradeRAMButton = (
<Tooltip
title={
@ -144,13 +144,13 @@ export function HacknetNodeElem(props: IProps): React.ReactElement {
multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores);
} else {
const levelsToMax = HacknetNodeConstants.MaxCores - node.cores;
multiplier = Math.min(levelsToMax, purchaseMult );
multiplier = Math.min(levelsToMax, purchaseMult);
}
const increase =
calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.hacknet_node_money_mult) -
calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.mults.hacknet_node_money) -
node.moneyGainRatePerSecond;
const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);
const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.mults.hacknet_node_core_cost);
upgradeCoresButton = (
<Tooltip
title={

@ -61,11 +61,16 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
}
const base_increase =
calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -
calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
calculateHashGainRate(
node.level + multiplier,
0,
node.maxRam,
node.cores,
props.player.mults.hacknet_node_money,
) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.mults.hacknet_node_money);
const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam;
const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);
const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.mults.hacknet_node_level_cost);
upgradeLevelButton = (
<Tooltip
title={
@ -122,8 +127,8 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
0,
node.maxRam * Math.pow(2, multiplier),
node.cores,
props.player.hacknet_node_money_mult,
) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
props.player.mults.hacknet_node_money,
) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.mults.hacknet_node_money);
const modded_increase =
calculateHashGainRate(
@ -131,11 +136,11 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
node.ramUsed,
node.maxRam * Math.pow(2, multiplier),
node.cores,
props.player.hacknet_node_money_mult,
props.player.mults.hacknet_node_money,
) -
calculateHashGainRate(node.level, node.ramUsed, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
calculateHashGainRate(node.level, node.ramUsed, node.maxRam, node.cores, props.player.mults.hacknet_node_money);
const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);
const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.mults.hacknet_node_ram_cost);
upgradeRamButton = (
<Tooltip
title={
@ -179,11 +184,16 @@ export function HacknetServerElem(props: IProps): React.ReactElement {
}
const base_increase =
calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -
calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult);
calculateHashGainRate(
node.level,
0,
node.maxRam,
node.cores + multiplier,
props.player.mults.hacknet_node_money,
) - calculateHashGainRate(node.level, 0, node.maxRam, node.cores, props.player.mults.hacknet_node_money);
const modded_increase = (base_increase * (node.maxRam - node.ramUsed)) / node.maxRam;
const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);
const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.mults.hacknet_node_core_cost);
upgradeCoresButton = (
<Tooltip
title={

@ -16,10 +16,10 @@ export function calculateDifficulty(player: IPlayer, startingSecurityLevel: numb
export function calculateReward(player: IPlayer, startingSecurityLevel: number): number {
const xpMult = 10 * 60 * 15;
const total =
calculateSkill(player.strength_exp_mult * xpMult, player.strength_mult) +
calculateSkill(player.defense_exp_mult * xpMult, player.defense_mult) +
calculateSkill(player.agility_exp_mult * xpMult, player.agility_mult) +
calculateSkill(player.dexterity_exp_mult * xpMult, player.dexterity_mult) +
calculateSkill(player.charisma_exp_mult * xpMult, player.charisma_mult);
calculateSkill(player.mults.strength_exp * xpMult, player.mults.strength) +
calculateSkill(player.mults.defense_exp * xpMult, player.mults.defense) +
calculateSkill(player.mults.agility_exp * xpMult, player.mults.agility) +
calculateSkill(player.mults.dexterity_exp * xpMult, player.mults.dexterity) +
calculateSkill(player.mults.charisma_exp * xpMult, player.mults.charisma);
return calculateRawDiff(player, total, startingSecurityLevel);
}

@ -1511,19 +1511,19 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
},
getHackingMultipliers: () => (): HackingMultipliers => {
return {
chance: Player.hacking_chance_mult,
speed: Player.hacking_speed_mult,
money: Player.hacking_money_mult,
growth: Player.hacking_grow_mult,
chance: Player.mults.hacking_chance,
speed: Player.mults.hacking_speed,
money: Player.mults.hacking_money,
growth: Player.mults.hacking_grow,
};
},
getHacknetMultipliers: () => (): HacknetMultipliers => {
return {
production: Player.hacknet_node_money_mult,
purchaseCost: Player.hacknet_node_purchase_cost_mult,
ramCost: Player.hacknet_node_ram_cost_mult,
coreCost: Player.hacknet_node_core_cost_mult,
levelCost: Player.hacknet_node_level_cost_mult,
production: Player.mults.hacknet_node_money,
purchaseCost: Player.mults.hacknet_node_purchase_cost,
ramCost: Player.mults.hacknet_node_ram_cost,
coreCost: Player.mults.hacknet_node_core_cost,
levelCost: Player.mults.hacknet_node_level_cost,
};
},
getBitNodeMultipliers: (ctx: NetscriptContext) => (): IBNMults => {
@ -2366,51 +2366,23 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
agility: Player.agility,
charisma: Player.charisma,
intelligence: Player.intelligence,
hacking_chance_mult: Player.hacking_chance_mult,
hacking_speed_mult: Player.hacking_speed_mult,
hacking_money_mult: Player.hacking_money_mult,
hacking_grow_mult: Player.hacking_grow_mult,
hacking_exp: Player.hacking_exp,
strength_exp: Player.strength_exp,
defense_exp: Player.defense_exp,
dexterity_exp: Player.dexterity_exp,
agility_exp: Player.agility_exp,
charisma_exp: Player.charisma_exp,
hacking_mult: Player.hacking_mult,
strength_mult: Player.strength_mult,
defense_mult: Player.defense_mult,
dexterity_mult: Player.dexterity_mult,
agility_mult: Player.agility_mult,
charisma_mult: Player.charisma_mult,
hacking_exp_mult: Player.hacking_exp_mult,
strength_exp_mult: Player.strength_exp_mult,
defense_exp_mult: Player.defense_exp_mult,
dexterity_exp_mult: Player.dexterity_exp_mult,
agility_exp_mult: Player.agility_exp_mult,
charisma_exp_mult: Player.charisma_exp_mult,
company_rep_mult: Player.company_rep_mult,
faction_rep_mult: Player.faction_rep_mult,
hacking_chance_mult: Player.mults.hacking_chance,
mults: JSON.parse(JSON.stringify(Player.mults)),
numPeopleKilled: Player.numPeopleKilled,
money: Player.money,
city: Player.city,
location: Player.location,
companyName: Player.companyName,
crime_money_mult: Player.crime_money_mult,
crime_success_mult: Player.crime_success_mult,
work_money_mult: Player.work_money_mult,
hacknet_node_money_mult: Player.hacknet_node_money_mult,
hacknet_node_purchase_cost_mult: Player.hacknet_node_purchase_cost_mult,
hacknet_node_ram_cost_mult: Player.hacknet_node_ram_cost_mult,
hacknet_node_core_cost_mult: Player.hacknet_node_core_cost_mult,
hacknet_node_level_cost_mult: Player.hacknet_node_level_cost_mult,
hasWseAccount: Player.hasWseAccount,
hasTixApiAccess: Player.hasTixApiAccess,
has4SData: Player.has4SData,
has4SDataTixApi: Player.has4SDataTixApi,
bladeburner_max_stamina_mult: Player.bladeburner_max_stamina_mult,
bladeburner_stamina_gain_mult: Player.bladeburner_stamina_gain_mult,
bladeburner_analysis_mult: Player.bladeburner_analysis_mult,
bladeburner_success_chance_mult: Player.bladeburner_success_chance_mult,
bitNodeN: Player.bitNodeN,
totalPlaytime: Player.totalPlaytime,
playtimeSinceLastAug: Player.playtimeSinceLastAug,

@ -257,7 +257,7 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
function getMaterial(divisionName: string, cityName: string, materialName: string): Material {
const warehouse = getWarehouse(divisionName, cityName);
const matName = (materialName ).replace(/ /g, "");
const matName = materialName.replace(/ /g, "");
const material = warehouse.materials[matName];
if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);
return material;
@ -725,9 +725,11 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
const employeeName = ctx.helper.string("employeeName", _employeeName);
const job = ctx.helper.string("job", _job);
const employee = getEmployee(divisionName, cityName, employeeName);
return netscriptDelay(["Training", "Unassigned"].includes(employee.pos) ? 0 : 1000, workerScript).then(function () {
return netscriptDelay(["Training", "Unassigned"].includes(employee.pos) ? 0 : 1000, workerScript).then(
function () {
return Promise.resolve(AssignJob(employee, job));
});
},
);
},
hireEmployee:
(ctx: NetscriptContext) =>
@ -777,7 +779,7 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
const office = getOffice(divisionName, cityName);
const corporation = getCorporation();
return netscriptDelay(
(60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),
(60 * 1000) / (player.mults.hacking_speed * calculateIntelligenceBonus(player.intelligence, 1)),
workerScript,
).then(function () {
return Promise.resolve(ThrowParty(corporation, office, costPerEmployee));
@ -791,7 +793,7 @@ export function NetscriptCorporation(player: IPlayer, workerScript: WorkerScript
const cityName = ctx.helper.city("cityName", _cityName);
const corporation = getCorporation();
return netscriptDelay(
(60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),
(60 * 1000) / (player.mults.hacking_speed * calculateIntelligenceBonus(player.intelligence, 1)),
workerScript,
).then(function () {
return Promise.resolve(BuyCoffee(corporation, getDivision(divisionName), getOffice(divisionName, cityName)));

@ -141,7 +141,7 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript): I
const i = ctx.helper.number("i", _i);
const n = ctx.helper.number("n", _n);
const node = getHacknetNode(ctx, i);
return node.calculateLevelUpgradeCost(n, player.hacknet_node_level_cost_mult);
return node.calculateLevelUpgradeCost(n, player.mults.hacknet_node_level_cost);
},
getRamUpgradeCost:
(ctx: NetscriptContext) =>
@ -149,7 +149,7 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript): I
const i = ctx.helper.number("i", _i);
const n = ctx.helper.number("n", _n);
const node = getHacknetNode(ctx, i);
return node.calculateRamUpgradeCost(n, player.hacknet_node_ram_cost_mult);
return node.calculateRamUpgradeCost(n, player.mults.hacknet_node_ram_cost);
},
getCoreUpgradeCost:
(ctx: NetscriptContext) =>
@ -157,7 +157,7 @@ export function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript): I
const i = ctx.helper.number("i", _i);
const n = ctx.helper.number("n", _n);
const node = getHacknetNode(ctx, i);
return node.calculateCoreUpgradeCost(n, player.hacknet_node_core_cost_mult);
return node.calculateCoreUpgradeCost(n, player.mults.hacknet_node_core_cost);
},
getCacheUpgradeCost:
(ctx: NetscriptContext) =>

@ -679,23 +679,23 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
jobTitles: Object.values(player.jobs),
maxHp: player.max_hp,
mult: {
agility: player.agility_mult,
agilityExp: player.agility_exp_mult,
agility: player.mults.agility,
agilityExp: player.mults.agility_exp,
charisma: player.charisma,
charismaExp: player.charisma_exp,
companyRep: player.company_rep_mult,
crimeMoney: player.crime_money_mult,
crimeSuccess: player.crime_success_mult,
defense: player.defense_mult,
defenseExp: player.defense_exp_mult,
dexterity: player.dexterity_mult,
dexterityExp: player.dexterity_exp_mult,
factionRep: player.faction_rep_mult,
hacking: player.hacking_mult,
hackingExp: player.hacking_exp_mult,
strength: player.strength_mult,
strengthExp: player.strength_exp_mult,
workMoney: player.work_money_mult,
companyRep: player.mults.company_rep,
crimeMoney: player.mults.crime_money,
crimeSuccess: player.mults.crime_success,
defense: player.mults.defense,
defenseExp: player.mults.defense_exp,
dexterity: player.mults.dexterity,
dexterityExp: player.mults.dexterity_exp,
factionRep: player.mults.faction_rep,
hacking: player.mults.hacking,
hackingExp: player.mults.hacking_exp,
strength: player.mults.strength,
strengthExp: player.mults.strength_exp,
workMoney: player.mults.work_money,
},
tor: player.hasTorRouter(),
hackingExp: player.hacking_exp,
@ -1115,7 +1115,7 @@ export function NetscriptSingularity(player: IPlayer, workerScript: WorkerScript
);
return false;
}
const repGain = (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;
const repGain = (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.mults.faction_rep;
faction.playerReputation += repGain;
player.loseMoney(amt, "other");
_ctx.log(

@ -210,23 +210,23 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI<ISleeve> {
maxHp: sl.max_hp,
mult: {
agility: sl.agility_mult,
agilityExp: sl.agility_exp_mult,
charisma: sl.charisma_mult,
charismaExp: sl.charisma_exp_mult,
companyRep: sl.company_rep_mult,
crimeMoney: sl.crime_money_mult,
crimeSuccess: sl.crime_success_mult,
defense: sl.defense_mult,
defenseExp: sl.defense_exp_mult,
dexterity: sl.dexterity_mult,
dexterityExp: sl.dexterity_exp_mult,
factionRep: sl.faction_rep_mult,
hacking: sl.hacking_mult,
hackingExp: sl.hacking_exp_mult,
strength: sl.strength_mult,
strengthExp: sl.strength_exp_mult,
workMoney: sl.work_money_mult,
agility: sl.mults.agility,
agilityExp: sl.mults.agility_exp,
charisma: sl.mults.charisma,
charismaExp: sl.mults.charisma_exp,
companyRep: sl.mults.company_rep,
crimeMoney: sl.mults.crime_money,
crimeSuccess: sl.mults.crime_success,
defense: sl.mults.defense,
defenseExp: sl.mults.defense_exp,
dexterity: sl.mults.dexterity,
dexterityExp: sl.mults.dexterity_exp,
factionRep: sl.mults.faction_rep,
hacking: sl.mults.hacking,
hackingExp: sl.mults.hacking_exp,
strength: sl.mults.strength,
strengthExp: sl.mults.strength_exp,
workMoney: sl.mults.work_money,
},
timeWorked: sl.currentTaskTime,

@ -4,44 +4,44 @@ import { CONSTANTS } from "../../Constants";
import { IPlayer } from "../IPlayer";
export const calculateEntropy = (player: IPlayer, stacks = 1): IMap<number> => {
const multipliers: IMap<number> = {
hacking_chance_mult: player.hacking_chance_mult,
hacking_speed_mult: player.hacking_speed_mult,
hacking_money_mult: player.hacking_money_mult,
hacking_grow_mult: player.hacking_grow_mult,
const multipliers: Record<string, number> = {
hacking_chance: player.mults.hacking_chance,
hacking_speed: player.mults.hacking_speed,
hacking_money: player.mults.hacking_money,
hacking_grow: player.mults.hacking_grow,
hacking_mult: player.hacking_mult,
strength_mult: player.strength_mult,
defense_mult: player.defense_mult,
dexterity_mult: player.dexterity_mult,
agility_mult: player.agility_mult,
charisma_mult: player.charisma_mult,
hacking: player.mults.hacking,
strength: player.mults.strength,
defense: player.mults.defense,
dexterity: player.mults.dexterity,
agility: player.mults.agility,
charisma: player.mults.charisma,
hacking_exp_mult: player.hacking_exp_mult,
strength_exp_mult: player.strength_exp_mult,
defense_exp_mult: player.defense_exp_mult,
dexterity_exp_mult: player.dexterity_exp_mult,
agility_exp_mult: player.agility_exp_mult,
charisma_exp_mult: player.charisma_exp_mult,
hacking_exp: player.mults.hacking_exp,
strength_exp: player.mults.strength_exp,
defense_exp: player.mults.defense_exp,
dexterity_exp: player.mults.dexterity_exp,
agility_exp: player.mults.agility_exp,
charisma_exp: player.mults.charisma_exp,
company_rep_mult: player.company_rep_mult,
faction_rep_mult: player.faction_rep_mult,
company_rep: player.mults.company_rep,
faction_rep: player.mults.faction_rep,
crime_money_mult: player.crime_money_mult,
crime_success_mult: player.crime_success_mult,
crime_money: player.mults.crime_money,
crime_success: player.mults.crime_success,
hacknet_node_money_mult: player.hacknet_node_money_mult,
hacknet_node_purchase_cost_mult: player.hacknet_node_purchase_cost_mult,
hacknet_node_ram_cost_mult: player.hacknet_node_ram_cost_mult,
hacknet_node_core_cost_mult: player.hacknet_node_core_cost_mult,
hacknet_node_level_cost_mult: player.hacknet_node_level_cost_mult,
hacknet_node_money: player.mults.hacknet_node_money,
hacknet_node_purchase_cost: player.mults.hacknet_node_purchase_cost,
hacknet_node_ram_cost: player.mults.hacknet_node_ram_cost,
hacknet_node_core_cost: player.mults.hacknet_node_core_cost,
hacknet_node_level_cost: player.mults.hacknet_node_level_cost,
work_money_mult: player.work_money_mult,
work_money: player.mults.work_money,
bladeburner_max_stamina_mult: player.bladeburner_max_stamina_mult,
bladeburner_stamina_gain_mult: player.bladeburner_stamina_gain_mult,
bladeburner_analysis_mult: player.bladeburner_analysis_mult,
bladeburner_success_chance_mult: player.bladeburner_success_chance_mult,
bladeburner_max_stamina: player.mults.bladeburner_max_stamina,
bladeburner_stamina_gain: player.mults.bladeburner_stamina_gain,
bladeburner_analysis: player.mults.bladeburner_analysis,
bladeburner_success_chance: player.mults.bladeburner_success_chance,
};
for (const [mult, val] of Object.entries(multipliers)) {

@ -3,6 +3,7 @@
import { IPlayerOwnedAugmentation } from "../Augmentation/PlayerOwnedAugmentation";
import { ITaskTracker } from "./ITaskTracker";
import { Multipliers } from "./Multipliers";
export interface IPerson {
// Stats
@ -25,27 +26,7 @@ export interface IPerson {
charisma_exp: number;
intelligence_exp: number;
// Multipliers
hacking_exp_mult: number;
strength_exp_mult: number;
defense_exp_mult: number;
dexterity_exp_mult: number;
agility_exp_mult: number;
charisma_exp_mult: number;
hacking_mult: number;
strength_mult: number;
defense_mult: number;
dexterity_mult: number;
agility_mult: number;
charisma_mult: number;
company_rep_mult: number;
faction_rep_mult: number;
crime_money_mult: number;
crime_success_mult: number;
bladeburner_analysis_mult: number;
mults: Multipliers;
augmentations: IPlayerOwnedAugmentation[];

@ -30,6 +30,7 @@ import { ISkillProgress } from "./formulas/skill";
import { PlayerAchievement } from "../Achievements/Achievements";
import { IPerson } from "./IPerson";
import { Work } from "src/Work/Work";
import { Multipliers } from "./Multipliers";
export interface IPlayer extends IPerson {
bitNodeN: number;
@ -88,37 +89,7 @@ export interface IPlayer extends IPerson {
charisma_exp: number;
intelligence_exp: number;
// Multipliers
hacking_chance_mult: number;
hacking_speed_mult: number;
hacking_money_mult: number;
hacking_grow_mult: number;
hacking_mult: number;
hacking_exp_mult: number;
strength_mult: number;
strength_exp_mult: number;
defense_mult: number;
defense_exp_mult: number;
dexterity_mult: number;
dexterity_exp_mult: number;
agility_mult: number;
agility_exp_mult: number;
charisma_mult: number;
charisma_exp_mult: number;
hacknet_node_money_mult: number;
hacknet_node_purchase_cost_mult: number;
hacknet_node_ram_cost_mult: number;
hacknet_node_core_cost_mult: number;
hacknet_node_level_cost_mult: number;
company_rep_mult: number;
faction_rep_mult: number;
work_money_mult: number;
crime_success_mult: number;
crime_money_mult: number;
bladeburner_max_stamina_mult: number;
bladeburner_stamina_gain_mult: number;
bladeburner_analysis_mult: number;
bladeburner_success_chance_mult: number;
mults: Multipliers;
currentWork: Work | null;
focus: boolean;

@ -1,3 +1,5 @@
import { AugmentationStats } from "../ScriptEditor/NetscriptDefinitions";
export interface Multipliers {
hacking_chance: number;
hacking_speed: number;
@ -65,3 +67,38 @@ export const defaultMultipliers = (): Multipliers => {
bladeburner_success_chance: 1,
};
};
export const mergeMultipliers = (m0: Multipliers, m1: AugmentationStats): Multipliers => {
return {
hacking_chance: m0.hacking_chance * (m1.hacking_chance ?? 1),
hacking_speed: m0.hacking_speed * (m1.hacking_speed ?? 1),
hacking_money: m0.hacking_money * (m1.hacking_money ?? 1),
hacking_grow: m0.hacking_grow * (m1.hacking_grow ?? 1),
hacking: m0.hacking * (m1.hacking ?? 1),
hacking_exp: m0.hacking_exp * (m1.hacking_exp ?? 1),
strength: m0.strength * (m1.strength ?? 1),
strength_exp: m0.strength_exp * (m1.strength_exp ?? 1),
defense: m0.defense * (m1.defense ?? 1),
defense_exp: m0.defense_exp * (m1.defense_exp ?? 1),
dexterity: m0.dexterity * (m1.dexterity ?? 1),
dexterity_exp: m0.dexterity_exp * (m1.dexterity_exp ?? 1),
agility: m0.agility * (m1.agility ?? 1),
agility_exp: m0.agility_exp * (m1.agility_exp ?? 1),
charisma: m0.charisma * (m1.charisma ?? 1),
charisma_exp: m0.charisma_exp * (m1.charisma_exp ?? 1),
hacknet_node_money: m0.hacknet_node_money * (m1.hacknet_node_money ?? 1),
hacknet_node_purchase_cost: m0.hacknet_node_purchase_cost * (m1.hacknet_node_purchase_cost ?? 1),
hacknet_node_ram_cost: m0.hacknet_node_ram_cost * (m1.hacknet_node_ram_cost ?? 1),
hacknet_node_core_cost: m0.hacknet_node_core_cost * (m1.hacknet_node_core_cost ?? 1),
hacknet_node_level_cost: m0.hacknet_node_level_cost * (m1.hacknet_node_level_cost ?? 1),
company_rep: m0.company_rep * (m1.company_rep ?? 1),
faction_rep: m0.faction_rep * (m1.faction_rep ?? 1),
work_money: m0.work_money * (m1.work_money ?? 1),
crime_success: m0.crime_success * (m1.crime_success ?? 1),
crime_money: m0.crime_money * (m1.crime_money ?? 1),
bladeburner_max_stamina: m0.bladeburner_max_stamina * (m1.bladeburner_max_stamina ?? 1),
bladeburner_stamina_gain: m0.bladeburner_stamina_gain * (m1.bladeburner_stamina_gain ?? 1),
bladeburner_analysis: m0.bladeburner_analysis * (m1.bladeburner_analysis ?? 1),
bladeburner_success_chance: m0.bladeburner_success_chance * (m1.bladeburner_success_chance ?? 1),
};
};

@ -7,6 +7,7 @@ import { CONSTANTS } from "../Constants";
import { calculateSkill } from "./formulas/skill";
import { calculateIntelligenceBonus } from "./formulas/intelligence";
import { IPerson } from "./IPerson";
import { defaultMultipliers, mergeMultipliers, Multipliers } from "./Multipliers";
// Base class representing a person-like object
export abstract class Person implements IPerson {
@ -34,46 +35,7 @@ export abstract class Person implements IPerson {
charisma_exp = 0;
intelligence_exp = 0;
/**
* Multipliers
*/
hacking_mult = 1;
strength_mult = 1;
defense_mult = 1;
dexterity_mult = 1;
agility_mult = 1;
charisma_mult = 1;
hacking_exp_mult = 1;
strength_exp_mult = 1;
defense_exp_mult = 1;
dexterity_exp_mult = 1;
agility_exp_mult = 1;
charisma_exp_mult = 1;
hacking_chance_mult = 1;
hacking_speed_mult = 1;
hacking_money_mult = 1;
hacking_grow_mult = 1;
company_rep_mult = 1;
faction_rep_mult = 1;
crime_money_mult = 1;
crime_success_mult = 1;
work_money_mult = 1;
hacknet_node_money_mult = 1;
hacknet_node_purchase_cost_mult = 1;
hacknet_node_ram_cost_mult = 1;
hacknet_node_core_cost_mult = 1;
hacknet_node_level_cost_mult = 1;
bladeburner_max_stamina_mult = 1;
bladeburner_stamina_gain_mult = 1;
bladeburner_analysis_mult = 1;
bladeburner_success_chance_mult = 1;
mults = defaultMultipliers();
/**
* Augmentations
@ -101,13 +63,7 @@ export abstract class Person implements IPerson {
* Updates this object's multipliers for the given augmentation
*/
applyAugmentation(aug: Augmentation): void {
for (const mult of Object.keys(aug.mults)) {
if ((this as any)[mult] == null) {
console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);
} else {
(this as any)[mult] *= aug.mults[mult];
}
}
this.mults = mergeMultipliers(this.mults, aug.mults);
}
/**
@ -132,7 +88,7 @@ export abstract class Person implements IPerson {
this.agility / CONSTANTS.MaxSkillLevel +
this.charisma / CONSTANTS.MaxSkillLevel)) /
5.5;
return t * this.faction_rep_mult;
return t * this.mults.faction_rep;
}
/**
@ -140,7 +96,7 @@ export abstract class Person implements IPerson {
* when doing Hacking Work for a faction
*/
getFactionHackingWorkRepGain(): number {
return (this.hacking / CONSTANTS.MaxSkillLevel) * this.faction_rep_mult;
return (this.hacking / CONSTANTS.MaxSkillLevel) * this.mults.faction_rep;
}
/**
@ -156,45 +112,14 @@ export abstract class Person implements IPerson {
this.dexterity / CONSTANTS.MaxSkillLevel +
this.agility / CONSTANTS.MaxSkillLevel)) /
4.5;
return t * this.faction_rep_mult;
return t * this.mults.faction_rep;
}
/**
* Reset all multipliers to 1
*/
resetMultipliers(): void {
this.hacking_mult = 1;
this.strength_mult = 1;
this.defense_mult = 1;
this.dexterity_mult = 1;
this.agility_mult = 1;
this.charisma_mult = 1;
this.hacking_exp_mult = 1;
this.strength_exp_mult = 1;
this.defense_exp_mult = 1;
this.dexterity_exp_mult = 1;
this.agility_exp_mult = 1;
this.charisma_exp_mult = 1;
this.company_rep_mult = 1;
this.faction_rep_mult = 1;
this.crime_money_mult = 1;
this.crime_success_mult = 1;
this.work_money_mult = 1;
this.hacknet_node_money_mult = 1;
this.hacknet_node_purchase_cost_mult = 1;
this.hacknet_node_ram_cost_mult = 1;
this.hacknet_node_core_cost_mult = 1;
this.hacknet_node_level_cost_mult = 1;
this.bladeburner_max_stamina_mult = 1;
this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1;
this.bladeburner_success_chance_mult = 1;
this.mults = defaultMultipliers();
}
/**
@ -203,32 +128,32 @@ export abstract class Person implements IPerson {
updateStatLevels(): void {
this.hacking = Math.max(
1,
Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),
Math.floor(this.calculateStat(this.hacking_exp, this.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier)),
);
this.strength = Math.max(
1,
Math.floor(
this.calculateStat(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier),
this.calculateStat(this.strength_exp, this.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier),
),
);
this.defense = Math.max(
1,
Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),
Math.floor(this.calculateStat(this.defense_exp, this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier)),
);
this.dexterity = Math.max(
1,
Math.floor(
this.calculateStat(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),
this.calculateStat(this.dexterity_exp, this.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier),
),
);
this.agility = Math.max(
1,
Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),
Math.floor(this.calculateStat(this.agility_exp, this.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier)),
);
this.charisma = Math.max(
1,
Math.floor(
this.calculateStat(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier),
this.calculateStat(this.charisma_exp, this.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier),
),
);

@ -39,6 +39,7 @@ import { getRandomInt } from "../../utils/helpers/getRandomInt";
import { ITaskTracker } from "../ITaskTracker";
import { CONSTANTS } from "../../Constants";
import { Work } from "src/Work/Work";
import { defaultMultipliers, Multipliers } from "../Multipliers";
export class PlayerObject implements IPlayer {
// Class members
@ -102,37 +103,7 @@ export class PlayerObject implements IPlayer {
charisma_exp: number;
intelligence_exp: number;
// Multipliers
hacking_chance_mult: number;
hacking_speed_mult: number;
hacking_money_mult: number;
hacking_grow_mult: number;
hacking_mult: number;
hacking_exp_mult: number;
strength_mult: number;
strength_exp_mult: number;
defense_mult: number;
defense_exp_mult: number;
dexterity_mult: number;
dexterity_exp_mult: number;
agility_mult: number;
agility_exp_mult: number;
charisma_mult: number;
charisma_exp_mult: number;
hacknet_node_money_mult: number;
hacknet_node_purchase_cost_mult: number;
hacknet_node_ram_cost_mult: number;
hacknet_node_core_cost_mult: number;
hacknet_node_level_cost_mult: number;
company_rep_mult: number;
faction_rep_mult: number;
work_money_mult: number;
crime_success_mult: number;
crime_money_mult: number;
bladeburner_max_stamina_mult: number;
bladeburner_stamina_gain_mult: number;
bladeburner_analysis_mult: number;
bladeburner_success_chance_mult: number;
mults: Multipliers;
currentWork: Work | null;
focus: boolean;
@ -246,12 +217,6 @@ export class PlayerObject implements IPlayer {
//Special stats
this.intelligence = 0;
//Hacking multipliers
this.hacking_chance_mult = 1;
this.hacking_speed_mult = 1;
this.hacking_money_mult = 1;
this.hacking_grow_mult = 1;
//Experience and multipliers
this.hacking_exp = 0;
this.strength_exp = 0;
@ -261,22 +226,7 @@ export class PlayerObject implements IPlayer {
this.charisma_exp = 0;
this.intelligence_exp = 0;
this.hacking_mult = 1;
this.strength_mult = 1;
this.defense_mult = 1;
this.dexterity_mult = 1;
this.agility_mult = 1;
this.charisma_mult = 1;
this.hacking_exp_mult = 1;
this.strength_exp_mult = 1;
this.defense_exp_mult = 1;
this.dexterity_exp_mult = 1;
this.agility_exp_mult = 1;
this.charisma_exp_mult = 1;
this.company_rep_mult = 1;
this.faction_rep_mult = 1;
this.mults = defaultMultipliers();
//Money
this.money = 1000 + CONSTANTS.Donations;
@ -315,21 +265,6 @@ export class PlayerObject implements IPlayer {
this.numPeopleKilled = 0;
this.karma = 0;
this.crime_money_mult = 1;
this.crime_success_mult = 1;
//Flags/variables for working (Company, Faction, Creating Program, Taking Class)
this.focus = false;
this.work_money_mult = 1;
//Hacknet Node multipliers
this.hacknet_node_money_mult = 1;
this.hacknet_node_purchase_cost_mult = 1;
this.hacknet_node_ram_cost_mult = 1;
this.hacknet_node_core_cost_mult = 1;
this.hacknet_node_level_cost_mult = 1;
//Stock Market
this.hasWseAccount = false;
this.hasTixApiAccess = false;
@ -344,10 +279,6 @@ export class PlayerObject implements IPlayer {
//Bladeburner
this.bladeburner = null;
this.bladeburner_max_stamina_mult = 1;
this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1; //Field Analysis Only
this.bladeburner_success_chance_mult = 1;
// Sleeves & Re-sleeving
this.sleeves = [];
@ -375,6 +306,7 @@ export class PlayerObject implements IPlayer {
this.achievements = [];
this.terminalCommandHistory = [];
this.focus = false;
this.currentWork = null;
// Let's get a hash of some semi-random stuff so we have something unique.

@ -52,6 +52,7 @@ import { IPerson } from "../IPerson";
import { Player } from "../../Player";
import { isCompanyWork } from "../../Work/CompanyWork";
import { defaultMultipliers } from "../Multipliers";
export function init(this: IPlayer): void {
/* Initialize Player's home computer */
@ -196,29 +197,33 @@ export function calculateSkillProgress(this: IPlayer, exp: number, mult = 1): IS
export function updateSkillLevels(this: IPlayer): void {
this.hacking = Math.max(
1,
Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),
Math.floor(this.calculateSkill(this.hacking_exp, this.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier)),
);
this.strength = Math.max(
1,
Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier)),
Math.floor(
this.calculateSkill(this.strength_exp, this.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier),
),
);
this.defense = Math.max(
1,
Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),
Math.floor(this.calculateSkill(this.defense_exp, this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier)),
);
this.dexterity = Math.max(
1,
Math.floor(
this.calculateSkill(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),
this.calculateSkill(this.dexterity_exp, this.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier),
),
);
this.agility = Math.max(
1,
Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),
Math.floor(this.calculateSkill(this.agility_exp, this.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier)),
);
this.charisma = Math.max(
1,
Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier)),
Math.floor(
this.calculateSkill(this.charisma_exp, this.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier),
),
);
if (this.intelligence > 0) {
@ -233,43 +238,7 @@ export function updateSkillLevels(this: IPlayer): void {
}
export function resetMultipliers(this: IPlayer): void {
this.hacking_chance_mult = 1;
this.hacking_speed_mult = 1;
this.hacking_money_mult = 1;
this.hacking_grow_mult = 1;
this.hacking_mult = 1;
this.strength_mult = 1;
this.defense_mult = 1;
this.dexterity_mult = 1;
this.agility_mult = 1;
this.charisma_mult = 1;
this.hacking_exp_mult = 1;
this.strength_exp_mult = 1;
this.defense_exp_mult = 1;
this.dexterity_exp_mult = 1;
this.agility_exp_mult = 1;
this.charisma_exp_mult = 1;
this.company_rep_mult = 1;
this.faction_rep_mult = 1;
this.crime_money_mult = 1;
this.crime_success_mult = 1;
this.hacknet_node_money_mult = 1;
this.hacknet_node_purchase_cost_mult = 1;
this.hacknet_node_ram_cost_mult = 1;
this.hacknet_node_core_cost_mult = 1;
this.hacknet_node_level_cost_mult = 1;
this.work_money_mult = 1;
this.bladeburner_max_stamina_mult = 1;
this.bladeburner_stamina_gain_mult = 1;
this.bladeburner_analysis_mult = 1;
this.bladeburner_success_chance_mult = 1;
this.mults = defaultMultipliers();
}
export function hasProgram(this: IPlayer, programName: string): boolean {
@ -345,7 +314,7 @@ export function gainHackingExp(this: IPerson, exp: number): void {
this.hacking_exp = 0;
}
this.hacking = calculateSkillF(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier);
this.hacking = calculateSkillF(this.hacking_exp, this.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier);
}
export function gainStrengthExp(this: IPerson, exp: number): void {
@ -358,7 +327,7 @@ export function gainStrengthExp(this: IPerson, exp: number): void {
this.strength_exp = 0;
}
this.strength = calculateSkillF(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier);
this.strength = calculateSkillF(this.strength_exp, this.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier);
}
export function gainDefenseExp(this: IPerson, exp: number): void {
@ -371,7 +340,7 @@ export function gainDefenseExp(this: IPerson, exp: number): void {
this.defense_exp = 0;
}
this.defense = calculateSkillF(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier);
this.defense = calculateSkillF(this.defense_exp, this.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier);
const ratio = this.hp / this.max_hp;
this.max_hp = Math.floor(10 + this.defense / 10);
this.hp = Math.round(this.max_hp * ratio);
@ -389,7 +358,7 @@ export function gainDexterityExp(this: IPerson, exp: number): void {
this.dexterity = calculateSkillF(
this.dexterity_exp,
this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,
this.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier,
);
}
@ -403,7 +372,7 @@ export function gainAgilityExp(this: IPerson, exp: number): void {
this.agility_exp = 0;
}
this.agility = calculateSkillF(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier);
this.agility = calculateSkillF(this.agility_exp, this.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier);
}
export function gainCharismaExp(this: IPerson, exp: number): void {
@ -416,7 +385,7 @@ export function gainCharismaExp(this: IPerson, exp: number): void {
this.charisma_exp = 0;
}
this.charisma = calculateSkillF(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier);
this.charisma = calculateSkillF(this.charisma_exp, this.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier);
}
export function gainIntelligenceExp(this: IPerson, exp: number): void {
@ -431,12 +400,12 @@ export function gainIntelligenceExp(this: IPerson, exp: number): void {
}
export function gainStats(this: IPerson, retValue: ITaskTracker): void {
this.gainHackingExp(retValue.hack * this.hacking_exp_mult);
this.gainStrengthExp(retValue.str * this.strength_exp_mult);
this.gainDefenseExp(retValue.def * this.defense_exp_mult);
this.gainDexterityExp(retValue.dex * this.dexterity_exp_mult);
this.gainAgilityExp(retValue.agi * this.agility_exp_mult);
this.gainCharismaExp(retValue.cha * this.charisma_exp_mult);
this.gainHackingExp(retValue.hack * this.mults.hacking_exp);
this.gainStrengthExp(retValue.str * this.mults.strength_exp);
this.gainDefenseExp(retValue.def * this.mults.defense_exp);
this.gainDexterityExp(retValue.dex * this.mults.dexterity_exp);
this.gainAgilityExp(retValue.agi * this.mults.agility_exp);
this.gainCharismaExp(retValue.cha * this.mults.charisma_exp);
this.gainIntelligenceExp(retValue.int);
}

@ -169,14 +169,14 @@ export class Sleeve extends Person {
this.resetTaskStatus(p);
}
this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.hack = crime.hacking_exp * this.mults.hacking_exp * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.str = crime.strength_exp * this.mults.strength_exp * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.def = crime.defense_exp * this.mults.defense_exp * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.dex = crime.dexterity_exp * this.mults.dexterity_exp * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.agi = crime.agility_exp * this.mults.agility_exp * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.cha = crime.charisma_exp * this.mults.charisma_exp * BitNodeMultipliers.CrimeExpGain;
this.gainRatesForTask.int = crime.intelligence_exp;
this.gainRatesForTask.money = crime.money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;
this.gainRatesForTask.money = crime.money * this.mults.crime_money * BitNodeMultipliers.CrimeMoney;
this.currentTaskLocation = String(this.gainRatesForTask.money);
@ -478,7 +478,7 @@ export class Sleeve extends Person {
);
const favorMult = 1 + company.favor / 100;
return jobPerformance * this.company_rep_mult * favorMult;
return jobPerformance * this.mults.company_rep * favorMult;
} else {
return 0;
}
@ -804,22 +804,22 @@ export class Sleeve extends Person {
switch (this.className.toLowerCase()) {
case "study computer science":
this.gainRatesForTask.hack =
CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;
CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.mults.hacking_exp;
break;
case "data structures":
this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;
this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.mults.hacking_exp;
break;
case "networks":
this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;
this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.mults.hacking_exp;
break;
case "algorithms":
this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;
this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.mults.hacking_exp;
break;
case "management":
this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;
this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.mults.charisma_exp;
break;
case "leadership":
this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;
this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.mults.charisma_exp;
break;
default:
break;
@ -856,13 +856,13 @@ export class Sleeve extends Person {
const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;
const sanitizedStat: string = this.gymStatType.toLowerCase();
if (sanitizedStat.includes("str")) {
this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;
this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.mults.strength_exp;
} else if (sanitizedStat.includes("def")) {
this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;
this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.mults.defense_exp;
} else if (sanitizedStat.includes("dex")) {
this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;
this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.mults.dexterity_exp;
} else if (sanitizedStat.includes("agi")) {
this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;
this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.mults.agility_exp;
}
return;
@ -906,37 +906,37 @@ export class Sleeve extends Person {
this.gainRatesForTask.money =
companyPosition.baseSalary *
company.salaryMultiplier *
this.work_money_mult *
this.mults.work_money *
BitNodeMultipliers.CompanyWorkMoney;
this.gainRatesForTask.hack =
companyPosition.hackingExpGain *
company.expMultiplier *
this.hacking_exp_mult *
this.mults.hacking_exp *
BitNodeMultipliers.CompanyWorkExpGain;
this.gainRatesForTask.str =
companyPosition.strengthExpGain *
company.expMultiplier *
this.strength_exp_mult *
this.mults.strength_exp *
BitNodeMultipliers.CompanyWorkExpGain;
this.gainRatesForTask.def =
companyPosition.defenseExpGain *
company.expMultiplier *
this.defense_exp_mult *
this.mults.defense_exp *
BitNodeMultipliers.CompanyWorkExpGain;
this.gainRatesForTask.dex =
companyPosition.dexterityExpGain *
company.expMultiplier *
this.dexterity_exp_mult *
this.mults.dexterity_exp *
BitNodeMultipliers.CompanyWorkExpGain;
this.gainRatesForTask.agi =
companyPosition.agilityExpGain *
company.expMultiplier *
this.agility_exp_mult *
this.mults.agility_exp *
BitNodeMultipliers.CompanyWorkExpGain;
this.gainRatesForTask.cha =
companyPosition.charismaExpGain *
company.expMultiplier *
this.charisma_exp_mult *
this.mults.charisma_exp *
BitNodeMultipliers.CompanyWorkExpGain;
this.currentTaskLocation = companyName;
@ -970,28 +970,28 @@ export class Sleeve extends Person {
return false;
}
this.factionWorkType = FactionWorkType.HACKING;
this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.hack = 0.15 * this.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain;
} else if (sanitizedWorkType.includes("field")) {
if (!factionInfo.offerFieldWork) {
return false;
}
this.factionWorkType = FactionWorkType.FIELD;
this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.hack = 0.1 * this.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.str = 0.1 * this.mults.strength_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.def = 0.1 * this.mults.defense_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.dex = 0.1 * this.mults.dexterity_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.agi = 0.1 * this.mults.agility_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.cha = 0.1 * this.mults.charisma_exp * BitNodeMultipliers.FactionWorkExpGain;
} else if (sanitizedWorkType.includes("security")) {
if (!factionInfo.offerSecurityWork) {
return false;
}
this.factionWorkType = FactionWorkType.SECURITY;
this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.hack = 0.1 * this.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.str = 0.15 * this.mults.strength_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.def = 0.15 * this.mults.defense_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.dex = 0.15 * this.mults.dexterity_exp * BitNodeMultipliers.FactionWorkExpGain;
this.gainRatesForTask.agi = 0.15 * this.mults.agility_exp * BitNodeMultipliers.FactionWorkExpGain;
} else {
return false;
}
@ -1102,8 +1102,8 @@ export class Sleeve extends Person {
switch (action) {
case "Field analysis":
time = this.getBladeburnerActionTime(p, "General", action);
this.gainRatesForTask.hack = 20 * this.hacking_exp_mult;
this.gainRatesForTask.cha = 20 * this.charisma_exp_mult;
this.gainRatesForTask.hack = 20 * this.mults.hacking_exp;
this.gainRatesForTask.cha = 20 * this.mults.charisma_exp;
break;
case "Recruitment":
time = this.getBladeburnerActionTime(p, "General", action);

@ -54,32 +54,38 @@ export function MoreStatsModal(props: IProps): React.ReactElement {
<br />
<StatsTable
rows={[
[<>Hacking Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.hacking_mult)],
[<>Hacking Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.hacking_exp_mult)],
[<>Strength Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.strength_mult)],
[<>Strength Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.strength_exp_mult)],
[<>Defense Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.defense_mult)],
[<>Defense Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.defense_exp_mult)],
[<>Dexterity Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.dexterity_mult)],
[<>Hacking Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.hacking)],
[<>Hacking Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.hacking_exp)],
[<>Strength Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.strength)],
[
<>Strength Experience multiplier:&nbsp;</>,
numeralWrapper.formatPercentage(props.sleeve.mults.strength_exp),
],
[<>Defense Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.defense)],
[<>Defense Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.defense_exp)],
[<>Dexterity Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.dexterity)],
[
<>Dexterity Experience multiplier:&nbsp;</>,
numeralWrapper.formatPercentage(props.sleeve.dexterity_exp_mult),
numeralWrapper.formatPercentage(props.sleeve.mults.dexterity_exp),
],
[<>Agility Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.agility)],
[<>Agility Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.agility_exp)],
[<>Charisma Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.charisma)],
[
<>Charisma Experience multiplier:&nbsp;</>,
numeralWrapper.formatPercentage(props.sleeve.mults.charisma_exp),
],
[<>Agility Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.agility_mult)],
[<>Agility Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.agility_exp_mult)],
[<>Charisma Level multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.charisma_mult)],
[<>Charisma Experience multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.charisma_exp_mult)],
[
<>Faction Reputation Gain multiplier:&nbsp;</>,
numeralWrapper.formatPercentage(props.sleeve.faction_rep_mult),
numeralWrapper.formatPercentage(props.sleeve.mults.faction_rep),
],
[
<>Company Reputation Gain multiplier:&nbsp;</>,
numeralWrapper.formatPercentage(props.sleeve.company_rep_mult),
numeralWrapper.formatPercentage(props.sleeve.mults.company_rep),
],
[<>Salary multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.work_money_mult)],
[<>Crime Money multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.crime_money_mult)],
[<>Crime Success multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.crime_success_mult)],
[<>Salary multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.work_money)],
[<>Crime Money multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.crime_money)],
[<>Crime Success multiplier:&nbsp;</>, numeralWrapper.formatPercentage(props.sleeve.mults.crime_success)],
]}
title="Multipliers:"
/>

@ -15,7 +15,7 @@ function mult(f: Faction): number {
export function getHackingWorkRepGain(p: IPlayer, f: Faction): number {
return (
((p.hacking + p.intelligence / 3) / CONSTANTS.MaxSkillLevel) *
p.faction_rep_mult *
p.mults.faction_rep *
p.getIntelligenceBonus(1) *
mult(f) *
CalculateShareMult()
@ -27,7 +27,7 @@ export function getFactionSecurityWorkRepGain(p: IPlayer, f: Faction): number {
(0.9 * (p.strength + p.defense + p.dexterity + p.agility + (p.hacking + p.intelligence) * CalculateShareMult())) /
CONSTANTS.MaxSkillLevel /
4.5;
return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);
return t * p.mults.faction_rep * mult(f) * p.getIntelligenceBonus(1);
}
export function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {
@ -41,5 +41,5 @@ export function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {
(p.hacking + p.intelligence) * CalculateShareMult())) /
CONSTANTS.MaxSkillLevel /
5.5;
return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);
return t * p.mults.faction_rep * mult(f) * p.getIntelligenceBonus(1);
}

@ -296,7 +296,7 @@ export function prestigeSourceFile(flume: boolean): void {
hserver.level = 100;
hserver.cores = 10;
hserver.cache = 5;
hserver.updateHashRate(Player.hacknet_node_money_mult);
hserver.updateHashRate(Player.mults.hacknet_node_money);
hserver.updateHashCapacity();
updateHashManagerCapacity(Player);
}

@ -16,51 +16,22 @@ interface Player {
agility: number;
charisma: number;
intelligence: number;
hacking_chance_mult: number;
hacking_speed_mult: number;
hacking_money_mult: number;
hacking_grow_mult: number;
hacking_exp: number;
strength_exp: number;
defense_exp: number;
dexterity_exp: number;
agility_exp: number;
charisma_exp: number;
hacking_mult: number;
strength_mult: number;
defense_mult: number;
dexterity_mult: number;
agility_mult: number;
charisma_mult: number;
hacking_exp_mult: number;
strength_exp_mult: number;
defense_exp_mult: number;
dexterity_exp_mult: number;
agility_exp_mult: number;
charisma_exp_mult: number;
company_rep_mult: number;
faction_rep_mult: number;
mults: Multipliers;
numPeopleKilled: number;
money: number;
city: string;
location: string;
companyName: string;
crime_money_mult: number;
crime_success_mult: number;
work_money_mult: number;
hacknet_node_money_mult: number;
hacknet_node_purchase_cost_mult: number;
hacknet_node_ram_cost_mult: number;
hacknet_node_core_cost_mult: number;
hacknet_node_level_cost_mult: number;
hasWseAccount: boolean;
hasTixApiAccess: boolean;
has4SData: boolean;
has4SDataTixApi: boolean;
bladeburner_max_stamina_mult: number;
bladeburner_stamina_gain_mult: number;
bladeburner_analysis_mult: number;
bladeburner_success_chance_mult: number;
bitNodeN: number;
totalPlaytime: number;
playtimeSinceLastAug: number;
@ -73,6 +44,42 @@ interface Player {
entropy: number;
}
/**
* @public
*/
export interface Multipliers {
hacking_chance: number;
hacking_speed: number;
hacking_money: number;
hacking_grow: number;
hacking: number;
hacking_exp: number;
strength: number;
strength_exp: number;
defense: number;
defense_exp: number;
dexterity: number;
dexterity_exp: number;
agility: number;
agility_exp: number;
charisma: number;
charisma_exp: number;
hacknet_node_money: number;
hacknet_node_purchase_cost: number;
hacknet_node_ram_cost: number;
hacknet_node_core_cost: number;
hacknet_node_level_cost: number;
company_rep: number;
faction_rep: number;
work_money: number;
crime_success: number;
crime_money: number;
bladeburner_max_stamina: number;
bladeburner_stamina_gain: number;
bladeburner_analysis: number;
bladeburner_success_chance: number;
}
/**
* @public
*/
@ -169,65 +176,65 @@ export interface CrimeStats {
*/
export interface AugmentationStats {
/** Multiplier to hacking skill */
hacking_mult?: number;
hacking?: number;
/** Multiplier to strength skill */
strength_mult?: number;
strength?: number;
/** Multiplier to defense skill */
defense_mult?: number;
defense?: number;
/** Multiplier to dexterity skill */
dexterity_mult?: number;
dexterity?: number;
/** Multiplier to agility skill */
agility_mult?: number;
agility?: number;
/** Multiplier to charisma skill */
charisma_mult?: number;
charisma?: number;
/** Multiplier to hacking experience gain rate */
hacking_exp_mult?: number;
hacking_exp?: number;
/** Multiplier to strength experience gain rate */
strength_exp_mult?: number;
strength_exp?: number;
/** Multiplier to defense experience gain rate */
defense_exp_mult?: number;
defense_exp?: number;
/** Multiplier to dexterity experience gain rate */
dexterity_exp_mult?: number;
dexterity_exp?: number;
/** Multiplier to agility experience gain rate */
agility_exp_mult?: number;
agility_exp?: number;
/** Multiplier to charisma experience gain rate */
charisma_exp_mult?: number;
charisma_exp?: number;
/** Multiplier to chance of successfully performing a hack */
hacking_chance_mult?: number;
hacking_chance?: number;
/** Multiplier to hacking speed */
hacking_speed_mult?: number;
hacking_speed?: number;
/** Multiplier to amount of money the player gains from hacking */
hacking_money_mult?: number;
hacking_money?: number;
/** Multiplier to amount of money injected into servers using grow */
hacking_grow_mult?: number;
hacking_grow?: number;
/** Multiplier to amount of reputation gained when working */
company_rep_mult?: number;
company_rep?: number;
/** Multiplier to amount of reputation gained when working */
faction_rep_mult?: number;
faction_rep?: number;
/** Multiplier to amount of money gained from crimes */
crime_money_mult?: number;
crime_money?: number;
/** Multiplier to crime success rate */
crime_success_mult?: number;
crime_success?: number;
/** Multiplier to amount of money gained from working */
work_money_mult?: number;
work_money?: number;
/** Multiplier to amount of money produced by Hacknet Nodes */
hacknet_node_money_mult?: number;
hacknet_node_money?: number;
/** Multiplier to cost of purchasing a Hacknet Node */
hacknet_node_purchase_cost_mult?: number;
hacknet_node_purchase_cost?: number;
/** Multiplier to cost of ram for a Hacknet Node */
hacknet_node_ram_cost_mult?: number;
hacknet_node_ram_cost?: number;
/** Multiplier to cost of core for a Hacknet Node */
hacknet_node_core_cost_mult?: number;
hacknet_node_core_cost?: number;
/** Multiplier to cost of leveling up a Hacknet Node */
hacknet_node_level_cost_mult?: number;
hacknet_node_level_cost?: number;
/** Multiplier to Bladeburner max stamina */
bladeburner_max_stamina_mult?: number;
bladeburner_max_stamina?: number;
/** Multiplier to Bladeburner stamina gain rate */
bladeburner_stamina_gain_mult?: number;
bladeburner_stamina_gain?: number;
/** Multiplier to effectiveness in Bladeburner Field Analysis */
bladeburner_analysis_mult?: number;
bladeburner_analysis?: number;
/** Multiplier to success chance in Bladeburner contracts/operations */
bladeburner_success_chance_mult?: number;
bladeburner_success_chance?: number;
}
/**

@ -58,7 +58,7 @@ export function numCycleForGrowth(server: Server, growth: number, p: IPlayer, co
const cycles =
Math.log(growth) /
(Math.log(ajdGrowthRate) *
p.hacking_grow_mult *
p.mults.hacking_grow *
serverGrowthPercentage *
BitNodeMultipliers.ServerGrowthRate *
coreBonus);
@ -130,7 +130,7 @@ export function numCycleForGrowthCorrected(
const serverGrowthPercentage = server.serverGrowth / 100.0;
const coreMultiplier = 1 + (cores - 1) / 16;
const threadMultiplier =
serverGrowthPercentage * p.hacking_grow_mult * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;
serverGrowthPercentage * p.mults.hacking_grow * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;
/* To understand what is done below we need to do some math. I hope the explanation is clear enough.
* First of, the names will be shortened for ease of manipulation:

@ -20,5 +20,5 @@ export function calculateServerGrowth(server: Server, threads: number, p: IPlaye
//Apply serverGrowth for the calculated number of growth cycles
const coreBonus = 1 + (cores - 1) / 16;
return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);
return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.mults.hacking_grow * coreBonus);
}

@ -20,32 +20,32 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
}
const incMult = 1 + mult / 100;
const decMult = 1 - mult / 100;
Player.hacking_chance_mult *= incMult;
Player.hacking_speed_mult *= incMult;
Player.hacking_money_mult *= incMult;
Player.hacking_grow_mult *= incMult;
Player.hacking_mult *= incMult;
Player.strength_mult *= incMult;
Player.defense_mult *= incMult;
Player.dexterity_mult *= incMult;
Player.agility_mult *= incMult;
Player.charisma_mult *= incMult;
Player.hacking_exp_mult *= incMult;
Player.strength_exp_mult *= incMult;
Player.defense_exp_mult *= incMult;
Player.dexterity_exp_mult *= incMult;
Player.agility_exp_mult *= incMult;
Player.charisma_exp_mult *= incMult;
Player.company_rep_mult *= incMult;
Player.faction_rep_mult *= incMult;
Player.crime_money_mult *= incMult;
Player.crime_success_mult *= incMult;
Player.hacknet_node_money_mult *= incMult;
Player.hacknet_node_purchase_cost_mult *= decMult;
Player.hacknet_node_ram_cost_mult *= decMult;
Player.hacknet_node_core_cost_mult *= decMult;
Player.hacknet_node_level_cost_mult *= decMult;
Player.work_money_mult *= incMult;
Player.mults.hacking_chance *= incMult;
Player.mults.hacking_speed *= incMult;
Player.mults.hacking_money *= incMult;
Player.mults.hacking_grow *= incMult;
Player.mults.hacking *= incMult;
Player.mults.strength *= incMult;
Player.mults.defense *= incMult;
Player.mults.dexterity *= incMult;
Player.mults.agility *= incMult;
Player.mults.charisma *= incMult;
Player.mults.hacking_exp *= incMult;
Player.mults.strength_exp *= incMult;
Player.mults.defense_exp *= incMult;
Player.mults.dexterity_exp *= incMult;
Player.mults.agility_exp *= incMult;
Player.mults.charisma_exp *= incMult;
Player.mults.company_rep *= incMult;
Player.mults.faction_rep *= incMult;
Player.mults.crime_money *= incMult;
Player.mults.crime_success *= incMult;
Player.mults.hacknet_node_money *= incMult;
Player.mults.hacknet_node_purchase_cost *= decMult;
Player.mults.hacknet_node_ram_cost *= decMult;
Player.mults.hacknet_node_core_cost *= decMult;
Player.mults.hacknet_node_level_cost *= decMult;
Player.mults.work_money *= incMult;
break;
}
case 2: {
@ -55,9 +55,9 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 24 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.crime_money_mult *= incMult;
Player.crime_success_mult *= incMult;
Player.charisma_mult *= incMult;
Player.mults.crime_money *= incMult;
Player.mults.crime_success *= incMult;
Player.mults.charisma *= incMult;
break;
}
case 3: {
@ -67,8 +67,8 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 8 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.charisma_mult *= incMult;
Player.work_money_mult *= incMult;
Player.mults.charisma *= incMult;
Player.mults.work_money *= incMult;
break;
}
case 4: {
@ -83,12 +83,12 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 8 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.hacking_chance_mult *= incMult;
Player.hacking_speed_mult *= incMult;
Player.hacking_money_mult *= incMult;
Player.hacking_grow_mult *= incMult;
Player.hacking_mult *= incMult;
Player.hacking_exp_mult *= incMult;
Player.mults.hacking_chance *= incMult;
Player.mults.hacking_speed *= incMult;
Player.mults.hacking_money *= incMult;
Player.mults.hacking_grow *= incMult;
Player.mults.hacking *= incMult;
Player.mults.hacking_exp *= incMult;
break;
}
case 6: {
@ -98,14 +98,14 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 8 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.strength_exp_mult *= incMult;
Player.defense_exp_mult *= incMult;
Player.dexterity_exp_mult *= incMult;
Player.agility_exp_mult *= incMult;
Player.strength_mult *= incMult;
Player.defense_mult *= incMult;
Player.dexterity_mult *= incMult;
Player.agility_mult *= incMult;
Player.mults.strength_exp *= incMult;
Player.mults.defense_exp *= incMult;
Player.mults.dexterity_exp *= incMult;
Player.mults.agility_exp *= incMult;
Player.mults.strength *= incMult;
Player.mults.defense *= incMult;
Player.mults.dexterity *= incMult;
Player.mults.agility *= incMult;
break;
}
case 7: {
@ -115,10 +115,10 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 8 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.bladeburner_max_stamina_mult *= incMult;
Player.bladeburner_stamina_gain_mult *= incMult;
Player.bladeburner_analysis_mult *= incMult;
Player.bladeburner_success_chance_mult *= incMult;
Player.mults.bladeburner_max_stamina *= incMult;
Player.mults.bladeburner_stamina_gain *= incMult;
Player.mults.bladeburner_analysis *= incMult;
Player.mults.bladeburner_success_chance *= incMult;
break;
}
case 8: {
@ -128,7 +128,7 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 12 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.hacking_grow_mult *= incMult;
Player.mults.hacking_grow *= incMult;
break;
}
case 9: {
@ -139,11 +139,11 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
}
const incMult = 1 + mult / 100;
const decMult = 1 - mult / 100;
Player.hacknet_node_core_cost_mult *= decMult;
Player.hacknet_node_level_cost_mult *= decMult;
Player.hacknet_node_money_mult *= incMult;
Player.hacknet_node_purchase_cost_mult *= decMult;
Player.hacknet_node_ram_cost_mult *= decMult;
Player.mults.hacknet_node_core_cost *= decMult;
Player.mults.hacknet_node_level_cost *= decMult;
Player.mults.hacknet_node_money *= incMult;
Player.mults.hacknet_node_purchase_cost *= decMult;
Player.mults.hacknet_node_ram_cost *= decMult;
break;
}
case 10: {
@ -158,8 +158,8 @@ export function applySourceFile(srcFile: PlayerOwnedSourceFile): void {
mult += 32 / Math.pow(2, i);
}
const incMult = 1 + mult / 100;
Player.work_money_mult *= incMult;
Player.company_rep_mult *= incMult;
Player.mults.work_money *= incMult;
Player.mults.company_rep *= incMult;
break;
}
case 12: // The Recursion

@ -36,12 +36,12 @@ export function calculateClassEarnings(player: IPlayer, work: ClassWork): WorkSt
return {
money: cost,
reputation: 0,
hackExp: hackExp * player.hacking_exp_mult * BitNodeMultipliers.ClassGymExpGain,
strExp: strExp * player.strength_exp_mult * BitNodeMultipliers.ClassGymExpGain,
defExp: defExp * player.defense_exp_mult * BitNodeMultipliers.ClassGymExpGain,
dexExp: dexExp * player.dexterity_exp_mult * BitNodeMultipliers.ClassGymExpGain,
agiExp: agiExp * player.agility_exp_mult * BitNodeMultipliers.ClassGymExpGain,
chaExp: chaExp * player.charisma_exp_mult * BitNodeMultipliers.ClassGymExpGain,
hackExp: hackExp * player.mults.hacking_exp * BitNodeMultipliers.ClassGymExpGain,
strExp: strExp * player.mults.strength_exp * BitNodeMultipliers.ClassGymExpGain,
defExp: defExp * player.mults.defense_exp * BitNodeMultipliers.ClassGymExpGain,
dexExp: dexExp * player.mults.dexterity_exp * BitNodeMultipliers.ClassGymExpGain,
agiExp: agiExp * player.mults.agility_exp * BitNodeMultipliers.ClassGymExpGain,
chaExp: chaExp * player.mults.charisma_exp * BitNodeMultipliers.ClassGymExpGain,
intExp: 0,
};
}

@ -42,45 +42,45 @@ export const calculateCompanyWorkStats = (player: IPlayer, company: Company): Wo
focusBonus *
companyPosition.baseSalary *
company.salaryMultiplier *
player.work_money_mult *
player.mults.work_money *
BitNodeMultipliers.CompanyWorkMoney *
bn11Mult,
reputation: focusBonus * jobPerformance * player.company_rep_mult * favorMult,
reputation: focusBonus * jobPerformance * player.mults.company_rep * favorMult,
hackExp:
focusBonus *
companyPosition.hackingExpGain *
company.expMultiplier *
player.hacking_exp_mult *
player.mults.hacking_exp *
BitNodeMultipliers.CompanyWorkExpGain,
strExp:
focusBonus *
companyPosition.strengthExpGain *
company.expMultiplier *
player.strength_exp_mult *
player.mults.strength_exp *
BitNodeMultipliers.CompanyWorkExpGain,
defExp:
focusBonus *
companyPosition.defenseExpGain *
company.expMultiplier *
player.defense_exp_mult *
player.mults.defense_exp *
BitNodeMultipliers.CompanyWorkExpGain,
dexExp:
focusBonus *
companyPosition.dexterityExpGain *
company.expMultiplier *
player.dexterity_exp_mult *
player.mults.dexterity_exp *
BitNodeMultipliers.CompanyWorkExpGain,
agiExp:
focusBonus *
companyPosition.agilityExpGain *
company.expMultiplier *
player.agility_exp_mult *
player.mults.agility_exp *
BitNodeMultipliers.CompanyWorkExpGain,
chaExp:
focusBonus *
companyPosition.charismaExpGain *
company.expMultiplier *
player.charisma_exp_mult *
player.mults.charisma_exp *
BitNodeMultipliers.CompanyWorkExpGain,
intExp: 0,
};

@ -36,17 +36,17 @@ export function calculateFactionExp(player: IPlayer, tpe: FactionWorkType): Work
money: 0,
reputation: 0,
hackExp:
(focusBonus * (baseStats.hackExp * player.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
(focusBonus * (baseStats.hackExp * player.mults.hacking_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
strExp:
(focusBonus * (baseStats.strExp * player.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
(focusBonus * (baseStats.strExp * player.mults.strength_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
defExp:
(focusBonus * (baseStats.defExp * player.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
(focusBonus * (baseStats.defExp * player.mults.defense_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
dexExp:
(focusBonus * (baseStats.dexExp * player.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
(focusBonus * (baseStats.dexExp * player.mults.dexterity_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
agiExp:
(focusBonus * (baseStats.agiExp * player.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
(focusBonus * (baseStats.agiExp * player.mults.agility_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
chaExp:
(focusBonus * (baseStats.chaExp * player.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
(focusBonus * (baseStats.chaExp * player.mults.charisma_exp * BitNodeMultipliers.FactionWorkExpGain)) / gameCPS,
intExp: 0,
};
}

@ -377,21 +377,21 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Hacking Chance",
value: player.hacking_chance_mult,
value: player.mults.hacking_chance,
},
{
mult: "Hacking Speed",
value: player.hacking_speed_mult,
value: player.mults.hacking_speed,
},
{
mult: "Hacking Money",
value: player.hacking_money_mult,
effValue: player.hacking_money_mult * BitNodeMultipliers.ScriptHackMoney,
value: player.mults.hacking_money,
effValue: player.mults.hacking_money * BitNodeMultipliers.ScriptHackMoney,
},
{
mult: "Hacking Growth",
value: player.hacking_grow_mult,
effValue: player.hacking_grow_mult * BitNodeMultipliers.ServerGrowthRate,
value: player.mults.hacking_grow,
effValue: player.mults.hacking_grow * BitNodeMultipliers.ServerGrowthRate,
},
]}
color={Settings.theme.hack}
@ -400,13 +400,13 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Hacking Level",
value: player.hacking_mult,
effValue: player.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier,
value: player.mults.hacking,
effValue: player.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier,
},
{
mult: "Hacking Experience",
value: player.hacking_exp_mult,
effValue: player.hacking_exp_mult * BitNodeMultipliers.HackExpGain,
value: player.mults.hacking_exp,
effValue: player.mults.hacking_exp * BitNodeMultipliers.HackExpGain,
},
]}
color={Settings.theme.hack}
@ -415,12 +415,12 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Strength Level",
value: player.strength_mult,
effValue: player.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier,
value: player.mults.strength,
effValue: player.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier,
},
{
mult: "Strength Experience",
value: player.strength_exp_mult,
value: player.mults.strength_exp,
},
]}
color={Settings.theme.combat}
@ -429,12 +429,12 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Defense Level",
value: player.defense_mult,
effValue: player.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier,
value: player.mults.defense,
effValue: player.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier,
},
{
mult: "Defense Experience",
value: player.defense_exp_mult,
value: player.mults.defense_exp,
},
]}
color={Settings.theme.combat}
@ -443,12 +443,12 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Dexterity Level",
value: player.dexterity_mult,
effValue: player.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,
value: player.mults.dexterity,
effValue: player.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier,
},
{
mult: "Dexterity Experience",
value: player.dexterity_exp_mult,
value: player.mults.dexterity_exp,
},
]}
color={Settings.theme.combat}
@ -457,12 +457,12 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Agility Level",
value: player.agility_mult,
effValue: player.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier,
value: player.mults.agility,
effValue: player.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier,
},
{
mult: "Agility Experience",
value: player.agility_exp_mult,
value: player.mults.agility_exp,
},
]}
color={Settings.theme.combat}
@ -471,12 +471,12 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Charisma Level",
value: player.charisma_mult,
effValue: player.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier,
value: player.mults.charisma,
effValue: player.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier,
},
{
mult: "Charisma Experience",
value: player.charisma_exp_mult,
value: player.mults.charisma_exp,
},
]}
color={Settings.theme.cha}
@ -489,24 +489,24 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Hacknet Node Production",
value: player.hacknet_node_money_mult,
effValue: player.hacknet_node_money_mult * BitNodeMultipliers.HacknetNodeMoney,
value: player.mults.hacknet_node_money,
effValue: player.mults.hacknet_node_money * BitNodeMultipliers.HacknetNodeMoney,
},
{
mult: "Hacknet Node Purchase Cost",
value: player.hacknet_node_purchase_cost_mult,
value: player.mults.hacknet_node_purchase_cost,
},
{
mult: "Hacknet Node RAM Upgrade Cost",
value: player.hacknet_node_ram_cost_mult,
value: player.mults.hacknet_node_ram_cost,
},
{
mult: "Hacknet Node Core Purchase Cost",
value: player.hacknet_node_core_cost_mult,
value: player.mults.hacknet_node_core_cost,
},
{
mult: "Hacknet Node Level Upgrade Cost",
value: player.hacknet_node_level_cost_mult,
value: player.mults.hacknet_node_level_cost,
},
]}
color={Settings.theme.primary}
@ -515,19 +515,19 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Company Reputation Gain",
value: player.company_rep_mult,
value: player.mults.company_rep,
color: Settings.theme.rep,
},
{
mult: "Faction Reputation Gain",
value: player.faction_rep_mult,
effValue: player.faction_rep_mult * BitNodeMultipliers.FactionWorkRepGain,
value: player.mults.faction_rep,
effValue: player.mults.faction_rep * BitNodeMultipliers.FactionWorkRepGain,
color: Settings.theme.rep,
},
{
mult: "Salary",
value: player.work_money_mult,
effValue: player.work_money_mult * BitNodeMultipliers.CompanyWorkMoney,
value: player.mults.work_money,
effValue: player.mults.work_money * BitNodeMultipliers.CompanyWorkMoney,
color: Settings.theme.money,
},
]}
@ -537,12 +537,12 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Crime Success Chance",
value: player.crime_success_mult,
value: player.mults.crime_success,
},
{
mult: "Crime Money",
value: player.crime_money_mult,
effValue: player.crime_money_mult * BitNodeMultipliers.CrimeMoney,
value: player.mults.crime_money,
effValue: player.mults.crime_money * BitNodeMultipliers.CrimeMoney,
color: Settings.theme.money,
},
]}
@ -553,19 +553,19 @@ export function CharacterStats(): React.ReactElement {
rows={[
{
mult: "Bladeburner Success Chance",
value: player.bladeburner_success_chance_mult,
value: player.mults.bladeburner_success_chance,
},
{
mult: "Bladeburner Max Stamina",
value: player.bladeburner_max_stamina_mult,
value: player.mults.bladeburner_max_stamina,
},
{
mult: "Bladeburner Stamina Gain",
value: player.bladeburner_stamina_gain_mult,
value: player.mults.bladeburner_stamina_gain,
},
{
mult: "Bladeburner Field Analysis",
value: player.bladeburner_analysis_mult,
value: player.mults.bladeburner_analysis,
},
]}
color={Settings.theme.primary}

@ -293,27 +293,27 @@ export function CharacterOverview({ save, killScripts }: IProps): React.ReactEle
const hackingProgress = player.calculateSkillProgress(
player.hacking_exp,
player.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier,
player.mults.hacking * BitNodeMultipliers.HackingLevelMultiplier,
);
const strengthProgress = player.calculateSkillProgress(
player.strength_exp,
player.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier,
player.mults.strength * BitNodeMultipliers.StrengthLevelMultiplier,
);
const defenseProgress = player.calculateSkillProgress(
player.defense_exp,
player.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier,
player.mults.defense * BitNodeMultipliers.DefenseLevelMultiplier,
);
const dexterityProgress = player.calculateSkillProgress(
player.dexterity_exp,
player.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,
player.mults.dexterity * BitNodeMultipliers.DexterityLevelMultiplier,
);
const agilityProgress = player.calculateSkillProgress(
player.agility_exp,
player.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier,
player.mults.agility * BitNodeMultipliers.AgilityLevelMultiplier,
);
const charismaProgress = player.calculateSkillProgress(
player.charisma_exp,
player.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier,
player.mults.charisma * BitNodeMultipliers.CharismaLevelMultiplier,
);
return (