Compare commits

..

No commits in common. "87f55a8a1adddff38b95c383e2840a0fb3f3bfec" and "60aa61e56e06ff263b2d7a718be31001efde607c" have entirely different histories.

5 changed files with 20 additions and 115 deletions

View File

@ -42431,6 +42431,7 @@ export const tmSpecies: TmSpecies = {
Species.TORTERRA, Species.TORTERRA,
Species.BUDEW, Species.BUDEW,
Species.ROSERADE, Species.ROSERADE,
Species.WORMADAM,
Species.CHERUBI, Species.CHERUBI,
Species.CHERRIM, Species.CHERRIM,
Species.CARNIVINE, Species.CARNIVINE,
@ -42448,7 +42449,6 @@ export const tmSpecies: TmSpecies = {
Species.PETILIL, Species.PETILIL,
Species.LILLIGANT, Species.LILLIGANT,
Species.MARACTUS, Species.MARACTUS,
Species.MINCCINO,
Species.CINCCINO, Species.CINCCINO,
Species.DEERLING, Species.DEERLING,
Species.SAWSBUCK, Species.SAWSBUCK,
@ -42511,10 +42511,6 @@ export const tmSpecies: TmSpecies = {
Species.DIPPLIN, Species.DIPPLIN,
Species.OGERPON, Species.OGERPON,
Species.HYDRAPPLE, Species.HYDRAPPLE,
[
Species.WORMADAM,
"plant",
],
Species.ALOLA_EXEGGUTOR, Species.ALOLA_EXEGGUTOR,
Species.HISUI_VOLTORB, Species.HISUI_VOLTORB,
Species.HISUI_ELECTRODE, Species.HISUI_ELECTRODE,
@ -45988,7 +45984,6 @@ export const tmSpecies: TmSpecies = {
Species.TEDDIURSA, Species.TEDDIURSA,
Species.URSARING, Species.URSARING,
Species.HITMONTOP, Species.HITMONTOP,
Species.COMBUSKEN,
Species.BLAZIKEN, Species.BLAZIKEN,
Species.BRELOOM, Species.BRELOOM,
Species.MAKUHITA, Species.MAKUHITA,
@ -48617,7 +48612,6 @@ export const tmSpecies: TmSpecies = {
Species.WOOBAT, Species.WOOBAT,
Species.SWOOBAT, Species.SWOOBAT,
Species.SEWADDLE, Species.SEWADDLE,
Species.SWADLOON,
Species.LEAVANNY, Species.LEAVANNY,
Species.SIGILYPH, Species.SIGILYPH,
Species.ARCHEOPS, Species.ARCHEOPS,
@ -48647,9 +48641,6 @@ export const tmSpecies: TmSpecies = {
Species.ROWLET, Species.ROWLET,
Species.DARTRIX, Species.DARTRIX,
Species.DECIDUEYE, Species.DECIDUEYE,
Species.PIKIPEK,
Species.TRUMBEAK,
Species.TOUCANNON,
Species.VIKAVOLT, Species.VIKAVOLT,
Species.ORICORIO, Species.ORICORIO,
Species.TYPE_NULL, Species.TYPE_NULL,
@ -49171,8 +49162,6 @@ export const tmSpecies: TmSpecies = {
Species.AZELF, Species.AZELF,
Species.REGIGIGAS, Species.REGIGIGAS,
Species.DARKRAI, Species.DARKRAI,
Species.PIGNITE,
Species.EMBOAR,
Species.AUDINO, Species.AUDINO,
Species.TIMBURR, Species.TIMBURR,
Species.GURDURR, Species.GURDURR,
@ -49803,13 +49792,10 @@ export const tmSpecies: TmSpecies = {
], ],
[Moves.BRAVE_BIRD]: [ [Moves.BRAVE_BIRD]: [
Species.PIDGEY, Species.PIDGEY,
Species.PIDGEOTTO,
Species.PIDGEOT,
Species.ZUBAT, Species.ZUBAT,
Species.GOLBAT, Species.GOLBAT,
Species.FARFETCHD, Species.FARFETCHD,
Species.DODUO, Species.DODUO,
Species.DODRIO,
Species.ARTICUNO, Species.ARTICUNO,
Species.ZAPDOS, Species.ZAPDOS,
Species.MOLTRES, Species.MOLTRES,
@ -49820,7 +49806,6 @@ export const tmSpecies: TmSpecies = {
Species.MURKROW, Species.MURKROW,
Species.DELIBIRD, Species.DELIBIRD,
Species.SKARMORY, Species.SKARMORY,
Species.LUGIA,
Species.HO_OH, Species.HO_OH,
Species.BLAZIKEN, Species.BLAZIKEN,
Species.TAILLOW, Species.TAILLOW,
@ -49848,8 +49833,6 @@ export const tmSpecies: TmSpecies = {
Species.DARTRIX, Species.DARTRIX,
Species.DECIDUEYE, Species.DECIDUEYE,
Species.PIKIPEK, Species.PIKIPEK,
Species.TRUMBEAK,
Species.TOUCANNON,
Species.TAPU_KOKO, Species.TAPU_KOKO,
Species.ROOKIDEE, Species.ROOKIDEE,
Species.CORVISQUIRE, Species.CORVISQUIRE,
@ -50025,7 +50008,6 @@ export const tmSpecies: TmSpecies = {
Species.MUDSDALE, Species.MUDSDALE,
Species.SANDYGAST, Species.SANDYGAST,
Species.PALOSSAND, Species.PALOSSAND,
Species.MINIOR,
Species.NECROZMA, Species.NECROZMA,
Species.RILLABOOM, Species.RILLABOOM,
Species.DREDNAW, Species.DREDNAW,
@ -51986,7 +51968,6 @@ export const tmSpecies: TmSpecies = {
Species.BEHEEYEM, Species.BEHEEYEM,
Species.CRYOGONAL, Species.CRYOGONAL,
Species.DRUDDIGON, Species.DRUDDIGON,
Species.GOLETT,
Species.GOLURK, Species.GOLURK,
Species.PAWNIARD, Species.PAWNIARD,
Species.BISHARP, Species.BISHARP,
@ -52029,7 +52010,6 @@ export const tmSpecies: TmSpecies = {
Species.MELTAN, Species.MELTAN,
Species.MELMETAL, Species.MELMETAL,
Species.CORVIKNIGHT, Species.CORVIKNIGHT,
Species.PERRSERKER,
Species.CUFANT, Species.CUFANT,
Species.COPPERAJAH, Species.COPPERAJAH,
Species.DURALUDON, Species.DURALUDON,
@ -53219,8 +53199,6 @@ export const tmSpecies: TmSpecies = {
Species.NUMEL, Species.NUMEL,
Species.CAMERUPT, Species.CAMERUPT,
Species.TORKOAL, Species.TORKOAL,
Species.TRAPINCH,
Species.VIBRAVA,
Species.FLYGON, Species.FLYGON,
Species.LUNATONE, Species.LUNATONE,
Species.SOLROCK, Species.SOLROCK,
@ -53464,9 +53442,6 @@ export const tmSpecies: TmSpecies = {
Species.NUMEL, Species.NUMEL,
Species.CAMERUPT, Species.CAMERUPT,
Species.TORKOAL, Species.TORKOAL,
Species.TRAPINCH,
Species.VIBRAVA,
Species.FLYGON,
Species.LUNATONE, Species.LUNATONE,
Species.SOLROCK, Species.SOLROCK,
Species.BARBOACH, Species.BARBOACH,
@ -53549,7 +53524,6 @@ export const tmSpecies: TmSpecies = {
Species.HYDREIGON, Species.HYDREIGON,
Species.COBALION, Species.COBALION,
Species.TERRAKION, Species.TERRAKION,
Species.ZEKROM,
Species.LANDORUS, Species.LANDORUS,
Species.BINACLE, Species.BINACLE,
Species.BARBARACLE, Species.BARBARACLE,
@ -54596,7 +54570,6 @@ export const tmSpecies: TmSpecies = {
Species.SLOWBRO, Species.SLOWBRO,
Species.DROWZEE, Species.DROWZEE,
Species.HYPNO, Species.HYPNO,
Species.EXEGGCUTE,
Species.EXEGGUTOR, Species.EXEGGUTOR,
Species.STARMIE, Species.STARMIE,
Species.MR_MIME, Species.MR_MIME,
@ -54648,7 +54621,6 @@ export const tmSpecies: TmSpecies = {
Species.MESPRIT, Species.MESPRIT,
Species.AZELF, Species.AZELF,
Species.CRESSELIA, Species.CRESSELIA,
Species.DARKRAI,
Species.ARCEUS, Species.ARCEUS,
Species.VICTINI, Species.VICTINI,
Species.MUNNA, Species.MUNNA,
@ -54672,7 +54644,6 @@ export const tmSpecies: TmSpecies = {
Species.ESPURR, Species.ESPURR,
Species.MEOWSTIC, Species.MEOWSTIC,
Species.AROMATISSE, Species.AROMATISSE,
Species.INKAY,
Species.MALAMAR, Species.MALAMAR,
Species.SYLVEON, Species.SYLVEON,
Species.KLEFKI, Species.KLEFKI,
@ -55090,7 +55061,6 @@ export const tmSpecies: TmSpecies = {
Species.NIDOQUEEN, Species.NIDOQUEEN,
Species.NIDOKING, Species.NIDOKING,
Species.VILEPLUME, Species.VILEPLUME,
Species.VENOMOTH,
Species.DUGTRIO, Species.DUGTRIO,
Species.BELLSPROUT, Species.BELLSPROUT,
Species.WEEPINBELL, Species.WEEPINBELL,
@ -55195,7 +55165,6 @@ export const tmSpecies: TmSpecies = {
Species.MAGNEMITE, Species.MAGNEMITE,
Species.MAGNETON, Species.MAGNETON,
Species.ONIX, Species.ONIX,
Species.RHYHORN,
Species.RHYDON, Species.RHYDON,
Species.SNORLAX, Species.SNORLAX,
Species.MEW, Species.MEW,
@ -55228,7 +55197,6 @@ export const tmSpecies: TmSpecies = {
Species.TURTWIG, Species.TURTWIG,
Species.GROTLE, Species.GROTLE,
Species.TORTERRA, Species.TORTERRA,
Species.RAMPARDOS,
Species.SHIELDON, Species.SHIELDON,
Species.BASTIODON, Species.BASTIODON,
Species.BRONZOR, Species.BRONZOR,
@ -55244,8 +55212,6 @@ export const tmSpecies: TmSpecies = {
Species.REGIGIGAS, Species.REGIGIGAS,
Species.ARCEUS, Species.ARCEUS,
Species.TEPIG, Species.TEPIG,
Species.PIGNITE,
Species.EMBOAR,
Species.ROGGENROLA, Species.ROGGENROLA,
Species.BOLDORE, Species.BOLDORE,
Species.GIGALITH, Species.GIGALITH,
@ -55256,7 +55222,6 @@ export const tmSpecies: TmSpecies = {
Species.BEARTIC, Species.BEARTIC,
Species.GOLETT, Species.GOLETT,
Species.GOLURK, Species.GOLURK,
Species.COBALION,
Species.CARBINK, Species.CARBINK,
Species.AVALUGG, Species.AVALUGG,
Species.VOLCANION, Species.VOLCANION,
@ -55338,7 +55303,6 @@ export const tmSpecies: TmSpecies = {
Species.FLAAFFY, Species.FLAAFFY,
Species.AMPHAROS, Species.AMPHAROS,
Species.ELEKID, Species.ELEKID,
Species.RAIKOU,
Species.ELECTRIKE, Species.ELECTRIKE,
Species.MANECTRIC, Species.MANECTRIC,
Species.PLUSLE, Species.PLUSLE,
@ -55350,8 +55314,6 @@ export const tmSpecies: TmSpecies = {
Species.MAGNEZONE, Species.MAGNEZONE,
Species.ELECTIVIRE, Species.ELECTIVIRE,
Species.ROTOM, Species.ROTOM,
Species.BLITZLE,
Species.ZEBSTRIKA,
Species.EMOLGA, Species.EMOLGA,
Species.JOLTIK, Species.JOLTIK,
Species.GALVANTULA, Species.GALVANTULA,
@ -59723,7 +59685,6 @@ export const tmSpecies: TmSpecies = {
Species.NIDORINO, Species.NIDORINO,
Species.NIDOKING, Species.NIDOKING,
Species.RAPIDASH, Species.RAPIDASH,
Species.DODRIO,
Species.SEEL, Species.SEEL,
Species.DEWGONG, Species.DEWGONG,
Species.CLOYSTER, Species.CLOYSTER,
@ -59738,7 +59699,6 @@ export const tmSpecies: TmSpecies = {
Species.FORRETRESS, Species.FORRETRESS,
Species.DUNSPARCE, Species.DUNSPARCE,
Species.STEELIX, Species.STEELIX,
Species.SKARMORY,
Species.DELIBIRD, Species.DELIBIRD,
Species.HITMONTOP, Species.HITMONTOP,
Species.BALTOY, Species.BALTOY,
@ -60592,7 +60552,6 @@ export const tmSpecies: TmSpecies = {
Species.ARCANINE, Species.ARCANINE,
Species.PONYTA, Species.PONYTA,
Species.RAPIDASH, Species.RAPIDASH,
Species.DEWGONG,
Species.MEW, Species.MEW,
Species.CYNDAQUIL, Species.CYNDAQUIL,
Species.QUILAVA, Species.QUILAVA,
@ -60623,8 +60582,6 @@ export const tmSpecies: TmSpecies = {
Species.SKITTY, Species.SKITTY,
Species.DELCATTY, Species.DELCATTY,
Species.MAWILE, Species.MAWILE,
Species.PLUSLE,
Species.MINUN,
Species.VOLBEAT, Species.VOLBEAT,
Species.ILLUMISE, Species.ILLUMISE,
Species.SWABLU, Species.SWABLU,
@ -60646,7 +60603,6 @@ export const tmSpecies: TmSpecies = {
Species.UXIE, Species.UXIE,
Species.MESPRIT, Species.MESPRIT,
Species.AZELF, Species.AZELF,
Species.SHAYMIN,
Species.LILLIPUP, Species.LILLIPUP,
Species.HERDIER, Species.HERDIER,
Species.STOUTLAND, Species.STOUTLAND,
@ -66320,13 +66276,8 @@ export const tmSpecies: TmSpecies = {
Species.BLOODMOON_URSALUNA, Species.BLOODMOON_URSALUNA,
], ],
[Moves.ICE_SPINNER]: [ [Moves.ICE_SPINNER]: [
Species.SQUIRTLE,
Species.WARTORTLE,
Species.BLASTOISE,
Species.JIGGLYPUFF, Species.JIGGLYPUFF,
Species.WIGGLYTUFF, Species.WIGGLYTUFF,
Species.SEEL,
Species.DEWGONG,
Species.SHELLDER, Species.SHELLDER,
Species.CLOYSTER, Species.CLOYSTER,
Species.ARTICUNO, Species.ARTICUNO,
@ -66339,12 +66290,9 @@ export const tmSpecies: TmSpecies = {
Species.DUNSPARCE, Species.DUNSPARCE,
Species.DELIBIRD, Species.DELIBIRD,
Species.DONPHAN, Species.DONPHAN,
Species.HITMONTOP,
Species.LUDICOLO, Species.LUDICOLO,
Species.SNORUNT, Species.SNORUNT,
Species.GLALIE, Species.GLALIE,
Species.REGICE,
Species.REGISTEEL,
Species.PIPLUP, Species.PIPLUP,
Species.PRINPLUP, Species.PRINPLUP,
Species.EMPOLEON, Species.EMPOLEON,
@ -66356,14 +66304,10 @@ export const tmSpecies: TmSpecies = {
Species.ABOMASNOW, Species.ABOMASNOW,
Species.WEAVILE, Species.WEAVILE,
Species.FROSLASS, Species.FROSLASS,
Species.CINCCINO,
Species.CRYOGONAL, Species.CRYOGONAL,
Species.MIENSHAO, Species.MIENSHAO,
Species.BERGMITE, Species.BERGMITE,
Species.AVALUGG, Species.AVALUGG,
Species.POPPLIO,
Species.BRIONNE,
Species.PRIMARINA,
Species.CRABOMINABLE, Species.CRABOMINABLE,
Species.MAREANIE, Species.MAREANIE,
Species.TOXAPEX, Species.TOXAPEX,
@ -66901,9 +66845,6 @@ export const tmSpecies: TmSpecies = {
Species.BLOODMOON_URSALUNA, Species.BLOODMOON_URSALUNA,
], ],
[Moves.CHILLING_WATER]: [ [Moves.CHILLING_WATER]: [
Species.SQUIRTLE,
Species.WARTORTLE,
Species.BLASTOISE,
Species.CLEFAIRY, Species.CLEFAIRY,
Species.CLEFABLE, Species.CLEFABLE,
Species.JIGGLYPUFF, Species.JIGGLYPUFF,
@ -66915,19 +66856,12 @@ export const tmSpecies: TmSpecies = {
Species.POLIWAG, Species.POLIWAG,
Species.POLIWHIRL, Species.POLIWHIRL,
Species.POLIWRATH, Species.POLIWRATH,
Species.TENTACOOL,
Species.TENTACRUEL,
Species.SLOWPOKE, Species.SLOWPOKE,
Species.SLOWBRO, Species.SLOWBRO,
Species.SEEL,
Species.DEWGONG,
Species.SHELLDER, Species.SHELLDER,
Species.CLOYSTER, Species.CLOYSTER,
Species.CHANSEY, Species.CHANSEY,
Species.HORSEA,
Species.SEADRA,
Species.GYARADOS, Species.GYARADOS,
Species.LAPRAS,
Species.VAPOREON, Species.VAPOREON,
Species.SNORLAX, Species.SNORLAX,
Species.DRATINI, Species.DRATINI,
@ -66935,13 +66869,8 @@ export const tmSpecies: TmSpecies = {
Species.DRAGONITE, Species.DRAGONITE,
Species.MEWTWO, Species.MEWTWO,
Species.MEW, Species.MEW,
Species.TOTODILE,
Species.CROCONAW,
Species.FERALIGATR,
Species.SENTRET, Species.SENTRET,
Species.FURRET, Species.FURRET,
Species.CHINCHOU,
Species.LANTURN,
Species.CLEFFA, Species.CLEFFA,
Species.MARILL, Species.MARILL,
Species.AZUMARILL, Species.AZUMARILL,
@ -66953,13 +66882,7 @@ export const tmSpecies: TmSpecies = {
Species.DUNSPARCE, Species.DUNSPARCE,
Species.QWILFISH, Species.QWILFISH,
Species.DELIBIRD, Species.DELIBIRD,
Species.KINGDRA,
Species.BLISSEY, Species.BLISSEY,
Species.SUICUNE,
Species.LUGIA,
Species.MUDKIP,
Species.MARSHTOMP,
Species.SWAMPERT,
Species.LOTAD, Species.LOTAD,
Species.LOMBRE, Species.LOMBRE,
Species.LUDICOLO, Species.LUDICOLO,
@ -66985,8 +66908,6 @@ export const tmSpecies: TmSpecies = {
Species.MILOTIC, Species.MILOTIC,
Species.SNORUNT, Species.SNORUNT,
Species.GLALIE, Species.GLALIE,
Species.LATIAS,
Species.LATIOS,
Species.KYOGRE, Species.KYOGRE,
Species.PIPLUP, Species.PIPLUP,
Species.PRINPLUP, Species.PRINPLUP,
@ -67012,8 +66933,6 @@ export const tmSpecies: TmSpecies = {
"", "",
"origin", "origin",
], ],
Species.PHIONE,
Species.MANAPHY,
Species.ARCEUS, Species.ARCEUS,
Species.OSHAWOTT, Species.OSHAWOTT,
Species.DEWOTT, Species.DEWOTT,
@ -67024,8 +66943,6 @@ export const tmSpecies: TmSpecies = {
"blue-striped", "blue-striped",
"white-striped", "white-striped",
], ],
Species.MINCCINO,
Species.CINCCINO,
Species.DUCKLETT, Species.DUCKLETT,
Species.SWANNA, Species.SWANNA,
Species.ALOMOMOLA, Species.ALOMOMOLA,
@ -67033,7 +66950,6 @@ export const tmSpecies: TmSpecies = {
Species.BEARTIC, Species.BEARTIC,
Species.CRYOGONAL, Species.CRYOGONAL,
Species.TORNADUS, Species.TORNADUS,
Species.KELDEO,
Species.FROAKIE, Species.FROAKIE,
Species.FROGADIER, Species.FROGADIER,
[ [
@ -67054,17 +66970,12 @@ export const tmSpecies: TmSpecies = {
Species.GOODRA, Species.GOODRA,
Species.BERGMITE, Species.BERGMITE,
Species.AVALUGG, Species.AVALUGG,
Species.POPPLIO,
Species.BRIONNE,
Species.PRIMARINA,
Species.YUNGOOS, Species.YUNGOOS,
Species.GUMSHOOS, Species.GUMSHOOS,
Species.CRABRAWLER, Species.CRABRAWLER,
Species.CRABOMINABLE, Species.CRABOMINABLE,
Species.MAREANIE, Species.MAREANIE,
Species.TOXAPEX, Species.TOXAPEX,
Species.DEWPIDER,
Species.ARAQUANID,
Species.ORANGURU, Species.ORANGURU,
Species.PASSIMIAN, Species.PASSIMIAN,
Species.SANDYGAST, Species.SANDYGAST,

View File

@ -342,8 +342,8 @@ export class LoadingScene extends SceneBase {
this.loadLoadingScreen(); this.loadLoadingScreen();
initAchievements();
initVouchers(); initVouchers();
initAchievements();
initStatsKeys(); initStatsKeys();
initPokemonPrevolutions(); initPokemonPrevolutions();
initBiomes(); initBiomes();

View File

@ -1,7 +1,7 @@
import { clientSessionId } from "#app/account"; import { clientSessionId } from "#app/account";
import BattleScene from "#app/battle-scene"; import BattleScene from "#app/battle-scene";
import { BattleType } from "#app/battle"; import { BattleType } from "#app/battle";
import { getCharVariantFromDialogue } from "#app/data/dialogue"; import { miscDialogue, getCharVariantFromDialogue } from "#app/data/dialogue";
import { pokemonEvolutions } from "#app/data/pokemon-evolutions"; import { pokemonEvolutions } from "#app/data/pokemon-evolutions";
import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species"; import PokemonSpecies, { getPokemonSpecies } from "#app/data/pokemon-species";
import { trainerConfigs } from "#app/data/trainer-config"; import { trainerConfigs } from "#app/data/trainer-config";
@ -136,16 +136,12 @@ export class GameOverPhase extends BattlePhase {
}; };
if (this.victory && this.scene.gameMode.isClassic) { if (this.victory && this.scene.gameMode.isClassic) {
const dialogueKey = "miscDialogue:ending"; const message = miscDialogue.ending[this.scene.gameData.gender === PlayerGender.FEMALE ? 0 : 1];
if (!this.scene.ui.shouldSkipDialogue(dialogueKey)) { if (!this.scene.ui.shouldSkipDialogue(message)) {
this.scene.ui.fadeIn(500).then(() => { this.scene.ui.fadeIn(500).then(() => {
const genderIndex = this.scene.gameData.gender ?? PlayerGender.UNSET; this.scene.charSprite.showCharacter(`rival_${this.scene.gameData.gender === PlayerGender.FEMALE ? "m" : "f"}`, getCharVariantFromDialogue(miscDialogue.ending[this.scene.gameData.gender === PlayerGender.FEMALE ? 0 : 1])).then(() => {
const genderStr = PlayerGender[genderIndex].toLowerCase(); this.scene.ui.showDialogue(message, this.scene.gameData.gender === PlayerGender.FEMALE ? trainerConfigs[TrainerType.RIVAL].name : trainerConfigs[TrainerType.RIVAL].nameFemale, null, () => {
// Dialogue has to be retrieved so that the rival's expressions can be loaded and shown via getCharVariantFromDialogue
const dialogue = i18next.t(dialogueKey, { context: genderStr });
this.scene.charSprite.showCharacter(`rival_${this.scene.gameData.gender === PlayerGender.FEMALE ? "m" : "f"}`, getCharVariantFromDialogue(dialogue)).then(() => {
this.scene.ui.showDialogue(dialogueKey, this.scene.gameData.gender === PlayerGender.FEMALE ? trainerConfigs[TrainerType.RIVAL].name : trainerConfigs[TrainerType.RIVAL].nameFemale, null, () => {
this.scene.ui.fadeOut(500).then(() => { this.scene.ui.fadeOut(500).then(() => {
this.scene.charSprite.hide().then(() => { this.scene.charSprite.hide().then(() => {
const endCardPhase = new EndCardPhase(this.scene); const endCardPhase = new EndCardPhase(this.scene);

View File

@ -324,7 +324,7 @@ export const achvs = {
HATCH_SHINY: new Achv("HATCH_SHINY", "", "HATCH_SHINY.description", "golden_egg", 100).setSecret(), HATCH_SHINY: new Achv("HATCH_SHINY", "", "HATCH_SHINY.description", "golden_egg", 100).setSecret(),
HIDDEN_ABILITY: new Achv("HIDDEN_ABILITY", "", "HIDDEN_ABILITY.description", "ability_charm", 75), HIDDEN_ABILITY: new Achv("HIDDEN_ABILITY", "", "HIDDEN_ABILITY.description", "ability_charm", 75),
PERFECT_IVS: new Achv("PERFECT_IVS", "", "PERFECT_IVS.description", "blunder_policy", 100), PERFECT_IVS: new Achv("PERFECT_IVS", "", "PERFECT_IVS.description", "blunder_policy", 100),
CLASSIC_VICTORY: new Achv("CLASSIC_VICTORY", "", "CLASSIC_VICTORY.description", "relic_crown", 150, c => c.gameData.gameStats.sessionsWon === 0), 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)), 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, scene) => c instanceof SingleGenerationChallenge && c.value === 1 && !scene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)), MONO_GEN_ONE_VICTORY: new ChallengeAchv("MONO_GEN_ONE", "", "MONO_GEN_ONE.description", "ribbon_gen1", 100, (c, scene) => c instanceof SingleGenerationChallenge && c.value === 1 && !scene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)),
MONO_GEN_TWO_VICTORY: new ChallengeAchv("MONO_GEN_TWO", "", "MONO_GEN_TWO.description", "ribbon_gen2", 100, (c, scene) => c instanceof SingleGenerationChallenge && c.value === 2 && !scene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)), MONO_GEN_TWO_VICTORY: new ChallengeAchv("MONO_GEN_TWO", "", "MONO_GEN_TWO.description", "ribbon_gen2", 100, (c, scene) => c instanceof SingleGenerationChallenge && c.value === 2 && !scene.gameMode.challenges.some(c => c.id === Challenges.INVERSE_BATTLE && c.value > 0)),

View File

@ -306,18 +306,16 @@ export default class UI extends Phaser.GameObjects.Container {
} }
} }
showDialogue(keyOrText: string, name: string | undefined, delay: integer | null = 0, callback: Function, callbackDelay?: integer, promptDelay?: integer): void { showDialogue(i18nKey: string, name: string | undefined, delay: integer | null = 0, callback: Function, callbackDelay?: integer, promptDelay?: integer): void {
const battleScene = this.scene as BattleScene; const battleScene = this.scene as BattleScene;
// Get localized dialogue (if available) // Get localized dialogue (if available)
let hasi18n = false; let hasi18n = false;
let text = keyOrText; if (i18next.exists(i18nKey) ) {
const genderIndex = battleScene.gameData.gender ?? PlayerGender.UNSET; const genderIndex = battleScene.gameData.gender ?? PlayerGender.UNSET;
const genderStr = PlayerGender[genderIndex].toLowerCase(); const genderStr = PlayerGender[genderIndex].toLowerCase();
i18nKey = i18next.t(i18nKey, { context: genderStr });
if (i18next.exists(keyOrText) ) {
const i18nKey = keyOrText;
hasi18n = true; hasi18n = true;
text = i18next.t(i18nKey, { context: genderStr }); // override text with translation
// Skip dialogue if the player has enabled the option and the dialogue has been already seen // Skip dialogue if the player has enabled the option and the dialogue has been already seen
if (battleScene.skipSeenDialogues &&battleScene.gameData.getSeenDialogues()[i18nKey] === true) { if (battleScene.skipSeenDialogues &&battleScene.gameData.getSeenDialogues()[i18nKey] === true) {
@ -327,11 +325,11 @@ export default class UI extends Phaser.GameObjects.Container {
} }
} }
let showMessageAndCallback = () => { let showMessageAndCallback = () => {
hasi18n && battleScene.gameData.saveSeenDialogue(keyOrText); hasi18n && battleScene.gameData.saveSeenDialogue(i18nKey);
callback(); callback();
}; };
if (text.indexOf("$") > -1) { if (i18nKey.indexOf("$") > -1) {
const messagePages = text.split(/\$/g).map(m => m.trim()); const messagePages = i18nKey.split(/\$/g).map(m => m.trim());
for (let p = messagePages.length - 1; p >= 0; p--) { for (let p = messagePages.length - 1; p >= 0; p--) {
const originalFunc = showMessageAndCallback; const originalFunc = showMessageAndCallback;
showMessageAndCallback = () => this.showDialogue(messagePages[p], name, null, originalFunc); showMessageAndCallback = () => this.showDialogue(messagePages[p], name, null, originalFunc);
@ -340,9 +338,9 @@ export default class UI extends Phaser.GameObjects.Container {
} else { } else {
const handler = this.getHandler(); const handler = this.getHandler();
if (handler instanceof MessageUiHandler) { if (handler instanceof MessageUiHandler) {
(handler as MessageUiHandler).showDialogue(text, name, delay, showMessageAndCallback, callbackDelay, true, promptDelay); (handler as MessageUiHandler).showDialogue(i18nKey, name, delay, showMessageAndCallback, callbackDelay, true, promptDelay);
} else { } else {
this.getMessageHandler().showDialogue(text, name, delay, showMessageAndCallback, callbackDelay, true, promptDelay); this.getMessageHandler().showDialogue(i18nKey, name, delay, showMessageAndCallback, callbackDelay, true, promptDelay);
} }
} }
} }