From 33b304bff5796769ba130d1e6b5791e44475625a Mon Sep 17 00:00:00 2001 From: Mughur Date: Fri, 23 Sep 2022 15:17:48 +0300 Subject: [PATCH] Crime gains now properly affected by player mults --- src/Work/CrimeWork.ts | 2 +- src/Work/formulas/Crime.ts | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Work/CrimeWork.ts b/src/Work/CrimeWork.ts index 28a813ea1..d7876047d 100644 --- a/src/Work/CrimeWork.ts +++ b/src/Work/CrimeWork.ts @@ -108,7 +108,7 @@ export class CrimeWork extends Work { let karma = crime.karma; const success = determineCrimeSuccess(player, crime.type); if (success) { - player.gainMoney(gains.money * player.mults.crime_money, "crime"); + player.gainMoney(gains.money, "crime"); player.numPeopleKilled += crime.kills; player.gainIntelligenceExp(gains.intExp); } else { diff --git a/src/Work/formulas/Crime.ts b/src/Work/formulas/Crime.ts index 365bc7adc..af5d046d7 100644 --- a/src/Work/formulas/Crime.ts +++ b/src/Work/formulas/Crime.ts @@ -1,17 +1,18 @@ import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; import { Crime } from "src/Crime/Crime"; import { newWorkStats, scaleWorkStats, WorkStats } from "../WorkStats"; +import { Player } from "../../Player"; export const calculateCrimeWorkStats = (crime: Crime): WorkStats => { const gains = scaleWorkStats( newWorkStats({ - money: crime.money, - hackExp: crime.hacking_exp * 2, - strExp: crime.strength_exp * 2, - defExp: crime.defense_exp * 2, - dexExp: crime.dexterity_exp * 2, - agiExp: crime.agility_exp * 2, - chaExp: crime.charisma_exp * 2, + money: crime.money * Player.mults.crime_money, + hackExp: crime.hacking_exp * 2 * Player.mults.hacking_exp, + strExp: crime.strength_exp * 2 * Player.mults.strength_exp, + defExp: crime.defense_exp * 2 * Player.mults.defense_exp, + dexExp: crime.dexterity_exp * 2 * Player.mults.dexterity_exp, + agiExp: crime.agility_exp * 2 * Player.mults.agility_exp, + chaExp: crime.charisma_exp * 2 * Player.mults.charisma_exp, intExp: crime.intelligence_exp * 2, }), BitNodeMultipliers.CrimeExpGain,