bitburner-src/src/ui/CharacterStats.tsx

605 lines
21 KiB
TypeScript
Raw Normal View History

2022-04-08 01:32:11 +02:00
import { Paper, Table, TableBody, Box, IconButton, Typography, Container, Tooltip } from "@mui/material";
import { MoreHoriz, Info } from "@mui/icons-material";
import React, { useState } from "react";
import { BitNodes } from "../BitNode/BitNode";
import { currentNodeMults } from "../BitNode/BitNodeMultipliers";
import { BitNodeMultipliersDisplay } from "../BitNode/ui/BitnodeMultipliersDescription";
import { HacknetServerConstants } from "../Hacknet/data/Constants";
2022-04-07 18:31:06 +02:00
import { getPurchaseServerLimit } from "../Server/ServerPurchases";
import { Settings } from "../Settings/Settings";
2021-09-20 05:29:02 +02:00
import { MoneySourceTracker } from "../utils/MoneySourceTracker";
2022-04-07 18:31:06 +02:00
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
import { Player } from "@player";
import { formatPercent, formatNumber } from "./formatNumber";
2021-09-18 19:29:01 +02:00
import { Modal } from "./React/Modal";
2022-04-07 18:31:06 +02:00
import { Money } from "./React/Money";
import { StatsRow } from "./React/StatsRow";
import { StatsTable } from "./React/StatsTable";
import { useRerender } from "./React/hooks";
import { getMaxFavor } from "../Go/effects/effect";
2021-09-10 21:08:51 +02:00
2022-04-07 18:50:23 +02:00
interface EmployersModalProps {
open: boolean;
onClose: () => void;
}
const EmployersModal = ({ open, onClose }: EmployersModalProps): React.ReactElement => {
return (
<Modal open={open} onClose={onClose}>
2021-09-18 09:00:07 +02:00
<>
2022-04-08 01:32:11 +02:00
<Typography variant="h5">All Employers</Typography>
2021-09-18 09:00:07 +02:00
<ul>
2022-09-13 00:00:09 +02:00
{Object.keys(Player.jobs).map((j) => (
2022-04-07 18:50:23 +02:00
<Typography key={j}>* {j}</Typography>
2021-09-18 09:00:07 +02:00
))}
</ul>
</>
2022-04-07 18:50:23 +02:00
</Modal>
);
};
2021-09-10 21:08:51 +02:00
2022-05-07 23:51:34 +02:00
interface IMultRow {
// The name of the multiplier
mult: string;
// The player's raw multiplier value
value: number;
// The player's effective multiplier value, affected by BitNode mults
effValue?: number;
// The text color for the row
color?: string;
// Whether to format as percent or scalar
isNumber?: boolean;
2022-05-07 23:51:34 +02:00
}
2022-04-07 18:31:06 +02:00
interface MultTableProps {
2022-05-07 23:51:34 +02:00
rows: IMultRow[];
2022-04-07 18:31:06 +02:00
color: string;
2022-04-08 02:06:42 +02:00
noMargin?: boolean;
2021-09-18 09:00:07 +02:00
}
2022-04-07 18:31:06 +02:00
function MultiplierTable(props: MultTableProps): React.ReactElement {
2021-09-18 09:00:07 +02:00
return (
<Table sx={{ display: "table", width: "100%", mb: props.noMargin ? 0 : 2 }}>
2022-04-07 18:31:06 +02:00
<TableBody>
{props.rows.map((data) => {
2022-05-07 23:51:34 +02:00
const { mult, value, effValue = null, color = props.color } = data;
2022-04-07 18:31:06 +02:00
2022-09-13 00:00:09 +02:00
if (effValue !== null && effValue !== value && Player.sourceFileLvl(5) > 0) {
2022-04-07 18:31:06 +02:00
return (
2022-05-07 23:51:34 +02:00
<StatsRow key={mult} name={mult} color={color} data={{}}>
2022-04-07 18:31:06 +02:00
<>
2022-05-07 23:51:34 +02:00
<Typography color={color}>
{data.isNumber ? (
formatNumber(value, 0)
) : (
<>
<span style={{ opacity: 0.5 }}>{formatPercent(value)}</span> {formatPercent(effValue)}
</>
)}
2022-04-07 18:31:06 +02:00
</Typography>
</>
</StatsRow>
);
}
return (
<StatsRow
key={mult}
name={mult}
color={color}
data={{ content: data.isNumber ? formatNumber(value, 0) : formatPercent(value) }}
/>
);
2022-04-07 18:31:06 +02:00
})}
</TableBody>
</Table>
2021-09-18 09:00:07 +02:00
);
}
function CurrentBitNode(): React.ReactElement {
if (Player.sourceFiles.size > 0) {
2022-09-13 00:00:09 +02:00
const index = "BitNode" + Player.bitNodeN;
const lvl = Math.min(Player.sourceFileLvl(Player.bitNodeN) + 1, Player.bitNodeN === 12 ? Infinity : 3);
2021-09-18 09:00:07 +02:00
return (
2022-05-07 21:48:26 +02:00
<Paper sx={{ mb: 1, p: 1 }}>
<Typography variant="h5">
2022-09-13 00:00:09 +02:00
BitNode {Player.bitNodeN}: {BitNodes[index].name} (Level {lvl})
2022-05-07 21:48:26 +02:00
</Typography>
<Typography sx={{ whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>{BitNodes[index].info}</Typography>
</Paper>
2021-09-18 09:00:07 +02:00
);
2021-09-05 01:09:30 +02:00
}
2021-09-18 09:00:07 +02:00
return <></>;
}
2021-09-18 19:29:01 +02:00
interface IMoneyModalProps {
open: boolean;
onClose: () => void;
}
2021-09-18 09:00:07 +02:00
2021-09-18 19:29:01 +02:00
function MoneyModal({ open, onClose }: IMoneyModalProps): React.ReactElement {
2021-09-09 05:47:34 +02:00
function convertMoneySourceTrackerToString(src: MoneySourceTracker): React.ReactElement {
const parts: [string, JSX.Element][] = [[`Total:`, <Money key="total" money={src.total} />]];
2021-10-27 20:18:33 +02:00
if (src.augmentations) {
parts.push([`Augmentations:`, <Money key="aug" money={src.augmentations} />]);
2021-10-27 20:18:33 +02:00
}
2021-09-05 01:09:30 +02:00
if (src.bladeburner) {
parts.push([`Bladeburner:`, <Money key="blade" money={src.bladeburner} />]);
}
2021-10-27 20:18:33 +02:00
if (src.casino) {
parts.push([`Casino:`, <Money key="casino" money={src.casino} />]);
2021-10-27 20:18:33 +02:00
}
2021-09-05 01:09:30 +02:00
if (src.codingcontract) {
parts.push([`Coding Contracts:`, <Money key="coding-contract" money={src.codingcontract} />]);
}
2021-09-05 01:09:30 +02:00
if (src.work) {
parts.push([`Company Work:`, <Money key="company-work" money={src.work} />]);
2021-09-05 01:09:30 +02:00
}
if (src.class) {
parts.push([`Class:`, <Money key="class" money={src.class} />]);
2021-09-05 01:09:30 +02:00
}
if (src.corporation) {
parts.push([`Corporation:`, <Money key="corp" money={src.corporation} />]);
2021-09-05 01:09:30 +02:00
}
if (src.crime) {
parts.push([`Crimes:`, <Money key="crime" money={src.crime} />]);
2021-09-05 01:09:30 +02:00
}
if (src.gang) {
parts.push([`Gang:`, <Money key="gang" money={src.gang} />]);
2021-09-05 01:09:30 +02:00
}
if (src.gang_expenses) {
parts.push([`Gang Expenses:`, <Money key="gang-expenses" money={src.gang_expenses} />]);
}
2021-09-05 01:09:30 +02:00
if (src.hacking) {
parts.push([`Hacking:`, <Money key="hacking" money={src.hacking} />]);
2021-09-05 01:09:30 +02:00
}
2021-10-27 20:18:33 +02:00
if (src.hacknet) {
parts.push([`Hacknet:`, <Money key="hacknet" money={src.hacknet} />]);
2021-09-05 01:09:30 +02:00
}
2021-11-06 02:01:23 +01:00
if (src.hacknet_expenses) {
parts.push([`Hacknet Expenses:`, <Money key="hacknet-expenses" money={src.hacknet_expenses} />]);
2021-11-06 02:01:23 +01:00
}
2021-09-05 01:09:30 +02:00
if (src.hospitalization) {
parts.push([`Hospitalization:`, <Money key="hospital" money={src.hospitalization} />]);
2021-09-05 01:09:30 +02:00
}
if (src.infiltration) {
parts.push([`Infiltration:`, <Money key="infiltration" money={src.infiltration} />]);
2021-09-05 01:09:30 +02:00
}
2021-10-27 20:18:33 +02:00
if (src.servers) {
parts.push([`Servers:`, <Money key="servers" money={src.servers} />]);
2021-10-27 20:18:33 +02:00
}
2021-09-05 01:09:30 +02:00
if (src.stock) {
parts.push([`Stock Market:`, <Money key="market" money={src.stock} />]);
2021-09-05 01:09:30 +02:00
}
if (src.sleeves) {
parts.push([`Sleeves:`, <Money key="sleeves" money={src.sleeves} />]);
}
2021-10-27 20:18:33 +02:00
if (src.other) {
parts.push([`Other:`, <Money key="other" money={src.other} />]);
2021-10-27 20:18:33 +02:00
}
2021-09-18 19:29:01 +02:00
return <StatsTable rows={parts} wide />;
2021-09-05 01:09:30 +02:00
}
2021-09-18 19:29:01 +02:00
let content = (
<>
<Typography variant="h6" color="primary">
Money earned since you last installed Augmentations
</Typography>
<br />
2022-09-13 00:00:09 +02:00
{convertMoneySourceTrackerToString(Player.moneySourceA)}
2021-09-18 19:29:01 +02:00
</>
);
if (Player.sourceFiles.size > 0) {
2021-09-18 19:29:01 +02:00
content = (
2021-09-05 01:09:30 +02:00
<>
2021-09-18 19:29:01 +02:00
{content}
2021-09-05 01:09:30 +02:00
<br />
2021-09-18 19:29:01 +02:00
<br />
<Typography variant="h6" color="primary">
Money earned in this BitNode
</Typography>
<br />
2022-09-13 00:00:09 +02:00
{convertMoneySourceTrackerToString(Player.moneySourceB)}
2021-09-05 01:09:30 +02:00
</>
);
2021-09-18 19:29:01 +02:00
}
2021-09-18 19:29:01 +02:00
return (
<Modal open={open} onClose={onClose}>
{content}
</Modal>
);
}
export function CharacterStats(): React.ReactElement {
const [moneyOpen, setMoneyOpen] = useState(false);
2022-04-07 18:50:23 +02:00
const [employersOpen, setEmployersOpen] = useState(false);
useRerender(200);
2021-09-18 19:29:01 +02:00
2021-09-10 21:08:51 +02:00
const timeRows = [
2022-09-13 00:00:09 +02:00
["Since last Augmentation installation", convertTimeMsToTimeElapsedString(Player.playtimeSinceLastAug)],
2021-09-10 21:08:51 +02:00
];
if (Player.sourceFiles.size > 0) {
2022-09-13 00:00:09 +02:00
timeRows.push(["Since last Bitnode destroyed", convertTimeMsToTimeElapsedString(Player.playtimeSinceLastBitnode)]);
2021-09-05 01:09:30 +02:00
}
2022-09-13 00:00:09 +02:00
timeRows.push(["Total", convertTimeMsToTimeElapsedString(Player.totalPlaytime)]);
2021-09-05 01:09:30 +02:00
return (
2022-04-08 01:32:11 +02:00
<Container maxWidth="lg" disableGutters sx={{ mx: 0 }}>
<Typography variant="h4">Stats</Typography>
<Box sx={{ display: "grid", gridTemplateColumns: "1fr 1fr", minWidth: "fit-content", mb: 1, gap: 1 }}>
2022-04-07 18:31:06 +02:00
<Paper sx={{ p: 1 }}>
2022-04-08 01:32:11 +02:00
<Typography variant="h5">General</Typography>
2022-04-07 18:31:06 +02:00
<Table>
<TableBody>
2022-09-13 00:00:09 +02:00
<StatsRow name="Current City" color={Settings.theme.primary} data={{ content: Player.city }} />
2022-04-07 18:31:06 +02:00
<StatsRow name="Money" color={Settings.theme.money} data={{}}>
<>
2022-09-13 00:00:09 +02:00
<Money money={Player.money} />
2022-04-07 18:31:06 +02:00
<IconButton onClick={() => setMoneyOpen(true)} sx={{ p: 0 }}>
2022-04-08 01:32:11 +02:00
<MoreHoriz color="info" />
2022-04-07 18:31:06 +02:00
</IconButton>
</>
</StatsRow>
2022-07-19 20:21:12 +02:00
2022-09-13 00:00:09 +02:00
{Player.jobs && Object.keys(Player.jobs).length !== 0 ? (
2022-04-07 18:50:23 +02:00
<StatsRow name="All Employers" color={Settings.theme.primary} data={{}}>
<>
2022-09-13 00:00:09 +02:00
<span style={{ color: Settings.theme.primary }}>{Object.keys(Player.jobs).length} total</span>
2022-04-07 18:50:23 +02:00
<IconButton onClick={() => setEmployersOpen(true)} sx={{ p: 0 }}>
2022-04-08 01:32:11 +02:00
<MoreHoriz color="info" />
2022-04-07 18:50:23 +02:00
</IconButton>
</>
</StatsRow>
2022-04-09 16:06:32 +02:00
) : (
<></>
2022-04-07 18:50:23 +02:00
)}
2022-04-07 18:31:06 +02:00
<StatsRow
name="Servers Owned"
color={Settings.theme.primary}
2022-09-13 00:00:09 +02:00
data={{ content: `${Player.purchasedServers.length} / ${getPurchaseServerLimit()}` }}
2022-04-07 18:31:06 +02:00
/>
<StatsRow
2022-09-13 00:00:09 +02:00
name={`Hacknet ${Player.bitNodeN === 9 || Player.sourceFileLvl(9) > 0 ? "Servers" : "Nodes"} owned`}
2022-04-07 18:31:06 +02:00
color={Settings.theme.primary}
data={{
2022-09-13 00:00:09 +02:00
content: `${Player.hacknetNodes.length}${
Player.bitNodeN === 9 || Player.sourceFileLvl(9) > 0
2022-04-14 07:22:50 +02:00
? ` / ${HacknetServerConstants.MaxServers}`
: ""
2022-04-07 18:31:06 +02:00
}`,
}}
/>
<StatsRow
name="Augmentations Installed"
color={Settings.theme.primary}
2022-09-13 00:00:09 +02:00
data={{ content: String(Player.augmentations.length) }}
2022-04-07 18:31:06 +02:00
/>
</TableBody>
</Table>
</Paper>
<Paper sx={{ p: 1 }}>
2022-04-08 01:32:11 +02:00
<Typography variant="h5">Skills</Typography>
2022-04-07 18:31:06 +02:00
<Table>
<TableBody>
<StatsRow
name="Hacking"
color={Settings.theme.hack}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.hacking, exp: Player.exp.hacking }}
2022-04-07 18:31:06 +02:00
/>
<StatsRow
name="Strength"
color={Settings.theme.combat}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.strength, exp: Player.exp.strength }}
2022-04-07 18:31:06 +02:00
/>
<StatsRow
name="Defense"
color={Settings.theme.combat}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.defense, exp: Player.exp.defense }}
2022-04-07 18:31:06 +02:00
/>
<StatsRow
name="Dexterity"
color={Settings.theme.combat}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.dexterity, exp: Player.exp.dexterity }}
2022-04-07 18:31:06 +02:00
/>
<StatsRow
name="Agility"
color={Settings.theme.combat}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.agility, exp: Player.exp.agility }}
2022-04-07 18:31:06 +02:00
/>
<StatsRow
name="Charisma"
color={Settings.theme.cha}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.charisma, exp: Player.exp.charisma }}
2022-04-07 18:31:06 +02:00
/>
2022-09-13 00:00:09 +02:00
{Player.skills.intelligence > 0 && (Player.bitNodeN === 5 || Player.sourceFileLvl(5) > 0) && (
2022-04-07 18:31:06 +02:00
<StatsRow
name="Intelligence"
color={Settings.theme.int}
2022-09-13 00:00:09 +02:00
data={{ level: Player.skills.intelligence, exp: Player.exp.intelligence }}
2022-04-07 18:31:06 +02:00
/>
)}
</TableBody>
</Table>
</Paper>
2021-09-18 19:29:01 +02:00
</Box>
2022-04-07 18:31:06 +02:00
2022-05-07 21:48:26 +02:00
<Paper sx={{ p: 1, mb: 1 }}>
<Typography variant="h5" color="primary" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
Multipliers
2022-09-13 00:00:09 +02:00
{Player.sourceFileLvl(5) > 0 && (
2022-05-07 21:48:26 +02:00
<Tooltip
title={
<Typography>
Displays your current multipliers.
<br />
<br />
When there is a dim number next to a multiplier, that means that the multiplier in question is being
affected by BitNode multipliers.
<br />
<br />
The dim number is the raw multiplier, and the undimmed number is the effective multiplier, as dictated
by the BitNode.
</Typography>
}
>
<Info sx={{ ml: 1, mb: 0.5 }} color="info" />
</Tooltip>
)}
</Typography>
<Box sx={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: 1 }}>
<Box>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Hacking Chance",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacking_chance,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacking Speed",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacking_speed,
effValue: Player.mults.hacking_speed * currentNodeMults.HackingSpeedMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacking Money",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacking_money,
effValue: Player.mults.hacking_money * currentNodeMults.ScriptHackMoney,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacking Growth",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacking_grow,
effValue: Player.mults.hacking_grow * currentNodeMults.ServerGrowthRate,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.hack}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Hacking Level",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacking,
effValue: Player.mults.hacking * currentNodeMults.HackingLevelMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacking Experience",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacking_exp,
effValue: Player.mults.hacking_exp * currentNodeMults.HackExpGain,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.hack}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Strength Level",
2022-09-13 00:00:09 +02:00
value: Player.mults.strength,
effValue: Player.mults.strength * currentNodeMults.StrengthLevelMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Strength Experience",
2022-09-13 00:00:09 +02:00
value: Player.mults.strength_exp,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.combat}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Defense Level",
2022-09-13 00:00:09 +02:00
value: Player.mults.defense,
effValue: Player.mults.defense * currentNodeMults.DefenseLevelMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Defense Experience",
2022-09-13 00:00:09 +02:00
value: Player.mults.defense_exp,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.combat}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Dexterity Level",
2022-09-13 00:00:09 +02:00
value: Player.mults.dexterity,
effValue: Player.mults.dexterity * currentNodeMults.DexterityLevelMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Dexterity Experience",
2022-09-13 00:00:09 +02:00
value: Player.mults.dexterity_exp,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.combat}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Agility Level",
2022-09-13 00:00:09 +02:00
value: Player.mults.agility,
effValue: Player.mults.agility * currentNodeMults.AgilityLevelMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Agility Experience",
2022-09-13 00:00:09 +02:00
value: Player.mults.agility_exp,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.combat}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Charisma Level",
2022-09-13 00:00:09 +02:00
value: Player.mults.charisma,
effValue: Player.mults.charisma * currentNodeMults.CharismaLevelMultiplier,
2022-05-07 23:51:34 +02:00
},
{
mult: "Charisma Experience",
2022-09-13 00:00:09 +02:00
value: Player.mults.charisma_exp,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.cha}
noMargin
/>
</Box>
<Box>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Hacknet Production",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacknet_node_money,
effValue: Player.mults.hacknet_node_money * currentNodeMults.HacknetNodeMoney,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacknet Purchase Cost",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacknet_node_purchase_cost,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacknet RAM Upgrade Cost",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacknet_node_ram_cost,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacknet Core Purchase Cost",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacknet_node_core_cost,
2022-05-07 23:51:34 +02:00
},
{
mult: "Hacknet Level Upgrade Cost",
2022-09-13 00:00:09 +02:00
value: Player.mults.hacknet_node_level_cost,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.primary}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Company Reputation Gain",
2022-09-13 00:00:09 +02:00
value: Player.mults.company_rep,
effValue: Player.mults.company_rep * currentNodeMults.CompanyWorkRepGain,
2022-05-07 23:51:34 +02:00
color: Settings.theme.rep,
},
{
mult: "Faction Reputation Gain",
2022-09-13 00:00:09 +02:00
value: Player.mults.faction_rep,
effValue: Player.mults.faction_rep * currentNodeMults.FactionWorkRepGain,
2022-05-07 23:51:34 +02:00
color: Settings.theme.rep,
},
{
mult: "Salary",
2022-09-13 00:00:09 +02:00
value: Player.mults.work_money,
effValue: Player.mults.work_money * currentNodeMults.CompanyWorkMoney,
2022-05-07 23:51:34 +02:00
color: Settings.theme.money,
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.money}
/>
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Crime Success Chance",
2022-09-13 00:00:09 +02:00
value: Player.mults.crime_success,
effValue: Player.mults.crime_success * currentNodeMults.CrimeSuccessRate,
2022-05-07 23:51:34 +02:00
},
{
mult: "Crime Money",
2022-09-13 00:00:09 +02:00
value: Player.mults.crime_money,
effValue: Player.mults.crime_money * currentNodeMults.CrimeMoney,
color: Settings.theme.money,
2022-05-07 23:51:34 +02:00
},
2022-05-07 21:48:26 +02:00
]}
color={Settings.theme.combat}
/>
{Player.canAccessBladeburner() && currentNodeMults.BladeburnerRank > 0 && (
2022-04-07 18:31:06 +02:00
<MultiplierTable
rows={[
2022-05-07 23:51:34 +02:00
{
mult: "Bladeburner Success Chance",
2022-09-13 00:00:09 +02:00
value: Player.mults.bladeburner_success_chance,
2022-05-07 23:51:34 +02:00
},
{
mult: "Bladeburner Max Stamina",
2022-09-13 00:00:09 +02:00
value: Player.mults.bladeburner_max_stamina,
2022-05-07 23:51:34 +02:00
},
{
mult: "Bladeburner Stamina Gain",
2022-09-13 00:00:09 +02:00
value: Player.mults.bladeburner_stamina_gain,
2022-05-07 23:51:34 +02:00
},
{
mult: "Bladeburner Field Analysis",
2022-09-13 00:00:09 +02:00
value: Player.mults.bladeburner_analysis,
2022-05-07 23:51:34 +02:00
},
2022-04-07 18:31:06 +02:00
]}
color={Settings.theme.primary}
noMargin={!Player.sourceFileLvl(14) && Player.bitNodeN !== 14}
/>
)}
{(Player.sourceFileLvl(14) || Player.bitNodeN === 14) && (
<MultiplierTable
rows={[
{
mult: "IPvGO Node Power bonus",
value: Player.sourceFileLvl(14) ? 1.25 * currentNodeMults.GoPower : currentNodeMults.GoPower,
},
{
mult: "IPvGO Max Favor",
value: getMaxFavor(),
isNumber: true,
},
]}
color={Settings.theme.combat}
2022-05-07 21:48:26 +02:00
noMargin
2022-04-07 18:31:06 +02:00
/>
2022-05-07 21:48:26 +02:00
)}
2022-04-07 18:31:06 +02:00
</Box>
2022-05-07 21:48:26 +02:00
</Box>
</Paper>
<Paper sx={{ p: 1, mb: 1 }}>
<Typography variant="h5">Time Played</Typography>
<Table>
<TableBody>
{timeRows.map(([name, content]) => (
<StatsRow key={name} name={name} color={Settings.theme.primary} data={{ content: content }} />
))}
</TableBody>
</Table>
</Paper>
2021-09-18 19:29:01 +02:00
<CurrentBitNode />
{(Player.bitNodeN === 5 || Player.sourceFileLvl(5) > 0) && (
<Paper sx={{ p: 1, mb: 1 }}>
<Typography variant="h5">BitNode Multipliers</Typography>
2022-09-13 00:00:09 +02:00
<BitNodeMultipliersDisplay n={Player.bitNodeN} />
</Paper>
)}
2021-09-18 19:29:01 +02:00
<MoneyModal open={moneyOpen} onClose={() => setMoneyOpen(false)} />
2022-04-07 18:50:23 +02:00
<EmployersModal open={employersOpen} onClose={() => setEmployersOpen(false)} />
2022-04-08 01:32:11 +02:00
</Container>
2021-09-05 01:09:30 +02:00
);
}