INFILTRATION: Add HP and damage to Intro UI (#1242)

This commit is contained in:
catloversg
2024-05-09 07:10:20 +07:00
committed by GitHub
parent 6a1691fe54
commit 6f009679ad
4 changed files with 22 additions and 3 deletions
+12 -1
View File
@@ -3,10 +3,13 @@ import { Box, Button, Container, Paper, Tooltip, Typography } from "@mui/materia
import React from "react";
import { Location } from "../../Locations/Location";
import { Settings } from "../../Settings/Settings";
import { formatNumberNoSuffix } from "../../ui/formatNumber";
import { formatHp, formatNumberNoSuffix } from "../../ui/formatNumber";
import { Player } from "@player";
import { calculateDamageAfterFailingInfiltration } from "../utils";
interface IProps {
Location: Location;
StartingDifficulty: number;
Difficulty: number;
MaxLevel: number;
start: () => void;
@@ -56,6 +59,14 @@ export function Intro(props: IProps): React.ReactElement {
<Typography variant="h4">
Infiltrating <b>{props.Location.name}</b>
</Typography>
<Typography variant="h6">
<b>HP: {`${formatHp(Player.hp.current)} / ${formatHp(Player.hp.max)}`}</b>
</Typography>
<Typography variant="h6">
<b>Lose {calculateDamageAfterFailingInfiltration(props.StartingDifficulty)} HP for each failure</b>
</Typography>
<Typography variant="h6">
<b>Maximum Level: </b>
{props.MaxLevel}