mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
BUGFIX: Fix the return of weaken() to account for BN mult (#448)
This commit is contained in:
parent
6290ce562a
commit
9353129e84
@ -383,7 +383,8 @@ export const ns: InternalAPI<NSFull> = {
|
||||
return Promise.resolve(0);
|
||||
}
|
||||
const coreBonus = 1 + (host.cpuCores - 1) / 16;
|
||||
server.weaken(CONSTANTS.ServerWeakenAmount * threads * coreBonus);
|
||||
const weakenAmt = CONSTANTS.ServerWeakenAmount * threads * coreBonus;
|
||||
server.weaken(weakenAmt);
|
||||
ctx.workerScript.scriptRef.recordWeaken(server.hostname, threads);
|
||||
const expGain = calculateHackingExpGain(server, Player) * threads;
|
||||
helpers.log(
|
||||
@ -395,7 +396,8 @@ export const ns: InternalAPI<NSFull> = {
|
||||
);
|
||||
ctx.workerScript.scriptRef.onlineExpGained += expGain;
|
||||
Player.gainHackingExp(expGain);
|
||||
return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads * coreBonus);
|
||||
// Account for hidden multiplier in Server.weaken()
|
||||
return Promise.resolve(weakenAmt * BitNodeMultipliers.ServerWeakenRate);
|
||||
});
|
||||
},
|
||||
weakenAnalyze:
|
||||
|
Loading…
Reference in New Issue
Block a user