From e55387df4d8a8d6a874d11c71a207bd4472d05f1 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Fri, 10 May 2024 15:39:20 +0700 Subject: [PATCH] INFILTRATION: Rename variables in slash game (#1253) This PR renames variables in the slash game to match the new description/wording in #1243. --- src/Infiltration/ui/SlashGame.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Infiltration/ui/SlashGame.tsx b/src/Infiltration/ui/SlashGame.tsx index 9dbc73749..837e66650 100644 --- a/src/Infiltration/ui/SlashGame.tsx +++ b/src/Infiltration/ui/SlashGame.tsx @@ -34,14 +34,14 @@ export function SlashGame({ difficulty, onSuccess, onFailure }: IMinigameProps): // Determine timeframes for game phase changes const newDifficulty: Difficulty = { window: 0 }; interpolate(difficulties, difficulty, newDifficulty); - const timePreparing = + const distractedTime = newDifficulty.window * (Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 1.3 : 1); - const timeAttacking = 250; - const timeGuarding = Math.random() * 3250 + 1500 - (timeAttacking + timePreparing); + const alertedTime = 250; + const guardingTime = Math.random() * 3250 + 1500 - (distractedTime + alertedTime); // Set initial game state setPhase(0); - setGuardingTime(timeGuarding); + setGuardingTime(guardingTime); setHasAugment(Player.hasAugmentation(AugmentationName.MightOfAres, true)); // Setup timer for game phases @@ -49,9 +49,9 @@ export function SlashGame({ difficulty, onSuccess, onFailure }: IMinigameProps): setPhase(1); id = setTimeout(() => { setPhase(2); - id = setTimeout(() => onFailure(), timeAttacking); - }, timePreparing); - }, timeGuarding); + id = setTimeout(() => onFailure(), alertedTime); + }, distractedTime); + }, guardingTime); return () => clearTimeout(id); }, [difficulty, onSuccess, onFailure]);