finishWeaken now shows 3 decimal places for hackDifficulty and improved the print message

This commit is contained in:
Jordan Turner 2021-12-15 18:53:39 -07:00
parent e3a0caf50f
commit 889751490f

@ -254,9 +254,9 @@ export class Terminal implements ITerminal {
const expGain = calculateHackingExpGain(server, player); const expGain = calculateHackingExpGain(server, player);
server.weaken(CONSTANTS.ServerWeakenAmount); server.weaken(CONSTANTS.ServerWeakenAmount);
this.print( this.print(
`'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${numeralWrapper.formatExp( `'${server.hostname}' security level weakened to ${server.hackDifficulty.toFixed(
expGain, 3,
)} hacking exp.`, )} and Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,
); );
} }