mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-01 21:37:59 +02:00
allbuild commit 2b4a1bb7
This commit is contained in:
+18
-11
@@ -8,6 +8,7 @@ import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { CrimeType } from "../utils/WorkType";
|
||||
import { Work, WorkType } from "./Work";
|
||||
import { newWorkStats, scaleWorkStats, WorkStats } from "./WorkStats";
|
||||
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
|
||||
enum newCrimeType {
|
||||
SHOPLIFT = "SHOPLIFT",
|
||||
@@ -90,16 +91,22 @@ export class CrimeWork extends Work {
|
||||
|
||||
earnings(): WorkStats {
|
||||
const crime = this.getCrime();
|
||||
return 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,
|
||||
});
|
||||
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;
|
||||
}
|
||||
|
||||
commit(player: IPlayer): void {
|
||||
@@ -113,7 +120,7 @@ export class CrimeWork extends Work {
|
||||
const focusPenalty = player.focusPenalty();
|
||||
// exp times 2 because were trying to maintain the same numbers as before the conversion
|
||||
// Technically the definition of Crimes should have the success numbers and failure should divide by 4
|
||||
let gains = scaleWorkStats(this.earnings(), focusPenalty);
|
||||
let gains = scaleWorkStats(this.earnings(), focusPenalty, false);
|
||||
let karma = crime.karma;
|
||||
const success = determineCrimeSuccess(player, crime.type);
|
||||
if (success) {
|
||||
|
||||
Reference in New Issue
Block a user