INFILTRATION: Rename variables in slash game (#1253)

This PR renames variables in the slash game to match the new description/wording in #1243.
This commit is contained in:
catloversg 2024-05-10 15:39:20 +07:00 committed by GitHub
parent 2414949c2c
commit e55387df4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -34,14 +34,14 @@ export function SlashGame({ difficulty, onSuccess, onFailure }: IMinigameProps):
// Determine timeframes for game phase changes // Determine timeframes for game phase changes
const newDifficulty: Difficulty = { window: 0 }; const newDifficulty: Difficulty = { window: 0 };
interpolate(difficulties, difficulty, newDifficulty); interpolate(difficulties, difficulty, newDifficulty);
const timePreparing = const distractedTime =
newDifficulty.window * (Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 1.3 : 1); newDifficulty.window * (Player.hasAugmentation(AugmentationName.WKSharmonizer, true) ? 1.3 : 1);
const timeAttacking = 250; const alertedTime = 250;
const timeGuarding = Math.random() * 3250 + 1500 - (timeAttacking + timePreparing); const guardingTime = Math.random() * 3250 + 1500 - (distractedTime + alertedTime);
// Set initial game state // Set initial game state
setPhase(0); setPhase(0);
setGuardingTime(timeGuarding); setGuardingTime(guardingTime);
setHasAugment(Player.hasAugmentation(AugmentationName.MightOfAres, true)); setHasAugment(Player.hasAugmentation(AugmentationName.MightOfAres, true));
// Setup timer for game phases // Setup timer for game phases
@ -49,9 +49,9 @@ export function SlashGame({ difficulty, onSuccess, onFailure }: IMinigameProps):
setPhase(1); setPhase(1);
id = setTimeout(() => { id = setTimeout(() => {
setPhase(2); setPhase(2);
id = setTimeout(() => onFailure(), timeAttacking); id = setTimeout(() => onFailure(), alertedTime);
}, timePreparing); }, distractedTime);
}, timeGuarding); }, guardingTime);
return () => clearTimeout(id); return () => clearTimeout(id);
}, [difficulty, onSuccess, onFailure]); }, [difficulty, onSuccess, onFailure]);