tweak(web/skillcheck): adjust game difficulty

Don't spawn the skillcheck zone in the 1/3rd of the circle and adjust hard difficulty
This commit is contained in:
Luke
2022-10-13 23:22:07 +02:00
committed by Luke
parent e4b3e0186d
commit a358f1ccad

View File

@@ -16,7 +16,7 @@ const getRandomAngle = (min: number, max: number) => Math.floor(Math.random() *
const difficultyOffsets = { const difficultyOffsets = {
easy: 275, easy: 275,
medium: 290, medium: 290,
hard: 300, hard: 295,
}; };
debugData([ debugData([
@@ -35,10 +35,11 @@ const SkillCheck: React.FC = () => {
}); });
useNuiEvent('startSkillCheck', (data: 'easy' | 'medium' | 'hard') => { useNuiEvent('startSkillCheck', (data: 'easy' | 'medium' | 'hard') => {
const offset = difficultyOffsets[data];
setSkillCheck({ setSkillCheck({
visible: true, visible: true,
angle: -90 + getRandomAngle(0, 360), angle: -90 + getRandomAngle(120, 360 - (315 - offset)),
difficultyOffset: difficultyOffsets[data], difficultyOffset: offset,
difficulty: data, difficulty: data,
}); });
}); });
@@ -65,7 +66,7 @@ const SkillCheck: React.FC = () => {
<Indicator <Indicator
angle={skillCheck.angle} angle={skillCheck.angle}
offset={skillCheck.difficultyOffset} 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} setSkillCheck={setSkillCheck}
/> />
</svg> </svg>