import React from "react"; import { Location } from "../../Locations/Location"; import Grid from "@mui/material/Grid"; import Typography from "@mui/material/Typography"; import Button from "@mui/material/Button"; import { numeralWrapper } from "../../ui/numeralFormat"; interface IProps { Location: Location; Difficulty: number; MaxLevel: number; start: () => void; cancel: () => void; } function arrowPart(color: string, length: number): JSX.Element { let arrow = ""; if (length <= 0) length = 0; else if (length > 13) length = 13; else { length--; arrow = ">"; } return ( {"=".repeat(length)} {arrow} {" ".repeat(13 - arrow.length - length)} ); } function coloredArrow(difficulty: number): JSX.Element { if (difficulty === 0) { return ( {">"} {" ".repeat(38)} ); } else { return ( <> {arrowPart("white", difficulty * 13)} {arrowPart("orange", (difficulty - 1) * 13)} {arrowPart("red", (difficulty - 2) * 13)} ); } } export function Intro(props: IProps): React.ReactElement { return ( <> Infiltrating {props.Location.name} Maximum level: {props.MaxLevel} Difficulty: {numeralWrapper.format(props.Difficulty * 33.3333, "0")} / 100 {props.Difficulty > 1.5 && ( Warning: This location is too heavily guarded for your current stats, try training or finding an easier location. )} [{coloredArrow(props.Difficulty)}] {` ^ ^ ^ ^`} {` Trivial Normal Hard Impossible`} Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation.
The minigames you play are randomly selected. It might take you few tries to get used to them.
No game require use of the mouse.
Spacebar is the default action/confirm button.
Everything that uses arrow can also use WASD
Sometimes the rest of the keyboard is used.
); }