diff --git a/src/Crime/Crime.ts b/src/Crime/Crime.ts index e68096504..8100d9c0e 100644 --- a/src/Crime/Crime.ts +++ b/src/Crime/Crime.ts @@ -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; diff --git a/src/Crime/Crimes.ts b/src/Crime/Crimes.ts index 407eb85ad..d1f24b646 100644 --- a/src/Crime/Crimes.ts +++ b/src/Crime/Crimes.ts @@ -6,7 +6,7 @@ import { IMap } from "../types"; import { CrimeType } from "../utils/WorkType"; export const Crimes: IMap = { - 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 = { 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 = { 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 = { 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 = { 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 = { 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 = { 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 = { 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 = { 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 = { 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 = { 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 = { 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, diff --git a/src/ui/WorkInProgressRoot.tsx b/src/ui/WorkInProgressRoot.tsx index 70e847cc6..8f5ba77ce 100644 --- a/src/ui/WorkInProgressRoot.tsx +++ b/src/ui/WorkInProgressRoot.tsx @@ -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: [ + Success chance: {numeralWrapper.formatPercentage(successChance)}, Gains (on success),