Skip to content

Commit

Permalink
tweak(web/skillcheck): adjust game difficulty
Browse files Browse the repository at this point in the history
Don't spawn the skillcheck zone in the 1/3rd of the circle and adjust hard difficulty
  • Loading branch information
LukeWasTakenn committed Oct 18, 2022
1 parent e4b3e01 commit a358f1c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions web/src/features/skillcheck/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand All @@ -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,
});
});
Expand All @@ -65,7 +66,7 @@ const SkillCheck: React.FC = () => {
<Indicator
angle={skillCheck.angle}
offset={skillCheck.difficultyOffset}
multiplier={skillCheck.difficulty === 'easy' ? 1 : skillCheck.difficulty === 'medium' ? 1.5 : 2}
multiplier={skillCheck.difficulty === 'easy' ? 1 : skillCheck.difficulty === 'medium' ? 1.5 : 1.75}
setSkillCheck={setSkillCheck}
/>
</svg>
Expand Down

0 comments on commit a358f1c

Please sign in to comment.