mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-08 08:43:53 +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
|
||||
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]);
|
||||
|
Loading…
Reference in New Issue
Block a user