mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-12 03:05:48 +00:00
Refactor challenges and add fresh start (#2964)
* Refactor challenges and add fresh start * Add achievement for fresh start challenge
This commit is contained in:
parent
01f6ec2ef3
commit
991051fa09
@ -264,6 +264,10 @@ export const PGMachv: AchievementTranslationEntries = {
|
|||||||
"MONO_FAIRY": {
|
"MONO_FAIRY": {
|
||||||
name: "Hey! Listen!",
|
name: "Hey! Listen!",
|
||||||
},
|
},
|
||||||
|
"FRESH_START": {
|
||||||
|
name: "First Try!",
|
||||||
|
description: "Complete the fresh start challenge."
|
||||||
|
}
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version)
|
// Achievement translations for the when the player character is female (it for now uses the same translations as the male version)
|
||||||
|
@ -5,7 +5,7 @@ import i18next from "i18next";
|
|||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
import { ParseKeys } from "i18next";
|
import { ParseKeys } from "i18next";
|
||||||
import { Challenge, SingleGenerationChallenge, SingleTypeChallenge } from "#app/data/challenge.js";
|
import { Challenge, FreshStartChallenge, SingleGenerationChallenge, SingleTypeChallenge } from "#app/data/challenge.js";
|
||||||
|
|
||||||
export enum AchvTier {
|
export enum AchvTier {
|
||||||
COMMON,
|
COMMON,
|
||||||
@ -276,6 +276,8 @@ export function getAchievementDescription(localizationKey: string): string {
|
|||||||
case "MONO_DARK":
|
case "MONO_DARK":
|
||||||
case "MONO_FAIRY":
|
case "MONO_FAIRY":
|
||||||
return i18next.t(`${genderPrefix}achv:MonoType.description` as ParseKeys, {"type": i18next.t(`pokemonInfo:Type.${localizationKey.slice(5)}`)});
|
return i18next.t(`${genderPrefix}achv:MonoType.description` as ParseKeys, {"type": i18next.t(`pokemonInfo:Type.${localizationKey.slice(5)}`)});
|
||||||
|
case "FRESH_START":
|
||||||
|
return i18next.t(`${genderPrefix}achv:FRESH_START.description` as ParseKeys);
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -350,6 +352,7 @@ export const achvs = {
|
|||||||
MONO_DRAGON: new ChallengeAchv("MONO_DRAGON","", "MONO_DRAGON.description", "dragon_fang", 100, c => c instanceof SingleTypeChallenge && c.value === 16),
|
MONO_DRAGON: new ChallengeAchv("MONO_DRAGON","", "MONO_DRAGON.description", "dragon_fang", 100, c => c instanceof SingleTypeChallenge && c.value === 16),
|
||||||
MONO_DARK: new ChallengeAchv("MONO_DARK","", "MONO_DARK.description", "black_glasses", 100, c => c instanceof SingleTypeChallenge && c.value === 17),
|
MONO_DARK: new ChallengeAchv("MONO_DARK","", "MONO_DARK.description", "black_glasses", 100, c => c instanceof SingleTypeChallenge && c.value === 17),
|
||||||
MONO_FAIRY: new ChallengeAchv("MONO_FAIRY","", "MONO_FAIRY.description", "fairy_feather", 100, c => c instanceof SingleTypeChallenge && c.value === 18),
|
MONO_FAIRY: new ChallengeAchv("MONO_FAIRY","", "MONO_FAIRY.description", "fairy_feather", 100, c => c instanceof SingleTypeChallenge && c.value === 18),
|
||||||
|
FRESH_START: new ChallengeAchv("FRESH_START","", "FRESH_START.description", "mystic_ticket", 100, c => c instanceof FreshStartChallenge && c.value === 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
export function initAchievements() {
|
export function initAchievements() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user