From 8e1aa32d30b22afad03adf1636574e6312d70592 Mon Sep 17 00:00:00 2001 From: Alex Bueno <44420072+aweell@users.noreply.github.com> Date: Fri, 29 Nov 2024 20:30:49 +0100 Subject: [PATCH] Fix achievements --- .../utils/achievement-config.jsx | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/pages/advent-calendar-2024/utils/achievement-config.jsx b/src/pages/advent-calendar-2024/utils/achievement-config.jsx index 70dbfedd4f..8275cff741 100644 --- a/src/pages/advent-calendar-2024/utils/achievement-config.jsx +++ b/src/pages/advent-calendar-2024/utils/achievement-config.jsx @@ -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", @@ -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, }, ];