mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
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:
@@ -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 = () => {
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user