allbuild commit 2b4a1bb7

This commit is contained in:
Olivier Gagnon
2022-07-28 11:37:28 -04:00
parent 2b4a1bb7db
commit c8440ef268
11 changed files with 61 additions and 53 deletions
+18 -11
View File
@@ -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) {