@pokepc/dataset 6.5.1 → 6.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{box-preset-sanitizer-GjGde3eW.mjs → box-preset-sanitizer-DHGv5TJj.mjs} +2 -2
- package/build/{box-preset-sanitizer-GjGde3eW.mjs.map → box-preset-sanitizer-DHGv5TJj.mjs.map} +1 -1
- package/build/box-preset-sanitizer-kg68JZPB.d.mts.map +1 -1
- package/build/{build-DeFbpXmN.mjs → build-DvGzwIK8.mjs} +74 -17
- package/build/build-DvGzwIK8.mjs.map +1 -0
- package/build/{build-DlK17pH-.mjs → build-bE_0_-0H.mjs} +16 -15
- package/build/build-bE_0_-0H.mjs.map +1 -0
- package/build/enums-CCbmORM6.d.mts.map +1 -1
- package/build/lib/box-preset-sanitizer.mjs +1 -1
- package/build/lib/box-preset-transform.d.mts +4 -6
- package/build/lib/box-preset-transform.d.mts.map +1 -1
- package/build/lib/box-preset-transform.mjs +2 -2
- package/build/lib/constants.d.mts +3 -4
- package/build/lib/constants.d.mts.map +1 -1
- package/build/lib/fs.d.mts +52 -53
- package/build/lib/fs.d.mts.map +1 -1
- package/build/lib/fs.mjs +3 -3
- package/build/lib/fs.mjs.map +1 -1
- package/build/lib/languages.d.mts +11 -12
- package/build/lib/languages.d.mts.map +1 -1
- package/build/lib/schemas.d.mts +1 -1
- package/build/lib/schemas.mjs +1 -1
- package/build/lib/search.d.mts +2 -3
- package/build/lib/search.d.mts.map +1 -1
- package/build/lib/search.mjs.map +1 -1
- package/build/lib/types.d.mts +34 -34
- package/build/lib/types.d.mts.map +1 -1
- package/build/lib/utils.d.mts +16 -17
- package/build/lib/utils.d.mts.map +1 -1
- package/build/lib/validators.d.mts +1 -1
- package/build/lib-next/_build.d.mts +1 -1
- package/build/lib-next/_build.mjs +2 -2
- package/build/lib-next/enums.d.mts +41 -42
- package/build/lib-next/enums.d.mts.map +1 -1
- package/build/lib-next/fs.d.mts +3 -4
- package/build/lib-next/fs.d.mts.map +1 -1
- package/build/lib-next/languages.d.mts +17 -18
- package/build/lib-next/languages.d.mts.map +1 -1
- package/build/lib-next/schemas.d.mts +230 -232
- package/build/lib-next/schemas.d.mts.map +1 -1
- package/build/lib-next/schemas.mjs +1 -1
- package/build/schemas-Bj1AIX0P.mjs +93 -0
- package/build/schemas-Bj1AIX0P.mjs.map +1 -0
- package/build/schemas-CcUqoHNr.mjs +349 -0
- package/build/schemas-CcUqoHNr.mjs.map +1 -0
- package/build/schemas-DZQWOWP4.d.mts +804 -0
- package/build/schemas-DZQWOWP4.d.mts.map +1 -0
- package/build/utils-BwovRocd.mjs.map +1 -1
- package/data/abilities.json +9 -0
- package/data/games/champions.json +5 -1
- package/data/games/pokopia-bubblybasin.json +42 -0
- package/data/games/pokopia.json +1 -1
- package/data/indices/games.json +1 -0
- package/data/indices/pokedexes.json +3 -1
- package/data/pokedexes/champions-regular-roster-m-b.json +3 -0
- package/data/pokedexes/champions-regular-roster-m-c.json +464 -0
- package/data/pokedexes/paldea-kitakami.json +0 -2
- package/data/pokedexes/pokopia-basin.json +63 -0
- package/data/pokedexes/pokopia-event.json +6 -2
- package/data/pokemon/absol-mega-z.json +1 -3
- package/data/pokemon/baxcalibur.json +1 -1
- package/data/pokemon/garchomp-mega-z.json +2 -2
- package/data/pokemon/golisopod.json +12 -1
- package/data/pokemon/lucario-mega-z.json +1 -3
- package/data/pokemon/pyroar-f.json +7 -2
- package/data/pokemon/pyroar.json +2 -1
- package/data/pokemon/rillaboom.json +1 -1
- package/data/pokemon/salamence.json +2 -1
- package/data-next/champions/abilities.json +10 -0
- package/data-next/champions/i18n/chs/abilities.json +7 -0
- package/data-next/champions/i18n/cht/abilities.json +7 -0
- package/data-next/champions/i18n/deu/abilities.json +7 -0
- package/data-next/champions/i18n/eng/abilities.json +7 -0
- package/data-next/champions/i18n/es-es/abilities.json +7 -0
- package/data-next/champions/i18n/es-la/abilities.json +7 -0
- package/data-next/champions/i18n/fra/abilities.json +7 -0
- package/data-next/champions/i18n/ita/abilities.json +7 -0
- package/data-next/champions/i18n/jpn/abilities.json +7 -0
- package/data-next/champions/i18n/kor/abilities.json +7 -0
- package/data-next/champions/i18n/pt-br/abilities.json +7 -0
- package/data-next/champions/items.json +34 -0
- package/data-next/champions/moves.json +1 -0
- package/package.json +10 -10
- package/build/build-DeFbpXmN.mjs.map +0 -1
- package/build/build-DlK17pH-.mjs.map +0 -1
- package/build/schemas-B4fI9u0f.mjs +0 -93
- package/build/schemas-B4fI9u0f.mjs.map +0 -1
- package/build/schemas-BCuqOH_X.d.mts +0 -805
- package/build/schemas-BCuqOH_X.d.mts.map +0 -1
- package/build/schemas-Dt7FbAMy.mjs +0 -349
- package/build/schemas-Dt7FbAMy.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas-DZQWOWP4.d.mts","names":[],"sources":["../src/lib/schemas.ts"],"mappings":";;cAkEa,gBAAc,IAAA,UAAA,IAAA;;;;;;;;;;;;IAA+D,IAAA,YAAA,IAAA;cAE7E,eAAa,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIxB,IAAA,KAAA;cACW,mBAAiB,IAAA;;;GAI5B,IAAA,KAAA;cACW,iBAAe,IAAA;;;GAE1B,IAAA,KAAA;cACW,aAAW,IAAA;;;;GAEtB,IAAA,KAAA;cACW,oBAAkB,IAAA;;;;;;;;;;;;;;;;;;;;;;;GAuB7B,IAAA,KAAA;cACW,sBAAoB,IAAA;;;;;;;;;;;;;;;;GAO/B,IAAA,KAAA;cACW,YAAU,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBrB,IAAA,KAAA;cACW,kBAAgB,IAAA;;;;GAI3B,IAAA,KAAA;cACW,YAAU,IAAA;;;;;;;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,IAAA,KAAA;cAEW,oBAAkB,IAAA,UAAA,IAAA,WAAA,IAAA,UAAA,IAAA,WAAA,IAAA;;;;;;;;;;;;;;;;;GAA8D,IAAA,KAAA;cAEhF;cAUA,4BAA0B,IAAA,SAAA,IAAA;cAE1B,2BAAyB,IAAA,UAAA,IAAA,YAAA,IAAA,YAAA,IAAA;;;;;GASrC,IAAA,KAAA;cAEY,0BAAwB,IAAA;;;;;;;;GAK1B,IAAA,KAAA;cAEE,uBAAqB,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBvB,IAAA,KAAA;cAEE,2BAAyB,IAAA;;;;;;;;GASpC,IAAA,KAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-BwovRocd.mjs","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["// ----- Dataset UTILS --------------------------------------------\n\nimport { arrayUnique, capitalizeFirstLetter } from '../utils/utils-internal'\n\nexport function formatDexNum(num: number | string, positions: number = 4): string {\n return num.toString().padStart(positions, '0')\n}\n\nexport function dexNumToInt(num: number | string): number {\n return typeof num === 'string' ? Number.parseInt(num.replace(/^0+/, '')) : num\n}\n\nexport function dexNumToGen(nationalDexNum: number | string): number {\n const num = dexNumToInt(nationalDexNum)\n\n if (num <= 151) return 1\n if (num <= 251) return 2\n if (num <= 386) return 3\n if (num <= 493) return 4\n if (num <= 649) return 5\n if (num <= 721) return 6\n if (num <= 809) return 7\n if (num <= 905) return 8\n return 9\n}\n\nexport function randomPokemonList<T extends Pkds.PokemonBase>(\n pokemonList: Array<T>,\n quantity = 16,\n withForms = true,\n): Array<T> {\n const filteredPokes = withForms ? pokemonList : pokemonList.filter((pkm) => !pkm.isForm)\n const minIndex = 1\n const maxIndex = filteredPokes.length\n const distinctPokeIndices = new Set<number>()\n\n while (distinctPokeIndices.size < quantity) {\n const newPoke = Math.floor(Math.random() * (maxIndex - minIndex + 1)) + minIndex\n distinctPokeIndices.add(newPoke)\n }\n\n return Array.from(distinctPokeIndices)\n .map((index) => filteredPokes[index])\n .filter(Boolean)\n}\n\nexport function getPossiblePokemonGenders(meta: Pkds.Pokemon): Pkds.Gender[] {\n if (meta.hasGenderDifferences && meta.isFemaleForm) {\n return ['f']\n }\n if (meta.hasGenderDifferences && !meta.isFemaleForm) {\n return ['m']\n }\n if (meta.maleRate >= 100) {\n return ['m']\n }\n if (meta.femaleRate >= 100) {\n return ['f']\n }\n if (meta.maleRate <= 0 && meta.femaleRate <= 0) {\n return []\n }\n return ['m', 'f']\n}\n\nexport function getPokemonGender(\n inputGender: string | null | undefined,\n meta: Pkds.Pokemon,\n options?: { allowEmpty?: boolean },\n): Pkds.Gender {\n const possibleGenders = getPossiblePokemonGenders(meta)\n if (possibleGenders.length === 1) {\n return possibleGenders[0]\n }\n if (possibleGenders.length === 0) {\n return null\n }\n\n if (inputGender === 'm' || inputGender === 'f') {\n return inputGender\n }\n\n if (options?.allowEmpty) {\n // if allowEmpty is true, we won't determine/guess the gender, and return null\n // at this point, inputGender is either null or undefined as well\n return null\n }\n\n // if the gender is not specified, we need to determine it based on the maleRate and femaleRate\n if (meta.maleRate >= meta.femaleRate) {\n return 'm'\n }\n\n // if the femaleRate is greater than the maleRate, then the gender is female\n return 'f'\n}\n\n// ----- Dataset Text and Translation UTILS --------------------------------------------\n\nexport function translatePokemonText(\n pkm: Pkds.Pokemon,\n lang3Char: Pkds.LanguageAlpha3,\n): Pkds.PokemonText {\n const fallback = lang3Char === 'eng' ? undefined : translatePokemon(pkm, 'eng')\n const pkmName = pkm.names[lang3Char] ?? fallback?.name ?? pkm.id\n\n const texts: Pkds.PokemonText = {\n lang: lang3Char,\n genusText: pkm.genus[lang3Char] ?? fallback?.genusText,\n name: pkmName,\n speciesName: pkm.speciesNames[lang3Char] ?? pkmName ?? fallback?.speciesName ?? pkmName,\n formName: pkm.formNames[lang3Char] ?? fallback?.formName,\n }\n\n return texts\n}\n\nexport function translatePokemon(\n pokemon: Pkds.Pokemon | Pkds.TranslatedPokemon,\n lang: Pkds.LanguageAlpha3,\n dexNumPositions?: number,\n): Pkds.TranslatedPokemon {\n if (!('name' in pokemon)) {\n return {\n ...pokemon,\n ...translatePokemonText(pokemon, lang),\n speciesGen: dexNumToGen(pokemon.dexNum),\n dexNum: formatDexNum(\n pokemon.dexNum,\n dexNumPositions ?? Math.max(3, String(pokemon.dexNum).length),\n ),\n searchableText: generatePokemonSearchableText(pokemon),\n }\n }\n\n return {\n ...pokemon,\n ...translatePokemonText(pokemon, lang),\n }\n}\n\nexport function translatePokemonList(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Array<Pkds.TranslatedPokemon> {\n return pokemonList.map((pokemon) => translatePokemon(pokemon, lang))\n}\n\nexport function translatePokemonById(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Record<string, Pkds.TranslatedPokemon> {\n return Object.fromEntries(\n pokemonList.map((pokemon) => [pokemon.id, translatePokemon(pokemon, lang)]),\n )\n}\n\nexport function translatePokemonByNid(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Record<string, Pkds.TranslatedPokemon> {\n return Object.fromEntries(\n pokemonList.map((pokemon) => [pokemon.nid, translatePokemon(pokemon, lang)]),\n )\n}\n\nexport function generatePokemonDescription(\n pokemon: Pkds.TranslatedPokemon,\n lang3Char: Pkds.LanguageAlpha3,\n) {\n const parts = []\n const features = []\n const text = translatePokemonText(pokemon, lang3Char)\n\n // Basic description\n parts.push(`${text.genusText}`)\n\n // Form information\n if (pokemon.isForm) {\n parts.push(`Form: ${pokemon.formName}`)\n }\n\n // Pokemon category\n if (pokemon.isMythical) {\n features.push('Mythical')\n }\n if (pokemon.isLegendary) {\n features.push('Legendary')\n }\n\n // Type and generation information\n const types = [pokemon.type1]\n if (pokemon.type2) types.push(pokemon.type2)\n parts.push(`${types.map(capitalizeFirstLetter).join('/')} type`)\n parts.push(`It was discovered in Generation ${pokemon.gen}`)\n\n if (features.length > 0) {\n parts.push(`Classified as a ${features.join(' and ')} Pokémon`)\n }\n\n return parts.join('. ') + '.'\n}\n\nexport function generatePokemonSearchableText(poke: Pkds.Pokemon) {\n const pokeName = arrayUnique(Object.values(poke.names ?? {})).join(' ')\n const pokeFormName = arrayUnique(Object.values(poke.formNames ?? {})).join(' ')\n const speciesGen = dexNumToGen(poke.dexNum)\n\n const fullText = [\n pokeName,\n pokeFormName,\n poke.dexNum,\n poke.id,\n `type:${poke.type1}`,\n poke.type2 ? `type:${poke.type2}` : '',\n `region:${poke.region}`,\n `color:${poke.color}${poke.color === 'brown' ? ' color:orange' : ''}`,\n `gen${speciesGen} gen:${speciesGen} gen${poke.gen} gen:${poke.gen}`,\n poke.isMythical ? 'mythical' : '',\n poke.isLegendary ? 'legendary' : '',\n poke.isFemaleForm ? 'female' : '',\n poke.isBaby ? 'baby' : '',\n poke.isUltraBeast ? 'ultrabeast ultra beast' : '',\n poke.isRegional ? 'regional' : '',\n poke.isFusion ? 'fusion' : '',\n poke.isParadox ? 'paradox' : '',\n poke.isConvergent ? 'convergent' : '',\n poke.isCosmeticForm ? 'cosmetic' : '',\n poke.isGmax ? 'gigantamax gmax' : '',\n poke.isForm ? `is-form` : ``,\n poke.isMega ? `is-mega` : ``,\n poke.isBattleOnlyForm ? `is-battle-only` : `not-battle-only`,\n poke.storableIn.length > 0 ? 'is-storable' : 'not-storable',\n ]\n .filter(Boolean)\n .join(' ')\n .toLowerCase()\n\n return fullText\n}\n\nexport function getGameCategoryLabel(game: Pkds.Game): string {\n switch (game.series) {\n case 'main':\n return 'Main-series'\n case 'legends':\n return 'Legends-series'\n case 'storage':\n return 'Storage-series'\n default:\n return 'Spin-off'\n }\n}\n\nexport function generateGameDescription(game: Pkds.Game, gameCatText: string) {\n const platforms = game.platforms.map((platform: string) => platform.toUpperCase()).join(' / ')\n const features = []\n const parts = []\n const genPart = game.gen > 0 ? ` from Generation ${game.gen} ` : ''\n const releaseText = game.isUnreleased ? 'that will be released for' : 'released for'\n\n parts.push(\n `Pokémon ${game.name} is a ${gameCatText} ${game.type} ${genPart}${releaseText} ${platforms}`,\n )\n\n // if (game.gen > 0) {\n // parts.push(`It's a Generation ${game.gen} game`)\n // }\n\n if (game.features.gmax) features.push('Gigantamax')\n if (game.features.tera) features.push('Terastallization')\n if (game.features.alpha) features.push('Alpha Pokémon')\n\n if (features.length > 0) {\n // parts.push(`It features ${features.join(', ')}`)\n }\n\n if (game.region && game.region !== 'unknown') {\n const capitalizedRegion = game.region.charAt(0).toUpperCase() + game.region.slice(1)\n parts.push(`The game takes place in the ${capitalizedRegion} region`)\n }\n\n return parts.join('. ') + '.'\n}\n\nexport function resolvePokemonName(\n meta: Pkds.TranslatedPokemon,\n nickname?: string,\n lang3Char?: Pkds.LanguageAlpha3,\n): Pkds.PokemonNameInfo {\n const txt: Pkds.PokemonText = lang3Char\n ? translatePokemonText(meta, lang3Char)\n : {\n lang: meta.lang,\n name: meta.name,\n speciesName: meta.speciesName,\n formName: meta.formName,\n genusText: meta.genusText,\n }\n\n const nameObj: Pkds.PokemonNameInfo = {\n displayName: txt.speciesName ?? txt.name,\n displayFormName: txt.formName,\n fullName: txt.name,\n speciesName: txt.speciesName ?? txt.name,\n formName: txt.formName,\n isNicknamed: !!nickname,\n lang: txt.lang,\n }\n\n if (meta.isForm) {\n if (meta.isMega || meta.isPrimal || meta.isGmax) {\n nameObj.displayName = nameObj.fullName\n } else if (txt.formName) {\n nameObj.displayName = `${nameObj.speciesName} (${txt.formName})`\n }\n }\n if (nickname) {\n nameObj.displayName = `${nickname} - ${nameObj.displayName}`\n }\n return nameObj\n}\n"],"mappings":";;AAIA,SAAgB,aAAa,KAAsB,YAAoB,GAAW;CAChF,OAAO,IAAI,SAAS,CAAC,CAAC,SAAS,WAAW,GAAG;AAC/C;AAEA,SAAgB,YAAY,KAA8B;CACxD,OAAO,OAAO,QAAQ,WAAW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kB,QAAQ;CACtE;CAEA,OAAO,MAAM,KAAK,IAAI,IAAI;AAC5B;AAEA,SAAgB,mBACd,MACA,UACA,WACsB;CACtB,MAAM,MAAwB,YAC1B,qBAAqB,MAAM,SAAS,IACpC;EACE,MAAM,KAAK;EACX,MAAM,KAAK;EACX,aAAa,KAAK;EAClB,UAAU,KAAK;EACf,WAAW,KAAK;CAClB;CAEJ,MAAM,UAAgC;EACpC,aAAa,IAAI,eAAe,IAAI;EACpC,iBAAiB,IAAI;EACrB,UAAU,IAAI;EACd,aAAa,IAAI,eAAe,IAAI;EACpC,UAAU,IAAI;EACd,aAAa,CAAC,CAAC;EACf,MAAM,IAAI;CACZ;CAEA,IAAI,KAAK;MACH,KAAK,UAAU,KAAK,YAAY,KAAK,QACvC,QAAQ,cAAc,QAAQ;OACzB,IAAI,IAAI,UACb,QAAQ,cAAc,GAAG,QAAQ,YAAY,IAAI,IAAI,SAAS;CAAA;CAGlE,IAAI,UACF,QAAQ,cAAc,GAAG,SAAS,KAAK,QAAQ;CAEjD,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"utils-BwovRocd.mjs","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["// ----- Dataset UTILS --------------------------------------------\n\nimport { arrayUnique, capitalizeFirstLetter } from '../utils/utils-internal'\n\nexport function formatDexNum(num: number | string, positions: number = 4): string {\n return num.toString().padStart(positions, '0')\n}\n\nexport function dexNumToInt(num: number | string): number {\n return typeof num === 'string' ? Number.parseInt(num.replace(/^0+/, '')) : num\n}\n\nexport function dexNumToGen(nationalDexNum: number | string): number {\n const num = dexNumToInt(nationalDexNum)\n\n if (num <= 151) return 1\n if (num <= 251) return 2\n if (num <= 386) return 3\n if (num <= 493) return 4\n if (num <= 649) return 5\n if (num <= 721) return 6\n if (num <= 809) return 7\n if (num <= 905) return 8\n return 9\n}\n\nexport function randomPokemonList<T extends Pkds.PokemonBase>(\n pokemonList: Array<T>,\n quantity = 16,\n withForms = true,\n): Array<T> {\n const filteredPokes = withForms ? pokemonList : pokemonList.filter((pkm) => !pkm.isForm)\n const minIndex = 1\n const maxIndex = filteredPokes.length\n const distinctPokeIndices = new Set<number>()\n\n while (distinctPokeIndices.size < quantity) {\n const newPoke = Math.floor(Math.random() * (maxIndex - minIndex + 1)) + minIndex\n distinctPokeIndices.add(newPoke)\n }\n\n return Array.from(distinctPokeIndices)\n .map((index) => filteredPokes[index])\n .filter(Boolean)\n}\n\nexport function getPossiblePokemonGenders(meta: Pkds.Pokemon): Pkds.Gender[] {\n if (meta.hasGenderDifferences && meta.isFemaleForm) {\n return ['f']\n }\n if (meta.hasGenderDifferences && !meta.isFemaleForm) {\n return ['m']\n }\n if (meta.maleRate >= 100) {\n return ['m']\n }\n if (meta.femaleRate >= 100) {\n return ['f']\n }\n if (meta.maleRate <= 0 && meta.femaleRate <= 0) {\n return []\n }\n return ['m', 'f']\n}\n\nexport function getPokemonGender(\n inputGender: string | null | undefined,\n meta: Pkds.Pokemon,\n options?: { allowEmpty?: boolean },\n): Pkds.Gender {\n const possibleGenders = getPossiblePokemonGenders(meta)\n if (possibleGenders.length === 1) {\n return possibleGenders[0]\n }\n if (possibleGenders.length === 0) {\n return null\n }\n\n if (inputGender === 'm' || inputGender === 'f') {\n return inputGender\n }\n\n if (options?.allowEmpty) {\n // if allowEmpty is true, we won't determine/guess the gender, and return null\n // at this point, inputGender is either null or undefined as well\n return null\n }\n\n // if the gender is not specified, we need to determine it based on the maleRate and femaleRate\n if (meta.maleRate >= meta.femaleRate) {\n return 'm'\n }\n\n // if the femaleRate is greater than the maleRate, then the gender is female\n return 'f'\n}\n\n// ----- Dataset Text and Translation UTILS --------------------------------------------\n\nexport function translatePokemonText(\n pkm: Pkds.Pokemon,\n lang3Char: Pkds.LanguageAlpha3,\n): Pkds.PokemonText {\n const fallback = lang3Char === 'eng' ? undefined : translatePokemon(pkm, 'eng')\n const pkmName = pkm.names[lang3Char] ?? fallback?.name ?? pkm.id\n\n const texts: Pkds.PokemonText = {\n lang: lang3Char,\n genusText: pkm.genus[lang3Char] ?? fallback?.genusText,\n name: pkmName,\n speciesName: pkm.speciesNames[lang3Char] ?? pkmName ?? fallback?.speciesName ?? pkmName,\n formName: pkm.formNames[lang3Char] ?? fallback?.formName,\n }\n\n return texts\n}\n\nexport function translatePokemon(\n pokemon: Pkds.Pokemon | Pkds.TranslatedPokemon,\n lang: Pkds.LanguageAlpha3,\n dexNumPositions?: number,\n): Pkds.TranslatedPokemon {\n if (!('name' in pokemon)) {\n return {\n ...pokemon,\n ...translatePokemonText(pokemon, lang),\n speciesGen: dexNumToGen(pokemon.dexNum),\n dexNum: formatDexNum(\n pokemon.dexNum,\n dexNumPositions ?? Math.max(3, String(pokemon.dexNum).length),\n ),\n searchableText: generatePokemonSearchableText(pokemon),\n }\n }\n\n return {\n ...pokemon,\n ...translatePokemonText(pokemon, lang),\n }\n}\n\nexport function translatePokemonList(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Array<Pkds.TranslatedPokemon> {\n return pokemonList.map((pokemon) => translatePokemon(pokemon, lang))\n}\n\nexport function translatePokemonById(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Record<string, Pkds.TranslatedPokemon> {\n return Object.fromEntries(\n pokemonList.map((pokemon) => [pokemon.id, translatePokemon(pokemon, lang)]),\n )\n}\n\nexport function translatePokemonByNid(\n pokemonList: Array<Pkds.Pokemon | Pkds.TranslatedPokemon>,\n lang: Pkds.LanguageAlpha3,\n): Record<string, Pkds.TranslatedPokemon> {\n return Object.fromEntries(\n pokemonList.map((pokemon) => [pokemon.nid, translatePokemon(pokemon, lang)]),\n )\n}\n\nexport function generatePokemonDescription(\n pokemon: Pkds.TranslatedPokemon,\n lang3Char: Pkds.LanguageAlpha3,\n) {\n const parts = []\n const features = []\n const text = translatePokemonText(pokemon, lang3Char)\n\n // Basic description\n parts.push(`${text.genusText}`)\n\n // Form information\n if (pokemon.isForm) {\n parts.push(`Form: ${pokemon.formName}`)\n }\n\n // Pokemon category\n if (pokemon.isMythical) {\n features.push('Mythical')\n }\n if (pokemon.isLegendary) {\n features.push('Legendary')\n }\n\n // Type and generation information\n const types = [pokemon.type1]\n if (pokemon.type2) types.push(pokemon.type2)\n parts.push(`${types.map(capitalizeFirstLetter).join('/')} type`)\n parts.push(`It was discovered in Generation ${pokemon.gen}`)\n\n if (features.length > 0) {\n parts.push(`Classified as a ${features.join(' and ')} Pokémon`)\n }\n\n return parts.join('. ') + '.'\n}\n\nexport function generatePokemonSearchableText(poke: Pkds.Pokemon) {\n const pokeName = arrayUnique(Object.values(poke.names ?? {})).join(' ')\n const pokeFormName = arrayUnique(Object.values(poke.formNames ?? {})).join(' ')\n const speciesGen = dexNumToGen(poke.dexNum)\n\n const fullText = [\n pokeName,\n pokeFormName,\n poke.dexNum,\n poke.id,\n `type:${poke.type1}`,\n poke.type2 ? `type:${poke.type2}` : '',\n `region:${poke.region}`,\n `color:${poke.color}${poke.color === 'brown' ? ' color:orange' : ''}`,\n `gen${speciesGen} gen:${speciesGen} gen${poke.gen} gen:${poke.gen}`,\n poke.isMythical ? 'mythical' : '',\n poke.isLegendary ? 'legendary' : '',\n poke.isFemaleForm ? 'female' : '',\n poke.isBaby ? 'baby' : '',\n poke.isUltraBeast ? 'ultrabeast ultra beast' : '',\n poke.isRegional ? 'regional' : '',\n poke.isFusion ? 'fusion' : '',\n poke.isParadox ? 'paradox' : '',\n poke.isConvergent ? 'convergent' : '',\n poke.isCosmeticForm ? 'cosmetic' : '',\n poke.isGmax ? 'gigantamax gmax' : '',\n poke.isForm ? `is-form` : ``,\n poke.isMega ? `is-mega` : ``,\n poke.isBattleOnlyForm ? `is-battle-only` : `not-battle-only`,\n poke.storableIn.length > 0 ? 'is-storable' : 'not-storable',\n ]\n .filter(Boolean)\n .join(' ')\n .toLowerCase()\n\n return fullText\n}\n\nexport function getGameCategoryLabel(game: Pkds.Game): string {\n switch (game.series) {\n case 'main':\n return 'Main-series'\n case 'legends':\n return 'Legends-series'\n case 'storage':\n return 'Storage-series'\n default:\n return 'Spin-off'\n }\n}\n\nexport function generateGameDescription(game: Pkds.Game, gameCatText: string) {\n const platforms = game.platforms.map((platform: string) => platform.toUpperCase()).join(' / ')\n const features = []\n const parts = []\n const genPart = game.gen > 0 ? ` from Generation ${game.gen} ` : ''\n const releaseText = game.isUnreleased ? 'that will be released for' : 'released for'\n\n parts.push(\n `Pokémon ${game.name} is a ${gameCatText} ${game.type} ${genPart}${releaseText} ${platforms}`,\n )\n\n // if (game.gen > 0) {\n // parts.push(`It's a Generation ${game.gen} game`)\n // }\n\n if (game.features.gmax) features.push('Gigantamax')\n if (game.features.tera) features.push('Terastallization')\n if (game.features.alpha) features.push('Alpha Pokémon')\n\n if (features.length > 0) {\n // parts.push(`It features ${features.join(', ')}`)\n }\n\n if (game.region && game.region !== 'unknown') {\n const capitalizedRegion = game.region.charAt(0).toUpperCase() + game.region.slice(1)\n parts.push(`The game takes place in the ${capitalizedRegion} region`)\n }\n\n return parts.join('. ') + '.'\n}\n\nexport function resolvePokemonName(\n meta: Pkds.TranslatedPokemon,\n nickname?: string,\n lang3Char?: Pkds.LanguageAlpha3,\n): Pkds.PokemonNameInfo {\n const txt: Pkds.PokemonText = lang3Char\n ? translatePokemonText(meta, lang3Char)\n : {\n lang: meta.lang,\n name: meta.name,\n speciesName: meta.speciesName,\n formName: meta.formName,\n genusText: meta.genusText,\n }\n\n const nameObj: Pkds.PokemonNameInfo = {\n displayName: txt.speciesName ?? txt.name,\n displayFormName: txt.formName,\n fullName: txt.name,\n speciesName: txt.speciesName ?? txt.name,\n formName: txt.formName,\n isNicknamed: !!nickname,\n lang: txt.lang,\n }\n\n if (meta.isForm) {\n if (meta.isMega || meta.isPrimal || meta.isGmax) {\n nameObj.displayName = nameObj.fullName\n } else if (txt.formName) {\n nameObj.displayName = `${nameObj.speciesName} (${txt.formName})`\n }\n }\n if (nickname) {\n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S,KAAK,eAAe;CAEtD,IAAI,SAAS,SAAS,GAAG,CAEzB;CAEA,IAAI,KAAK,UAAU,KAAK,WAAW,WAAW;EAC5C,MAAM,oBAAoB,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,KAAK,OAAO,MAAM,CAAC;EACnF,MAAM,KAAK,+BAA+B,kBAAkB,QAAQ;CACtE;CAEA,OAAO,MAAM,KAAK,IAAI,IAAI;AAC5B;AAEA,SAAgB,mBACd,MACA,UACA,WACsB;CACtB,MAAM,MAAwB,YAC1B,qBAAqB,MAAM,SAAS,IACpC;EACE,MAAM,KAAK;EACX,MAAM,KAAK;EACX,aAAa,KAAK;EAClB,UAAU,KAAK;EACf,WAAW,KAAK;CAClB;CAEJ,MAAM,UAAgC;EACpC,aAAa,IAAI,eAAe,IAAI;EACpC,iBAAiB,IAAI;EACrB,UAAU,IAAI;EACd,aAAa,IAAI,eAAe,IAAI;EACpC,UAAU,IAAI;EACd,aAAa,CAAC,CAAC;EACf,MAAM,IAAI;CACZ;CAEA,IAAI,KAAK,QAAQ;EACf,IAAI,KAAK,UAAU,KAAK,YAAY,KAAK,QACvC,QAAQ,cAAc,QAAQ;OACzB,IAAI,IAAI,UACb,QAAQ,cAAc,GAAG,QAAQ,YAAY,IAAI,IAAI,SAAS;CAElE;CACA,IAAI,UACF,QAAQ,cAAc,GAAG,SAAS,KAAK,QAAQ;CAEjD,OAAO;AACT"}
|
package/data/abilities.json
CHANGED
|
@@ -2858,5 +2858,14 @@
|
|
|
2858
2858
|
"shortDesc": "Boosts the power of this Pokemon's Fire-type moves by 50%.",
|
|
2859
2859
|
"desc": "Boosts the power of the Pokémon's Fire-type moves by 50%.",
|
|
2860
2860
|
"tags": ["move-boost"]
|
|
2861
|
+
},
|
|
2862
|
+
{
|
|
2863
|
+
"id": "auraguard",
|
|
2864
|
+
"name": "Aura Guard",
|
|
2865
|
+
"psName": "Aura Guard",
|
|
2866
|
+
"gen": 9,
|
|
2867
|
+
"shortDesc": "This Pokemon takes 1/2 damage from contact moves.",
|
|
2868
|
+
"desc": "The Pokémon is wrapped in its aura, halving the damage it takes from moves that make direct contact.",
|
|
2869
|
+
"tags": ["defense"]
|
|
2861
2870
|
}
|
|
2862
2871
|
]
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
"releaseDate": "2026-04-08",
|
|
12
12
|
"region": "unknown",
|
|
13
13
|
"originMark": "none",
|
|
14
|
-
"pokedexes": [
|
|
14
|
+
"pokedexes": [
|
|
15
|
+
"champions-regular-roster-m-a",
|
|
16
|
+
"champions-regular-roster-m-b",
|
|
17
|
+
"champions-regular-roster-m-c"
|
|
18
|
+
],
|
|
15
19
|
"maxBoxes": 40,
|
|
16
20
|
"maxBoxSize": 30,
|
|
17
21
|
"platforms": ["switch", "switch2", "mobile"],
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pokopia-bubblybasin",
|
|
3
|
+
"name": "Bubbly Basin",
|
|
4
|
+
"gen": 0,
|
|
5
|
+
"nameSlug": "bubbly-basin",
|
|
6
|
+
"codename": null,
|
|
7
|
+
"type": "dlc",
|
|
8
|
+
"series": "spinoff",
|
|
9
|
+
"gameSet": "pokopia",
|
|
10
|
+
"gameSuperSet": null,
|
|
11
|
+
"releaseDate": "2026-08-05",
|
|
12
|
+
"region": "kanto",
|
|
13
|
+
"originMark": "none",
|
|
14
|
+
"pokedexes": ["pokopia-basin"],
|
|
15
|
+
"maxBoxes": 0,
|
|
16
|
+
"maxBoxSize": 0,
|
|
17
|
+
"platforms": ["switch2"],
|
|
18
|
+
"features": {
|
|
19
|
+
"storage": false,
|
|
20
|
+
"pokedex": true,
|
|
21
|
+
"training": false,
|
|
22
|
+
"shiny": false,
|
|
23
|
+
"items": false,
|
|
24
|
+
"gender": false,
|
|
25
|
+
"pokerus": false,
|
|
26
|
+
"nature": false,
|
|
27
|
+
"ribbons": false,
|
|
28
|
+
"marks": false,
|
|
29
|
+
"markings": false,
|
|
30
|
+
"shadow": false,
|
|
31
|
+
"ball": false,
|
|
32
|
+
"mega": false,
|
|
33
|
+
"zmove": false,
|
|
34
|
+
"gmax": false,
|
|
35
|
+
"alpha": false,
|
|
36
|
+
"tera": false,
|
|
37
|
+
"plusmvs": false,
|
|
38
|
+
"mints": false,
|
|
39
|
+
"sizes": false,
|
|
40
|
+
"abilities": false
|
|
41
|
+
}
|
|
42
|
+
}
|
package/data/games/pokopia.json
CHANGED
package/data/indices/games.json
CHANGED
|
@@ -264,6 +264,9 @@
|
|
|
264
264
|
{ "pid": "vivillon-jungle", "dexNum": 666, "isForm": true, "transferOnly": true },
|
|
265
265
|
{ "pid": "vivillon-fancy", "dexNum": 666, "isForm": true, "transferOnly": true },
|
|
266
266
|
{ "pid": "vivillon-pokeball", "dexNum": 666, "isForm": true, "transferOnly": true },
|
|
267
|
+
{ "pid": "pyroar", "dexNum": 668, "isForm": false },
|
|
268
|
+
{ "pid": "pyroar-f", "dexNum": 668, "isForm": true },
|
|
269
|
+
{ "pid": "pyroar-mega", "dexNum": 668, "isForm": true },
|
|
267
270
|
{ "pid": "floette-eternal", "dexNum": 670, "isForm": true, "transferOnly": true },
|
|
268
271
|
{ "pid": "floette-eternal-mega", "dexNum": 670, "isForm": true, "transferOnly": true },
|
|
269
272
|
{ "pid": "florges", "dexNum": 671, "isForm": false },
|