From a358f1ccad8ab66f0aae9be3d09ba40fe06ef0b8 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 13 Oct 2022 23:22:07 +0200 Subject: [PATCH] tweak(web/skillcheck): adjust game difficulty Don't spawn the skillcheck zone in the 1/3rd of the circle and adjust hard difficulty --- web/src/features/skillcheck/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/features/skillcheck/index.tsx b/web/src/features/skillcheck/index.tsx index 57c2074..0b6d00e 100644 --- a/web/src/features/skillcheck/index.tsx +++ b/web/src/features/skillcheck/index.tsx @@ -16,7 +16,7 @@ const getRandomAngle = (min: number, max: number) => Math.floor(Math.random() * const difficultyOffsets = { easy: 275, medium: 290, - hard: 300, + hard: 295, }; debugData([ @@ -35,10 +35,11 @@ const SkillCheck: React.FC = () => { }); useNuiEvent('startSkillCheck', (data: 'easy' | 'medium' | 'hard') => { + const offset = difficultyOffsets[data]; setSkillCheck({ visible: true, - angle: -90 + getRandomAngle(0, 360), - difficultyOffset: difficultyOffsets[data], + angle: -90 + getRandomAngle(120, 360 - (315 - offset)), + difficultyOffset: offset, difficulty: data, }); }); @@ -65,7 +66,7 @@ const SkillCheck: React.FC = () => {