From 217f6d1e57e6f6e1766c25e5faee4dd27741d13b Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:38:39 -0500 Subject: [PATCH 01/25] Update basic Game code --- src/Infiltration/ui/Game.tsx | 46 ++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/src/Infiltration/ui/Game.tsx b/src/Infiltration/ui/Game.tsx index eb5be4ec9..f9834ba83 100644 --- a/src/Infiltration/ui/Game.tsx +++ b/src/Infiltration/ui/Game.tsx @@ -1,19 +1,17 @@ -import { use } from "../../ui/Context"; +import { Button, Container, Paper, Typography } from "@mui/material"; import React, { useState } from "react"; -import Grid from "@mui/material/Grid"; -import Button from "@mui/material/Button"; -import { Countdown } from "./Countdown"; -import { BracketGame } from "./BracketGame"; -import { SlashGame } from "./SlashGame"; +import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { use } from "../../ui/Context"; import { BackwardGame } from "./BackwardGame"; +import { BracketGame } from "./BracketGame"; import { BribeGame } from "./BribeGame"; import { CheatCodeGame } from "./CheatCodeGame"; +import { Countdown } from "./Countdown"; import { Cyberpunk2077Game } from "./Cyberpunk2077Game"; import { MinesweeperGame } from "./MinesweeperGame"; -import { WireCuttingGame } from "./WireCuttingGame"; +import { SlashGame } from "./SlashGame"; import { Victory } from "./Victory"; -import Typography from "@mui/material/Typography"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { WireCuttingGame } from "./WireCuttingGame"; interface IProps { StartingDifficulty: number; @@ -113,7 +111,7 @@ export function Game(props: IProps): React.ReactElement { stageComponent = setStage(Stage.Minigame)} />; break; case Stage.Minigame: { - const MiniGame = minigames[gameIds.id]; + const MiniGame = SlashGame; // minigames[gameIds.id]; stageComponent = ; break; } @@ -139,22 +137,18 @@ export function Game(props: IProps): React.ReactElement { } return ( - <> - - - - - - - Level: {level} / {props.MaxLevel} - - - + + + + + Level {level} / {props.MaxLevel} + + + - - {stageComponent} - - - + {stageComponent} + ); } From 0396e4066ceb9ae8220f14146ebcdf3b54d7bd37 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:38:45 -0500 Subject: [PATCH 02/25] Update Slash Game --- src/Infiltration/ui/SlashGame.tsx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Infiltration/ui/SlashGame.tsx b/src/Infiltration/ui/SlashGame.tsx index b9eb523a9..8676b2a21 100644 --- a/src/Infiltration/ui/SlashGame.tsx +++ b/src/Infiltration/ui/SlashGame.tsx @@ -1,13 +1,12 @@ import React, { useState, useEffect } from "react"; -import Grid from "@mui/material/Grid"; import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; import { GameTimer } from "./GameTimer"; import { interpolate } from "./Difficulty"; -import Typography from "@mui/material/Typography"; import { KEY } from "../../utils/helpers/keyCodes"; import { Player } from "../../Player"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -59,23 +58,25 @@ export function SlashGame(props: IMinigameProps): React.ReactElement { }, []); return ( - + <> - + Slash when his guard is down! + {hasAugment ? ( - <> - Guard will drop in... - - + + Guard will drop in... + + ) : ( <> )} + {phase === 0 && Guarding ...} {phase === 1 && Preparing?} {phase === 2 && ATTACKING!} - - + + ); } From 43e2fc8d87fb1a56837da1ab169d13f5070b2688 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:43:19 -0500 Subject: [PATCH 03/25] Update Bracket Game --- src/Infiltration/ui/BracketGame.tsx | 10 +++++----- src/Infiltration/ui/SlashGame.tsx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Infiltration/ui/BracketGame.tsx b/src/Infiltration/ui/BracketGame.tsx index 41015e8e6..9c620ce86 100644 --- a/src/Infiltration/ui/BracketGame.tsx +++ b/src/Infiltration/ui/BracketGame.tsx @@ -6,10 +6,10 @@ import { GameTimer } from "./GameTimer"; import { random } from "../utils"; import { interpolate } from "./Difficulty"; import { BlinkingCursor } from "./BlinkingCursor"; -import Typography from "@mui/material/Typography"; import { Player } from "../../Player"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { KEY } from "../../utils/helpers/keyCodes"; +import { Paper, Box, Typography } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -84,16 +84,16 @@ export function BracketGame(props: IMinigameProps): React.ReactElement { } return ( - + <> - + Close the brackets {`${left}${right}`} - - + + ); } diff --git a/src/Infiltration/ui/SlashGame.tsx b/src/Infiltration/ui/SlashGame.tsx index 8676b2a21..1c4a89810 100644 --- a/src/Infiltration/ui/SlashGame.tsx +++ b/src/Infiltration/ui/SlashGame.tsx @@ -60,7 +60,7 @@ export function SlashGame(props: IMinigameProps): React.ReactElement { return ( <> - + Slash when his guard is down! {hasAugment ? ( From 082b4abe71e62761d708ef2b9864bb0a075633a7 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:50:55 -0500 Subject: [PATCH 04/25] Update Backward Game --- src/Infiltration/ui/BackwardGame.tsx | 18 ++++++------------ src/Infiltration/ui/BlinkingCursor.tsx | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/Infiltration/ui/BackwardGame.tsx b/src/Infiltration/ui/BackwardGame.tsx index 1c5ef1e6c..dd2785ddd 100644 --- a/src/Infiltration/ui/BackwardGame.tsx +++ b/src/Infiltration/ui/BackwardGame.tsx @@ -6,10 +6,10 @@ import { GameTimer } from "./GameTimer"; import { random } from "../utils"; import { interpolate } from "./Difficulty"; import { BlinkingCursor } from "./BlinkingCursor"; -import Typography from "@mui/material/Typography"; import { KEY } from "../../utils/helpers/keyCodes"; import { Player } from "../../Player"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -48,24 +48,18 @@ export function BackwardGame(props: IMinigameProps): React.ReactElement { } return ( - + <> - + Type it{!hasAugment ? " backward" : ""} - - - - {answer} - - - + {answer} {guess} - - + + ); } diff --git a/src/Infiltration/ui/BlinkingCursor.tsx b/src/Infiltration/ui/BlinkingCursor.tsx index 599d23f66..0cace1fd1 100644 --- a/src/Infiltration/ui/BlinkingCursor.tsx +++ b/src/Infiltration/ui/BlinkingCursor.tsx @@ -6,5 +6,5 @@ export function BlinkingCursor(): React.ReactElement { const i = setInterval(() => setOn((old) => !old), 1000); return () => clearInterval(i); }); - return <>{on ? "|" : ""}; + return <>{on ? "|" : <> }; } From 2d90d41b4e49cb3ebe694e25852f87c30f23094f Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:52:58 -0500 Subject: [PATCH 05/25] Update Bribe Game --- src/Infiltration/ui/BribeGame.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Infiltration/ui/BribeGame.tsx b/src/Infiltration/ui/BribeGame.tsx index 6f6811e14..ea6ac5773 100644 --- a/src/Infiltration/ui/BribeGame.tsx +++ b/src/Infiltration/ui/BribeGame.tsx @@ -4,12 +4,12 @@ import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; import { GameTimer } from "./GameTimer"; import { interpolate } from "./Difficulty"; -import Typography from "@mui/material/Typography"; import { KEY } from "../../utils/helpers/keyCodes"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; import { Settings } from "../../Settings/Settings"; import { downArrowSymbol, upArrowSymbol } from "../utils"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -88,13 +88,11 @@ export function BribeGame(props: IMinigameProps): React.ReactElement { } return ( - + <> - - Say something nice about the guard. + + Say something nice about the guard - - {upArrowSymbol} @@ -104,8 +102,8 @@ export function BribeGame(props: IMinigameProps): React.ReactElement { {downArrowSymbol} - - + + ); } From 4bf6acf95cf7d94c091f406aa70e64c2d2f00a36 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:54:43 -0500 Subject: [PATCH 06/25] Update Cheat Code Game --- src/Infiltration/ui/CheatCodeGame.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Infiltration/ui/CheatCodeGame.tsx b/src/Infiltration/ui/CheatCodeGame.tsx index f0974a3bc..e7b356369 100644 --- a/src/Infiltration/ui/CheatCodeGame.tsx +++ b/src/Infiltration/ui/CheatCodeGame.tsx @@ -13,9 +13,9 @@ import { downArrowSymbol, } from "../utils"; import { interpolate } from "./Difficulty"; -import Typography from "@mui/material/Typography"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -55,14 +55,14 @@ export function CheatCodeGame(props: IMinigameProps): React.ReactElement { } return ( - + <> - + Enter the Code! {code[index]} - - + + ); } From b3879e386f7b47d6ffb5abdc87f5c6c10a22a5c6 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:57:18 -0500 Subject: [PATCH 07/25] Update Cyberpunk2077 Game --- src/Infiltration/ui/Cyberpunk2077Game.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Infiltration/ui/Cyberpunk2077Game.tsx b/src/Infiltration/ui/Cyberpunk2077Game.tsx index 6c61f6494..534acfc49 100644 --- a/src/Infiltration/ui/Cyberpunk2077Game.tsx +++ b/src/Infiltration/ui/Cyberpunk2077Game.tsx @@ -5,11 +5,11 @@ import { KeyHandler } from "./KeyHandler"; import { GameTimer } from "./GameTimer"; import { interpolate } from "./Difficulty"; import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; -import Typography from "@mui/material/Typography"; import { KEY } from "../../utils/helpers/keyCodes"; import { Settings } from "../../Settings/Settings"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -78,9 +78,9 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement { const fontSize = "2em"; return ( - + <> - + Match the symbols! Targets:{" "} @@ -125,8 +125,8 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement { ))} - - + + ); } From 13d7f6d4e97410f2dd01052a29d28f6ac2560d3d Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 14:58:59 -0500 Subject: [PATCH 08/25] Update Minesweeper Game --- src/Infiltration/ui/MinesweeperGame.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Infiltration/ui/MinesweeperGame.tsx b/src/Infiltration/ui/MinesweeperGame.tsx index 723b31f57..20a818e70 100644 --- a/src/Infiltration/ui/MinesweeperGame.tsx +++ b/src/Infiltration/ui/MinesweeperGame.tsx @@ -5,10 +5,10 @@ import { KeyHandler } from "./KeyHandler"; import { GameTimer } from "./GameTimer"; import { interpolate } from "./Difficulty"; import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; -import Typography from "@mui/material/Typography"; import { KEY } from "../../utils/helpers/keyCodes"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -82,9 +82,9 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement { }, []); return ( - + <> - + {memoryPhase ? "Remember all the mines!" : "Mark all the mines!"} {minefield.map((line, y) => (
@@ -105,8 +105,8 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement {
))} -
-
+ + ); } From 320d6943ded759066aeb1d6a8701cf17ad7d0ccb Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 16:50:19 -0500 Subject: [PATCH 09/25] Update Wire Cutting Game --- src/Infiltration/ui/WireCuttingGame.tsx | 49 ++++++++++++++----------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/src/Infiltration/ui/WireCuttingGame.tsx b/src/Infiltration/ui/WireCuttingGame.tsx index 7ca0aedbc..e8a08f453 100644 --- a/src/Infiltration/ui/WireCuttingGame.tsx +++ b/src/Infiltration/ui/WireCuttingGame.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import Grid from "@mui/material/Grid"; -import Typography from "@mui/material/Typography"; import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; import { GameTimer } from "./GameTimer"; @@ -10,6 +9,7 @@ import { KEY } from "../../utils/helpers/keyCodes"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; import { Settings } from "../../Settings/Settings"; +import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; @@ -102,46 +102,53 @@ export function WireCuttingGame(props: IMinigameProps): React.ReactElement { } return ( - + <> - - Cut the wires with the following properties! (keyboard 1 to 9) + + + Cut the wires with the following properties! (keyboard 1 to 9) + {questions.map((question, i) => ( {question.toString()} ))} - + {new Array(wires.length).fill(0).map((_, i) => { const isCorrectWire = checkWire(i + 1); const color = hasAugment && !isCorrectWire ? Settings.theme.disabled : Settings.theme.primary; return ( - -  {i + 1}     - + + {i + 1} + ); })} - - {new Array(8).fill(0).map((_, i) => ( -
- + {new Array(8).fill(0).map((_, i) => ( + {wires.map((wire, j) => { if ((i === 3 || i === 4) && cutWires[j]) { - return       ; + return ; } const isCorrectWire = checkWire(j + 1); const wireColor = hasAugment && !isCorrectWire ? Settings.theme.disabled : wire.colors[i % wire.colors.length]; return ( - - |{wire.tpe}|    - + + |{wire.tpe}| + ); })} - -
- ))} + + ))} + -
-
+ + ); } From 16d47543c4abe30c06734b56ba92e85e907f58ee Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 16:50:51 -0500 Subject: [PATCH 10/25] Update Game Timer --- src/Infiltration/ui/Game.tsx | 2 +- src/Infiltration/ui/GameTimer.tsx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Infiltration/ui/Game.tsx b/src/Infiltration/ui/Game.tsx index f9834ba83..22eb08049 100644 --- a/src/Infiltration/ui/Game.tsx +++ b/src/Infiltration/ui/Game.tsx @@ -111,7 +111,7 @@ export function Game(props: IProps): React.ReactElement { stageComponent = setStage(Stage.Minigame)} />; break; case Stage.Minigame: { - const MiniGame = SlashGame; // minigames[gameIds.id]; + const MiniGame = minigames[gameIds.id]; stageComponent = ; break; } diff --git a/src/Infiltration/ui/GameTimer.tsx b/src/Infiltration/ui/GameTimer.tsx index a55ab0587..354973f77 100644 --- a/src/Infiltration/ui/GameTimer.tsx +++ b/src/Infiltration/ui/GameTimer.tsx @@ -1,8 +1,7 @@ -import LinearProgress from "@mui/material/LinearProgress"; import React, { useState, useEffect } from "react"; import withStyles from "@mui/styles/withStyles"; import { Theme } from "@mui/material/styles"; -import Grid from "@mui/material/Grid"; +import { Paper, LinearProgress } from "@mui/material"; import { use } from "../../ui/Context"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; @@ -19,6 +18,7 @@ const TimerProgress = withStyles((theme: Theme) => ({ interface IProps { millis: number; onExpire: () => void; + noPaper?: boolean; } export function GameTimer(props: IProps): React.ReactElement { @@ -42,9 +42,11 @@ export function GameTimer(props: IProps): React.ReactElement { // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation // TODO(hydroflame): there's like a bug where it triggers the end before the // bar physically reaches the end - return ( - + return props.noPaper ? ( + + ) : ( + - + ); } From fe330f9f9fffeefac0c7f66b0bd06bf00ba057be Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 16:51:00 -0500 Subject: [PATCH 11/25] Update root --- src/Infiltration/ui/InfiltrationRoot.tsx | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Infiltration/ui/InfiltrationRoot.tsx b/src/Infiltration/ui/InfiltrationRoot.tsx index 1c78b5b19..53370ecbd 100644 --- a/src/Infiltration/ui/InfiltrationRoot.tsx +++ b/src/Infiltration/ui/InfiltrationRoot.tsx @@ -22,24 +22,24 @@ export function InfiltrationRoot(props: IProps): React.ReactElement { router.toCity(); } - if (!start) { - return ( - setStart(true)} - cancel={cancel} - /> - ); - } - return ( - +
+ {start ? ( + + ) : ( + setStart(true)} + cancel={cancel} + /> + )} +
); } From 433e05bcf8d2e3dff01c82ce8ff5813ebffa5084 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 18:02:49 -0500 Subject: [PATCH 12/25] Improve slash game aug timer accuracy --- src/Infiltration/ui/SlashGame.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infiltration/ui/SlashGame.tsx b/src/Infiltration/ui/SlashGame.tsx index 1c4a89810..9fa69ad04 100644 --- a/src/Infiltration/ui/SlashGame.tsx +++ b/src/Infiltration/ui/SlashGame.tsx @@ -42,7 +42,7 @@ export function SlashGame(props: IMinigameProps): React.ReactElement { const hasAugment = Player.hasAugmentation(AugmentationNames.MightOfAres, true); const phaseZeroTime = Math.random() * 3250 + 1500 - (250 + difficulty.window); const phaseOneTime = 250; - const timeUntilAttacking = phaseZeroTime + phaseOneTime; + const timeUntilAttacking = (phaseZeroTime + phaseOneTime) * 0.8; useEffect(() => { let id = window.setTimeout(() => { From d616010f7464c8c1a87277d6ea2f754e0bbf9a66 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 18:13:15 -0500 Subject: [PATCH 13/25] Update Intro --- src/Infiltration/ui/Intro.tsx | 138 +++++++++++++++++++--------------- 1 file changed, 79 insertions(+), 59 deletions(-) diff --git a/src/Infiltration/ui/Intro.tsx b/src/Infiltration/ui/Intro.tsx index bedf9e629..5c1711519 100644 --- a/src/Infiltration/ui/Intro.tsx +++ b/src/Infiltration/ui/Intro.tsx @@ -1,9 +1,10 @@ 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"; +import { Button, Paper, Typography, Container, Tooltip, Box } from "@mui/material"; +import { Report } from "@mui/icons-material"; +import { Settings } from "../../Settings/Settings"; interface IProps { Location: Location; @@ -41,9 +42,9 @@ function coloredArrow(difficulty: number): JSX.Element { } else { return ( <> - {arrowPart("white", difficulty * 13)} - {arrowPart("orange", (difficulty - 1) * 13)} - {arrowPart("red", (difficulty - 2) * 13)} + {arrowPart(Settings.theme.primary, difficulty * 13)} + {arrowPart(Settings.theme.warning, (difficulty - 1) * 13)} + {arrowPart(Settings.theme.error, (difficulty - 2) * 13)} ); } @@ -51,65 +52,84 @@ function coloredArrow(difficulty: number): JSX.Element { 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 - - + + + + Infiltrating {props.Location.name} + + + Maximum Level: + {props.MaxLevel} + + 2 + ? Settings.theme.error + : props.Difficulty > 1 + ? Settings.theme.warning + : Settings.theme.primary, + display: "flex", + alignItems: "center", + }} + > + Difficulty:  + {numeralWrapper.format(props.Difficulty * 33.3333, "0")} / 100 + {props.Difficulty > 1.5 && ( + + This location is too heavily guarded for your current stats. It is recommended that you try training, + or finding an easier location. + + } + > + + + )} + - {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`} + - - [{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 that you can trade for money or reputation. +
+
+ Gameplay: +
+
    - 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 requires use of the mouse.
  • +
  • + Spacebar is the default action/confirm button. +
  • +
  • + The arrow keys and WASD can be used interchangeably. +
  • +
  • Sometimes the rest of the keyboard is used.
  • -
    - - 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. - - +
+ + -
- - -
- + + + ); } From b772d5157e1f3727f11a818cfe6d99ca5ebf376a Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 18:18:39 -0500 Subject: [PATCH 14/25] Update Countdown --- src/Infiltration/ui/Countdown.tsx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Infiltration/ui/Countdown.tsx b/src/Infiltration/ui/Countdown.tsx index 91878cd20..8b0659b86 100644 --- a/src/Infiltration/ui/Countdown.tsx +++ b/src/Infiltration/ui/Countdown.tsx @@ -1,7 +1,6 @@ import React, { useState, useEffect } from "react"; -import Grid from "@mui/material/Grid"; +import { Typography, Paper } from "@mui/material"; -import Typography from "@mui/material/Typography"; interface IProps { onFinish: () => void; } @@ -13,17 +12,13 @@ export function Countdown(props: IProps): React.ReactElement { props.onFinish(); return; } - setTimeout(() => setX(x - 1), 200); + setTimeout(() => setX(x - 1), 300); }); return ( - <> - - - Get Ready! - {x} - - - + + Get Ready! + {x} + ); } From ae8b6d088ed9bfd79cf85ff095f91d1b40409c89 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 18:49:46 -0500 Subject: [PATCH 15/25] Update Victory --- src/Infiltration/ui/BribeGame.tsx | 2 + src/Infiltration/ui/Game.tsx | 9 +++-- src/Infiltration/ui/Victory.tsx | 63 ++++++++++++++----------------- 3 files changed, 36 insertions(+), 38 deletions(-) diff --git a/src/Infiltration/ui/BribeGame.tsx b/src/Infiltration/ui/BribeGame.tsx index ea6ac5773..f8e02cfdd 100644 --- a/src/Infiltration/ui/BribeGame.tsx +++ b/src/Infiltration/ui/BribeGame.tsx @@ -152,6 +152,7 @@ const positive = [ "patient", "dynamic", "loyal", + "based", ]; const negative = [ @@ -175,4 +176,5 @@ const negative = [ "picky", "tactless", "thoughtless", + "cringe", ]; diff --git a/src/Infiltration/ui/Game.tsx b/src/Infiltration/ui/Game.tsx index 22eb08049..f11e2e632 100644 --- a/src/Infiltration/ui/Game.tsx +++ b/src/Infiltration/ui/Game.tsx @@ -1,5 +1,6 @@ import { Button, Container, Paper, Typography } from "@mui/material"; import React, { useState } from "react"; +import { Location } from "../../Locations/Location"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { use } from "../../ui/Context"; import { BackwardGame } from "./BackwardGame"; @@ -139,9 +140,11 @@ export function Game(props: IProps): React.ReactElement { return ( - + {stage !== Stage.Sell && ( + + )} Level {level} / {props.MaxLevel} diff --git a/src/Infiltration/ui/Victory.tsx b/src/Infiltration/ui/Victory.tsx index 2a90351a0..aec8b3bdb 100644 --- a/src/Infiltration/ui/Victory.tsx +++ b/src/Infiltration/ui/Victory.tsx @@ -1,13 +1,8 @@ import { Factions } from "../../Faction/Factions"; import React, { useState } from "react"; -import Grid from "@mui/material/Grid"; import { Money } from "../../ui/React/Money"; import { Reputation } from "../../ui/React/Reputation"; import { use } from "../../ui/Context"; -import Typography from "@mui/material/Typography"; -import Button from "@mui/material/Button"; -import MenuItem from "@mui/material/MenuItem"; -import Select, { SelectChangeEvent } from "@mui/material/Select"; import { FactionNames } from "../../Faction/data/FactionNames"; import { formatNumber } from "../../utils/StringHelperFunctions"; import { @@ -16,6 +11,8 @@ import { calculateTradeInformationRepReward, } from "../formulas/victory"; import { inviteToFaction } from "../../Faction/FactionHelpers"; +import { Button, MenuItem, Select, SelectChangeEvent, Paper, Typography, Box } from "@mui/material"; +import { Location } from "../../Locations/Location"; interface IProps { StartingDifficulty: number; @@ -66,24 +63,22 @@ export function Victory(props: IProps): React.ReactElement { } return ( - <> - - - Infiltration successful! - - - - You{" "} - {isMemberOfInfiltrators ? ( - <> - have gained {formatNumber(infiltrationRepGain, 2)} rep for {FactionNames.ShadowsOfAnarchy} and{" "} - - ) : ( - <> - )} - can trade the confidential information you found for money or reputation. - - {"none"} @@ -98,17 +93,15 @@ export function Victory(props: IProps): React.ReactElement { - - - - - - - - - + + + + + ); } From d0c48585bc05b212599785da40c38b613a8db9c4 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sun, 24 Apr 2022 18:51:30 -0500 Subject: [PATCH 16/25] Clean up code --- src/Infiltration/ui/BackwardGame.tsx | 17 ++++++++--------- src/Infiltration/ui/BlinkingCursor.tsx | 2 +- src/Infiltration/ui/BracketGame.tsx | 17 ++++++++--------- src/Infiltration/ui/BribeGame.tsx | 13 ++++++------- src/Infiltration/ui/CheatCodeGame.tsx | 17 ++++++++--------- src/Infiltration/ui/Countdown.tsx | 4 ++-- src/Infiltration/ui/Cyberpunk2077Game.tsx | 17 ++++++++--------- src/Infiltration/ui/Game.tsx | 1 - src/Infiltration/ui/GameTimer.tsx | 8 ++++---- src/Infiltration/ui/InfiltrationRoot.tsx | 4 ++-- src/Infiltration/ui/Intro.tsx | 7 +++---- src/Infiltration/ui/MinesweeperGame.tsx | 17 ++++++++--------- src/Infiltration/ui/SlashGame.tsx | 14 +++++++------- src/Infiltration/ui/Victory.tsx | 11 +++++------ src/Infiltration/ui/WireCuttingGame.tsx | 15 +++++++-------- 15 files changed, 77 insertions(+), 87 deletions(-) diff --git a/src/Infiltration/ui/BackwardGame.tsx b/src/Infiltration/ui/BackwardGame.tsx index dd2785ddd..f02e62abe 100644 --- a/src/Infiltration/ui/BackwardGame.tsx +++ b/src/Infiltration/ui/BackwardGame.tsx @@ -1,15 +1,14 @@ +import { Paper, Typography } from "@mui/material"; import React, { useState } from "react"; -import Grid from "@mui/material/Grid"; +import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Player } from "../../Player"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { random } from "../utils"; +import { BlinkingCursor } from "./BlinkingCursor"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { random } from "../utils"; -import { interpolate } from "./Difficulty"; -import { BlinkingCursor } from "./BlinkingCursor"; -import { KEY } from "../../utils/helpers/keyCodes"; -import { Player } from "../../Player"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/BlinkingCursor.tsx b/src/Infiltration/ui/BlinkingCursor.tsx index 0cace1fd1..c3152ab72 100644 --- a/src/Infiltration/ui/BlinkingCursor.tsx +++ b/src/Infiltration/ui/BlinkingCursor.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from "react"; +import React, { useEffect, useState } from "react"; export function BlinkingCursor(): React.ReactElement { const [on, setOn] = useState(true); diff --git a/src/Infiltration/ui/BracketGame.tsx b/src/Infiltration/ui/BracketGame.tsx index 9c620ce86..26f7e19fe 100644 --- a/src/Infiltration/ui/BracketGame.tsx +++ b/src/Infiltration/ui/BracketGame.tsx @@ -1,15 +1,14 @@ +import { Paper, Typography } from "@mui/material"; import React, { useState } from "react"; -import Grid from "@mui/material/Grid"; +import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Player } from "../../Player"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { random } from "../utils"; +import { BlinkingCursor } from "./BlinkingCursor"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { random } from "../utils"; -import { interpolate } from "./Difficulty"; -import { BlinkingCursor } from "./BlinkingCursor"; -import { Player } from "../../Player"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { KEY } from "../../utils/helpers/keyCodes"; -import { Paper, Box, Typography } from "@mui/material"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/BribeGame.tsx b/src/Infiltration/ui/BribeGame.tsx index f8e02cfdd..6fdc85246 100644 --- a/src/Infiltration/ui/BribeGame.tsx +++ b/src/Infiltration/ui/BribeGame.tsx @@ -1,15 +1,14 @@ +import { Paper, Typography } from "@mui/material"; import React, { useEffect, useState } from "react"; -import Grid from "@mui/material/Grid"; -import { IMinigameProps } from "./IMinigameProps"; -import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { interpolate } from "./Difficulty"; -import { KEY } from "../../utils/helpers/keyCodes"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; import { Settings } from "../../Settings/Settings"; +import { KEY } from "../../utils/helpers/keyCodes"; import { downArrowSymbol, upArrowSymbol } from "../utils"; -import { Paper, Typography, Box } from "@mui/material"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; +import { IMinigameProps } from "./IMinigameProps"; +import { KeyHandler } from "./KeyHandler"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/CheatCodeGame.tsx b/src/Infiltration/ui/CheatCodeGame.tsx index e7b356369..471003b41 100644 --- a/src/Infiltration/ui/CheatCodeGame.tsx +++ b/src/Infiltration/ui/CheatCodeGame.tsx @@ -1,21 +1,20 @@ +import { Paper, Typography } from "@mui/material"; import React, { useState } from "react"; -import Grid from "@mui/material/Grid"; -import { IMinigameProps } from "./IMinigameProps"; -import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; +import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Player } from "../../Player"; import { - random, + downArrowSymbol, getArrow, getInverseArrow, leftArrowSymbol, + random, rightArrowSymbol, upArrowSymbol, - downArrowSymbol, } from "../utils"; import { interpolate } from "./Difficulty"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { Player } from "../../Player"; -import { Paper, Typography, Box } from "@mui/material"; +import { GameTimer } from "./GameTimer"; +import { IMinigameProps } from "./IMinigameProps"; +import { KeyHandler } from "./KeyHandler"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/Countdown.tsx b/src/Infiltration/ui/Countdown.tsx index 8b0659b86..00d068ba6 100644 --- a/src/Infiltration/ui/Countdown.tsx +++ b/src/Infiltration/ui/Countdown.tsx @@ -1,5 +1,5 @@ -import React, { useState, useEffect } from "react"; -import { Typography, Paper } from "@mui/material"; +import { Paper, Typography } from "@mui/material"; +import React, { useEffect, useState } from "react"; interface IProps { onFinish: () => void; diff --git a/src/Infiltration/ui/Cyberpunk2077Game.tsx b/src/Infiltration/ui/Cyberpunk2077Game.tsx index 534acfc49..3f88045f5 100644 --- a/src/Infiltration/ui/Cyberpunk2077Game.tsx +++ b/src/Infiltration/ui/Cyberpunk2077Game.tsx @@ -1,15 +1,14 @@ +import { Paper, Typography } from "@mui/material"; import React, { useState } from "react"; -import Grid from "@mui/material/Grid"; -import { IMinigameProps } from "./IMinigameProps"; -import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { interpolate } from "./Difficulty"; -import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; -import { KEY } from "../../utils/helpers/keyCodes"; -import { Settings } from "../../Settings/Settings"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; -import { Paper, Typography, Box } from "@mui/material"; +import { Settings } from "../../Settings/Settings"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; +import { IMinigameProps } from "./IMinigameProps"; +import { KeyHandler } from "./KeyHandler"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/Game.tsx b/src/Infiltration/ui/Game.tsx index f11e2e632..2f58decda 100644 --- a/src/Infiltration/ui/Game.tsx +++ b/src/Infiltration/ui/Game.tsx @@ -1,6 +1,5 @@ import { Button, Container, Paper, Typography } from "@mui/material"; import React, { useState } from "react"; -import { Location } from "../../Locations/Location"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { use } from "../../ui/Context"; import { BackwardGame } from "./BackwardGame"; diff --git a/src/Infiltration/ui/GameTimer.tsx b/src/Infiltration/ui/GameTimer.tsx index 354973f77..77d6d28e9 100644 --- a/src/Infiltration/ui/GameTimer.tsx +++ b/src/Infiltration/ui/GameTimer.tsx @@ -1,9 +1,9 @@ -import React, { useState, useEffect } from "react"; -import withStyles from "@mui/styles/withStyles"; +import { LinearProgress, Paper } from "@mui/material"; import { Theme } from "@mui/material/styles"; -import { Paper, LinearProgress } from "@mui/material"; -import { use } from "../../ui/Context"; +import withStyles from "@mui/styles/withStyles"; +import React, { useEffect, useState } from "react"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { use } from "../../ui/Context"; const TimerProgress = withStyles((theme: Theme) => ({ root: { diff --git a/src/Infiltration/ui/InfiltrationRoot.tsx b/src/Infiltration/ui/InfiltrationRoot.tsx index 53370ecbd..86e44a43d 100644 --- a/src/Infiltration/ui/InfiltrationRoot.tsx +++ b/src/Infiltration/ui/InfiltrationRoot.tsx @@ -1,9 +1,9 @@ import React, { useState } from "react"; -import { Intro } from "./Intro"; -import { Game } from "./Game"; import { Location } from "../../Locations/Location"; import { use } from "../../ui/Context"; import { calculateDifficulty, calculateReward } from "../formulas/game"; +import { Game } from "./Game"; +import { Intro } from "./Intro"; interface IProps { location: Location; } diff --git a/src/Infiltration/ui/Intro.tsx b/src/Infiltration/ui/Intro.tsx index 5c1711519..b87e3271c 100644 --- a/src/Infiltration/ui/Intro.tsx +++ b/src/Infiltration/ui/Intro.tsx @@ -1,10 +1,9 @@ +import { Report } from "@mui/icons-material"; +import { Box, Button, Container, Paper, Tooltip, Typography } from "@mui/material"; import React from "react"; import { Location } from "../../Locations/Location"; -import Grid from "@mui/material/Grid"; -import { numeralWrapper } from "../../ui/numeralFormat"; -import { Button, Paper, Typography, Container, Tooltip, Box } from "@mui/material"; -import { Report } from "@mui/icons-material"; import { Settings } from "../../Settings/Settings"; +import { numeralWrapper } from "../../ui/numeralFormat"; interface IProps { Location: Location; diff --git a/src/Infiltration/ui/MinesweeperGame.tsx b/src/Infiltration/ui/MinesweeperGame.tsx index 20a818e70..1ec2538b9 100644 --- a/src/Infiltration/ui/MinesweeperGame.tsx +++ b/src/Infiltration/ui/MinesweeperGame.tsx @@ -1,14 +1,13 @@ -import React, { useState, useEffect } from "react"; -import Grid from "@mui/material/Grid"; -import { IMinigameProps } from "./IMinigameProps"; -import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { interpolate } from "./Difficulty"; -import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; -import { KEY } from "../../utils/helpers/keyCodes"; +import { Paper, Typography } from "@mui/material"; +import React, { useEffect, useState } from "react"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; -import { Paper, Typography, Box } from "@mui/material"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; +import { IMinigameProps } from "./IMinigameProps"; +import { KeyHandler } from "./KeyHandler"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/SlashGame.tsx b/src/Infiltration/ui/SlashGame.tsx index 9fa69ad04..f95ee7c37 100644 --- a/src/Infiltration/ui/SlashGame.tsx +++ b/src/Infiltration/ui/SlashGame.tsx @@ -1,12 +1,12 @@ -import React, { useState, useEffect } from "react"; +import { Box, Paper, Typography } from "@mui/material"; +import React, { useEffect, useState } from "react"; +import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; +import { Player } from "../../Player"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; import { IMinigameProps } from "./IMinigameProps"; import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { interpolate } from "./Difficulty"; -import { KEY } from "../../utils/helpers/keyCodes"; -import { Player } from "../../Player"; -import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; -import { Paper, Typography, Box } from "@mui/material"; interface Difficulty { [key: string]: number; diff --git a/src/Infiltration/ui/Victory.tsx b/src/Infiltration/ui/Victory.tsx index aec8b3bdb..c73993ae1 100644 --- a/src/Infiltration/ui/Victory.tsx +++ b/src/Infiltration/ui/Victory.tsx @@ -1,18 +1,17 @@ -import { Factions } from "../../Faction/Factions"; +import { Box, Button, MenuItem, Paper, Select, SelectChangeEvent, Typography } from "@mui/material"; import React, { useState } from "react"; +import { FactionNames } from "../../Faction/data/FactionNames"; +import { inviteToFaction } from "../../Faction/FactionHelpers"; +import { Factions } from "../../Faction/Factions"; +import { use } from "../../ui/Context"; import { Money } from "../../ui/React/Money"; import { Reputation } from "../../ui/React/Reputation"; -import { use } from "../../ui/Context"; -import { FactionNames } from "../../Faction/data/FactionNames"; import { formatNumber } from "../../utils/StringHelperFunctions"; import { calculateInfiltratorsRepReward, calculateSellInformationCashReward, calculateTradeInformationRepReward, } from "../formulas/victory"; -import { inviteToFaction } from "../../Faction/FactionHelpers"; -import { Button, MenuItem, Select, SelectChangeEvent, Paper, Typography, Box } from "@mui/material"; -import { Location } from "../../Locations/Location"; interface IProps { StartingDifficulty: number; diff --git a/src/Infiltration/ui/WireCuttingGame.tsx b/src/Infiltration/ui/WireCuttingGame.tsx index e8a08f453..ce994e1a4 100644 --- a/src/Infiltration/ui/WireCuttingGame.tsx +++ b/src/Infiltration/ui/WireCuttingGame.tsx @@ -1,15 +1,14 @@ +import { Box, Paper, Typography } from "@mui/material"; import React, { useEffect, useState } from "react"; -import Grid from "@mui/material/Grid"; -import { IMinigameProps } from "./IMinigameProps"; -import { KeyHandler } from "./KeyHandler"; -import { GameTimer } from "./GameTimer"; -import { random } from "../utils"; -import { interpolate } from "./Difficulty"; -import { KEY } from "../../utils/helpers/keyCodes"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; import { Settings } from "../../Settings/Settings"; -import { Paper, Typography, Box } from "@mui/material"; +import { KEY } from "../../utils/helpers/keyCodes"; +import { random } from "../utils"; +import { interpolate } from "./Difficulty"; +import { GameTimer } from "./GameTimer"; +import { IMinigameProps } from "./IMinigameProps"; +import { KeyHandler } from "./KeyHandler"; interface Difficulty { [key: string]: number; From c613021e8f9a35b33beb06a6626181e1d0ac2aff Mon Sep 17 00:00:00 2001 From: nickofolas Date: Fri, 29 Apr 2022 15:56:34 -0500 Subject: [PATCH 17/25] Better centering and change arrows --- src/Infiltration/ui/InfiltrationRoot.tsx | 2 +- src/Infiltration/ui/Intro.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Infiltration/ui/InfiltrationRoot.tsx b/src/Infiltration/ui/InfiltrationRoot.tsx index 86e44a43d..a66d60145 100644 --- a/src/Infiltration/ui/InfiltrationRoot.tsx +++ b/src/Infiltration/ui/InfiltrationRoot.tsx @@ -23,7 +23,7 @@ export function InfiltrationRoot(props: IProps): React.ReactElement { } return ( -
+
{start ? ( [{coloredArrow(props.Difficulty)}] {` ^ ^ ^ ^`} + >{` ▲ ▲ ▲ ▲`} {` Trivial Normal Hard Impossible`} + >{` Trivial Normal Hard Impossible`} From 2f12484f9ea0f283472bafd78e43202876630be4 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Fri, 29 Apr 2022 16:59:38 -0500 Subject: [PATCH 18/25] Update intro arrows --- src/Infiltration/ui/Intro.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infiltration/ui/Intro.tsx b/src/Infiltration/ui/Intro.tsx index 79012a446..8a7bb12fd 100644 --- a/src/Infiltration/ui/Intro.tsx +++ b/src/Infiltration/ui/Intro.tsx @@ -92,7 +92,7 @@ export function Intro(props: IProps): React.ReactElement { [{coloredArrow(props.Difficulty)}] {` ▲ ▲ ▲ ▲`} + >{`▲ ▲ ▲ ▲`} {` Trivial Normal Hard Impossible`} From c3a3cca9aebd1694839a1f1243e35eac5ce81618 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Fri, 29 Apr 2022 17:00:13 -0500 Subject: [PATCH 19/25] Update Intro --- src/Infiltration/ui/Intro.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infiltration/ui/Intro.tsx b/src/Infiltration/ui/Intro.tsx index 8a7bb12fd..217545af1 100644 --- a/src/Infiltration/ui/Intro.tsx +++ b/src/Infiltration/ui/Intro.tsx @@ -111,7 +111,7 @@ export function Intro(props: IProps): React.ReactElement {
  • The minigames you play are randomly selected.
    - It might take you few tries to get used to them. + It might take you a few tries to get used to them.
  • No game requires use of the mouse.
  • From 1bcb0099f4fdb8f84ea299aa4f2bc059aeee1373 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Fri, 29 Apr 2022 17:01:38 -0500 Subject: [PATCH 20/25] Update grid matching game --- src/Infiltration/ui/Cyberpunk2077Game.tsx | 71 ++++++++++++++--------- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/src/Infiltration/ui/Cyberpunk2077Game.tsx b/src/Infiltration/ui/Cyberpunk2077Game.tsx index 3f88045f5..e5c1d6287 100644 --- a/src/Infiltration/ui/Cyberpunk2077Game.tsx +++ b/src/Infiltration/ui/Cyberpunk2077Game.tsx @@ -1,4 +1,4 @@ -import { Paper, Typography } from "@mui/material"; +import { Paper, Typography, Box } from "@mui/material"; import React, { useState } from "react"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; @@ -18,6 +18,12 @@ interface Difficulty { symbols: number; } +interface GridItem { + content: string; + color: string; + selected?: boolean; +} + const difficulties: { Trivial: Difficulty; Normal: Difficulty; @@ -75,18 +81,33 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement { } } + const flatGrid: GridItem[] = []; + grid.map((line, y) => + line.map((cell, x) => { + const isCorrectAnswer = cell === answers[currentAnswerIndex]; + const optionColor = hasAugment && !isCorrectAnswer ? Settings.theme.disabled : Settings.theme.primary; + + if (x === pos[0] && y === pos[1]) { + flatGrid.push({ color: optionColor, content: cell, selected: true }); + return; + } + + flatGrid.push({ color: optionColor, content: cell }); + }), + ); + const fontSize = "2em"; return ( <> - + Match the symbols! Targets:{" "} {answers.map((a, i) => { if (i == currentAnswerIndex) return ( - + {a}  ); @@ -98,31 +119,27 @@ export function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement { })}
    - {grid.map((line, y) => ( -
    - - {line.map((cell, x) => { - const isCorrectAnswer = cell === answers[currentAnswerIndex]; - - if (x == pos[0] && y == pos[1]) { - return ( - - {cell}  - - ); - } - - const optionColor = hasAugment && !isCorrectAnswer ? Settings.theme.disabled : Settings.theme.primary; - return ( - - {cell}  - - ); - })} + + {flatGrid.map((item) => ( + + {item.content} -
    -
    - ))} + ))} +
    From 437cd66ffe48bbf7ae2fbfa86e1a5e3bbf4014b0 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 30 Apr 2022 00:27:49 -0500 Subject: [PATCH 21/25] Update Minesweeper game UI --- src/Infiltration/ui/MinesweeperGame.tsx | 76 ++++++++++++++++++------- 1 file changed, 56 insertions(+), 20 deletions(-) diff --git a/src/Infiltration/ui/MinesweeperGame.tsx b/src/Infiltration/ui/MinesweeperGame.tsx index 1ec2538b9..9e8faa6de 100644 --- a/src/Infiltration/ui/MinesweeperGame.tsx +++ b/src/Infiltration/ui/MinesweeperGame.tsx @@ -1,7 +1,10 @@ -import { Paper, Typography } from "@mui/material"; +import { Close, Flag, Report } from "@mui/icons-material"; +import { Box, Paper, Typography } from "@mui/material"; +import { uniqueId } from "lodash"; import React, { useEffect, useState } from "react"; import { AugmentationNames } from "../../Augmentation/data/AugmentationNames"; import { Player } from "../../Player"; +import { Settings } from "../../Settings/Settings"; import { KEY } from "../../utils/helpers/keyCodes"; import { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from "../utils"; import { interpolate } from "./Difficulty"; @@ -80,29 +83,62 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement { return () => clearInterval(id); }, []); + const flatGrid: { flagged?: boolean; current?: boolean; marked?: boolean }[] = []; + + minefield.map((line, y) => + line.map((cell, x) => { + if (memoryPhase) { + flatGrid.push({ flagged: Boolean(minefield[y][x]) }); + return; + } else if (x === pos[0] && y === pos[1]) { + flatGrid.push({ current: true }); + } else if (answer[y][x]) { + flatGrid.push({ marked: true }); + } else if (hasAugment && minefield[y][x]) { + flatGrid.push({ flagged: true }); + } else { + flatGrid.push({}); + } + }), + ); + return ( <> - + {memoryPhase ? "Remember all the mines!" : "Mark all the mines!"} - {minefield.map((line, y) => ( -
    - - {line.map((cell, x) => { - if (memoryPhase) { - if (minefield[y][x]) return [?] ; - return [ ] ; - } else { - if (x == pos[0] && y == pos[1]) return [X] ; - if (answer[y][x]) return [.] ; - if (hasAugment && minefield[y][x]) return [?] ; - return [ ] ; - } - })} - -
    -
    - ))} + + {flatGrid.map((item) => { + const color = item.current + ? Settings.theme.infolight + : item.marked + ? Settings.theme.warning + : Settings.theme.error; + return ( + + {item.current ? : item.flagged ? : item.marked ? : <>} + + ); + })} +
    From def89832cb8c6d94bbef66ecf134cf10fba8221d Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 30 Apr 2022 00:28:00 -0500 Subject: [PATCH 22/25] Fix slash game Aug ending game early --- src/Infiltration/ui/SlashGame.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Infiltration/ui/SlashGame.tsx b/src/Infiltration/ui/SlashGame.tsx index f95ee7c37..16787eefc 100644 --- a/src/Infiltration/ui/SlashGame.tsx +++ b/src/Infiltration/ui/SlashGame.tsx @@ -42,7 +42,7 @@ export function SlashGame(props: IMinigameProps): React.ReactElement { const hasAugment = Player.hasAugmentation(AugmentationNames.MightOfAres, true); const phaseZeroTime = Math.random() * 3250 + 1500 - (250 + difficulty.window); const phaseOneTime = 250; - const timeUntilAttacking = (phaseZeroTime + phaseOneTime) * 0.8; + const timeUntilAttacking = phaseZeroTime + phaseOneTime; useEffect(() => { let id = window.setTimeout(() => { @@ -66,7 +66,7 @@ export function SlashGame(props: IMinigameProps): React.ReactElement { {hasAugment ? ( Guard will drop in... - + null} noPaper /> ) : ( <> From 9ea62981de8c78ae76d7fc08ae2551d63ecf7975 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 30 Apr 2022 15:11:34 -0500 Subject: [PATCH 23/25] Update intro `ul` alignment --- src/Infiltration/ui/Intro.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Infiltration/ui/Intro.tsx b/src/Infiltration/ui/Intro.tsx index 217545af1..7844ba3ca 100644 --- a/src/Infiltration/ui/Intro.tsx +++ b/src/Infiltration/ui/Intro.tsx @@ -98,8 +98,8 @@ export function Intro(props: IProps): React.ReactElement { >{` 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 that you can trade for money or reputation.
    From d4f312882926db7450ac997bb7d7b29a77edd940 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Sat, 30 Apr 2022 15:59:31 -0500 Subject: [PATCH 24/25] Adjust infil root height so it isn't scrollable --- src/Infiltration/ui/InfiltrationRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infiltration/ui/InfiltrationRoot.tsx b/src/Infiltration/ui/InfiltrationRoot.tsx index a66d60145..b66a7d31b 100644 --- a/src/Infiltration/ui/InfiltrationRoot.tsx +++ b/src/Infiltration/ui/InfiltrationRoot.tsx @@ -23,7 +23,7 @@ export function InfiltrationRoot(props: IProps): React.ReactElement { } return ( -
    +
    {start ? ( Date: Mon, 2 May 2022 11:38:20 -0500 Subject: [PATCH 25/25] Simplify conditionals --- src/Infiltration/ui/MinesweeperGame.tsx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/Infiltration/ui/MinesweeperGame.tsx b/src/Infiltration/ui/MinesweeperGame.tsx index 9e8faa6de..af49a144f 100644 --- a/src/Infiltration/ui/MinesweeperGame.tsx +++ b/src/Infiltration/ui/MinesweeperGame.tsx @@ -116,11 +116,23 @@ export function MinesweeperGame(props: IMinigameProps): React.ReactElement { }} > {flatGrid.map((item) => { - const color = item.current - ? Settings.theme.infolight - : item.marked - ? Settings.theme.warning - : Settings.theme.error; + let color: string; + let icon: React.ReactElement; + + if (item.marked) { + color = Settings.theme.warning; + icon = ; + } else if (item.current) { + color = Settings.theme.infolight; + icon = ; + } else if (item.flagged) { + color = Settings.theme.error; + icon = ; + } else { + color = Settings.theme.primary; + icon = <>; + } + return ( - {item.current ? : item.flagged ? : item.marked ? : <>} + {icon} ); })}