mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-01 12:03:47 +01:00
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:
parent
2414949c2c
commit
e55387df4d
@ -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]);
|
||||||
|
Loading…
Reference in New Issue
Block a user