[Enhancement/Item] Add Achievement to Unlock Eviolite (#3390)

* Add Achievement & Adjust Weight Function

* Create `EVIOLITE` Unlockable

* Add Placeholder Localization Entries

* Add `de` Localization

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Add `ko` Localization

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Add Placeholder `ja` Entry

* Add `pt-BR` Localization

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Add `fr` Localization

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Add Missing Placeholders for Localization

* Add `fr` Localization (female)

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

---------

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
Co-authored-by: returntoice <dieandbecome@gmail.com>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
This commit is contained in:
Amani H. 2024-08-07 20:07:28 -04:00 committed by GitHub
parent 00d039c65b
commit 723040208d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 77 additions and 4 deletions

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Undefeated",
description: "Beat the game in classic mode",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "The Original Rival",

View File

@ -170,6 +170,11 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Ungeschlagen",
description: "Beende den klassischen Modus erfolgreich.",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "'Bringe dein Kind mit zur Arbeit'-Tag" ,
description: "Beende den klassischen Modus erfolgreich mit mindestens einem nicht entwickeltem Pokémon in deinem Team"
},
"MONO_GEN_ONE": {
name: "Der originale Rivale",
description: "Schließe die 'Nur 1. Generation' Herausforderung ab.",
@ -348,6 +353,7 @@ export const PGFachv: AchievementTranslationEntries = {
"HIDDEN_ABILITY": PGMachv.HIDDEN_ABILITY,
"PERFECT_IVS": PGMachv.PERFECT_IVS,
"CLASSIC_VICTORY": PGMachv.CLASSIC_VICTORY,
"UNEVOLVED_CLASSIC_VICTORY": PGMachv.UNEVOLVED_CLASSIC_VICTORY,
"MONO_GEN_ONE": PGMachv.MONO_GEN_ONE,
"MONO_GEN_TWO": PGMachv.MONO_GEN_TWO,
"MONO_GEN_THREE": PGMachv.MONO_GEN_THREE,

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Undefeated",
description: "Beat the game in classic mode",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "The Original Rival",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Imbatible",
description: "Completa el juego en modo clásico.",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "The Original Rival",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Invaincu",
description: "Terminer le jeu en mode classique",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Le stagiaire de 3e",
description: "Terminer le mode Classique avec au moins un Pokémon non-évolué dans léquipe."
},
"MONO_GEN_ONE": {
name: "Le rival originel",
@ -439,6 +443,10 @@ export const PGFachv: AchievementTranslationEntries = {
name: "Invaincue",
description: "Terminer le jeu en mode classique",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Le stagiaire de 3e",
description: "Terminer le mode Classique avec au moins un Pokémon non-évolué dans léquipe."
},
"MONO_GEN_ONE": {
name: "Le rival originel",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Imbattuto",
description: "Vinci in modalità classica",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "Rivale Originale",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Undefeated",
description: "Beat the game in classic mode",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "The Original Rival",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "무패",
description: "클래식 모드 클리어",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "우리집 꿈나무",
description: "최종 진화형이 아닌 포켓몬을 데리고 클래식 모드 클리어."
},
"MONO_GEN_ONE": {
name: "근본 라이벌",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "Invencível",
description: "Vença o jogo no modo clássico",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Tire as Crianças da Sala",
description: "Vença o jogo no Modo Clássico com pelo menos um membro da equipe não evoluído.."
},
"MONO_GEN_ONE": {
@ -440,6 +444,10 @@ export const PGFachv: AchievementTranslationEntries = {
name: "Invencível",
description: "Vença o jogo no modo clássico",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "战无不胜",
description: "在经典模式中通关游戏",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "最初的劲敌",

View File

@ -169,6 +169,10 @@ export const PGMachv: AchievementTranslationEntries = {
name: "戰無不勝",
description: "在經典模式中通關遊戲",
},
"UNEVOLVED_CLASSIC_VICTORY": {
name: "Bring Your Child To Work Day",
description: "Beat the game in Classic Mode with at least one unevolved party member."
},
"MONO_GEN_ONE": {
name: "最初的勁敵",

View File

@ -1544,7 +1544,12 @@ const modifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.MINT, 4),
new WeightedModifierType(modifierTypes.RARE_EVOLUTION_ITEM, (party: Pokemon[]) => Math.min(Math.ceil(party[0].scene.currentBattle.waveIndex / 15) * 4, 32), 32),
new WeightedModifierType(modifierTypes.AMULET_COIN, skipInLastClassicWaveOrDefault(3)),
//new WeightedModifierType(modifierTypes.EVIOLITE, (party: Pokemon[]) => party.some(p => ((p.getSpeciesForm(true).speciesId in pokemonEvolutions) || (p.isFusion() && (p.getFusionSpeciesForm(true).speciesId in pokemonEvolutions))) && !p.getHeldItems().some(i => i instanceof Modifiers.EvolutionStatBoosterModifier)) ? 10 : 0),
new WeightedModifierType(modifierTypes.EVIOLITE, (party: Pokemon[]) => {
if (party[0].scene.gameData.unlocks[Unlockables.EVIOLITE]) {
return party.some(p => ((p.getSpeciesForm(true).speciesId in pokemonEvolutions) || (p.isFusion() && (p.getFusionSpeciesForm(true).speciesId in pokemonEvolutions))) && !p.getHeldItems().some(i => i instanceof Modifiers.EvolutionStatBoosterModifier)) ? 10 : 0;
}
return 0;
}),
new WeightedModifierType(modifierTypes.SPECIES_STAT_BOOSTER, 12),
new WeightedModifierType(modifierTypes.LEEK, (party: Pokemon[]) => {
const checkedSpecies = [ Species.FARFETCHD, Species.GALAR_FARFETCHD, Species.SIRFETCHD ];

View File

@ -65,6 +65,7 @@ import { PlayerGender } from "#enums/player-gender";
import { Species } from "#enums/species";
import { TrainerType } from "#enums/trainer-type";
import { applyChallenges, ChallengeType } from "./data/challenge";
import { pokemonEvolutions } from "./data/pokemon-evolutions";
const { t } = i18next;
@ -4287,6 +4288,7 @@ export class GameOverPhase extends BattlePhase {
if (this.victory && newClear) {
if (this.scene.gameMode.isClassic) {
firstClear = this.scene.validateAchv(achvs.CLASSIC_VICTORY);
this.scene.validateAchv(achvs.UNEVOLVED_CLASSIC_VICTORY);
this.scene.gameData.gameStats.sessionsWon++;
for (const pokemon of this.scene.getParty()) {
this.awardRibbon(pokemon);
@ -4387,6 +4389,9 @@ export class GameOverPhase extends BattlePhase {
if (!this.scene.gameData.unlocks[Unlockables.MINI_BLACK_HOLE]) {
this.scene.unshiftPhase(new UnlockPhase(this.scene, Unlockables.MINI_BLACK_HOLE));
}
if (!this.scene.gameData.unlocks[Unlockables.EVIOLITE] && this.scene.getParty().some(p => p.getSpeciesForm(true).speciesId in pokemonEvolutions)) {
this.scene.unshiftPhase(new UnlockPhase(this.scene, Unlockables.EVIOLITE));
}
}
}

View File

@ -1,6 +1,7 @@
import { Modifier } from "typescript";
import BattleScene from "../battle-scene";
import { TurnHeldItemTransferModifier } from "../modifier/modifier";
import { pokemonEvolutions } from "#app/data/pokemon-evolutions";
import i18next from "i18next";
import * as Utils from "../utils";
import { PlayerGender } from "#enums/player-gender";
@ -240,6 +241,8 @@ export function getAchievementDescription(localizationKey: string): string {
return i18next.t(`${genderPrefix}achv:PERFECT_IVS.description` as ParseKeys);
case "CLASSIC_VICTORY":
return i18next.t(`${genderPrefix}achv:CLASSIC_VICTORY.description` as ParseKeys);
case "UNEVOLVED_CLASSIC_VICTORY":
return i18next.t(`${genderPrefix}achv:UNEVOLVED_CLASSIC_VICTORY.description` as ParseKeys);
case "MONO_GEN_ONE":
return i18next.t(`${genderPrefix}achv:MONO_GEN_ONE.description` as ParseKeys);
case "MONO_GEN_TWO":
@ -326,6 +329,7 @@ export const achvs = {
HIDDEN_ABILITY: new Achv("HIDDEN_ABILITY","", "HIDDEN_ABILITY.description","ability_charm", 75),
PERFECT_IVS: new Achv("PERFECT_IVS","", "PERFECT_IVS.description","blunder_policy", 100),
CLASSIC_VICTORY: new Achv("CLASSIC_VICTORY","", "CLASSIC_VICTORY.description","relic_crown", 150),
UNEVOLVED_CLASSIC_VICTORY: new Achv("UNEVOLVED_CLASSIC_VICTORY", "", "UNEVOLVED_CLASSIC_VICTORY.description", "eviolite", 175, c => c.getParty().some(p => p.getSpeciesForm(true).speciesId in pokemonEvolutions)),
MONO_GEN_ONE_VICTORY: new ChallengeAchv("MONO_GEN_ONE","", "MONO_GEN_ONE.description", "ribbon_gen1", 100, c => c instanceof SingleGenerationChallenge && c.value === 1),
MONO_GEN_TWO_VICTORY: new ChallengeAchv("MONO_GEN_TWO","", "MONO_GEN_TWO.description", "ribbon_gen2", 100, c => c instanceof SingleGenerationChallenge && c.value === 2),
MONO_GEN_THREE_VICTORY: new ChallengeAchv("MONO_GEN_THREE","", "MONO_GEN_THREE.description", "ribbon_gen3", 100, c => c instanceof SingleGenerationChallenge && c.value === 3),

View File

@ -309,7 +309,8 @@ export class GameData {
this.unlocks = {
[Unlockables.ENDLESS_MODE]: false,
[Unlockables.MINI_BLACK_HOLE]: false,
[Unlockables.SPLICED_ENDLESS_MODE]: false
[Unlockables.SPLICED_ENDLESS_MODE]: false,
[Unlockables.EVIOLITE]: false
};
this.achvUnlocks = {};
this.voucherUnlocks = {};

View File

@ -1,9 +1,11 @@
import i18next from "i18next";
import { GameMode, GameModes } from "../game-mode";
export enum Unlockables {
ENDLESS_MODE,
MINI_BLACK_HOLE,
SPLICED_ENDLESS_MODE
SPLICED_ENDLESS_MODE,
EVIOLITE
}
export function getUnlockableName(unlockable: Unlockables) {
@ -11,8 +13,10 @@ export function getUnlockableName(unlockable: Unlockables) {
case Unlockables.ENDLESS_MODE:
return `${GameMode.getModeName(GameModes.ENDLESS)} Mode`;
case Unlockables.MINI_BLACK_HOLE:
return "Mini Black Hole";
return i18next.t("modifierType:ModifierType.MINI_BLACK_HOLE.name");
case Unlockables.SPLICED_ENDLESS_MODE:
return `${GameMode.getModeName(GameModes.SPLICED_ENDLESS)} Mode`;
case Unlockables.EVIOLITE:
return i18next.t("modifierType:ModifierType.EVIOLITE.name");
}
}