Skip to content

Commit

Permalink
Fix achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
aweell committed Nov 29, 2024
1 parent fd9d387 commit 8e1aa32
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/pages/advent-calendar-2024/utils/achievement-config.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,23 @@ export const achievementsConfig = [
message: "You have unlocked 5 consecutive days!",
isSecret: false,
},
{
id: "movieMaster",
name: "Movie Master",
description: "Get the maximum score in the Emoji Movies game",
icon: IconVideoCameraFilled,
check: () => {
const gameScores = JSON.parse(localStorage.getItem("gameScores")) || {};
const emojiMovies1Score = gameScores["Emoji Movies1"]?.score || 0;
const emojiMovies2Score = gameScores["Emoji Movies2"]?.score || 0;
const totalScore = emojiMovies1Score + emojiMovies2Score;
return totalScore > 800;
},

message:
"You know your movies! You achieve the maximum score in the Emoji Movies game!",
isSecret: false,
},
{
id: "adventChampion",
name: "Advent Champion",
Expand Down Expand Up @@ -80,24 +97,7 @@ export const achievementsConfig = [
},
message:
"Achievement Unlocked: Game Master - You have completed all game days!",
isSecret: false,
},
{
id: "movieMaster",
name: "Movie Master",
description: "Get the maximum score in the Emoji Movies game",
icon: IconVideoCameraFilled,
check: () => {
const gameScores = JSON.parse(localStorage.getItem("gameScores")) || {};
const emojiMovies1Score = gameScores["Emoji Movies1"]?.score || 0;
const emojiMovies2Score = gameScores["Emoji Movies2"]?.score || 0;
const totalScore = emojiMovies1Score + emojiMovies2Score;
return totalScore > 800;
},

message:
"You know your movies! You achieve the maximum score in the Emoji Movies game!",
isSecret: false,
isSecret: true,
},
];

Expand Down

0 comments on commit 8e1aa32

Please sign in to comment.