mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-24 07:02:26 +01:00
Merge pull request #4048 from Kelenius/CrimeWorkUISucChanceAndFix
UI: Improvements to crime work UI
This commit is contained in:
commit
a5fb280be8
@ -39,6 +39,9 @@ export class Crime {
|
||||
// Name of crime
|
||||
name = "";
|
||||
|
||||
// Name of crime as it appears on work screen: "You are attempting..."
|
||||
workName = "";
|
||||
|
||||
// Milliseconds it takes to attempt the crime
|
||||
time = 0;
|
||||
|
||||
@ -64,6 +67,7 @@ export class Crime {
|
||||
|
||||
constructor(
|
||||
name = "",
|
||||
workName = "",
|
||||
type: CrimeType,
|
||||
time = 0,
|
||||
money = 0,
|
||||
@ -72,6 +76,7 @@ export class Crime {
|
||||
params: IConstructorParams = {},
|
||||
) {
|
||||
this.name = name;
|
||||
this.workName = workName;
|
||||
this.type = type;
|
||||
this.time = time;
|
||||
this.money = money;
|
||||
|
@ -6,7 +6,7 @@ import { IMap } from "../types";
|
||||
import { CrimeType } from "../utils/WorkType";
|
||||
|
||||
export const Crimes: IMap<Crime> = {
|
||||
Shoplift: new Crime("Shoplift", CrimeType.SHOPLIFT, 2e3, 15e3, 1 / 20, 0.1, {
|
||||
Shoplift: new Crime("Shoplift", "to shoplift", CrimeType.SHOPLIFT, 2e3, 15e3, 1 / 20, 0.1, {
|
||||
dexterity_success_weight: 1,
|
||||
agility_success_weight: 1,
|
||||
|
||||
@ -14,7 +14,7 @@ export const Crimes: IMap<Crime> = {
|
||||
agility_exp: 2,
|
||||
}),
|
||||
|
||||
RobStore: new Crime("Rob Store", CrimeType.ROB_STORE, 60e3, 400e3, 1 / 5, 0.5, {
|
||||
RobStore: new Crime("Rob Store", "to rob a store", CrimeType.ROB_STORE, 60e3, 400e3, 1 / 5, 0.5, {
|
||||
hacking_exp: 30,
|
||||
dexterity_exp: 45,
|
||||
agility_exp: 45,
|
||||
@ -26,7 +26,7 @@ export const Crimes: IMap<Crime> = {
|
||||
intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,
|
||||
}),
|
||||
|
||||
Mug: new Crime("Mug", CrimeType.MUG, 4e3, 36e3, 1 / 5, 0.25, {
|
||||
Mug: new Crime("Mug", "to mug", CrimeType.MUG, 4e3, 36e3, 1 / 5, 0.25, {
|
||||
strength_exp: 3,
|
||||
defense_exp: 3,
|
||||
dexterity_exp: 3,
|
||||
@ -38,7 +38,7 @@ export const Crimes: IMap<Crime> = {
|
||||
agility_success_weight: 0.5,
|
||||
}),
|
||||
|
||||
Larceny: new Crime("Larceny", CrimeType.LARCENY, 90e3, 800e3, 1 / 3, 1.5, {
|
||||
Larceny: new Crime("Larceny", "larceny", CrimeType.LARCENY, 90e3, 800e3, 1 / 3, 1.5, {
|
||||
hacking_exp: 45,
|
||||
dexterity_exp: 60,
|
||||
agility_exp: 60,
|
||||
@ -50,7 +50,7 @@ export const Crimes: IMap<Crime> = {
|
||||
intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,
|
||||
}),
|
||||
|
||||
DealDrugs: new Crime("Deal Drugs", CrimeType.DRUGS, 10e3, 120e3, 1, 0.5, {
|
||||
DealDrugs: new Crime("Deal Drugs", "to deal drugs", CrimeType.DRUGS, 10e3, 120e3, 1, 0.5, {
|
||||
dexterity_exp: 5,
|
||||
agility_exp: 5,
|
||||
charisma_exp: 10,
|
||||
@ -60,7 +60,7 @@ export const Crimes: IMap<Crime> = {
|
||||
agility_success_weight: 1,
|
||||
}),
|
||||
|
||||
BondForgery: new Crime("Bond Forgery", CrimeType.BOND_FORGERY, 300e3, 4.5e6, 1 / 2, 0.1, {
|
||||
BondForgery: new Crime("Bond Forgery", "to forge bonds", CrimeType.BOND_FORGERY, 300e3, 4.5e6, 1 / 2, 0.1, {
|
||||
hacking_exp: 100,
|
||||
dexterity_exp: 150,
|
||||
charisma_exp: 15,
|
||||
@ -71,7 +71,7 @@ export const Crimes: IMap<Crime> = {
|
||||
intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,
|
||||
}),
|
||||
|
||||
TraffickArms: new Crime("Traffick Arms", CrimeType.TRAFFIC_ARMS, 40e3, 600e3, 2, 1, {
|
||||
TraffickArms: new Crime("Traffick Arms", "to traffic arms", CrimeType.TRAFFIC_ARMS, 40e3, 600e3, 2, 1, {
|
||||
strength_exp: 20,
|
||||
defense_exp: 20,
|
||||
dexterity_exp: 20,
|
||||
@ -85,7 +85,7 @@ export const Crimes: IMap<Crime> = {
|
||||
agility_success_weight: 1,
|
||||
}),
|
||||
|
||||
Homicide: new Crime("Homicide", CrimeType.HOMICIDE, 3e3, 45e3, 1, 3, {
|
||||
Homicide: new Crime("Homicide", "homicide", CrimeType.HOMICIDE, 3e3, 45e3, 1, 3, {
|
||||
strength_exp: 2,
|
||||
defense_exp: 2,
|
||||
dexterity_exp: 2,
|
||||
@ -99,7 +99,7 @@ export const Crimes: IMap<Crime> = {
|
||||
kills: 1,
|
||||
}),
|
||||
|
||||
GrandTheftAuto: new Crime("Grand Theft Auto", CrimeType.GRAND_THEFT_AUTO, 80e3, 1.6e6, 8, 5, {
|
||||
GrandTheftAuto: new Crime("Grand Theft Auto", "grand theft auto", CrimeType.GRAND_THEFT_AUTO, 80e3, 1.6e6, 8, 5, {
|
||||
strength_exp: 20,
|
||||
defense_exp: 20,
|
||||
dexterity_exp: 20,
|
||||
@ -115,7 +115,7 @@ export const Crimes: IMap<Crime> = {
|
||||
intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,
|
||||
}),
|
||||
|
||||
Kidnap: new Crime("Kidnap", CrimeType.KIDNAP, 120e3, 3.6e6, 5, 6, {
|
||||
Kidnap: new Crime("Kidnap", "to kidnap", CrimeType.KIDNAP, 120e3, 3.6e6, 5, 6, {
|
||||
strength_exp: 80,
|
||||
defense_exp: 80,
|
||||
dexterity_exp: 80,
|
||||
@ -130,7 +130,7 @@ export const Crimes: IMap<Crime> = {
|
||||
intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,
|
||||
}),
|
||||
|
||||
Assassination: new Crime("Assassination", CrimeType.ASSASSINATION, 300e3, 12e6, 8, 10, {
|
||||
Assassination: new Crime("Assassination", "to assassinate", CrimeType.ASSASSINATION, 300e3, 12e6, 8, 10, {
|
||||
strength_exp: 300,
|
||||
defense_exp: 300,
|
||||
dexterity_exp: 300,
|
||||
@ -145,7 +145,7 @@ export const Crimes: IMap<Crime> = {
|
||||
kills: 1,
|
||||
}),
|
||||
|
||||
Heist: new Crime("Heist", CrimeType.HEIST, 600e3, 120e6, 18, 15, {
|
||||
Heist: new Crime("Heist", "a heist", CrimeType.HEIST, 600e3, 120e6, 18, 15, {
|
||||
hacking_exp: 450,
|
||||
strength_exp: 450,
|
||||
defense_exp: 450,
|
||||
|
@ -221,6 +221,7 @@ export function WorkInProgressRoot(): React.ReactElement {
|
||||
const crime = player.currentWork.getCrime();
|
||||
const completion = (player.currentWork.unitCompleted / crime.time) * 100;
|
||||
const gains = player.currentWork.earnings();
|
||||
const successChance = crime.successRate(player);
|
||||
workInfo = {
|
||||
buttons: {
|
||||
cancel: () => {
|
||||
@ -232,9 +233,10 @@ export function WorkInProgressRoot(): React.ReactElement {
|
||||
player.stopFocusing();
|
||||
},
|
||||
},
|
||||
title: `You are attempting to ${crime.type}`,
|
||||
title: `You are attempting ${crime.workName}`,
|
||||
|
||||
gains: [
|
||||
<Typography>Success chance: {numeralWrapper.formatPercentage(successChance)}</Typography>,
|
||||
<Typography>Gains (on success)</Typography>,
|
||||
<StatsRow name="Money:" color={Settings.theme.money}>
|
||||
<Typography>
|
||||
|
Loading…
Reference in New Issue
Block a user