diff --git a/src/Bladeburner/Bladeburner.ts b/src/Bladeburner/Bladeburner.ts index 76b041e3a..8e64743be 100644 --- a/src/Bladeburner/Bladeburner.ts +++ b/src/Bladeburner/Bladeburner.ts @@ -38,7 +38,7 @@ import { formatTime } from "../utils/helpers/formatTime"; import { joinFaction } from "../Faction/FactionHelpers"; import { isSleeveInfiltrateWork } from "../PersonObjects/Sleeve/Work/SleeveInfiltrateWork"; import { isSleeveSupportWork } from "../PersonObjects/Sleeve/Work/SleeveSupportWork"; -import { WorkStats, newWorkStats } from "../Work/WorkStats"; +import { WorkStats, newWorkStats, multWorkStats } from "../Work/WorkStats"; import { getEnumHelper } from "../utils/EnumHelper"; import { PartialRecord, createEnumKeyedRecord, getRecordEntries } from "../Types/Record"; import { createContracts, loadContractsData } from "./data/Contracts"; @@ -1074,30 +1074,31 @@ export class Bladeburner { switch (action.name) { case BladeburnerGeneralActionName.Training: { this.stamina -= 0.5 * BladeburnerConstants.BaseStaminaLoss; - 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.getSkillMult(BladeburnerMultName.Stamina); + const strExpGain = 30, + defExpGain = 30, + dexExpGain = 30, + agiExpGain = 30, + staminaGain = 0.04; retValue.strExp = strExpGain; retValue.defExp = defExpGain; retValue.dexExp = dexExpGain; retValue.agiExp = agiExpGain; this.staminaBonus += staminaGain; + if (this.logging.general) { + // retValue contains the base EXP gains. + // Multiply by person EXP multipliers to predict the effective gain. + const effectiveGainPrediction = multWorkStats(retValue, person.mults); + // Predict effective stamina gain after applying Skill and Augmentation multipliers. + let effectiveStaminaGainPrediction = staminaGain * this.getSkillMult(BladeburnerMultName.Stamina); + effectiveStaminaGainPrediction *= person.mults.bladeburner_max_stamina; this.log( - `${person.whoAmI()}: ` + - "Training completed. Gained: " + - formatExp(strExpGain) + - " str exp, " + - formatExp(defExpGain) + - " def exp, " + - formatExp(dexExpGain) + - " dex exp, " + - formatExp(agiExpGain) + - " agi exp, " + - formatBigNumber(staminaGain) + - " max stamina.", + `${person.whoAmI()}: Training completed. Gained: ` + + `${formatExp(effectiveGainPrediction.strExp)} str exp, ` + + `${formatExp(effectiveGainPrediction.defExp)} def exp, ` + + `${formatExp(effectiveGainPrediction.dexExp)} dex exp, ` + + `${formatExp(effectiveGainPrediction.agiExp)} agi exp, ` + + `${formatBigNumber(effectiveStaminaGainPrediction)} max stamina.`, ); } break; @@ -1112,22 +1113,26 @@ export class Bladeburner { if (isNaN(eff) || eff < 0) { throw new Error("Field Analysis Effectiveness calculated to be NaN or negative"); } - const hackingExpGain = 20 * person.mults.hacking_exp; - const charismaExpGain = 20 * person.mults.charisma_exp; - const rankGain = 0.1 * currentNodeMults.BladeburnerRank; + this.getCurrentCity().improvePopulationEstimateByPercentage( + eff * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate), + ); + const hackingExpGain = 20; + const charismaExpGain = 20; retValue.hackExp = hackingExpGain; retValue.chaExp = charismaExpGain; retValue.intExp = BladeburnerConstants.BaseIntGain; + const rankGain = 0.1 * currentNodeMults.BladeburnerRank; this.changeRank(person, rankGain); - this.getCurrentCity().improvePopulationEstimateByPercentage( - eff * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate), - ); + if (this.logging.general) { + // retValue contains the base EXP gains. + // Multiply by person EXP multipliers to predict the effective gain. + const effectiveGainPrediction = multWorkStats(retValue, person.mults); this.log( `${person.whoAmI()}: ` + `Field analysis completed. Gained ${formatBigNumber(rankGain)} rank, ` + - `${formatExp(hackingExpGain)} hacking exp, and ` + - `${formatExp(charismaExpGain)} charisma exp.`, + `${formatExp(effectiveGainPrediction.hackExp)} hacking exp, and ` + + `${formatExp(effectiveGainPrediction.chaExp)} charisma exp.`, ); } break; diff --git a/src/Bladeburner/data/Skills.ts b/src/Bladeburner/data/Skills.ts index 2dbcdf77f..01d3ec3bb 100644 --- a/src/Bladeburner/data/Skills.ts +++ b/src/Bladeburner/data/Skills.ts @@ -83,10 +83,10 @@ export const Skills: Record = { }), [BladeburnerSkillName.CybersEdge]: new Skill({ name: BladeburnerSkillName.CybersEdge, - desc: "Each level of this skill increases your max stamina by 2%", + desc: "Each level of this skill increases your max stamina by 5%", baseCost: 1, costInc: 3, - mults: { [BladeburnerMultName.Stamina]: 2 }, + mults: { [BladeburnerMultName.Stamina]: 5 }, }), [BladeburnerSkillName.HandsOfMidas]: new Skill({ name: BladeburnerSkillName.HandsOfMidas,