BLADEBURNER: Add visual cues to warn player of dangerous actions and status of population, chaos (#1856)

This commit is contained in:
catloversg 2024-12-18 17:44:19 +07:00 committed by GitHub
parent c49a507031
commit 28da81f3f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 134 additions and 55 deletions

@ -12,6 +12,7 @@ import { clampNumber } from "../../utils/helpers/clampNumber";
export interface ActionParams { export interface ActionParams {
desc: string; desc: string;
warning?: string;
successScaling?: string; successScaling?: string;
baseDifficulty?: number; baseDifficulty?: number;
rewardFac?: number; rewardFac?: number;
@ -26,6 +27,7 @@ export interface ActionParams {
export abstract class ActionClass { export abstract class ActionClass {
desc = ""; desc = "";
warning = "";
successScaling = ""; successScaling = "";
// For LevelableActions, the base difficulty can be increased based on action level // For LevelableActions, the base difficulty can be increased based on action level
baseDifficulty = 100; baseDifficulty = 100;
@ -63,6 +65,7 @@ export abstract class ActionClass {
constructor(params: ActionParams | null = null) { constructor(params: ActionParams | null = null) {
if (!params) return; if (!params) return;
this.desc = params.desc; this.desc = params.desc;
if (params.warning) this.warning = params.warning;
if (params.successScaling) this.successScaling = params.successScaling; if (params.successScaling) this.successScaling = params.successScaling;
if (params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10); if (params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);

@ -829,24 +829,25 @@ export class Bladeburner implements OperationTeam {
} }
completeContract(success: boolean, action: Contract): void { completeContract(success: boolean, action: Contract): void {
if (!success) {
return;
}
const city = this.getCurrentCity(); const city = this.getCurrentCity();
if (success) { switch (action.name) {
switch (action.name) { case BladeburnerContractName.Tracking:
case BladeburnerContractName.Tracking: // Increase estimate accuracy by a relatively small amount
// Increase estimate accuracy by a relatively small amount city.improvePopulationEstimateByCount(
city.improvePopulationEstimateByCount( getRandomIntInclusive(100, 1e3) * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate),
getRandomIntInclusive(100, 1e3) * this.getSkillMult(BladeburnerMultName.SuccessChanceEstimate), );
); break;
break; case BladeburnerContractName.BountyHunter:
case BladeburnerContractName.BountyHunter: city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });
city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 }); city.changeChaosByCount(0.02);
city.changeChaosByCount(0.02); break;
break; case BladeburnerContractName.Retirement:
case BladeburnerContractName.Retirement: city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });
city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 }); city.changeChaosByCount(0.04);
city.changeChaosByCount(0.04); break;
break;
}
} }
} }

@ -9,9 +9,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
name: BladeburnerContractName.Tracking, name: BladeburnerContractName.Tracking,
desc: desc:
"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT " + "Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT " +
"engage. Stealth is of the utmost importance.\n\n" + "engage. Stealth is of the utmost importance.\n" +
"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever " + "Successfully completing this contract will slightly improve the Synthoid population estimate of your current city.",
"city you are currently in.",
successScaling: successScaling:
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Charisma. Unaffected by Hacking skill.", "Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Charisma. Unaffected by Hacking skill.",
baseDifficulty: 125, baseDifficulty: 125,
@ -44,9 +43,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
[BladeburnerContractName.BountyHunter]: new Contract({ [BladeburnerContractName.BountyHunter]: new Contract({
name: BladeburnerContractName.BountyHunter, name: BladeburnerContractName.BountyHunter,
desc: desc:
"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n\n" + "Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n" +
"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also " + "Successfully completing this contract will decrease the Synthoid population of your current city and increase its chaos level.",
"increase its chaos level.",
successScaling: successScaling:
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Charisma. Unaffected by Hacking skill.", "Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Charisma. Unaffected by Hacking skill.",
baseDifficulty: 250, baseDifficulty: 250,
@ -79,9 +77,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
[BladeburnerContractName.Retirement]: new Contract({ [BladeburnerContractName.Retirement]: new Contract({
name: BladeburnerContractName.Retirement, name: BladeburnerContractName.Retirement,
desc: desc:
"Hunt down and retire (kill) rogue Synthoids.\n\n" + "Hunt down and retire (kill) rogue Synthoids.\n" +
"Successfully completing a Retirement contract will lower the population in your current city, and will also " + "Successfully completing this contract will decrease the Synthoid population of your current city and increase its chaos level.",
"increase its chaos level.",
successScaling: "Affected by combat stats. Minor bonus from Charisma. Unaffected by Hacking skill.", successScaling: "Affected by combat stats. Minor bonus from Charisma. Unaffected by Hacking skill.",
baseDifficulty: 200, baseDifficulty: 200,
difficultyFac: 1.03, difficultyFac: 1.03,

@ -16,7 +16,7 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
desc: desc:
"Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations " + "Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations " +
"and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the " + "and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the " +
"current city.\n\n" + "current city.\n" +
"Does NOT require stamina.", "Does NOT require stamina.",
}), }),
[BladeburnerGeneralActionName.Recruitment]: new GeneralAction({ [BladeburnerGeneralActionName.Recruitment]: new GeneralAction({
@ -30,7 +30,7 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
return Math.pow(person.skills.charisma, 0.45) / (bladeburner.teamSize - bladeburner.sleeveSize + 1); return Math.pow(person.skills.charisma, 0.45) / (bladeburner.teamSize - bladeburner.sleeveSize + 1);
}, },
desc: desc:
"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n\n" + "Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n" +
"Does NOT require stamina.", "Does NOT require stamina.",
successScaling: "Success chance is affected by Charisma.", successScaling: "Success chance is affected by Charisma.",
}), }),
@ -38,8 +38,8 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
name: BladeburnerGeneralActionName.Diplomacy, name: BladeburnerGeneralActionName.Diplomacy,
getActionTime: () => 60, getActionTime: () => 60,
desc: desc:
"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in " + "Improve diplomatic relations with the Synthoid population. Completing this action will reduce the chaos level of " +
"your current city.\n\n" + "your current city.\n" +
"Does NOT require stamina.", "Does NOT require stamina.",
}), }),
[BladeburnerGeneralActionName.HyperbolicRegen]: new GeneralAction({ [BladeburnerGeneralActionName.HyperbolicRegen]: new GeneralAction({
@ -54,6 +54,8 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
getActionTime: () => 60, getActionTime: () => 60,
desc: desc:
"Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate " + "Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate " +
"additional contracts and operations, at the cost of increased Chaos.", "additional contracts and operations at the cost of increasing the chaos level of all cities.\n" +
"Does NOT require stamina.",
warning: "This action increases chaos of all cities by percentage.",
}), }),
}; };

@ -9,8 +9,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
[BladeburnerOperationName.Investigation]: new Operation({ [BladeburnerOperationName.Investigation]: new Operation({
name: BladeburnerOperationName.Investigation, name: BladeburnerOperationName.Investigation,
desc: desc:
"As a field agent, investigate and identify Synthoid populations, movements, and operations.\n\n" + "As a field agent, investigate and identify Synthoid populations, movements, and operations.\n" +
"Successful Investigation ops will increase the accuracy of your synthoid data.\n\n" + "Successful Investigation ops will increase the accuracy of your synthoid data.\n" +
"You will NOT lose HP from failed Investigation ops.", "You will NOT lose HP from failed Investigation ops.",
successScaling: "Significantly affected by Hacking skill and Charisma. Minor bonus from combat stats.", successScaling: "Significantly affected by Hacking skill and Charisma. Minor bonus from combat stats.",
baseDifficulty: 400, baseDifficulty: 400,
@ -43,7 +43,7 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
[BladeburnerOperationName.Undercover]: new Operation({ [BladeburnerOperationName.Undercover]: new Operation({
name: BladeburnerOperationName.Undercover, name: BladeburnerOperationName.Undercover,
desc: desc:
"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n\n" + "Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n" +
"Successful Undercover ops will increase the accuracy of your synthoid data.", "Successful Undercover ops will increase the accuracy of your synthoid data.",
successScaling: successScaling:
"Affected by Hacking skill, Dexterity, Agility and Charisma. Minor bonus from Defense and Strength.", "Affected by Hacking skill, Dexterity, Agility and Charisma. Minor bonus from Defense and Strength.",
@ -77,7 +77,10 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
}), }),
[BladeburnerOperationName.Sting]: new Operation({ [BladeburnerOperationName.Sting]: new Operation({
name: BladeburnerOperationName.Sting, name: BladeburnerOperationName.Sting,
desc: "Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.", desc:
"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.\n" +
"Completing this operation will increase the chaos level of your current city. If you complete it successfully, it will decrease the Synthoid population of your current city.",
warning: "This action decreases population by percentage.",
successScaling: successScaling:
"Significantly affected by Hacking skill and Dexterity. Major bonus from Charisma. Minor bonus from combat stats.", "Significantly affected by Hacking skill and Dexterity. Major bonus from Charisma. Minor bonus from combat stats.",
baseDifficulty: 650, baseDifficulty: 650,
@ -111,7 +114,9 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
name: BladeburnerOperationName.Raid, name: BladeburnerOperationName.Raid,
desc: desc:
"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your " + "Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your " +
"current city in order for this Operation to be successful.", "current city in order for this Operation to be successful.\n" +
"Completing this operation will decrease the Synthoid population of your current city and increase its chaos level.",
warning: "This action decreases population and increases chaos by percentage.",
successScaling: "Affected by combat stats. Minor bonus from Hacking skill. Unaffected by Charisma.", successScaling: "Affected by combat stats. Minor bonus from Hacking skill. Unaffected by Charisma.",
baseDifficulty: 800, baseDifficulty: 800,
difficultyFac: 1.045, difficultyFac: 1.045,
@ -148,7 +153,9 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
name: BladeburnerOperationName.StealthRetirement, name: BladeburnerOperationName.StealthRetirement,
desc: desc:
"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any " + "Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any " +
"attention. Stealth and discretion are key.", "attention. Stealth and discretion are key.\n" +
"Completing this operation will DECREASE the chaos level of your current city. If you complete it successfully, it will decrease the Synthoid population of your current city.",
warning: "This action decreases population by percentage.",
successScaling: successScaling:
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Hacking skill. Unaffected by Charisma.", "Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Hacking skill. Unaffected by Charisma.",
baseDifficulty: 1000, baseDifficulty: 1000,
@ -183,7 +190,9 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
name: BladeburnerOperationName.Assassination, name: BladeburnerOperationName.Assassination,
desc: desc:
"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the " + "Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the " +
"Synthoid communities.", "Synthoid communities.\n" +
"Completing this operation may increase the chaos level of your current city. If you complete it successfully, it will decrease the Synthoid population of your current city.",
warning: "This action may increase chaos by percentage.",
successScaling: successScaling:
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Hacking skill.\n" + "Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Hacking skill.\n" +
"Unaffected by Charisma.", "Unaffected by Charisma.",

@ -2,7 +2,7 @@ import type { Bladeburner } from "../Bladeburner";
import type { Action } from "../Types"; import type { Action } from "../Types";
import React from "react"; import React from "react";
import { Box, Typography } from "@mui/material"; import { Box, Tooltip, Typography } from "@mui/material";
import { CopyableText } from "../../ui/React/CopyableText"; import { CopyableText } from "../../ui/React/CopyableText";
import { createProgressBarText } from "../../utils/helpers/createProgressBarText"; import { createProgressBarText } from "../../utils/helpers/createProgressBarText";
import { StartButton } from "./StartButton"; import { StartButton } from "./StartButton";
@ -13,6 +13,8 @@ import { formatNumberNoSuffix } from "../../ui/formatNumber";
import { BlackOperation, Operation } from "../Actions"; import { BlackOperation, Operation } from "../Actions";
import { BladeburnerConstants } from "../data/Constants"; import { BladeburnerConstants } from "../data/Constants";
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
import WarningIcon from "@mui/icons-material/Warning";
import { Settings } from "../../Settings/Settings";
interface ActionHeaderProps { interface ActionHeaderProps {
bladeburner: Bladeburner; bladeburner: Bladeburner;
@ -87,6 +89,13 @@ export function ActionHeader({ bladeburner, action, rerender }: ActionHeaderProp
return ( return (
<Box display="flex" flexDirection="row" alignItems="center"> <Box display="flex" flexDirection="row" alignItems="center">
<CopyableText value={action.name} /> <CopyableText value={action.name} />
{action.warning && (
<Tooltip title={action.warning} sx={{ marginLeft: "10px" }}>
<Typography color={Settings.theme.warning}>
<WarningIcon />
</Typography>
</Tooltip>
)}
<StartButton bladeburner={bladeburner} action={action} rerender={rerender} /> <StartButton bladeburner={bladeburner} action={action} rerender={rerender} />
{allowTeam && <TeamSizeButton bladeburner={bladeburner} action={action} />} {allowTeam && <TeamSizeButton bladeburner={bladeburner} action={action} />}
</Box> </Box>

@ -2,14 +2,13 @@ import type { Bladeburner } from "../Bladeburner";
import type { GeneralAction } from "../Actions/GeneralAction"; import type { GeneralAction } from "../Actions/GeneralAction";
import React from "react"; import React from "react";
import { formatNumberNoSuffix } from "../../ui/formatNumber";
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions"; import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
import { Player } from "@player"; import { Player } from "@player";
import { Paper, Typography } from "@mui/material"; import { Paper, Typography } from "@mui/material";
import { useRerender } from "../../ui/React/hooks"; import { useRerender } from "../../ui/React/hooks";
import { ActionHeader } from "./ActionHeader"; import { ActionHeader } from "./ActionHeader";
import { BladeburnerGeneralActionName } from "@enums"; import { BladeburnerGeneralActionName } from "@enums";
import { clampNumber } from "../../utils/helpers/clampNumber"; import { SuccessChance } from "./SuccessChance";
interface GeneralActionElemProps { interface GeneralActionElemProps {
bladeburner: Bladeburner; bladeburner: Bladeburner;
@ -24,15 +23,14 @@ export function GeneralActionElem({ bladeburner, action }: GeneralActionElemProp
<Paper sx={{ my: 1, p: 1 }}> <Paper sx={{ my: 1, p: 1 }}>
<ActionHeader bladeburner={bladeburner} action={action} rerender={rerender}></ActionHeader> <ActionHeader bladeburner={bladeburner} action={action} rerender={rerender}></ActionHeader>
<br /> <br />
<Typography>{action.desc}</Typography> <Typography whiteSpace={"pre-wrap"}>{action.desc}</Typography>
<br /> <br />
<Typography> <Typography>
Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)} Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}
{action.name === BladeburnerGeneralActionName.Recruitment && ( {action.name === BladeburnerGeneralActionName.Recruitment && (
<> <>
<br /> <br />
Estimated success chance:{" "} <SuccessChance action={action} bladeburner={bladeburner} />
{formatNumberNoSuffix(clampNumber(action.getSuccessChance(bladeburner, Player), 0, 1) * 100, 1)}%
</> </>
)} )}
</Typography> </Typography>

@ -13,6 +13,8 @@ import { Factions } from "../../Faction/Factions";
import { Router } from "../../ui/GameRoot"; import { Router } from "../../ui/GameRoot";
import { Page } from "../../ui/Router"; import { Page } from "../../ui/Router";
import { TravelModal } from "./TravelModal"; import { TravelModal } from "./TravelModal";
import WarningIcon from "@mui/icons-material/Warning";
import { Settings } from "../../Settings/Settings";
interface StatsProps { interface StatsProps {
bladeburner: Bladeburner; bladeburner: Bladeburner;
@ -29,6 +31,35 @@ export function Stats({ bladeburner }: StatsProps): React.ReactElement {
if (success) Router.toPage(Page.Faction, { faction: Factions[FactionName.Bladeburners] }); if (success) Router.toPage(Page.Faction, { faction: Factions[FactionName.Bladeburners] });
} }
let populationTextColor = Settings.theme.primary;
let populationWarning: string | null = null;
/**
* The initial population is randomized between 1e9 and 1.5e9. If it drops below 1e9, the success chance is reduced.
* We use 2 thresholds:
* - 8e8: The success chance is reduced by ~15%. On average, random events usually do not reduce the population to
* this low number.
* - 1e8: The success chance is reduced by ~80%. If the population is reduced to this number, it's very likely that
* the player is performing actions that decrease the population by percentage.
*/
if (bladeburner.getCurrentCity().pop <= 1e8) {
populationTextColor = Settings.theme.error;
populationWarning = "extremely low";
} else if (bladeburner.getCurrentCity().pop < 9e8) {
populationTextColor = Settings.theme.warning;
populationWarning = "low";
}
let chaosTextColor = Settings.theme.primary;
let chaosWarning: string | null = null;
// When chaos is 1e4, the success chance is reduced by ~99%.
if (bladeburner.getCurrentCity().chaos >= 1e4) {
chaosTextColor = Settings.theme.error;
chaosWarning = "extremely high";
} else if (bladeburner.getCurrentCity().chaos >= BladeburnerConstants.ChaosThreshold) {
chaosTextColor = Settings.theme.warning;
chaosWarning = "high";
}
return ( return (
<Paper sx={{ p: 1, overflowY: "auto", overflowX: "hidden", wordBreak: "break-all" }}> <Paper sx={{ p: 1, overflowY: "auto", overflowX: "hidden", wordBreak: "break-all" }}>
<Box sx={{ display: "flex", flexDirection: "column", gap: 1, maxHeight: "60vh" }}> <Box sx={{ display: "flex", flexDirection: "column", gap: 1, maxHeight: "60vh" }}>
@ -96,13 +127,30 @@ export function Stats({ bladeburner }: StatsProps): React.ReactElement {
<Box display="flex"> <Box display="flex">
<Tooltip <Tooltip
title={ title={
<Typography> <Typography component="div">
This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An <Typography>
accurate population count increases success rate estimates. This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An
accurate population estimate increases success rate estimates.
</Typography>
<br />
<Typography>
You should be careful with actions that decrease Synthoid population by percentage. Those actions can
kill a large number of Synthoids in a short amount of time. Low population count decreases the success
chance of most actions. If the population count is too low, you will need to move to another city.
</Typography>
{populationWarning && (
<>
<br />
The intelligence agency notifies us that Synthoid population is {populationWarning}.
</>
)}
</Typography> </Typography>
} }
> >
<Typography>Est. Synthoid Population: {formatPopulation(bladeburner.getCurrentCity().popEst)}</Typography> <Typography color={populationTextColor} display="flex">
Est. Synthoid Population: {formatPopulation(bladeburner.getCurrentCity().popEst)}
{populationWarning && <WarningIcon sx={{ marginLeft: "10px" }} />}
</Typography>
</Tooltip> </Tooltip>
</Box> </Box>
<Box display="flex"> <Box display="flex">
@ -120,13 +168,24 @@ export function Stats({ bladeburner }: StatsProps): React.ReactElement {
<Box display="flex"> <Box display="flex">
<Tooltip <Tooltip
title={ title={
<Typography> <Typography component="div">
The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a <Typography>
chaos level can make contracts and operations harder. Tensions and conflicts between humans and Synthoids increase the city's chaos level. High chaos level
makes contracts and operations harder.
</Typography>
{chaosWarning && (
<>
<br />
Chaos level is {chaosWarning}.
</>
)}
</Typography> </Typography>
} }
> >
<Typography>City Chaos: {formatBigNumber(bladeburner.getCurrentCity().chaos)}</Typography> <Typography color={chaosTextColor} display="flex">
City Chaos: {formatBigNumber(bladeburner.getCurrentCity().chaos)}
{chaosWarning && <WarningIcon sx={{ marginLeft: "10px" }} />}
</Typography>
</Tooltip> </Tooltip>
</Box> </Box>
<br /> <br />

@ -7,6 +7,7 @@ import { Player } from "@player";
import { formatPercent } from "../../ui/formatNumber"; import { formatPercent } from "../../ui/formatNumber";
import { StealthIcon } from "./StealthIcon"; import { StealthIcon } from "./StealthIcon";
import { KillIcon } from "./KillIcon"; import { KillIcon } from "./KillIcon";
import InfoIcon from "@mui/icons-material/Info";
import { Tooltip, Typography } from "@mui/material"; import { Tooltip, Typography } from "@mui/material";
interface SuccessChanceProps { interface SuccessChanceProps {
@ -22,10 +23,10 @@ export function SuccessChance({ bladeburner, action }: SuccessChanceProps): Reac
return ( return (
<> <>
<Tooltip title={action.successScaling ? <Typography>{action.successScaling}</Typography> : ""}> <Tooltip title={action.successScaling ? <Typography>{action.successScaling}</Typography> : ""}>
<span> <Typography component="span" sx={{ marginRight: "15px" }}>
Estimated success chance: {chance} Estimated success chance: {chance}
{/* Intentional space*/}{" "} {action.successScaling && <InfoIcon sx={{ fontSize: "1.1rem", marginLeft: "10px" }} />}
</span> </Typography>
</Tooltip> </Tooltip>
{action.isStealth ? <StealthIcon /> : <></>} {action.isStealth ? <StealthIcon /> : <></>}
{action.isKill ? <KillIcon /> : <></>} {action.isKill ? <KillIcon /> : <></>}