mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 19:37:07 +02:00
Added a few formulas to calculate work gains
This commit is contained in:
+2
-17
@@ -9,6 +9,7 @@ import { CrimeType } from "../utils/WorkType";
|
||||
import { Work, WorkType } from "./Work";
|
||||
import { newWorkStats, scaleWorkStats, WorkStats } from "./WorkStats";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
import { calculateCrimeWorkStats } from "./formulas/Crime";
|
||||
|
||||
enum newCrimeType {
|
||||
SHOPLIFT = "SHOPLIFT",
|
||||
@@ -90,23 +91,7 @@ export class CrimeWork extends Work {
|
||||
}
|
||||
|
||||
earnings(): WorkStats {
|
||||
const crime = this.getCrime();
|
||||
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,
|
||||
intExp: crime.intelligence_exp * 2,
|
||||
}),
|
||||
BitNodeMultipliers.CrimeExpGain,
|
||||
false,
|
||||
);
|
||||
gains.money *= BitNodeMultipliers.CrimeMoney;
|
||||
return gains;
|
||||
return calculateCrimeWorkStats(this.getCrime());
|
||||
}
|
||||
|
||||
commit(player: IPlayer): void {
|
||||
|
||||
Reference in New Issue
Block a user