diff --git a/src/Augmentation/Augmentation.tsx b/src/Augmentation/Augmentation.tsx index 53a950809..d685028e0 100644 --- a/src/Augmentation/Augmentation.tsx +++ b/src/Augmentation/Augmentation.tsx @@ -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, 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, 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} -
+{f(mults.hacking_mult - 1)} all skills +
+{f(mults.hacking - 1)} all skills ); } else { - if (mults.hacking_mult) + if (mults.hacking !== 1) desc = ( <> {desc} -
+{f(mults.hacking_mult - 1)} hacking skill +
+{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} -
+{f(mults.strength_mult - 1)} combat skills +
+{f(mults.strength - 1)} combat skills ); } else { - if (mults.strength_mult) + if (mults.strength !== 1) desc = ( <> {desc} -
+{f(mults.strength_mult - 1)} strength skill +
+{f(mults.strength - 1)} strength skill ); - if (mults.defense_mult) + if (mults.defense !== 1) desc = ( <> {desc} -
+{f(mults.defense_mult - 1)} defense skill +
+{f(mults.defense - 1)} defense skill ); - if (mults.dexterity_mult) + if (mults.dexterity !== 1) desc = ( <> {desc} -
+{f(mults.dexterity_mult - 1)} dexterity skill +
+{f(mults.dexterity - 1)} dexterity skill ); - if (mults.agility_mult) + if (mults.agility !== 1) desc = ( <> {desc} -
+{f(mults.agility_mult - 1)} agility skill +
+{f(mults.agility - 1)} agility skill ); } - if (mults.charisma_mult) + if (mults.charisma !== 1) desc = ( <> {desc} -
+{f(mults.charisma_mult - 1)} charisma skill +
+{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} -
+{f(mults.hacking_exp_mult - 1)} exp for all skills +
+{f(mults.hacking_exp - 1)} exp for all skills ); } else { - if (mults.hacking_exp_mult) + if (mults.hacking_exp !== 1) desc = ( <> {desc} -
+{f(mults.hacking_exp_mult - 1)} hacking exp +
+{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} -
+{f(mults.strength_exp_mult - 1)} combat exp +
+{f(mults.strength_exp - 1)} combat exp ); } else { - if (mults.strength_exp_mult) + if (mults.strength_exp !== 1) desc = ( <> {desc} -
+{f(mults.strength_exp_mult - 1)} strength exp +
+{f(mults.strength_exp - 1)} strength exp ); - if (mults.defense_exp_mult) + if (mults.defense_exp !== 1) desc = ( <> {desc} -
+{f(mults.defense_exp_mult - 1)} defense exp +
+{f(mults.defense_exp - 1)} defense exp ); - if (mults.dexterity_exp_mult) + if (mults.dexterity_exp !== 1) desc = ( <> {desc} -
+{f(mults.dexterity_exp_mult - 1)} dexterity exp +
+{f(mults.dexterity_exp - 1)} dexterity exp ); - if (mults.agility_exp_mult) + if (mults.agility_exp !== 1) desc = ( <> {desc} -
+{f(mults.agility_exp_mult - 1)} agility exp +
+{f(mults.agility_exp - 1)} agility exp ); } - if (mults.charisma_exp_mult) + if (mults.charisma_exp !== 1) desc = ( <> {desc} -
+{f(mults.charisma_exp_mult - 1)} charisma exp +
+{f(mults.charisma_exp - 1)} charisma exp ); } - if (mults.hacking_speed_mult) + if (mults.hacking_speed !== 1) desc = ( <> {desc} -
+{f(mults.hacking_speed_mult - 1)} faster hack(), grow(), and weaken() +
+{f(mults.hacking_speed - 1)} faster hack(), grow(), and weaken() ); - if (mults.hacking_chance_mult) + if (mults.hacking_chance !== 1) desc = ( <> {desc} -
+{f(mults.hacking_chance_mult - 1)} hack() success chance +
+{f(mults.hacking_chance - 1)} hack() success chance ); - if (mults.hacking_money_mult) + if (mults.hacking_money !== 1) desc = ( <> {desc} -
+{f(mults.hacking_money_mult - 1)} hack() power +
+{f(mults.hacking_money - 1)} hack() power ); - if (mults.hacking_grow_mult) + if (mults.hacking_grow !== 1) desc = ( <> {desc} -
+{f(mults.hacking_grow_mult - 1)} grow() power +
+{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} -
+{f(mults.faction_rep_mult - 1)} reputation from factions and companies +
+{f(mults.faction_rep - 1)} reputation from factions and companies ); } else { - if (mults.faction_rep_mult) + if (mults.faction_rep !== 1) desc = ( <> {desc} -
+{f(mults.faction_rep_mult - 1)} reputation from factions +
+{f(mults.faction_rep - 1)} reputation from factions ); - if (mults.company_rep_mult) + if (mults.company_rep !== 1) desc = ( <> {desc} -
+{f(mults.company_rep_mult - 1)} reputation from companies +
+{f(mults.company_rep - 1)} reputation from companies ); } - if (mults.crime_money_mult) + if (mults.crime_money !== 1) desc = ( <> {desc} -
+{f(mults.crime_money_mult - 1)} crime money +
+{f(mults.crime_money - 1)} crime money ); - if (mults.crime_success_mult) + if (mults.crime_success !== 1) desc = ( <> {desc} -
+{f(mults.crime_success_mult - 1)} crime success rate +
+{f(mults.crime_success - 1)} crime success rate ); - if (mults.work_money_mult) + if (mults.work_money !== 1) desc = ( <> {desc} -
+{f(mults.work_money_mult - 1)} work money +
+{f(mults.work_money - 1)} work money ); - if (mults.hacknet_node_money_mult) + if (mults.hacknet_node_money !== 1) desc = ( <> {desc} -
+{f(mults.hacknet_node_money_mult - 1)} hacknet production +
+{f(mults.hacknet_node_money - 1)} hacknet production ); - if (mults.hacknet_node_purchase_cost_mult) + if (mults.hacknet_node_purchase_cost !== 1) desc = ( <> {desc} -
-{f(-(mults.hacknet_node_purchase_cost_mult - 1))} hacknet nodes cost +
-{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} -
-{f(-(mults.hacknet_node_level_cost_mult - 1))} hacknet nodes upgrade cost +
-{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} -
+{f(mults.bladeburner_max_stamina_mult - 1)} Bladeburner Max Stamina +
+{f(mults.bladeburner_max_stamina - 1)} Bladeburner Max Stamina ); - if (mults.bladeburner_stamina_gain_mult) + if (mults.bladeburner_stamina_gain !== 1) desc = ( <> {desc} -
+{f(mults.bladeburner_stamina_gain_mult - 1)} Bladeburner Stamina gain +
+{f(mults.bladeburner_stamina_gain - 1)} Bladeburner Stamina gain ); - if (mults.bladeburner_analysis_mult) + if (mults.bladeburner_analysis !== 1) desc = ( <> {desc} -
+{f(mults.bladeburner_analysis_mult - 1)} Bladeburner Field Analysis effectiveness +
+{f(mults.bladeburner_analysis - 1)} Bladeburner Field Analysis effectiveness ); - if (mults.bladeburner_success_chance_mult) + if (mults.bladeburner_success_chance !== 1) desc = ( <> {desc} -
+{f(mults.bladeburner_success_chance_mult - 1)} Bladeburner Contracts and Operations success chance +
+{f(mults.bladeburner_success_chance - 1)} Bladeburner Contracts and Operations success chance ); - if (mults.infiltration_base_rep_increase) - desc = ( - <> - {desc} -
+{f(mults.infiltration_base_rep_increase - 1)} Infiltration {FactionNames.ShadowsOfAnarchy} Reputation - base reward - - ); - if (mults.infiltration_rep_mult) - desc = ( - <> - {desc} -
+{f(mults.infiltration_rep_mult - 1)} Infiltration {FactionNames.ShadowsOfAnarchy} Reputation reward - - ); - if (mults.infiltration_trade_mult) - desc = ( - <> - {desc} -
+{f(mults.infiltration_trade_mult - 1)} Infiltration Reputation for trading information - - ); - if (mults.infiltration_sell_mult) - desc = ( - <> - {desc} -
+{f(mults.infiltration_sell_mult - 1)} Infiltration cash reward for selling information - - ); - if (mults.infiltration_timer_mult) - desc = ( - <> - {desc} -
+{f(mults.infiltration_timer_mult - 1)} Infiltration time per minigame - - ); - if (mults.infiltration_damage_reduction_mult) - desc = ( - <> - {desc} -
- {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 = {}; + 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) diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 2b0b51093..23d67a389 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -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) { diff --git a/src/Augmentation/data/AugmentationCreator.tsx b/src/Augmentation/data/AugmentationCreator.tsx index e3faedc5b..3fa2c98df 100644 --- a/src/Augmentation/data/AugmentationCreator.tsx +++ b/src/Augmentation/data/AugmentationCreator.tsx @@ -11,10 +11,10 @@ function getRandomBonus(): any { const bonuses = [ { bonuses: { - hacking_chance_mult: 1.25, - hacking_speed_mult: 1.1, - hacking_money_mult: 1.25, - hacking_grow_mult: 1.1, + hacking_chance: 1.25, + hacking_speed: 1.1, + hacking_money: 1.25, + hacking_grow: 1.1, }, description: "Increases the player's hacking chance by 25%.
" + @@ -24,8 +24,8 @@ function getRandomBonus(): any { }, { bonuses: { - hacking_mult: 1.15, - hacking_exp_mult: 2, + hacking: 1.15, + hacking_exp: 2, }, description: "Increases the player's hacking skill by 15%.
" + @@ -33,14 +33,14 @@ function getRandomBonus(): any { }, { bonuses: { - strength_mult: 1.25, - strength_exp_mult: 2, - defense_mult: 1.25, - defense_exp_mult: 2, - dexterity_mult: 1.25, - dexterity_exp_mult: 2, - agility_mult: 1.25, - agility_exp_mult: 2, + strength: 1.25, + strength_exp: 2, + defense: 1.25, + defense_exp: 2, + dexterity: 1.25, + dexterity_exp: 2, + agility: 1.25, + agility_exp: 2, }, description: "Increases all of the player's combat stats by 25%.
" + @@ -48,8 +48,8 @@ function getRandomBonus(): any { }, { bonuses: { - charisma_mult: 1.5, - charisma_exp_mult: 2, + charisma: 1.5, + charisma_exp: 2, }, description: "This augmentation increases the player's charisma by 50%.
" + @@ -57,11 +57,11 @@ function getRandomBonus(): any { }, { bonuses: { - hacknet_node_money_mult: 1.2, - hacknet_node_purchase_cost_mult: 0.85, - hacknet_node_ram_cost_mult: 0.85, - hacknet_node_core_cost_mult: 0.85, - hacknet_node_level_cost_mult: 0.85, + hacknet_node_money: 1.2, + hacknet_node_purchase_cost: 0.85, + hacknet_node_ram_cost: 0.85, + hacknet_node_core_cost: 0.85, + hacknet_node_level_cost: 0.85, }, description: "Increases the amount of money produced by Hacknet Nodes by 20%.
" + @@ -69,9 +69,9 @@ function getRandomBonus(): any { }, { bonuses: { - company_rep_mult: 1.25, - faction_rep_mult: 1.15, - work_money_mult: 1.7, + company_rep: 1.25, + faction_rep: 1.15, + work_money: 1.7, }, description: "Increases the amount of money the player gains from working by 70%.
" + @@ -80,8 +80,8 @@ function getRandomBonus(): any { }, { bonuses: { - crime_success_mult: 2, - crime_money_mult: 2, + crime_success: 2, + crime_money: 2, }, description: "Increases the player's crime success rate by 100%.
" + @@ -203,10 +203,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ moneyCost: 4.5e7, repCost: 1e4, info: "A heart implant that greatly increases the body's ability to effectively use and pump blood.", - strength_mult: 1.08, - defense_mult: 1.08, - agility_mult: 1.08, - dexterity_mult: 1.08, + strength: 1.08, + defense: 1.08, + agility: 1.08, + dexterity: 1.08, factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate], }), new Augmentation({ @@ -216,7 +216,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates " + "and enhances balance and hand-eye coordination.", - dexterity_mult: 1.1, + dexterity: 1.1, factions: [ FactionNames.SlumSnakes, FactionNames.TheDarkArmy, @@ -236,7 +236,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "This upgraded version of the 'Augmented Targeting' implant is capable of augmenting " + "reality by digitally displaying weaknesses and vital signs of threats.", prereqs: [AugmentationNames.Targeting1], - dexterity_mult: 1.2, + dexterity: 1.2, factions: [ FactionNames.TheDarkArmy, FactionNames.TheSyndicate, @@ -252,7 +252,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 2.75e4, info: "The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.", prereqs: [AugmentationNames.Targeting2, AugmentationNames.Targeting1], - dexterity_mult: 1.3, + dexterity: 1.3, factions: [ FactionNames.TheDarkArmy, FactionNames.TheSyndicate, @@ -269,8 +269,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood " + "more efficiently than an organic heart.", - agility_mult: 1.5, - strength_mult: 1.5, + agility: 1.5, + strength: 1.5, factions: [ FactionNames.KuaiGongInternational, FactionNames.FulcrumSecretTechnologies, @@ -289,8 +289,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The myofibrils in human muscles are injected with special chemicals that react with the proteins inside " + "the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. " + "Scientists have named these artificially enhanced units 'synfibrils'.", - strength_mult: 1.3, - defense_mult: 1.3, + strength: 1.3, + defense: 1.3, factions: [ FactionNames.KuaiGongInternational, FactionNames.FulcrumSecretTechnologies, @@ -309,8 +309,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "The rib cage is augmented to continuously release boosters into the bloodstream " + "which increase the oxygen-carrying capacity of blood.", - strength_mult: 1.1, - defense_mult: 1.1, + strength: 1.1, + defense: 1.1, factions: [ FactionNames.SlumSnakes, FactionNames.TheDarkArmy, @@ -330,8 +330,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which " + "improve focus and endurance while decreasing reaction time and fatigue.", prereqs: [AugmentationNames.CombatRib1], - strength_mult: 1.14, - defense_mult: 1.14, + strength: 1.14, + defense: 1.14, factions: [ FactionNames.TheDarkArmy, FactionNames.TheSyndicate, @@ -349,8 +349,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that " + "improve muscle mass and physical performance while being safe and free of side effects.", prereqs: [AugmentationNames.CombatRib2, AugmentationNames.CombatRib1], - strength_mult: 1.18, - defense_mult: 1.18, + strength: 1.18, + defense: 1.18, factions: [ FactionNames.TheDarkArmy, FactionNames.TheSyndicate, @@ -367,8 +367,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, " + "which improves its regenerative and extracellular homeostasis abilities.", - strength_mult: 1.2, - defense_mult: 1.2, + strength: 1.2, + defense: 1.2, factions: [ FactionNames.TheDarkArmy, FactionNames.TheSyndicate, @@ -389,7 +389,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective " + "at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to " + "mitigate damage from any fire or electrical traumas.", - defense_mult: 2.2, + defense: 2.2, factions: [ FactionNames.TheSyndicate, FactionNames.FulcrumSecretTechnologies, @@ -405,8 +405,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, " + "supercharging the spread of neural signals and increasing reflex speed.", - agility_mult: 1.05, - dexterity_mult: 1.05, + agility: 1.05, + dexterity: 1.05, factions: [ FactionNames.TianDiHui, FactionNames.SlumSnakes, @@ -424,8 +424,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 1.125e6, moneyCost: 4.25e9, info: "Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.", - strength_mult: 1.7, - defense_mult: 1.7, + strength: 1.7, + defense: 1.7, factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.TheCovenant], }), new Augmentation({ @@ -437,10 +437,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "It is now capable of stimulating and regulating neural signals " + "passing through the spinal cord, improving senses and reaction speed. " + "The 'Bionic Spine' also interfaces with all other 'Bionic' implants.", - strength_mult: 1.15, - defense_mult: 1.15, - agility_mult: 1.15, - dexterity_mult: 1.15, + strength: 1.15, + defense: 1.15, + agility: 1.15, + dexterity: 1.15, factions: [ FactionNames.SpeakersForTheDead, FactionNames.TheSyndicate, @@ -457,10 +457,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene " + "which enhances durability and supercharges all body functions.", prereqs: [AugmentationNames.BionicSpine], - strength_mult: 1.6, - defense_mult: 1.6, - agility_mult: 1.6, - dexterity_mult: 1.6, + strength: 1.6, + defense: 1.6, + agility: 1.6, + dexterity: 1.6, factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp], }), new Augmentation({ @@ -468,7 +468,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 1.5e5, moneyCost: 3.75e8, info: "Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.", - agility_mult: 1.6, + agility: 1.6, factions: [ FactionNames.SpeakersForTheDead, FactionNames.TheSyndicate, @@ -485,7 +485,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "An upgrade to the 'Bionic Legs' augmentation. The legs are fused " + "with graphene, greatly enhancing jumping ability.", prereqs: [AugmentationNames.BionicLegs], - agility_mult: 2.5, + agility: 2.5, factions: [FactionNames.MegaCorp, FactionNames.ECorp, FactionNames.FulcrumSecretTechnologies], }), new Augmentation({ @@ -496,7 +496,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A cochlear implant with an embedded computer that analyzes incoming speech. " + "The embedded computer processes characteristics of incoming speech, such as tone " + "and inflection, to pick up on subtle cues and aid in social interactions.", - charisma_mult: 1.2, + charisma: 1.2, factions: [ FactionNames.TianDiHui, FactionNames.Chongqing, @@ -516,8 +516,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "TITN is a series of viruses that targets and alters the sequences of human DNA in genes that " + "control personality. The TITN-41 strain alters these genes so that the subject becomes more " + "outgoing and sociable.", - charisma_mult: 1.15, - charisma_exp_mult: 1.15, + charisma: 1.15, + charisma_exp: 1.15, factions: [FactionNames.Silhouette], }), new Augmentation({ @@ -530,8 +530,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "language, voice tone, and inflection to determine the best course of action during social " + "situations. The implant also uses deep learning software to continuously learn new behavior " + "patterns and how to best respond.", - charisma_mult: 1.6, - charisma_exp_mult: 1.6, + charisma: 1.6, + charisma_exp: 1.6, factions: [ FactionNames.BachmanAssociates, FactionNames.NWO, @@ -547,7 +547,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing " + "capabilities.", - hacking_mult: 1.05, + hacking: 1.05, factions: [FactionNames.CyberSec, FactionNames.NiteSec], }), new Augmentation({ @@ -560,9 +560,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "nanoprocessor acting similar to the way a neuron would in a neural network. However, these " + "nanoprocessors are programmed to perform computations much faster than organic neurons, " + "allowing the user to solve much more complex problems at a much faster rate.", - hacking_speed_mult: 1.03, - hacking_money_mult: 1.15, - hacking_mult: 1.12, + hacking_speed: 1.03, + hacking_money: 1.15, + hacking: 1.12, factions: [FactionNames.BitRunners, FactionNames.FulcrumSecretTechnologies], }), new Augmentation({ @@ -572,9 +572,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "The body is injected with a chemical that artificially induces synaptic potentiation, " + "otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.", - hacking_speed_mult: 1.02, - hacking_chance_mult: 1.05, - hacking_exp_mult: 1.05, + hacking_speed: 1.02, + hacking_chance: 1.05, + hacking_exp: 1.05, factions: [FactionNames.TheBlackHand, FactionNames.NiteSec], }), new Augmentation({ @@ -586,9 +586,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "This process results in the proliferation of new, synthetic myelin sheaths in the nervous " + "system. These myelin sheaths can propogate neuro-signals much faster than their organic " + "counterparts, leading to greater processing speeds and better brain function.", - hacking_speed_mult: 1.03, - hacking_exp_mult: 1.1, - hacking_mult: 1.08, + hacking_speed: 1.03, + hacking_exp: 1.1, + hacking: 1.08, factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.BitRunners, FactionNames.TheBlackHand], }), new Augmentation({ @@ -598,7 +598,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A small cranial implant that continuously uses weak electrical signals to stimulate the brain and " + "induce stronger synaptic activity. This improves the user's cognitive abilities.", - hacking_speed_mult: 1.03, + hacking_speed: 1.03, factions: [FactionNames.CyberSec, FactionNames.Aevum], }), new Augmentation({ @@ -608,7 +608,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "Chemical injections are used to permanently alter and strengthen the brain's neuronal " + "circuits, strengthening the ability to retain information.", - hacking_exp_mult: 1.25, + hacking_exp: 1.25, factions: [FactionNames.NiteSec], }), new Augmentation({ @@ -619,7 +619,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A brain implant that provides an interface for direct, wireless communication between a computer's main " + "memory and the mind. This implant allows the user to not only access a computer's memory, but also alter " + "and delete it.", - hacking_money_mult: 1.25, + hacking_money: 1.25, factions: [ FactionNames.BitRunners, FactionNames.TheBlackHand, @@ -638,7 +638,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "processing all of the traffic on that network. By itself, the Embedded Netburner Module does " + "not do much, but a variety of very powerful upgrades can be installed that allow you to fully " + "control the traffic on a network.", - hacking_mult: 1.08, + hacking: 1.08, factions: [ FactionNames.BitRunners, FactionNames.TheBlackHand, @@ -658,11 +658,11 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. " + "This upgrade allows the Embedded Netburner Module to generate its own data on a network.", prereqs: [AugmentationNames.ENM], - hacking_speed_mult: 1.03, - hacking_money_mult: 1.1, - hacking_chance_mult: 1.03, - hacking_exp_mult: 1.07, - hacking_mult: 1.07, + hacking_speed: 1.03, + hacking_money: 1.1, + hacking_chance: 1.03, + hacking_exp: 1.07, + hacking: 1.07, factions: [ FactionNames.BitRunners, FactionNames.TheBlackHand, @@ -683,11 +683,11 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "a network by re-routing traffic, spoofing IP addresses, and altering the data inside network " + "packets.", prereqs: [AugmentationNames.ENMCore, AugmentationNames.ENM], - hacking_speed_mult: 1.05, - hacking_money_mult: 1.3, - hacking_chance_mult: 1.05, - hacking_exp_mult: 1.15, - hacking_mult: 1.08, + hacking_speed: 1.05, + hacking_money: 1.3, + hacking_chance: 1.05, + hacking_exp: 1.15, + hacking: 1.08, factions: [ FactionNames.BitRunners, FactionNames.ECorp, @@ -708,11 +708,11 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into " + "any device on a network.", prereqs: [AugmentationNames.ENMCoreV2, AugmentationNames.ENMCore, AugmentationNames.ENM], - hacking_speed_mult: 1.05, - hacking_money_mult: 1.4, - hacking_chance_mult: 1.1, - hacking_exp_mult: 1.25, - hacking_mult: 1.1, + hacking_speed: 1.05, + hacking_money: 1.4, + hacking_chance: 1.1, + hacking_exp: 1.25, + hacking: 1.1, factions: [ FactionNames.ECorp, FactionNames.MegaCorp, @@ -731,7 +731,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster " + "that vastly outperforms the Netburner Module's native single-core processor.", prereqs: [AugmentationNames.ENM], - hacking_speed_mult: 1.1, + hacking_speed: 1.1, factions: [ FactionNames.ECorp, FactionNames.MegaCorp, @@ -751,8 +751,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Embedded Netburner Module. This allows the Module to send and receive data " + "directly to and from the main memory of devices on a network.", prereqs: [AugmentationNames.ENM], - hacking_money_mult: 1.4, - hacking_chance_mult: 1.2, + hacking_money: 1.4, + hacking_chance: 1.2, factions: [ FactionNames.ECorp, FactionNames.MegaCorp, @@ -770,9 +770,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A cranial implant that intelligently stimulates certain areas of the brain " + "in order to improve cognitive functions.", - hacking_speed_mult: 1.02, - hacking_chance_mult: 1.1, - hacking_exp_mult: 1.12, + hacking_speed: 1.02, + hacking_chance: 1.1, + hacking_exp: 1.12, factions: [ FactionNames.TheBlackHand, FactionNames.Chongqing, @@ -793,9 +793,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A microprocessor that accelerates the processing " + "speed of biological neural networks. This is a cranial implant that is embedded inside the brain.", - hacking_mult: 1.1, - hacking_exp_mult: 1.15, - hacking_money_mult: 1.2, + hacking: 1.1, + hacking_exp: 1.15, + hacking_money: 1.2, factions: [FactionNames.BitRunners], }), new Augmentation({ @@ -807,8 +807,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "are a set of specialized microprocessors that are attached to " + "neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations " + "so that the brain doesn't have to.", - hacking_speed_mult: 1.01, - hacking_mult: 1.05, + hacking_speed: 1.01, + hacking: 1.05, factions: [FactionNames.CyberSec, FactionNames.NiteSec], }), new Augmentation({ @@ -821,9 +821,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations " + "so that the brain doesn't have to.", prereqs: [AugmentationNames.CranialSignalProcessorsG1], - hacking_speed_mult: 1.02, - hacking_chance_mult: 1.05, - hacking_mult: 1.07, + hacking_speed: 1.02, + hacking_chance: 1.05, + hacking: 1.07, factions: [FactionNames.CyberSec, FactionNames.NiteSec], }), new Augmentation({ @@ -836,9 +836,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations " + "so that the brain doesn't have to.", prereqs: [AugmentationNames.CranialSignalProcessorsG2, AugmentationNames.CranialSignalProcessorsG1], - hacking_speed_mult: 1.02, - hacking_money_mult: 1.15, - hacking_mult: 1.09, + hacking_speed: 1.02, + hacking_money: 1.15, + hacking: 1.09, factions: [FactionNames.NiteSec, FactionNames.TheBlackHand, FactionNames.BitRunners], }), new Augmentation({ @@ -855,9 +855,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ AugmentationNames.CranialSignalProcessorsG2, AugmentationNames.CranialSignalProcessorsG1, ], - hacking_speed_mult: 1.02, - hacking_money_mult: 1.2, - hacking_grow_mult: 1.25, + hacking_speed: 1.02, + hacking_money: 1.2, + hacking_grow: 1.25, factions: [FactionNames.TheBlackHand, FactionNames.BitRunners], }), new Augmentation({ @@ -875,9 +875,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ AugmentationNames.CranialSignalProcessorsG2, AugmentationNames.CranialSignalProcessorsG1, ], - hacking_mult: 1.3, - hacking_money_mult: 1.25, - hacking_grow_mult: 1.75, + hacking: 1.3, + hacking_money: 1.25, + hacking_grow: 1.75, factions: [FactionNames.BitRunners], }), new Augmentation({ @@ -888,9 +888,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The brain is surgically re-engineered to have increased neuronal density " + "by decreasing the neuron gap junction. Then, the body is genetically modified " + "to enhance the production and capabilities of its neural stem cells.", - hacking_mult: 1.15, - hacking_exp_mult: 1.1, - hacking_speed_mult: 1.03, + hacking: 1.15, + hacking_exp: 1.1, + hacking_speed: 1.03, factions: [FactionNames.ClarkeIncorporated], }), new Augmentation({ @@ -901,7 +901,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "This torso implant automatically injects nootropic supplements into " + "the bloodstream to improve memory, increase focus, and provide other " + "cognitive enhancements.", - company_rep_mult: 1.2, + company_rep: 1.2, factions: [ FactionNames.TianDiHui, FactionNames.Volhaven, @@ -920,8 +920,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "An advanced neural implant that improves your speaking abilities, making " + "you more convincing and likable in conversations and overall improving your " + "social interactions.", - company_rep_mult: 1.1, - charisma_mult: 1.1, + company_rep: 1.1, + charisma: 1.1, factions: [ FactionNames.TianDiHui, FactionNames.SpeakersForTheDead, @@ -936,14 +936,14 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 7.5e4, moneyCost: 9e8, info: "A cranial implant that stops procrastination by blocking specific neural pathways in the brain.", - hacking_exp_mult: 1.05, - strength_exp_mult: 1.05, - defense_exp_mult: 1.05, - dexterity_exp_mult: 1.05, - agility_exp_mult: 1.05, - charisma_exp_mult: 1.05, - company_rep_mult: 1.1, - work_money_mult: 1.2, + hacking_exp: 1.05, + strength_exp: 1.05, + defense_exp: 1.05, + dexterity_exp: 1.05, + agility_exp: 1.05, + charisma_exp: 1.05, + company_rep: 1.1, + work_money: 1.2, factions: [ FactionNames.BachmanAssociates, FactionNames.ClarkeIncorporated, @@ -959,8 +959,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Installs a Direct-Neural Interface jack into your arm that is compatible with most " + "computers. Connecting to a computer through this jack allows you to interface with " + "it using the brain's electrochemical signals.", - company_rep_mult: 1.3, - hacking_mult: 1.08, + company_rep: 1.3, + hacking: 1.08, factions: [ FactionNames.FourSigma, FactionNames.OmniTekIncorporated, @@ -977,8 +977,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "improves the performance of the interface and gives the user more control options " + "to a connected computer.", prereqs: [AugmentationNames.PCDNI], - company_rep_mult: 1.75, - hacking_mult: 1.1, + company_rep: 1.75, + hacking: 1.1, factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp, FactionNames.BladeIndustries], }), new Augmentation({ @@ -991,9 +991,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "the Neural Network upgrade allows the user to use their own brain's " + "processing power to aid the computer in computational tasks.", prereqs: [AugmentationNames.PCDNI], - company_rep_mult: 2, - hacking_mult: 1.1, - hacking_speed_mult: 1.05, + company_rep: 2, + hacking: 1.1, + hacking_speed: 1.05, factions: [FactionNames.FulcrumSecretTechnologies], }), new Augmentation({ @@ -1004,8 +1004,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The body is genetically re-engineered so that it produces the ADR-V1 pheromone, " + "an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, " + "triggers feelings of admiration and approval in other people.", - company_rep_mult: 1.1, - faction_rep_mult: 1.1, + company_rep: 1.1, + faction_rep: 1.1, factions: [ FactionNames.TianDiHui, FactionNames.TheSyndicate, @@ -1022,8 +1022,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The body is genetically re-engineered so that it produces the ADR-V2 pheromone, " + "which is similar to but more potent than ADR-V1. This pheromone, when excreted, " + "triggers feelings of admiration, approval, and respect in others.", - company_rep_mult: 1.2, - faction_rep_mult: 1.2, + company_rep: 1.2, + faction_rep: 1.2, factions: [ FactionNames.Silhouette, FactionNames.FourSigma, @@ -1041,8 +1041,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "criminal organizations and allows the user to project and control holographic " + "simulacrums within a large radius. These simulacrums are commonly used for " + "espionage and surveillance work.", - company_rep_mult: 1.15, - faction_rep_mult: 1.15, + company_rep: 1.15, + faction_rep: 1.15, factions: [FactionNames.TheSyndicate, FactionNames.TheDarkArmy, FactionNames.SpeakersForTheDead], }), new Augmentation({ @@ -1053,8 +1053,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Uploads the architecture and design details of a Hacknet Node's CPU into " + "the brain. This allows the user to engineer custom hardware and software " + "for the Hacknet Node that provides better performance.", - hacknet_node_money_mult: 1.15, - hacknet_node_purchase_cost_mult: 0.85, + hacknet_node_money: 1.15, + hacknet_node_purchase_cost: 0.85, factions: [FactionNames.Netburners], }), new Augmentation({ @@ -1065,8 +1065,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Uploads the architecture and design details of a Hacknet Node's main-memory cache " + "into the brain. This allows the user to engineer custom cache hardware for the " + "Hacknet Node that offers better performance.", - hacknet_node_money_mult: 1.1, - hacknet_node_level_cost_mult: 0.85, + hacknet_node_money: 1.1, + hacknet_node_level_cost: 0.85, factions: [FactionNames.Netburners], }), new Augmentation({ @@ -1077,8 +1077,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) " + "into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that " + "offers better performance.", - hacknet_node_money_mult: 1.1, - hacknet_node_purchase_cost_mult: 0.9, + hacknet_node_money: 1.1, + hacknet_node_purchase_cost: 0.9, factions: [FactionNames.Netburners], }), new Augmentation({ @@ -1089,7 +1089,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a " + "Hacknet Node. This lets the user access and manipulate the Node's kernel using " + "electrochemical signals.", - hacknet_node_money_mult: 1.25, + hacknet_node_money: 1.25, factions: [FactionNames.Netburners], }), new Augmentation({ @@ -1100,7 +1100,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Installs a Direct-Neural Interface jack into the arm that is capable of connecting " + "to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using " + "electrochemical signals.", - hacknet_node_money_mult: 1.45, + hacknet_node_money: 1.45, factions: [FactionNames.Netburners], }), new Augmentation({ @@ -1112,12 +1112,12 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "installed by releasing millions of nanobots into the human brain, each of which " + "attaches to a different neural pathway to enhance the brain's ability to retain " + "and retrieve information.", - hacking_exp_mult: 1.1, - strength_exp_mult: 1.1, - defense_exp_mult: 1.1, - dexterity_exp_mult: 1.1, - agility_exp_mult: 1.1, - charisma_exp_mult: 1.1, + hacking_exp: 1.1, + strength_exp: 1.1, + defense_exp: 1.1, + dexterity_exp: 1.1, + agility_exp: 1.1, + charisma_exp: 1.1, factions: [FactionNames.CyberSec, FactionNames.Aevum], }), new Augmentation({ @@ -1128,12 +1128,12 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A decentralized cranial implant that improves the brain's ability to learn. This " + "is a more powerful version of the Neurotrainer I augmentation, but it does not " + "require Neurotrainer I to be installed as a prerequisite.", - hacking_exp_mult: 1.15, - strength_exp_mult: 1.15, - defense_exp_mult: 1.15, - dexterity_exp_mult: 1.15, - agility_exp_mult: 1.15, - charisma_exp_mult: 1.15, + hacking_exp: 1.15, + strength_exp: 1.15, + defense_exp: 1.15, + dexterity_exp: 1.15, + agility_exp: 1.15, + charisma_exp: 1.15, factions: [FactionNames.BitRunners, FactionNames.NiteSec], }), new Augmentation({ @@ -1144,12 +1144,12 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A decentralized cranial implant that improves the brain's ability to learn. This " + "is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, " + "but it does not require either of them to be installed as a prerequisite.", - hacking_exp_mult: 1.2, - strength_exp_mult: 1.2, - defense_exp_mult: 1.2, - dexterity_exp_mult: 1.2, - agility_exp_mult: 1.2, - charisma_exp_mult: 1.2, + hacking_exp: 1.2, + strength_exp: 1.2, + defense_exp: 1.2, + dexterity_exp: 1.2, + agility_exp: 1.2, + charisma_exp: 1.2, factions: [FactionNames.NWO, FactionNames.FourSigma], }), new Augmentation({ @@ -1160,9 +1160,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A bionic eye implant that grants sight capabilities far beyond those of a natural human. " + "Embedded circuitry within the implant provides the ability to detect heat and movement " + "through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.", - dexterity_mult: 1.4, - hacking_speed_mult: 1.03, - hacking_money_mult: 1.1, + dexterity: 1.4, + hacking_speed: 1.03, + hacking_money: 1.1, factions: [FactionNames.BladeIndustries, FactionNames.KuaiGongInternational], }), new Augmentation({ @@ -1173,8 +1173,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A skin implant that reinforces the skin with highly-advanced synthetic cells. These " + "cells, when powered, have a negative refractive index. As a result, they bend light " + "around the skin, making the user much harder to see with the naked eye.", - agility_mult: 1.05, - crime_money_mult: 1.1, + agility: 1.05, + crime_money: 1.1, factions: [FactionNames.SlumSnakes, FactionNames.Tetrads], }), new Augmentation({ @@ -1187,9 +1187,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "cells, when powered, are capable of not only bending light but also of bending heat, " + "making the user more resilient as well as stealthy.", prereqs: [AugmentationNames.LuminCloaking1], - agility_mult: 1.1, - defense_mult: 1.1, - crime_money_mult: 1.25, + agility: 1.1, + defense: 1.1, + crime_money: 1.25, factions: [FactionNames.SlumSnakes, FactionNames.Tetrads], }), new Augmentation({ @@ -1197,9 +1197,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 2.25e4, moneyCost: 7.5e7, info: "A cochlear implant that helps the player detect and locate enemies using sound propagation.", - dexterity_mult: 1.1, - dexterity_exp_mult: 1.15, - crime_money_mult: 1.25, + dexterity: 1.1, + dexterity_exp: 1.15, + crime_money: 1.25, factions: [FactionNames.SlumSnakes], }), new Augmentation({ @@ -1210,18 +1210,18 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The body's nerves are attached with polypyrrole nanocircuits that " + "are capable of capturing wasted energy, in the form of heat, " + "and converting it back into usable power.", - hacking_mult: 1.05, - strength_mult: 1.05, - defense_mult: 1.05, - dexterity_mult: 1.05, - agility_mult: 1.05, - charisma_mult: 1.05, - hacking_exp_mult: 1.1, - strength_exp_mult: 1.1, - defense_exp_mult: 1.1, - dexterity_exp_mult: 1.1, - agility_exp_mult: 1.1, - charisma_exp_mult: 1.1, + hacking: 1.05, + strength: 1.05, + defense: 1.05, + dexterity: 1.05, + agility: 1.05, + charisma: 1.05, + hacking_exp: 1.1, + strength_exp: 1.1, + defense_exp: 1.1, + dexterity_exp: 1.1, + agility_exp: 1.1, + charisma_exp: 1.1, factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate, FactionNames.NWO], }), new Augmentation({ @@ -1232,10 +1232,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ `A brain implant that wirelessly connects you to the ${FactionNames.Illuminati}'s ` + "quantum supercomputer, allowing you to access and use its incredible " + "computing power.", - hacking_mult: 1.75, - hacking_speed_mult: 2, - hacking_chance_mult: 2.5, - hacking_money_mult: 4, + hacking: 1.75, + hacking_speed: 2, + hacking_chance: 2.5, + hacking_money: 4, factions: [FactionNames.Illuminati], }), new Augmentation({ @@ -1247,11 +1247,11 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "artificially-synthesized gene that was developed by DARPA to create " + "super-soldiers through genetic modification. The gene was outlawed in " + "2056.", - strength_mult: 1.75, - defense_mult: 1.75, - dexterity_mult: 1.75, - agility_mult: 1.75, - hacking_mult: 1.15, + strength: 1.75, + defense: 1.75, + dexterity: 1.75, + agility: 1.75, + hacking: 1.15, factions: [FactionNames.TheCovenant], }), new Augmentation({ @@ -1262,7 +1262,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ `A brain implant developed by ${FactionNames.ECorp}. They do not reveal what ` + "exactly the implant does, but they promise that it will greatly " + "enhance your abilities.", - hacking_grow_mult: 3, + hacking_grow: 3, stats: null, factions: [FactionNames.ECorp], }), @@ -1284,14 +1284,14 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "to hold and sustain hydrogen plasma. The plasma is used to generate " + "fusion power through nuclear fusion, providing limitless amounts of clean " + "energy for the body.", - strength_mult: 1.35, - defense_mult: 1.35, - dexterity_mult: 1.35, - agility_mult: 1.35, - strength_exp_mult: 1.35, - defense_exp_mult: 1.35, - dexterity_exp_mult: 1.35, - agility_exp_mult: 1.35, + strength: 1.35, + defense: 1.35, + dexterity: 1.35, + agility: 1.35, + strength_exp: 1.35, + defense_exp: 1.35, + dexterity_exp: 1.35, + agility_exp: 1.35, factions: [FactionNames.MegaCorp], }), new Augmentation({ @@ -1302,10 +1302,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A bionic jaw that contains advanced hardware and software " + "capable of psychoanalyzing and profiling the personality of " + "others using optical imaging software.", - charisma_mult: 1.5, - charisma_exp_mult: 1.5, - company_rep_mult: 1.25, - faction_rep_mult: 1.25, + charisma: 1.5, + charisma_exp: 1.5, + company_rep: 1.25, + faction_rep: 1.25, factions: [FactionNames.BachmanAssociates], }), new Augmentation({ @@ -1317,8 +1317,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "and integumentary system. The drug permanently modifies the DNA of the " + "body's skin and bone cells, granting them the ability to repair " + "and restructure themselves.", - strength_mult: 1.55, - defense_mult: 1.55, + strength: 1.55, + defense: 1.55, factions: [FactionNames.BladeIndustries], }), new Augmentation({ @@ -1329,18 +1329,18 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A concoction of advanced nanobots that is orally ingested into the " + "body. These nanobots induce physiological changes and significantly " + "improve the body's functioning in all aspects.", - hacking_mult: 1.2, - strength_mult: 1.2, - defense_mult: 1.2, - dexterity_mult: 1.2, - agility_mult: 1.2, - charisma_mult: 1.2, - hacking_exp_mult: 1.15, - strength_exp_mult: 1.15, - defense_exp_mult: 1.15, - dexterity_exp_mult: 1.15, - agility_exp_mult: 1.15, - charisma_exp_mult: 1.15, + hacking: 1.2, + strength: 1.2, + defense: 1.2, + dexterity: 1.2, + agility: 1.2, + charisma: 1.2, + hacking_exp: 1.15, + strength_exp: 1.15, + defense_exp: 1.15, + dexterity_exp: 1.15, + agility_exp: 1.15, + charisma_exp: 1.15, factions: [FactionNames.NWO], }), new Augmentation({ @@ -1353,7 +1353,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Even though it contains no weapons, the advanced tungsten titanium " + "alloy increases the user's strength to unbelievable levels. The augmentation " + "gets more powerful over time for seemingly no reason.", - strength_mult: 2.7, + strength: 2.7, factions: [FactionNames.NWO], }), new Augmentation({ @@ -1364,12 +1364,12 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The body is genetically re-engineered to maintain a state " + "of negligible senescence, preventing the body from " + "deteriorating with age.", - hacking_mult: 1.2, - strength_mult: 1.2, - defense_mult: 1.2, - dexterity_mult: 1.2, - agility_mult: 1.2, - charisma_mult: 1.2, + hacking: 1.2, + strength: 1.2, + defense: 1.2, + dexterity: 1.2, + agility: 1.2, + charisma: 1.2, factions: [FactionNames.ClarkeIncorporated], }), new Augmentation({ @@ -1380,8 +1380,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "OmniTek's data and information repository is uploaded " + "into your brain, enhancing your programming and " + "hacking abilities.", - hacking_mult: 1.2, - hacking_exp_mult: 1.25, + hacking: 1.2, + hacking_exp: 1.25, factions: [FactionNames.OmniTekIncorporated], }), new Augmentation({ @@ -1393,9 +1393,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "to the body using a skin graft. The result is photosynthetic " + "skin cells, allowing users to generate their own energy " + "and nutrition using solar power.", - strength_mult: 1.4, - defense_mult: 1.4, - agility_mult: 1.4, + strength: 1.4, + defense: 1.4, + agility: 1.4, factions: [FactionNames.KuaiGongInternational], }), new Augmentation({ @@ -1406,10 +1406,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A brain implant that provides a high-bandwidth, direct neural link between your " + `mind and the ${FactionNames.BitRunners}' data servers, which reportedly contain ` + "the largest database of hacking tools and information in the world.", - hacking_mult: 1.15, - hacking_exp_mult: 1.2, - hacking_chance_mult: 1.1, - hacking_speed_mult: 1.05, + hacking: 1.15, + hacking_exp: 1.2, + hacking_chance: 1.1, + hacking_speed: 1.05, programs: [Programs.FTPCrackProgram.name, Programs.RelaySMTPProgram.name], factions: [FactionNames.BitRunners], }), @@ -1422,11 +1422,11 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "enhances strength and dexterity but it is also embedded " + "with hardware and firmware that lets the user connect to, access, and hack " + "devices and machines by just touching them.", - strength_mult: 1.15, - dexterity_mult: 1.15, - hacking_mult: 1.1, - hacking_speed_mult: 1.02, - hacking_money_mult: 1.1, + strength: 1.15, + dexterity: 1.15, + hacking: 1.1, + hacking_speed: 1.02, + hacking_money: 1.1, factions: [FactionNames.TheBlackHand], }), new Augmentation({ @@ -1437,8 +1437,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "The CRTX42-AA gene is injected into the genome. " + "The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal " + "cortex and improves cognitive abilities.", - hacking_mult: 1.08, - hacking_exp_mult: 1.15, + hacking: 1.08, + hacking_exp: 1.15, factions: [FactionNames.NiteSec], }), new Augmentation({ @@ -1449,7 +1449,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A drug that genetically modifies the neurons in the brain " + "resulting in neurons that never die, continuously " + "regenerate, and strengthen themselves.", - hacking_exp_mult: 1.4, + hacking_exp: 1.4, factions: [FactionNames.Chongqing], }), new Augmentation({ @@ -1475,10 +1475,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "synthesizes glucose, amino acids, and vitamins and redistributes them " + "across the body. The device is powered by the body's naturally wasted " + "energy in the form of heat.", - strength_exp_mult: 1.2, - defense_exp_mult: 1.2, - dexterity_exp_mult: 1.2, - agility_exp_mult: 1.2, + strength_exp: 1.2, + defense_exp: 1.2, + dexterity_exp: 1.2, + agility_exp: 1.2, factions: [FactionNames.NewTokyo], }), new Augmentation({ @@ -1489,13 +1489,13 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "A 'Probability Computation Matrix' is installed in the frontal cortex. This implant " + "uses advanced mathematical algorithims to rapidly identify and compute statistical " + "outcomes of nearly every situation.", - charisma_mult: 1.0777, - charisma_exp_mult: 1.0777, - work_money_mult: 1.777, - faction_rep_mult: 1.0777, - company_rep_mult: 1.0777, - crime_success_mult: 1.0777, - crime_money_mult: 1.0777, + charisma: 1.0777, + charisma_exp: 1.0777, + work_money: 1.777, + faction_rep: 1.0777, + company_rep: 1.0777, + crime_success: 1.0777, + crime_money: 1.0777, programs: [Programs.DeepscanV1.name, Programs.AutoLink.name], factions: [FactionNames.Aevum], }), @@ -1504,9 +1504,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 7.5e3, moneyCost: 3e7, info: "A tiny chip that sits behind the retinae. This implant lets the user visually detect infrared radiation.", - crime_success_mult: 1.25, - crime_money_mult: 1.1, - dexterity_mult: 1.1, + crime_success: 1.25, + crime_money: 1.1, + dexterity: 1.1, factions: [FactionNames.Ishima], }), new Augmentation({ @@ -1517,7 +1517,7 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "Synthetic skin that is grafted onto the body. This skin consists of " + "millions of nanobots capable of projecting high-density muon beams, " + "creating an energy barrier around the user.", - defense_mult: 1.4, + defense: 1.4, factions: [FactionNames.Volhaven], }), new Augmentation({ @@ -1529,10 +1529,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "the retractable blades with an advanced graphene material " + "making them stronger and lighter.", prereqs: [AugmentationNames.BrachiBlades], - strength_mult: 1.4, - defense_mult: 1.4, - crime_success_mult: 1.1, - crime_money_mult: 1.3, + strength: 1.4, + defense: 1.4, + crime_success: 1.1, + crime_money: 1.3, factions: [FactionNames.SpeakersForTheDead], }), new Augmentation({ @@ -1544,8 +1544,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ "prosthetic arms with an advanced graphene material " + "to make them stronger and lighter.", prereqs: [AugmentationNames.BionicArms], - strength_mult: 1.85, - dexterity_mult: 1.85, + strength: 1.85, + dexterity: 1.85, factions: [FactionNames.TheDarkArmy], }), new Augmentation({ @@ -1553,10 +1553,10 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 1.25e4, moneyCost: 9e7, info: "A set of retractable plasteel blades that are implanted in the arm, underneath the skin.", - strength_mult: 1.15, - defense_mult: 1.15, - crime_success_mult: 1.1, - crime_money_mult: 1.15, + strength: 1.15, + defense: 1.15, + crime_success: 1.1, + crime_money: 1.15, factions: [FactionNames.TheSyndicate], }), new Augmentation({ @@ -1564,8 +1564,8 @@ export const initGeneralAugmentations = (): Augmentation[] => [ repCost: 6.25e4, moneyCost: 2.75e8, info: "Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.", - strength_mult: 1.3, - dexterity_mult: 1.3, + strength: 1.3, + dexterity: 1.3, factions: [FactionNames.Tetrads], }), new Augmentation({ @@ -1575,9 +1575,9 @@ export const initGeneralAugmentations = (): Augmentation[] => [ info: "A cranial implant that affects the user's personality, making them better " + "at negotiation in social situations.", - work_money_mult: 1.1, - company_rep_mult: 1.15, - faction_rep_mult: 1.15, + work_money: 1.1, + company_rep: 1.15, + faction_rep: 1.15, factions: [FactionNames.TianDiHui], }), new Augmentation({ @@ -1632,8 +1632,8 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "against debris, shrapnel, lasers, blinding flashes, and gas. It is also " + "embedded with a data processing chip that can be programmed to display an " + "AR HUD to assist the user in field missions.", - bladeburner_success_chance_mult: 1.03, - dexterity_mult: 1.05, + bladeburner_success_chance: 1.03, + dexterity: 1.05, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1646,9 +1646,9 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "technique was originally used on Bladeburners during the Synthoid uprising " + "to induce wakefulness and concentration, suppress fear, reduce empathy, " + "improve reflexes, and improve memory among other things.", - bladeburner_success_chance_mult: 1.03, - bladeburner_analysis_mult: 1.05, - bladeburner_stamina_gain_mult: 1.02, + bladeburner_success_chance: 1.03, + bladeburner_analysis: 1.05, + bladeburner_stamina_gain: 1.02, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1661,10 +1661,10 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "the ORION-MKIV shoulder enhances the strength and dexterity " + "of the user's right arm. It also provides protection due to its " + "crystallized graphene plating.", - defense_mult: 1.05, - strength_mult: 1.05, - dexterity_mult: 1.05, - bladeburner_success_chance_mult: 1.04, + defense: 1.05, + strength: 1.05, + dexterity: 1.05, + bladeburner_success_chance: 1.04, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1679,7 +1679,7 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "nature of the plasma disrupts the electrical systems of Augmentations. However, " + "it can also be effective against non-augmented enemies due to its high temperature " + "and concussive force.", - bladeburner_success_chance_mult: 1.06, + bladeburner_success_chance: 1.06, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1693,7 +1693,7 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "more power-efficient, more accurate, and can fire plasma bolts at a much " + "higher velocity than the V1 model.", prereqs: [AugmentationNames.HyperionV1], - bladeburner_success_chance_mult: 1.08, + bladeburner_success_chance: 1.08, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1706,11 +1706,11 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "including strength, speed, immune system enhancements, and mitochondrial efficiency. The " + "serum was originally developed by the Chinese military in an attempt to " + "create super soldiers.", - strength_mult: 1.07, - defense_mult: 1.07, - dexterity_mult: 1.07, - agility_mult: 1.07, - bladeburner_stamina_gain_mult: 1.05, + strength: 1.07, + defense: 1.07, + dexterity: 1.07, + agility: 1.07, + bladeburner_stamina_gain: 1.05, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1721,9 +1721,9 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ info: "A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus " + "heightens the senses and focus of its host, and also enhances its intuition.", - dexterity_exp_mult: 1.1, - bladeburner_analysis_mult: 1.1, - bladeburner_success_chance_mult: 1.04, + dexterity_exp: 1.1, + bladeburner_analysis: 1.1, + bladeburner_success_chance: 1.04, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1737,10 +1737,10 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "virus, this also grants accelerated healing and enhanced " + "reflexes.", prereqs: [AugmentationNames.VangelisVirus], - defense_exp_mult: 1.1, - dexterity_exp_mult: 1.1, - bladeburner_analysis_mult: 1.15, - bladeburner_success_chance_mult: 1.05, + defense_exp: 1.1, + dexterity_exp: 1.1, + bladeburner_analysis: 1.15, + bladeburner_success_chance: 1.05, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1753,11 +1753,11 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "extracellular matrix (ECM). This improves the ECM's ability to " + "structurally support the body and grants heightened strength and " + "durability.", - strength_exp_mult: 1.05, - defense_exp_mult: 1.05, - dexterity_exp_mult: 1.05, - agility_exp_mult: 1.05, - bladeburner_max_stamina_mult: 1.1, + strength_exp: 1.05, + defense_exp: 1.05, + dexterity_exp: 1.05, + agility_exp: 1.05, + bladeburner_max_stamina: 1.1, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1770,9 +1770,9 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "during the Synthoid Uprising. The organic musculature of the human foot " + "is enhanced with flexible carbon nanotube matrices that are controlled by " + "intelligent servo-motors.", - agility_mult: 1.05, - bladeburner_max_stamina_mult: 1.05, - bladeburner_stamina_gain_mult: 1.05, + agility: 1.05, + bladeburner_max_stamina: 1.05, + bladeburner_stamina_gain: 1.05, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1785,12 +1785,12 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, " + "concussive, thermal, chemical, and electric trauma. It also enhances the user's " + "physical abilities.", - strength_mult: 1.04, - defense_mult: 1.04, - dexterity_mult: 1.04, - agility_mult: 1.04, - bladeburner_stamina_gain_mult: 1.02, - bladeburner_success_chance_mult: 1.03, + strength: 1.04, + defense: 1.04, + dexterity: 1.04, + agility: 1.04, + bladeburner_stamina_gain: 1.02, + bladeburner_success_chance: 1.03, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1802,9 +1802,9 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of " + "more efficiently storing and using power.", prereqs: [AugmentationNames.BladeArmor], - bladeburner_success_chance_mult: 1.05, - bladeburner_stamina_gain_mult: 1.02, - bladeburner_max_stamina_mult: 1.05, + bladeburner_success_chance: 1.05, + bladeburner_stamina_gain: 1.02, + bladeburner_max_stamina: 1.05, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1816,8 +1816,8 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system " + "that is capable of projecting an energy shielding force field.", prereqs: [AugmentationNames.BladeArmor], - defense_mult: 1.05, - bladeburner_success_chance_mult: 1.06, + defense: 1.05, + bladeburner_success_chance: 1.06, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1830,7 +1830,7 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "weapon. It's precision and accuracy makes it useful for quickly neutralizing " + "threats while keeping casualties to a minimum.", prereqs: [AugmentationNames.BladeArmor], - bladeburner_success_chance_mult: 1.08, + bladeburner_success_chance: 1.08, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1844,7 +1844,7 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "modules that combine together to form a single, more powerful beam of up to " + "2000MW.", prereqs: [AugmentationNames.BladeArmorUnibeam], - bladeburner_success_chance_mult: 1.1, + bladeburner_success_chance: 1.1, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1857,8 +1857,8 @@ export const initBladeburnerAugmentations = (): Augmentation[] => [ "Unit that was specially designed to analyze Synthoid related data and " + "information.", prereqs: [AugmentationNames.BladeArmor], - bladeburner_analysis_mult: 1.15, - bladeburner_success_chance_mult: 1.02, + bladeburner_analysis: 1.15, + bladeburner_success_chance: 1.02, isSpecial: true, factions: [FactionNames.Bladeburners], }), @@ -1894,32 +1894,32 @@ export const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [ "It allows you to overclock your entire system by carefully " + "changing the configuration.", isSpecial: true, - hacking_chance_mult: 0.9, - hacking_speed_mult: 0.9, - hacking_money_mult: 0.9, - hacking_grow_mult: 0.9, - hacking_mult: 0.9, - strength_mult: 0.9, - defense_mult: 0.9, - dexterity_mult: 0.9, - agility_mult: 0.9, - charisma_mult: 0.9, - hacking_exp_mult: 0.9, - strength_exp_mult: 0.9, - defense_exp_mult: 0.9, - dexterity_exp_mult: 0.9, - agility_exp_mult: 0.9, - charisma_exp_mult: 0.9, - company_rep_mult: 0.9, - faction_rep_mult: 0.9, - crime_money_mult: 0.9, - crime_success_mult: 0.9, - hacknet_node_money_mult: 0.9, - hacknet_node_purchase_cost_mult: 1.1, - hacknet_node_ram_cost_mult: 1.1, - hacknet_node_core_cost_mult: 1.1, - hacknet_node_level_cost_mult: 1.1, - work_money_mult: 0.9, + hacking_chance: 0.9, + hacking_speed: 0.9, + hacking_money: 0.9, + hacking_grow: 0.9, + hacking: 0.9, + strength: 0.9, + defense: 0.9, + dexterity: 0.9, + agility: 0.9, + charisma: 0.9, + hacking_exp: 0.9, + strength_exp: 0.9, + defense_exp: 0.9, + dexterity_exp: 0.9, + agility_exp: 0.9, + charisma_exp: 0.9, + company_rep: 0.9, + faction_rep: 0.9, + crime_money: 0.9, + crime_success: 0.9, + hacknet_node_money: 0.9, + hacknet_node_purchase_cost: 1.1, + hacknet_node_ram_cost: 1.1, + hacknet_node_core_cost: 1.1, + hacknet_node_level_cost: 1.1, + work_money: 0.9, stats: <>Its unstable nature decreases all your stats by 10%, factions: [FactionNames.ChurchOfTheMachineGod], }), @@ -1933,32 +1933,32 @@ export const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [ "your frame granting a 5% reduced penalty to all stats.", prereqs: [AugmentationNames.StaneksGift1], isSpecial: true, - hacking_chance_mult: 0.95 / 0.9, - hacking_speed_mult: 0.95 / 0.9, - hacking_money_mult: 0.95 / 0.9, - hacking_grow_mult: 0.95 / 0.9, - hacking_mult: 0.95 / 0.9, - strength_mult: 0.95 / 0.9, - defense_mult: 0.95 / 0.9, - dexterity_mult: 0.95 / 0.9, - agility_mult: 0.95 / 0.9, - charisma_mult: 0.95 / 0.9, - hacking_exp_mult: 0.95 / 0.9, - strength_exp_mult: 0.95 / 0.9, - defense_exp_mult: 0.95 / 0.9, - dexterity_exp_mult: 0.95 / 0.9, - agility_exp_mult: 0.95 / 0.9, - charisma_exp_mult: 0.95 / 0.9, - company_rep_mult: 0.95 / 0.9, - faction_rep_mult: 0.95 / 0.9, - crime_money_mult: 0.95 / 0.9, - crime_success_mult: 0.95 / 0.9, - hacknet_node_money_mult: 0.95 / 0.9, - hacknet_node_purchase_cost_mult: 1.05 / 1.1, - hacknet_node_ram_cost_mult: 1.05 / 1.1, - hacknet_node_core_cost_mult: 1.05 / 1.1, - hacknet_node_level_cost_mult: 1.05 / 1.1, - work_money_mult: 0.95 / 0.9, + hacking_chance: 0.95 / 0.9, + hacking_speed: 0.95 / 0.9, + hacking_money: 0.95 / 0.9, + hacking_grow: 0.95 / 0.9, + hacking: 0.95 / 0.9, + strength: 0.95 / 0.9, + defense: 0.95 / 0.9, + dexterity: 0.95 / 0.9, + agility: 0.95 / 0.9, + charisma: 0.95 / 0.9, + hacking_exp: 0.95 / 0.9, + strength_exp: 0.95 / 0.9, + defense_exp: 0.95 / 0.9, + dexterity_exp: 0.95 / 0.9, + agility_exp: 0.95 / 0.9, + charisma_exp: 0.95 / 0.9, + company_rep: 0.95 / 0.9, + faction_rep: 0.95 / 0.9, + crime_money: 0.95 / 0.9, + crime_success: 0.95 / 0.9, + hacknet_node_money: 0.95 / 0.9, + hacknet_node_purchase_cost: 1.05 / 1.1, + hacknet_node_ram_cost: 1.05 / 1.1, + hacknet_node_core_cost: 1.05 / 1.1, + hacknet_node_level_cost: 1.05 / 1.1, + work_money: 0.95 / 0.9, stats: <>The penalty for the gift is reduced to 5%, factions: [FactionNames.ChurchOfTheMachineGod], }), @@ -1973,32 +1973,32 @@ export const initChurchOfTheMachineGodAugmentations = (): Augmentation[] => [ "of no longer suffering a stat penalty. ", prereqs: [AugmentationNames.StaneksGift2, AugmentationNames.StaneksGift1], isSpecial: true, - hacking_chance_mult: 1 / 0.95, - hacking_speed_mult: 1 / 0.95, - hacking_money_mult: 1 / 0.95, - hacking_grow_mult: 1 / 0.95, - hacking_mult: 1 / 0.95, - strength_mult: 1 / 0.95, - defense_mult: 1 / 0.95, - dexterity_mult: 1 / 0.95, - agility_mult: 1 / 0.95, - charisma_mult: 1 / 0.95, - hacking_exp_mult: 1 / 0.95, - strength_exp_mult: 1 / 0.95, - defense_exp_mult: 1 / 0.95, - dexterity_exp_mult: 1 / 0.95, - agility_exp_mult: 1 / 0.95, - charisma_exp_mult: 1 / 0.95, - company_rep_mult: 1 / 0.95, - faction_rep_mult: 1 / 0.95, - crime_money_mult: 1 / 0.95, - crime_success_mult: 1 / 0.95, - hacknet_node_money_mult: 1 / 0.95, - hacknet_node_purchase_cost_mult: 1 / 1.05, - hacknet_node_ram_cost_mult: 1 / 1.05, - hacknet_node_core_cost_mult: 1 / 1.05, - hacknet_node_level_cost_mult: 1 / 1.05, - work_money_mult: 1 / 0.95, + hacking_chance: 1 / 0.95, + hacking_speed: 1 / 0.95, + hacking_money: 1 / 0.95, + hacking_grow: 1 / 0.95, + hacking: 1 / 0.95, + strength: 1 / 0.95, + defense: 1 / 0.95, + dexterity: 1 / 0.95, + agility: 1 / 0.95, + charisma: 1 / 0.95, + hacking_exp: 1 / 0.95, + strength_exp: 1 / 0.95, + defense_exp: 1 / 0.95, + dexterity_exp: 1 / 0.95, + agility_exp: 1 / 0.95, + charisma_exp: 1 / 0.95, + company_rep: 1 / 0.95, + faction_rep: 1 / 0.95, + crime_money: 1 / 0.95, + crime_success: 1 / 0.95, + hacknet_node_money: 1 / 0.95, + hacknet_node_purchase_cost: 1 / 1.05, + hacknet_node_ram_cost: 1 / 1.05, + hacknet_node_core_cost: 1 / 1.05, + hacknet_node_level_cost: 1 / 1.05, + work_money: 1 / 0.95, stats: <>Stanek's Gift has no penalty., factions: [FactionNames.ChurchOfTheMachineGod], }), @@ -2023,32 +2023,32 @@ export function initNeuroFluxGovernor(): Augmentation { ), isSpecial: true, - hacking_chance_mult: 1.01 + donationBonus, - hacking_speed_mult: 1.01 + donationBonus, - hacking_money_mult: 1.01 + donationBonus, - hacking_grow_mult: 1.01 + donationBonus, - hacking_mult: 1.01 + donationBonus, - strength_mult: 1.01 + donationBonus, - defense_mult: 1.01 + donationBonus, - dexterity_mult: 1.01 + donationBonus, - agility_mult: 1.01 + donationBonus, - charisma_mult: 1.01 + donationBonus, - hacking_exp_mult: 1.01 + donationBonus, - strength_exp_mult: 1.01 + donationBonus, - defense_exp_mult: 1.01 + donationBonus, - dexterity_exp_mult: 1.01 + donationBonus, - agility_exp_mult: 1.01 + donationBonus, - charisma_exp_mult: 1.01 + donationBonus, - company_rep_mult: 1.01 + donationBonus, - faction_rep_mult: 1.01 + donationBonus, - crime_money_mult: 1.01 + donationBonus, - crime_success_mult: 1.01 + donationBonus, - hacknet_node_money_mult: 1.01 + donationBonus, - hacknet_node_purchase_cost_mult: 1 / (1.01 + donationBonus), - hacknet_node_ram_cost_mult: 1 / (1.01 + donationBonus), - hacknet_node_core_cost_mult: 1 / (1.01 + donationBonus), - hacknet_node_level_cost_mult: 1 / (1.01 + donationBonus), - work_money_mult: 1.01 + donationBonus, + hacking_chance: 1.01 + donationBonus, + hacking_speed: 1.01 + donationBonus, + hacking_money: 1.01 + donationBonus, + hacking_grow: 1.01 + donationBonus, + hacking: 1.01 + donationBonus, + strength: 1.01 + donationBonus, + defense: 1.01 + donationBonus, + dexterity: 1.01 + donationBonus, + agility: 1.01 + donationBonus, + charisma: 1.01 + donationBonus, + hacking_exp: 1.01 + donationBonus, + strength_exp: 1.01 + donationBonus, + defense_exp: 1.01 + donationBonus, + dexterity_exp: 1.01 + donationBonus, + agility_exp: 1.01 + donationBonus, + charisma_exp: 1.01 + donationBonus, + company_rep: 1.01 + donationBonus, + faction_rep: 1.01 + donationBonus, + crime_money: 1.01 + donationBonus, + crime_success: 1.01 + donationBonus, + hacknet_node_money: 1.01 + donationBonus, + hacknet_node_purchase_cost: 1 / (1.01 + donationBonus), + hacknet_node_ram_cost: 1 / (1.01 + donationBonus), + hacknet_node_core_cost: 1 / (1.01 + donationBonus), + hacknet_node_level_cost: 1 / (1.01 + donationBonus), + work_money: 1.01 + donationBonus, factions: Object.values(FactionNames).filter( (factionName) => ![FactionNames.ShadowsOfAnarchy, FactionNames.Bladeburners, FactionNames.ChurchOfTheMachineGod].includes( diff --git a/src/Augmentation/ui/PlayerMultipliers.tsx b/src/Augmentation/ui/PlayerMultipliers.tsx index 35652c70e..ff0317f37 100644 --- a/src/Augmentation/ui/PlayerMultipliers.tsx +++ b/src/Augmentation/ui/PlayerMultipliers.tsx @@ -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, }, ); } diff --git a/src/Bladeburner/Action.tsx b/src/Bladeburner/Action.tsx index fbffa5151..1bd6d5dcf 100644 --- a/src/Bladeburner/Action.tsx +++ b/src/Bladeburner/Action.tsx @@ -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()"); diff --git a/src/Bladeburner/Bladeburner.tsx b/src/Bladeburner/Bladeburner.tsx index 3628351b4..3a1c95b83 100644 --- a/src/Bladeburner/Bladeburner.tsx +++ b/src/Bladeburner/Bladeburner.tsx @@ -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; diff --git a/src/Bladeburner/ui/Stats.tsx b/src/Bladeburner/ui/Stats.tsx index acafc3cd7..64fc29db9 100644 --- a/src/Bladeburner/ui/Stats.tsx +++ b/src/Bladeburner/ui/Stats.tsx @@ -173,13 +173,13 @@ export function Stats(props: IProps): React.ReactElement { Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}
- 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)}%
- 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)}%
- 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)}%
- Aug. Field Analysis mult: {formatNumber(props.player.bladeburner_analysis_mult * 100, 1)}% + Aug. Field Analysis mult: {formatNumber(props.player.mults.bladeburner_analysis * 100, 1)}%
diff --git a/src/CotMG/StaneksGift.ts b/src/CotMG/StaneksGift.ts index 8fc4312af..0ce6ff1bd 100644 --- a/src/CotMG/StaneksGift.ts +++ b/src/CotMG/StaneksGift.ts @@ -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; } } diff --git a/src/Crime/Crime.ts b/src/Crime/Crime.ts index fb0a395b8..f1e404ee8 100644 --- a/src/Crime/Crime.ts +++ b/src/Crime/Crime.ts @@ -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); diff --git a/src/Exploits/applyExploits.ts b/src/Exploits/applyExploits.ts index f2edf35a9..0fc65b1ef 100644 --- a/src/Exploits/applyExploits.ts +++ b/src/Exploits/applyExploits.ts @@ -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; } diff --git a/src/Faction/FactionHelpers.tsx b/src/Faction/FactionHelpers.tsx index 0237d6e6a..bfc42e891 100644 --- a/src/Faction/FactionHelpers.tsx +++ b/src/Faction/FactionHelpers.tsx @@ -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; } } diff --git a/src/Faction/formulas/donation.ts b/src/Faction/formulas/donation.ts index 21c5869d1..ea0e99b11 100644 --- a/src/Faction/formulas/donation.ts +++ b/src/Faction/formulas/donation.ts @@ -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; } diff --git a/src/Gang/Gang.ts b/src/Gang/Gang.ts index 688235a08..81e337e94 100644 --- a/src/Gang/Gang.ts +++ b/src/Gang/Gang.ts @@ -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) { diff --git a/src/Hacking.ts b/src/Hacking.ts index 58039ff12..640b45e94 100644 --- a/src/Hacking.ts +++ b/src/Hacking.ts @@ -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; } diff --git a/src/Hacknet/HacknetHelpers.tsx b/src/Hacknet/HacknetHelpers.tsx index d756c672f..ecd91719f 100644 --- a/src/Hacknet/HacknetHelpers.tsx +++ b/src/Hacknet/HacknetHelpers.tsx @@ -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; } diff --git a/src/Hacknet/HacknetServer.ts b/src/Hacknet/HacknetServer.ts index bb82e0351..69828c254 100644 --- a/src/Hacknet/HacknetServer.ts +++ b/src/Hacknet/HacknetServer.ts @@ -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 { diff --git a/src/Hacknet/ui/HacknetNodeElem.tsx b/src/Hacknet/ui/HacknetNodeElem.tsx index b5909027c..bab635210 100644 --- a/src/Hacknet/ui/HacknetNodeElem.tsx +++ b/src/Hacknet/ui/HacknetNodeElem.tsx @@ -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 = ( (): 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, diff --git a/src/NetscriptFunctions/Corporation.ts b/src/NetscriptFunctions/Corporation.ts index 9ed771625..6dc698816 100644 --- a/src/NetscriptFunctions/Corporation.ts +++ b/src/NetscriptFunctions/Corporation.ts @@ -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 Promise.resolve(AssignJob(employee, job)); - }); + 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))); diff --git a/src/NetscriptFunctions/Hacknet.ts b/src/NetscriptFunctions/Hacknet.ts index 5bbdb77a8..f0f43d2de 100644 --- a/src/NetscriptFunctions/Hacknet.ts +++ b/src/NetscriptFunctions/Hacknet.ts @@ -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) => diff --git a/src/NetscriptFunctions/Singularity.ts b/src/NetscriptFunctions/Singularity.ts index f36efb1be..a0040e421 100644 --- a/src/NetscriptFunctions/Singularity.ts +++ b/src/NetscriptFunctions/Singularity.ts @@ -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( diff --git a/src/NetscriptFunctions/Sleeve.ts b/src/NetscriptFunctions/Sleeve.ts index c98d8b888..fb6d721f4 100644 --- a/src/NetscriptFunctions/Sleeve.ts +++ b/src/NetscriptFunctions/Sleeve.ts @@ -210,23 +210,23 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI { 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, diff --git a/src/PersonObjects/Grafting/EntropyAccumulation.ts b/src/PersonObjects/Grafting/EntropyAccumulation.ts index 8887df5a0..b1f7ea78f 100644 --- a/src/PersonObjects/Grafting/EntropyAccumulation.ts +++ b/src/PersonObjects/Grafting/EntropyAccumulation.ts @@ -4,44 +4,44 @@ import { CONSTANTS } from "../../Constants"; import { IPlayer } from "../IPlayer"; export const calculateEntropy = (player: IPlayer, stacks = 1): IMap => { - const multipliers: IMap = { - 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 = { + 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)) { diff --git a/src/PersonObjects/IPerson.ts b/src/PersonObjects/IPerson.ts index 18b697de2..6d4d48d6f 100644 --- a/src/PersonObjects/IPerson.ts +++ b/src/PersonObjects/IPerson.ts @@ -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[]; diff --git a/src/PersonObjects/IPlayer.ts b/src/PersonObjects/IPlayer.ts index 7eb275025..19d309a34 100644 --- a/src/PersonObjects/IPlayer.ts +++ b/src/PersonObjects/IPlayer.ts @@ -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; diff --git a/src/PersonObjects/Multipliers.ts b/src/PersonObjects/Multipliers.ts index 7f36b9bcb..9a941c03d 100644 --- a/src/PersonObjects/Multipliers.ts +++ b/src/PersonObjects/Multipliers.ts @@ -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), + }; +}; diff --git a/src/PersonObjects/Person.ts b/src/PersonObjects/Person.ts index 8790a26b8..d198e13df 100644 --- a/src/PersonObjects/Person.ts +++ b/src/PersonObjects/Person.ts @@ -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), ), ); diff --git a/src/PersonObjects/Player/PlayerObject.ts b/src/PersonObjects/Player/PlayerObject.ts index 58ed5526c..9e00c8bf4 100644 --- a/src/PersonObjects/Player/PlayerObject.ts +++ b/src/PersonObjects/Player/PlayerObject.ts @@ -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. diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts b/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts index 12ad37c74..a07363de2 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts @@ -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); } diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index 08aa2074c..dd48c3b2a 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -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); diff --git a/src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx b/src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx index be27b1dd9..8e82a4618 100644 --- a/src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx +++ b/src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx @@ -54,32 +54,38 @@ export function MoreStatsModal(props: IProps): React.ReactElement {
Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_mult)], - [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_exp_mult)], - [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_mult)], - [<>Strength Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_exp_mult)], - [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_mult)], - [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_exp_mult)], - [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.dexterity_mult)], + [<>Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.hacking)], + [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.hacking_exp)], + [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.strength)], + [ + <>Strength Experience multiplier: , + numeralWrapper.formatPercentage(props.sleeve.mults.strength_exp), + ], + [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.defense)], + [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.defense_exp)], + [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.dexterity)], [ <>Dexterity Experience multiplier: , - numeralWrapper.formatPercentage(props.sleeve.dexterity_exp_mult), + numeralWrapper.formatPercentage(props.sleeve.mults.dexterity_exp), + ], + [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.agility)], + [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.agility_exp)], + [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.charisma)], + [ + <>Charisma Experience multiplier: , + numeralWrapper.formatPercentage(props.sleeve.mults.charisma_exp), ], - [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_mult)], - [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_exp_mult)], - [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_mult)], - [<>Charisma Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_exp_mult)], [ <>Faction Reputation Gain multiplier: , - numeralWrapper.formatPercentage(props.sleeve.faction_rep_mult), + numeralWrapper.formatPercentage(props.sleeve.mults.faction_rep), ], [ <>Company Reputation Gain multiplier: , - numeralWrapper.formatPercentage(props.sleeve.company_rep_mult), + numeralWrapper.formatPercentage(props.sleeve.mults.company_rep), ], - [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.work_money_mult)], - [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_money_mult)], - [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_success_mult)], + [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.work_money)], + [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.crime_money)], + [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.mults.crime_success)], ]} title="Multipliers:" /> diff --git a/src/PersonObjects/formulas/reputation.ts b/src/PersonObjects/formulas/reputation.ts index 32d4cabd5..e94f3e6f3 100644 --- a/src/PersonObjects/formulas/reputation.ts +++ b/src/PersonObjects/formulas/reputation.ts @@ -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); } diff --git a/src/Prestige.ts b/src/Prestige.ts index a643018af..a5dac229c 100755 --- a/src/Prestige.ts +++ b/src/Prestige.ts @@ -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); } diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 7a5209e71..feec02beb 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -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; } /** diff --git a/src/Server/ServerHelpers.ts b/src/Server/ServerHelpers.ts index fe39b48d3..b5bc46269 100644 --- a/src/Server/ServerHelpers.ts +++ b/src/Server/ServerHelpers.ts @@ -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: diff --git a/src/Server/formulas/grow.ts b/src/Server/formulas/grow.ts index a849918b2..68df5aef3 100644 --- a/src/Server/formulas/grow.ts +++ b/src/Server/formulas/grow.ts @@ -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); } diff --git a/src/SourceFile/applySourceFile.ts b/src/SourceFile/applySourceFile.ts index 8e6a5672f..94d1e0232 100644 --- a/src/SourceFile/applySourceFile.ts +++ b/src/SourceFile/applySourceFile.ts @@ -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 diff --git a/src/Work/formulas/Class.ts b/src/Work/formulas/Class.ts index 6f5e29565..37cd6db43 100644 --- a/src/Work/formulas/Class.ts +++ b/src/Work/formulas/Class.ts @@ -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, }; } diff --git a/src/Work/formulas/Company.ts b/src/Work/formulas/Company.ts index fbdced8b2..8db541b3f 100644 --- a/src/Work/formulas/Company.ts +++ b/src/Work/formulas/Company.ts @@ -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, }; diff --git a/src/Work/formulas/Faction.ts b/src/Work/formulas/Faction.ts index 8bcfd3a44..0e3cfb345 100644 --- a/src/Work/formulas/Faction.ts +++ b/src/Work/formulas/Faction.ts @@ -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, }; } diff --git a/src/ui/CharacterStats.tsx b/src/ui/CharacterStats.tsx index f23246e8f..18793d785 100644 --- a/src/ui/CharacterStats.tsx +++ b/src/ui/CharacterStats.tsx @@ -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} diff --git a/src/ui/React/CharacterOverview.tsx b/src/ui/React/CharacterOverview.tsx index e62ec6fad..fef65d104 100644 --- a/src/ui/React/CharacterOverview.tsx +++ b/src/ui/React/CharacterOverview.tsx @@ -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 (