mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-25 17:13:47 +01:00
BLADEBURNER: UI now shows tooltips on action success chance to indicate which stat it scales with (#1699)
This commit is contained in:
parent
cc4c6d150b
commit
2e6aa8989c
@ -12,6 +12,7 @@ import { clampNumber } from "../../utils/helpers/clampNumber";
|
|||||||
|
|
||||||
export interface ActionParams {
|
export interface ActionParams {
|
||||||
desc: string;
|
desc: string;
|
||||||
|
successScaling?: string;
|
||||||
baseDifficulty?: number;
|
baseDifficulty?: number;
|
||||||
rewardFac?: number;
|
rewardFac?: number;
|
||||||
rankGain?: number;
|
rankGain?: number;
|
||||||
@ -25,6 +26,7 @@ export interface ActionParams {
|
|||||||
|
|
||||||
export abstract class ActionClass {
|
export abstract class ActionClass {
|
||||||
desc = "";
|
desc = "";
|
||||||
|
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;
|
||||||
|
|
||||||
@ -61,6 +63,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.successScaling) this.successScaling = params.successScaling;
|
||||||
if (params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);
|
if (params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);
|
||||||
|
|
||||||
if (params.rankGain) this.rankGain = params.rankGain;
|
if (params.rankGain) this.rankGain = params.rankGain;
|
||||||
@ -140,6 +143,7 @@ export abstract class ActionClass {
|
|||||||
function clamp(x: number): number {
|
function clamp(x: number): number {
|
||||||
return Math.max(0, Math.min(x, 1));
|
return Math.max(0, Math.min(x, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
const est = this.getSuccessChance(bladeburner, person, { est: true });
|
const est = this.getSuccessChance(bladeburner, person, { est: true });
|
||||||
const real = this.getSuccessChance(bladeburner, person);
|
const real = this.getSuccessChance(bladeburner, person);
|
||||||
const diff = Math.abs(real - est);
|
const diff = Math.abs(real - est);
|
||||||
|
@ -12,6 +12,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
|
|||||||
"engage. Stealth is of the utmost importance.\n\n" +
|
"engage. Stealth is of the utmost importance.\n\n" +
|
||||||
"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever " +
|
"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever " +
|
||||||
"city you are currently in.",
|
"city you are currently in.",
|
||||||
|
successScaling:
|
||||||
|
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Charisma. Unaffected by Hacking skill.",
|
||||||
baseDifficulty: 125,
|
baseDifficulty: 125,
|
||||||
difficultyFac: 1.02,
|
difficultyFac: 1.02,
|
||||||
rewardFac: 1.041,
|
rewardFac: 1.041,
|
||||||
@ -45,6 +47,8 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
|
|||||||
"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\n" +
|
||||||
"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also " +
|
"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also " +
|
||||||
"increase its chaos level.",
|
"increase its chaos level.",
|
||||||
|
successScaling:
|
||||||
|
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Charisma. Unaffected by Hacking skill.",
|
||||||
baseDifficulty: 250,
|
baseDifficulty: 250,
|
||||||
difficultyFac: 1.04,
|
difficultyFac: 1.04,
|
||||||
rewardFac: 1.085,
|
rewardFac: 1.085,
|
||||||
@ -78,6 +82,7 @@ export function createContracts(): Record<BladeburnerContractName, Contract> {
|
|||||||
"Hunt down and retire (kill) rogue Synthoids.\n\n" +
|
"Hunt down and retire (kill) rogue Synthoids.\n\n" +
|
||||||
"Successfully completing a Retirement contract will lower the population in your current city, and will also " +
|
"Successfully completing a Retirement contract will lower the population in your current city, and will also " +
|
||||||
"increase its chaos level.",
|
"increase its chaos level.",
|
||||||
|
successScaling: "Affected by combat stats. Minor bonus from Charisma. Unaffected by Hacking skill.",
|
||||||
baseDifficulty: 200,
|
baseDifficulty: 200,
|
||||||
difficultyFac: 1.03,
|
difficultyFac: 1.03,
|
||||||
rewardFac: 1.065,
|
rewardFac: 1.065,
|
||||||
|
@ -32,6 +32,7 @@ export const GeneralActions: Record<BladeburnerGeneralActionName, GeneralAction>
|
|||||||
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\n" +
|
||||||
"Does NOT require stamina.",
|
"Does NOT require stamina.",
|
||||||
|
successScaling: "Success chance is affected by Charisma.",
|
||||||
}),
|
}),
|
||||||
[BladeburnerGeneralActionName.Diplomacy]: new GeneralAction({
|
[BladeburnerGeneralActionName.Diplomacy]: new GeneralAction({
|
||||||
name: BladeburnerGeneralActionName.Diplomacy,
|
name: BladeburnerGeneralActionName.Diplomacy,
|
||||||
|
@ -12,6 +12,7 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
|
|||||||
"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\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\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.",
|
||||||
baseDifficulty: 400,
|
baseDifficulty: 400,
|
||||||
difficultyFac: 1.03,
|
difficultyFac: 1.03,
|
||||||
rewardFac: 1.07,
|
rewardFac: 1.07,
|
||||||
@ -44,6 +45,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
|
|||||||
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\n" +
|
||||||
"Successful Undercover ops will increase the accuracy of your synthoid data.",
|
"Successful Undercover ops will increase the accuracy of your synthoid data.",
|
||||||
|
successScaling:
|
||||||
|
"Affected by Hacking skill, Dexterity, Agility and Charisma. Minor bonus from Defense and Strength.",
|
||||||
baseDifficulty: 500,
|
baseDifficulty: 500,
|
||||||
difficultyFac: 1.04,
|
difficultyFac: 1.04,
|
||||||
rewardFac: 1.09,
|
rewardFac: 1.09,
|
||||||
@ -75,6 +78,8 @@ 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.",
|
||||||
|
successScaling:
|
||||||
|
"Significantly affected by Hacking skill and Dexterity. Major bonus from Charisma. Minor bonus from combat stats.",
|
||||||
baseDifficulty: 650,
|
baseDifficulty: 650,
|
||||||
difficultyFac: 1.04,
|
difficultyFac: 1.04,
|
||||||
rewardFac: 1.095,
|
rewardFac: 1.095,
|
||||||
@ -107,6 +112,7 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
|
|||||||
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.",
|
||||||
|
successScaling: "Affected by combat stats. Minor bonus from Hacking skill. Unaffected by Charisma.",
|
||||||
baseDifficulty: 800,
|
baseDifficulty: 800,
|
||||||
difficultyFac: 1.045,
|
difficultyFac: 1.045,
|
||||||
rewardFac: 1.1,
|
rewardFac: 1.1,
|
||||||
@ -143,6 +149,8 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
|
|||||||
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.",
|
||||||
|
successScaling:
|
||||||
|
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Hacking skill. Unaffected by Charisma.",
|
||||||
baseDifficulty: 1000,
|
baseDifficulty: 1000,
|
||||||
difficultyFac: 1.05,
|
difficultyFac: 1.05,
|
||||||
rewardFac: 1.11,
|
rewardFac: 1.11,
|
||||||
@ -176,6 +184,9 @@ export function createOperations(): Record<BladeburnerOperationName, Operation>
|
|||||||
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.",
|
||||||
|
successScaling:
|
||||||
|
"Significantly affected by Dexterity and Agility. Minor bonus from combat stats and Hacking skill.\n" +
|
||||||
|
"Unaffected by Charisma.",
|
||||||
baseDifficulty: 1500,
|
baseDifficulty: 1500,
|
||||||
difficultyFac: 1.06,
|
difficultyFac: 1.06,
|
||||||
rewardFac: 1.14,
|
rewardFac: 1.14,
|
||||||
|
@ -42,7 +42,8 @@ export function BlackOpPage({ bladeburner }: BlackOpPageProps): React.ReactEleme
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank
|
Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank
|
||||||
losses.
|
losses. Black Ops success significantly affected by combat stats. Many Ops benefit from Hacking skill.
|
||||||
|
Unaffected by Charisma.
|
||||||
</Typography>
|
</Typography>
|
||||||
{bladeburner.numBlackOpsComplete >= blackOpsArray.length ? (
|
{bladeburner.numBlackOpsComplete >= blackOpsArray.length ? (
|
||||||
<Button sx={{ my: 1, p: 1 }} onClick={finishBitNode}>
|
<Button sx={{ my: 1, p: 1 }} onClick={finishBitNode}>
|
||||||
|
@ -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 { Tooltip, Typography } from "@mui/material";
|
||||||
|
|
||||||
interface SuccessChanceProps {
|
interface SuccessChanceProps {
|
||||||
bladeburner: Bladeburner;
|
bladeburner: Bladeburner;
|
||||||
@ -20,7 +21,13 @@ export function SuccessChance({ bladeburner, action }: SuccessChanceProps): Reac
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
Estimated success chance: {chance} {action.isStealth ? <StealthIcon /> : <></>}
|
<Tooltip title={action.successScaling ? <Typography>{action.successScaling}</Typography> : ""}>
|
||||||
|
<span>
|
||||||
|
Estimated success chance: {chance}
|
||||||
|
{/* Intentional space*/}{" "}
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
{action.isStealth ? <StealthIcon /> : <></>}
|
||||||
{action.isKill ? <KillIcon /> : <></>}
|
{action.isKill ? <KillIcon /> : <></>}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user