@pokepc/dataset 6.7.0 → 6.7.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/README.md +15 -3
- package/build/{build-DvGzwIK8.mjs → build-D2oPkkzJ.mjs} +52 -52
- package/build/{build-DvGzwIK8.mjs.map → build-D2oPkkzJ.mjs.map} +1 -1
- package/build/{enums-DlMg7WLl.mjs → enums-u8n-nN0B.mjs} +5 -2
- package/build/enums-u8n-nN0B.mjs.map +1 -0
- package/build/lib/fs.d.mts +3 -3
- package/build/lib/fs.d.mts.map +1 -1
- package/build/lib/fs.mjs +21 -29
- package/build/lib/fs.mjs.map +1 -1
- package/build/lib/schemas.d.mts +1 -1
- package/build/lib/search.d.mts +2 -0
- package/build/lib/search.d.mts.map +1 -1
- package/build/lib/search.mjs +3 -3
- package/build/lib/search.mjs.map +1 -1
- package/build/lib/types.d.mts +1 -1
- package/build/lib/utils.d.mts +2 -0
- package/build/lib/utils.d.mts.map +1 -1
- package/build/lib/utils.mjs +3 -2
- package/build/lib-next/_build.mjs +1 -1
- package/build/lib-next/enums.d.mts.map +1 -1
- package/build/lib-next/enums.mjs +1 -1
- package/build/lib-next/schemas.mjs +1 -1
- package/build/{schemas-CDSWgtoj.d.mts → schemas-CIE3b72j.d.mts} +42 -42
- package/build/{schemas-CDSWgtoj.d.mts.map → schemas-CIE3b72j.d.mts.map} +1 -1
- package/build/{schemas-Bj1AIX0P.mjs → schemas-CWE4YPI2.mjs} +2 -2
- package/build/{schemas-Bj1AIX0P.mjs.map → schemas-CWE4YPI2.mjs.map} +1 -1
- package/build/{utils-BwovRocd.mjs → utils-BTjKkD-_.mjs} +2 -2
- package/build/utils-BTjKkD-_.mjs.map +1 -0
- package/build/utils-internal-C-UStMrZ.d.mts +7 -0
- package/build/utils-internal-C-UStMrZ.d.mts.map +1 -0
- package/build/{utils-internal-Czgdbnkv.mjs → utils-internal-DPjO9kQX.mjs} +7 -2
- package/build/{utils-internal-Czgdbnkv.mjs.map → utils-internal-DPjO9kQX.mjs.map} +1 -1
- package/data/pokedexes/hoenn-oras.json +12 -0
- package/data/pokedexes/kanto-lgpe.json +11 -0
- package/data/pokedexes/national-oras.json +27 -0
- package/data/pokemon/abomasnow-mega.json +1 -1
- package/data/pokemon/aggron-mega.json +1 -1
- package/data/pokemon/ampharos-mega.json +1 -1
- package/data/pokemon/blastoise-mega.json +12 -1
- package/data/pokemon/blaziken-mega.json +1 -1
- package/data/pokemon/charizard-mega-x.json +12 -2
- package/data/pokemon/charizard-mega-y.json +12 -2
- package/data/pokemon/gengar-mega.json +1 -1
- package/data/pokemon/heracross-mega.json +1 -1
- package/data/pokemon/houndoom-mega.json +1 -1
- package/data/pokemon/kangaskhan-mega.json +1 -1
- package/data/pokemon/lucario-mega.json +1 -1
- package/data/pokemon/manectric-mega.json +1 -1
- package/data/pokemon/mawile-mega.json +2 -1
- package/data/pokemon/mewtwo-mega-x.json +10 -1
- package/data/pokemon/mewtwo-mega-y.json +10 -1
- package/data/pokemon/pinsir-mega.json +1 -1
- package/data/pokemon/sableye-mega.json +1 -1
- package/data/pokemon/scizor-mega.json +1 -1
- package/data/pokemon/tyranitar-mega.json +1 -1
- package/data/pokemon/venusaur-mega.json +12 -1
- package/data-next/champions/abilities.json +117 -5
- package/data-next/champions/battle-states.json +24 -3
- package/data-next/champions/i18n/chs/abilities.json +104 -6
- package/data-next/champions/i18n/chs/battle-states.json +24 -3
- package/data-next/champions/i18n/chs/items.json +144 -0
- package/data-next/champions/i18n/chs/moves.json +25 -25
- package/data-next/champions/i18n/chs/pokemon.json +195 -0
- package/data-next/champions/i18n/cht/abilities.json +105 -7
- package/data-next/champions/i18n/cht/battle-states.json +24 -3
- package/data-next/champions/i18n/cht/items.json +144 -0
- package/data-next/champions/i18n/cht/moves.json +25 -25
- package/data-next/champions/i18n/cht/pokemon.json +195 -0
- package/data-next/champions/i18n/deu/abilities.json +105 -7
- package/data-next/champions/i18n/deu/battle-states.json +24 -3
- package/data-next/champions/i18n/deu/items.json +144 -0
- package/data-next/champions/i18n/deu/moves.json +28 -28
- package/data-next/champions/i18n/deu/pokemon.json +195 -0
- package/data-next/champions/i18n/eng/abilities.json +102 -4
- package/data-next/champions/i18n/eng/battle-states.json +24 -3
- package/data-next/champions/i18n/eng/items.json +144 -0
- package/data-next/champions/i18n/eng/moves.json +25 -25
- package/data-next/champions/i18n/eng/pokemon.json +195 -0
- package/data-next/champions/i18n/es-es/abilities.json +106 -8
- package/data-next/champions/i18n/es-es/battle-states.json +24 -3
- package/data-next/champions/i18n/es-es/items.json +145 -1
- package/data-next/champions/i18n/es-es/moves.json +25 -25
- package/data-next/champions/i18n/es-es/pokemon.json +195 -0
- package/data-next/champions/i18n/es-la/abilities.json +106 -8
- package/data-next/champions/i18n/es-la/battle-states.json +24 -3
- package/data-next/champions/i18n/es-la/items.json +145 -1
- package/data-next/champions/i18n/es-la/moves.json +26 -26
- package/data-next/champions/i18n/es-la/pokemon.json +195 -0
- package/data-next/champions/i18n/fra/abilities.json +105 -7
- package/data-next/champions/i18n/fra/battle-states.json +24 -3
- package/data-next/champions/i18n/fra/items.json +144 -0
- package/data-next/champions/i18n/fra/moves.json +25 -25
- package/data-next/champions/i18n/fra/pokemon.json +195 -0
- package/data-next/champions/i18n/ita/abilities.json +116 -18
- package/data-next/champions/i18n/ita/battle-states.json +24 -3
- package/data-next/champions/i18n/ita/items.json +145 -1
- package/data-next/champions/i18n/ita/moves.json +28 -28
- package/data-next/champions/i18n/ita/pokemon.json +195 -0
- package/data-next/champions/i18n/jpn/abilities.json +104 -6
- package/data-next/champions/i18n/jpn/battle-states.json +24 -3
- package/data-next/champions/i18n/jpn/items.json +144 -0
- package/data-next/champions/i18n/jpn/moves.json +25 -25
- package/data-next/champions/i18n/jpn/pokemon.json +195 -0
- package/data-next/champions/i18n/kor/abilities.json +104 -6
- package/data-next/champions/i18n/kor/battle-states.json +24 -3
- package/data-next/champions/i18n/kor/items.json +144 -0
- package/data-next/champions/i18n/kor/moves.json +25 -25
- package/data-next/champions/i18n/kor/pokemon.json +195 -0
- package/data-next/champions/i18n/pt-br/abilities.json +102 -4
- package/data-next/champions/i18n/pt-br/battle-states.json +24 -3
- package/data-next/champions/i18n/pt-br/items.json +144 -0
- package/data-next/champions/i18n/pt-br/moves.json +25 -25
- package/data-next/champions/i18n/pt-br/pokemon.json +195 -0
- package/data-next/champions/items.json +180 -0
- package/data-next/champions/moves.json +61 -61
- package/data-next/champions/pokemon-moves.json +1882 -173
- package/data-next/champions/pokemon.json +913 -21
- package/package.json +17 -9
- package/build/enums-DlMg7WLl.mjs.map +0 -1
- package/build/utils-BwovRocd.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as itemCategories, d as moveClasses, f as moveTargets, h as pokemonTypes, n as battleStates, u as moveCategories } from "./enums-
|
|
1
|
+
import { c as itemCategories, d as moveClasses, f as moveTargets, h as pokemonTypes, n as battleStates, u as moveCategories } from "./enums-u8n-nN0B.mjs";
|
|
2
2
|
import { z as z$1 } from "zod";
|
|
3
3
|
//#region src/lib-next/schemas.ts
|
|
4
4
|
const slugSchema = z$1.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
@@ -90,4 +90,4 @@ const pokemonMovesSchema = z$1.array(pokemonMovesRecordSchema);
|
|
|
90
90
|
//#endregion
|
|
91
91
|
export { pokemonListSchema as _, battleStatesSchema as a, pokemonSchema as b, i18nSchema as c, itemSchema as d, itemsSchema as f, pokemonI18nSchema as g, pokemonI18nRecordsSchema as h, battleStateSchema as i, itemI18nRecordsSchema as l, movesSchema as m, abilitySchema as n, championsLinkedBaseSchema as o, moveSchema as p, baseSchema as r, i18nRecordsSchema as s, abilitiesSchema as t, itemI18nSchema as u, pokemonMovesRecordSchema as v, slugSchema as x, pokemonMovesSchema as y };
|
|
92
92
|
|
|
93
|
-
//# sourceMappingURL=schemas-
|
|
93
|
+
//# sourceMappingURL=schemas-CWE4YPI2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas-
|
|
1
|
+
{"version":3,"file":"schemas-CWE4YPI2.mjs","names":["z"],"sources":["../src/lib-next/schemas.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n battleStates,\n itemCategories,\n moveCategories,\n moveClasses,\n moveTargets,\n pokemonTypes,\n} from './enums'\n\nexport const slugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)\n\nexport const baseSchema = z.object({\n id: z.string(),\n slug: slugSchema,\n name: z.string(),\n description: z.string(),\n})\n\nexport const championsLinkedBaseSchema = z.object({\n id: slugSchema,\n championsId: z.string(),\n // Null once enriched and PokeAPI has no such resource; absent before the\n // enrichment step has run. Never a guessed id.\n pokeApiId: z.number().int().positive().nullish(),\n slug: slugSchema,\n name: z.string(),\n description: z.string(),\n})\n\nexport const i18nSchema = z.object({\n id: z.string(),\n slug: slugSchema,\n slugLoc: slugSchema,\n name: z.string(),\n description: z.string(), // description template, with placeholders like `{0}`\n})\nexport type I18nRecord = z.infer<typeof i18nSchema>\nexport const i18nRecordsSchema = z.array(i18nSchema)\nexport type I18nRecords = z.infer<typeof i18nRecordsSchema>\n\nexport const itemI18nSchema = i18nSchema.extend({\n pluralName: z.string(),\n})\nexport type ItemI18nRecord = z.infer<typeof itemI18nSchema>\nexport const itemI18nRecordsSchema = z.array(itemI18nSchema)\nexport type ItemI18nRecords = z.infer<typeof itemI18nRecordsSchema>\n\nexport const moveSchema = championsLinkedBaseSchema.extend({\n type: z.enum(pokemonTypes),\n category: z.enum(moveCategories),\n power: z.number().min(0).max(999),\n pp: z.number().min(0).max(99),\n accuracy: z.number().min(0).max(101),\n priority: z.number().min(-10).max(10),\n target: z.enum(moveTargets),\n classification: z.array(z.enum(moveClasses)),\n contact: z.boolean(), // if its a direct contact move or not\n usable: z.boolean(), // if the game allows you to use it or not (e.g. legacy)\n})\nexport type MoveRecord = z.infer<typeof moveSchema>\nexport const movesSchema = z.array(moveSchema)\nexport type MoveRecords = z.infer<typeof movesSchema>\n\nexport const abilitySchema = championsLinkedBaseSchema.extend({})\nexport type AbilityRecord = z.infer<typeof abilitySchema>\nexport const abilitiesSchema = z.array(abilitySchema)\nexport type AbilityRecords = z.infer<typeof abilitiesSchema>\n\nexport const itemSchema = championsLinkedBaseSchema.extend({\n pluralName: z.string(),\n categories: z.array(z.enum(itemCategories)),\n})\nexport type ItemRecord = z.infer<typeof itemSchema>\nexport const itemsSchema = z.array(itemSchema)\nexport type ItemRecords = z.infer<typeof itemsSchema>\n\nexport const battleStateSchema = baseSchema.extend({\n state: z.enum(battleStates),\n})\nexport type BattleStateRecord = z.infer<typeof battleStateSchema>\nexport const battleStatesSchema = z.array(battleStateSchema)\nexport type BattleStateRecords = z.infer<typeof battleStatesSchema>\n\nexport const pokemonSchema = z.object({\n id: slugSchema,\n nid: slugSchema,\n name: z.string(),\n formName: z.string().optional(),\n pokeApiId: z.number().int().positive(),\n pokeApiFormId: z.number().int().positive().optional(),\n showdownId: z.string(),\n baseSpecies: slugSchema.optional(),\n championsId: z.string().regex(/^\\d{7}$/),\n type1: z.enum(pokemonTypes),\n type2: z.enum(pokemonTypes).nullable(),\n abilities: z.array(slugSchema),\n baseHp: z.number().int().min(1),\n baseAtk: z.number().int().min(1),\n baseDef: z.number().int().min(1),\n baseSpAtk: z.number().int().min(1),\n baseSpDef: z.number().int().min(1),\n baseSpeed: z.number().int().min(1),\n height: z.number().int().min(-1),\n weight: z.number().int().min(-1),\n isForm: z.boolean(),\n isBattleOnly: z.boolean(),\n isCosmetic: z.boolean(),\n isFemale: z.boolean(),\n})\nexport type PokemonRecord = z.infer<typeof pokemonSchema>\nexport const pokemonListSchema = z.array(pokemonSchema)\nexport type PokemonRecords = z.infer<typeof pokemonListSchema>\n\nexport const pokemonI18nSchema = z.object({\n id: slugSchema,\n championsId: z.string().regex(/^\\d{7}$/),\n name: z.string(),\n formName: z.string().optional(),\n})\nexport type PokemonI18nRecord = z.infer<typeof pokemonI18nSchema>\nexport const pokemonI18nRecordsSchema = z.array(pokemonI18nSchema)\nexport type PokemonI18nRecords = z.infer<typeof pokemonI18nRecordsSchema>\n\nexport const pokemonMovesRecordSchema = z.object({\n id: slugSchema,\n moves: z.array(slugSchema),\n})\nexport type PokemonMovesRecord = z.infer<typeof pokemonMovesRecordSchema>\n\nexport const pokemonMovesSchema = z.array(pokemonMovesRecordSchema)\nexport type PokemonMovesRecords = z.infer<typeof pokemonMovesSchema>\n"],"mappings":";;;AAUA,MAAa,aAAaA,IAAE,OAAO,CAAC,CAAC,MAAM,4BAA4B;AAEvE,MAAa,aAAaA,IAAE,OAAO;CACjC,IAAIA,IAAE,OAAO;CACb,MAAM;CACN,MAAMA,IAAE,OAAO;CACf,aAAaA,IAAE,OAAO;AACxB,CAAC;AAED,MAAa,4BAA4BA,IAAE,OAAO;CAChD,IAAI;CACJ,aAAaA,IAAE,OAAO;CAGtB,WAAWA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ;CAC/C,MAAM;CACN,MAAMA,IAAE,OAAO;CACf,aAAaA,IAAE,OAAO;AACxB,CAAC;AAED,MAAa,aAAaA,IAAE,OAAO;CACjC,IAAIA,IAAE,OAAO;CACb,MAAM;CACN,SAAS;CACT,MAAMA,IAAE,OAAO;CACf,aAAaA,IAAE,OAAO;AACxB,CAAC;AAED,MAAa,oBAAoBA,IAAE,MAAM,UAAU;AAGnD,MAAa,iBAAiB,WAAW,OAAO,EAC9C,YAAYA,IAAE,OAAO,EACvB,CAAC;AAED,MAAa,wBAAwBA,IAAE,MAAM,cAAc;AAG3D,MAAa,aAAa,0BAA0B,OAAO;CACzD,MAAMA,IAAE,KAAK,YAAY;CACzB,UAAUA,IAAE,KAAK,cAAc;CAC/B,OAAOA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAChC,IAAIA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,I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AI,CAAC,CAAC,IAAI,CAAC;CAC9B,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC/B,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAC/B,WAAWA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CACjC,WAAWA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CACjC,WAAWA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CACjC,QAAQA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;CAC/B,QAAQA,IAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;CAC/B,QAAQA,IAAE,QAAQ;CAClB,cAAcA,IAAE,QAAQ;CACxB,YAAYA,IAAE,QAAQ;CACtB,UAAUA,IAAE,QAAQ;AACtB,CAAC;AAED,MAAa,oBAAoBA,IAAE,MAAM,aAAa;AAGtD,MAAa,oBAAoBA,IAAE,OAAO;CACxC,IAAI;CACJ,aAAaA,IAAE,OAAO,CAAC,CAAC,MAAM,SAAS;CACvC,MAAMA,IAAE,OAAO;CACf,UAAUA,IAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC;AAED,MAAa,2BAA2BA,IAAE,MAAM,iBAAiB;AAGjE,MAAa,2BAA2BA,IAAE,OAAO;CAC/C,IAAI;CACJ,OAAOA,IAAE,MAAM,UAAU;AAC3B,CAAC;AAGD,MAAa,qBAAqBA,IAAE,MAAM,wBAAwB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as capitalizeFirstLetter, t as arrayUnique } from "./utils-internal-
|
|
1
|
+
import { n as capitalizeFirstLetter, t as arrayUnique } from "./utils-internal-DPjO9kQX.mjs";
|
|
2
2
|
//#region src/lib/utils.ts
|
|
3
3
|
function formatDexNum(num, positions = 4) {
|
|
4
4
|
return num.toString().padStart(positions, "0");
|
|
@@ -177,4 +177,4 @@ function resolvePokemonName(meta, nickname, lang3Char) {
|
|
|
177
177
|
//#endregion
|
|
178
178
|
export { generatePokemonDescription as a, getPokemonGender as c, resolvePokemonName as d, translatePokemon as f, translatePokemonText as g, translatePokemonList as h, generateGameDescription as i, getPossiblePokemonGenders as l, translatePokemonByNid as m, dexNumToInt as n, generatePokemonSearchableText as o, translatePokemonById as p, formatDexNum as r, getGameCategoryLabel as s, dexNumToGen as t, randomPokemonList as u };
|
|
179
179
|
|
|
180
|
-
//# sourceMappingURL=utils-
|
|
180
|
+
//# sourceMappingURL=utils-BTjKkD-_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-BTjKkD-_.mjs","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["// ----- Dataset UTILS --------------------------------------------\n\nimport { arrayUnique, capitalizeFirstLetter } from '../utils/utils-internal'\nexport { sortStringsInGivenOrder } 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":";;AAKA,SAAgB,aAAa,KAAsB,YAAoB,GAAW;CAChF,OAAO,IAAI,SAAS,CAAC,CAAC,SAAS,WAAW,GAAG;AAC/C;AAEA,SAAgB,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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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/utils/utils-internal.d.ts
|
|
2
|
+
declare function sortStringsInGivenOrder(strs: string[] | undefined, rightOrder: string[]): string[];
|
|
3
|
+
declare function sanitizeSearchQuery(query?: string | null): string;
|
|
4
|
+
declare function matchesSearchQuery(haystack: string, query?: string | null): boolean;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { sanitizeSearchQuery as n, sortStringsInGivenOrder as r, matchesSearchQuery as t };
|
|
7
|
+
//# sourceMappingURL=utils-internal-C-UStMrZ.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-internal-C-UStMrZ.d.mts","names":[],"sources":["../src/utils/utils-internal.ts"],"mappings":";iBAQgB,wBAAwB,4BAA4B;iBAQpD,oBAAoB;iBAyCpB,mBAAmB,kBAAkB"}
|
|
@@ -5,6 +5,11 @@ function capitalizeFirstLetter(string) {
|
|
|
5
5
|
function arrayUnique(array) {
|
|
6
6
|
return Array.from(new Set(array));
|
|
7
7
|
}
|
|
8
|
+
function sortStringsInGivenOrder(strs, rightOrder) {
|
|
9
|
+
return [...strs ?? []].sort((a, b) => {
|
|
10
|
+
return rightOrder.indexOf(a) - rightOrder.indexOf(b);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
8
13
|
function sanitizeSearchQuery(query) {
|
|
9
14
|
if (query === void 0 || query === null) return "";
|
|
10
15
|
return query.toLowerCase().replace(/\s{2,}/, " ").replace(/,/g, " ").replace(/\s{2,}/, " ");
|
|
@@ -28,6 +33,6 @@ function matchesSearchQuery(haystack, query) {
|
|
|
28
33
|
return positive.every((token) => normalizedHaystack.includes(token)) && negative.every((token) => !normalizedHaystack.includes(token));
|
|
29
34
|
}
|
|
30
35
|
//#endregion
|
|
31
|
-
export { sanitizeSearchQuery as i, capitalizeFirstLetter as n, matchesSearchQuery as r, arrayUnique as t };
|
|
36
|
+
export { sortStringsInGivenOrder as a, sanitizeSearchQuery as i, capitalizeFirstLetter as n, matchesSearchQuery as r, arrayUnique as t };
|
|
32
37
|
|
|
33
|
-
//# sourceMappingURL=utils-internal-
|
|
38
|
+
//# sourceMappingURL=utils-internal-DPjO9kQX.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-internal-
|
|
1
|
+
{"version":3,"file":"utils-internal-DPjO9kQX.mjs","names":[],"sources":["../src/utils/utils-internal.ts"],"sourcesContent":["export function capitalizeFirstLetter(string: string): string {\n return string.charAt(0).toUpperCase() + string.slice(1)\n}\n\nexport function arrayUnique<T>(array: T[]): T[] {\n return Array.from(new Set(array))\n}\n\nexport function sortStringsInGivenOrder(strs: string[] | undefined, rightOrder: string[]) {\n return [...(strs ?? [])].sort((a, b) => {\n const aIndex = rightOrder.indexOf(a)\n const bIndex = rightOrder.indexOf(b)\n return aIndex - bIndex\n })\n}\n\nexport function sanitizeSearchQuery(query?: string | null) {\n if (query === undefined || query === null) {\n return ''\n }\n return query\n .toLowerCase()\n .replace(/\\s{2,}/, ' ')\n .replace(/,/g, ' ')\n .replace(/\\s{2,}/, ' ')\n}\n\nexport function sanitizeFormStringSpaces(str: string | FormDataEntryValue | null | undefined) {\n if (!str) {\n return ''\n }\n return str.toString().replace(/\\s+/g, ' ').trim()\n}\n\nexport function splitSearchQueryTokens(query?: string | null): {\n positive: string[]\n negative: string[]\n} {\n const tokens = sanitizeSearchQuery(query).trim().split(/\\s+/).filter(Boolean)\n\n return tokens.reduce(\n (result, token) => {\n if (token.startsWith('!')) {\n const negatedToken = token.slice(1).trim()\n if (negatedToken) {\n result.negative.push(negatedToken)\n }\n } else {\n result.positive.push(token)\n }\n\n return result\n },\n { positive: [] as string[], negative: [] as string[] },\n )\n}\n\nexport function matchesSearchQuery(haystack: string, query?: string | null): boolean {\n const { positive, negative } = splitSearchQueryTokens(query)\n if (positive.length === 0 && negative.length === 0) {\n return true\n }\n\n const normalizedHaystack = sanitizeSearchQuery(haystack)\n\n return (\n positive.every((token) => normalizedHaystack.includes(token)) &&\n negative.every((token) => !normalizedHaystack.includes(token))\n )\n}\n"],"mappings":";AAAA,SAAgB,sBAAsB,QAAwB;CAC5D,OAAO,OAAO,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,OAAO,MAAM,CAAC;AACxD;AAEA,SAAgB,YAAe,OAAiB;CAC9C,OAAO,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC;AAClC;AAEA,SAAgB,wBAAwB,MAA4B,YAAsB;CACxF,OAAO,CAAC,GAAI,QAAQ,CAAC,CAAE,CAAC,CAAC,MAAM,GAAG,MAAM;EAGtC,OAFe,WAAW,QAAQ,CAEtB,IADG,WAAW,QAAQ,CACb;CACvB,CAAC;AACH;AAEA,SAAgB,oBAAoB,OAAuB;CACzD,IAAI,UAAU,KAAA,KAAa,UAAU,MACnC,OAAO;CAET,OAAO,MACJ,YAAY,CAAC,CACb,QAAQ,UAAU,GAAG,CAAC,CACtB,QAAQ,MAAM,GAAG,CAAC,CAClB,QAAQ,UAAU,GAAG;AAC1B;AASA,SAAgB,uBAAuB,OAGrC;CAGA,OAFe,oBAAoB,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAEzD,CAAC,CAAC,QACX,QAAQ,UAAU;EACjB,IAAI,MAAM,WAAW,GAAG,GAAG;GACzB,MAAM,eAAe,MAAM,MAAM,CAAC,CAAC,CAAC,KAAK;GACzC,IAAI,cACF,OAAO,SAAS,KAAK,YAAY;EAErC,OACE,OAAO,SAAS,KAAK,KAAK;EAG5B,OAAO;CACT,GACA;EAAE,UAAU,CAAC;EAAe,UAAU,CAAC;CAAc,CACvD;AACF;AAEA,SAAgB,mBAAmB,UAAkB,OAAgC;CACnF,MAAM,EAAE,UAAU,aAAa,uBAAuB,KAAK;CAC3D,IAAI,SAAS,WAAW,KAAK,SAAS,WAAW,GAC/C,OAAO;CAGT,MAAM,qBAAqB,oBAAoB,QAAQ;CAEvD,OACE,SAAS,OAAO,UAAU,mBAAmB,SAAS,KAAK,CAAC,KAC5D,SAAS,OAAO,UAAU,CAAC,mBAAmB,SAAS,KAAK,CAAC;AAEjE"}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
{ "pid": "combusken-f", "dexNum": 5, "isForm": true },
|
|
18
18
|
{ "pid": "blaziken", "dexNum": 6, "isForm": false },
|
|
19
19
|
{ "pid": "blaziken-f", "dexNum": 6, "isForm": true },
|
|
20
|
+
{ "pid": "blaziken-mega", "dexNum": 6, "isForm": true },
|
|
20
21
|
{ "pid": "mudkip", "dexNum": 7, "isForm": false },
|
|
21
22
|
{ "pid": "marshtomp", "dexNum": 8, "isForm": false },
|
|
22
23
|
{ "pid": "swampert", "dexNum": 9, "isForm": false },
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
{ "pid": "ralts", "dexNum": 29, "isForm": false },
|
|
49
50
|
{ "pid": "kirlia", "dexNum": 30, "isForm": false },
|
|
50
51
|
{ "pid": "gardevoir", "dexNum": 31, "isForm": false },
|
|
52
|
+
{ "pid": "gardevoir-mega", "dexNum": 31, "isForm": true },
|
|
51
53
|
{ "pid": "gallade", "dexNum": 32, "isForm": false },
|
|
52
54
|
{ "pid": "gallade-mega", "dexNum": 32, "isForm": true },
|
|
53
55
|
{ "pid": "surskit", "dexNum": 33, "isForm": false },
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
{ "pid": "kadabra-f", "dexNum": 41, "isForm": true },
|
|
63
65
|
{ "pid": "alakazam", "dexNum": 42, "isForm": false },
|
|
64
66
|
{ "pid": "alakazam-f", "dexNum": 42, "isForm": true },
|
|
67
|
+
{ "pid": "alakazam-mega", "dexNum": 42, "isForm": true },
|
|
65
68
|
{ "pid": "nincada", "dexNum": 43, "isForm": false },
|
|
66
69
|
{ "pid": "ninjask", "dexNum": 44, "isForm": false },
|
|
67
70
|
{ "pid": "shedinja", "dexNum": 45, "isForm": false },
|
|
@@ -78,6 +81,7 @@
|
|
|
78
81
|
{ "pid": "magikarp-f", "dexNum": 53, "isForm": true },
|
|
79
82
|
{ "pid": "gyarados", "dexNum": 54, "isForm": false },
|
|
80
83
|
{ "pid": "gyarados-f", "dexNum": 54, "isForm": true },
|
|
84
|
+
{ "pid": "gyarados-mega", "dexNum": 54, "isForm": true },
|
|
81
85
|
{ "pid": "azurill", "dexNum": 55, "isForm": false },
|
|
82
86
|
{ "pid": "marill", "dexNum": 56, "isForm": false },
|
|
83
87
|
{ "pid": "azumarill", "dexNum": 57, "isForm": false },
|
|
@@ -98,9 +102,11 @@
|
|
|
98
102
|
{ "pid": "sableye", "dexNum": 70, "isForm": false },
|
|
99
103
|
{ "pid": "sableye-mega", "dexNum": 70, "isForm": true },
|
|
100
104
|
{ "pid": "mawile", "dexNum": 71, "isForm": false },
|
|
105
|
+
{ "pid": "mawile-mega", "dexNum": 71, "isForm": true },
|
|
101
106
|
{ "pid": "aron", "dexNum": 72, "isForm": false },
|
|
102
107
|
{ "pid": "lairon", "dexNum": 73, "isForm": false },
|
|
103
108
|
{ "pid": "aggron", "dexNum": 74, "isForm": false },
|
|
109
|
+
{ "pid": "aggron-mega", "dexNum": 74, "isForm": true },
|
|
104
110
|
{ "pid": "machop", "dexNum": 75, "isForm": false },
|
|
105
111
|
{ "pid": "machoke", "dexNum": 76, "isForm": false },
|
|
106
112
|
{ "pid": "machamp", "dexNum": 77, "isForm": false },
|
|
@@ -108,8 +114,10 @@
|
|
|
108
114
|
{ "pid": "meditite-f", "dexNum": 78, "isForm": true },
|
|
109
115
|
{ "pid": "medicham", "dexNum": 79, "isForm": false },
|
|
110
116
|
{ "pid": "medicham-f", "dexNum": 79, "isForm": true },
|
|
117
|
+
{ "pid": "medicham-mega", "dexNum": 79, "isForm": true },
|
|
111
118
|
{ "pid": "electrike", "dexNum": 80, "isForm": false },
|
|
112
119
|
{ "pid": "manectric", "dexNum": 81, "isForm": false },
|
|
120
|
+
{ "pid": "manectric-mega", "dexNum": 81, "isForm": true },
|
|
113
121
|
{ "pid": "plusle", "dexNum": 82, "isForm": false },
|
|
114
122
|
{ "pid": "minun", "dexNum": 83, "isForm": false },
|
|
115
123
|
{ "pid": "magnemite", "dexNum": 84, "isForm": false },
|
|
@@ -199,6 +207,7 @@
|
|
|
199
207
|
{ "pid": "kecleon", "dexNum": 150, "isForm": false },
|
|
200
208
|
{ "pid": "shuppet", "dexNum": 151, "isForm": false },
|
|
201
209
|
{ "pid": "banette", "dexNum": 152, "isForm": false },
|
|
210
|
+
{ "pid": "banette-mega", "dexNum": 152, "isForm": true },
|
|
202
211
|
{ "pid": "duskull", "dexNum": 153, "isForm": false },
|
|
203
212
|
{ "pid": "dusclops", "dexNum": 154, "isForm": false },
|
|
204
213
|
{ "pid": "dusknoir", "dexNum": 155, "isForm": false },
|
|
@@ -206,6 +215,7 @@
|
|
|
206
215
|
{ "pid": "chingling", "dexNum": 157, "isForm": false },
|
|
207
216
|
{ "pid": "chimecho", "dexNum": 158, "isForm": false },
|
|
208
217
|
{ "pid": "absol", "dexNum": 159, "isForm": false },
|
|
218
|
+
{ "pid": "absol-mega", "dexNum": 159, "isForm": true },
|
|
209
219
|
{ "pid": "vulpix", "dexNum": 160, "isForm": false },
|
|
210
220
|
{ "pid": "ninetales", "dexNum": 161, "isForm": false },
|
|
211
221
|
{ "pid": "pichu", "dexNum": 162, "isForm": false },
|
|
@@ -227,8 +237,10 @@
|
|
|
227
237
|
{ "pid": "donphan", "dexNum": 173, "isForm": false },
|
|
228
238
|
{ "pid": "donphan-f", "dexNum": 173, "isForm": true },
|
|
229
239
|
{ "pid": "pinsir", "dexNum": 174, "isForm": false },
|
|
240
|
+
{ "pid": "pinsir-mega", "dexNum": 174, "isForm": true },
|
|
230
241
|
{ "pid": "heracross", "dexNum": 175, "isForm": false },
|
|
231
242
|
{ "pid": "heracross-f", "dexNum": 175, "isForm": true },
|
|
243
|
+
{ "pid": "heracross-mega", "dexNum": 175, "isForm": true },
|
|
232
244
|
{ "pid": "rhyhorn", "dexNum": 176, "isForm": false },
|
|
233
245
|
{ "pid": "rhyhorn-f", "dexNum": 176, "isForm": true },
|
|
234
246
|
{ "pid": "rhydon", "dexNum": 177, "isForm": false },
|
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
{ "pid": "charmander", "dexNum": 4, "isForm": false },
|
|
16
16
|
{ "pid": "charmeleon", "dexNum": 5, "isForm": false },
|
|
17
17
|
{ "pid": "charizard", "dexNum": 6, "isForm": false },
|
|
18
|
+
{ "pid": "charizard-mega-x", "dexNum": 6, "isForm": true },
|
|
19
|
+
{ "pid": "charizard-mega-y", "dexNum": 6, "isForm": true },
|
|
18
20
|
{ "pid": "squirtle", "dexNum": 7, "isForm": false },
|
|
19
21
|
{ "pid": "wartortle", "dexNum": 8, "isForm": false },
|
|
20
22
|
{ "pid": "blastoise", "dexNum": 9, "isForm": false },
|
|
23
|
+
{ "pid": "blastoise-mega", "dexNum": 9, "isForm": true },
|
|
21
24
|
{ "pid": "caterpie", "dexNum": 10, "isForm": false },
|
|
22
25
|
{ "pid": "metapod", "dexNum": 11, "isForm": false },
|
|
23
26
|
{ "pid": "butterfree", "dexNum": 12, "isForm": false },
|
|
@@ -98,6 +101,7 @@
|
|
|
98
101
|
{ "pid": "kadabra-f", "dexNum": 64, "isForm": true },
|
|
99
102
|
{ "pid": "alakazam", "dexNum": 65, "isForm": false },
|
|
100
103
|
{ "pid": "alakazam-f", "dexNum": 65, "isForm": true },
|
|
104
|
+
{ "pid": "alakazam-mega", "dexNum": 65, "isForm": true },
|
|
101
105
|
{ "pid": "machop", "dexNum": 66, "isForm": false },
|
|
102
106
|
{ "pid": "machoke", "dexNum": 67, "isForm": false },
|
|
103
107
|
{ "pid": "machamp", "dexNum": 68, "isForm": false },
|
|
@@ -135,6 +139,7 @@
|
|
|
135
139
|
{ "pid": "gastly", "dexNum": 92, "isForm": false },
|
|
136
140
|
{ "pid": "haunter", "dexNum": 93, "isForm": false },
|
|
137
141
|
{ "pid": "gengar", "dexNum": 94, "isForm": false },
|
|
142
|
+
{ "pid": "gengar-mega", "dexNum": 94, "isForm": true },
|
|
138
143
|
{ "pid": "onix", "dexNum": 95, "isForm": false },
|
|
139
144
|
{ "pid": "drowzee", "dexNum": 96, "isForm": false },
|
|
140
145
|
{ "pid": "hypno", "dexNum": 97, "isForm": false },
|
|
@@ -161,6 +166,7 @@
|
|
|
161
166
|
{ "pid": "chansey", "dexNum": 113, "isForm": false },
|
|
162
167
|
{ "pid": "tangela", "dexNum": 114, "isForm": false },
|
|
163
168
|
{ "pid": "kangaskhan", "dexNum": 115, "isForm": false },
|
|
169
|
+
{ "pid": "kangaskhan-mega", "dexNum": 115, "isForm": true },
|
|
164
170
|
{ "pid": "horsea", "dexNum": 116, "isForm": false },
|
|
165
171
|
{ "pid": "seadra", "dexNum": 117, "isForm": false },
|
|
166
172
|
{ "pid": "goldeen", "dexNum": 118, "isForm": false },
|
|
@@ -176,11 +182,13 @@
|
|
|
176
182
|
{ "pid": "electabuzz", "dexNum": 125, "isForm": false },
|
|
177
183
|
{ "pid": "magmar", "dexNum": 126, "isForm": false },
|
|
178
184
|
{ "pid": "pinsir", "dexNum": 127, "isForm": false },
|
|
185
|
+
{ "pid": "pinsir-mega", "dexNum": 127, "isForm": true },
|
|
179
186
|
{ "pid": "tauros", "dexNum": 128, "isForm": false },
|
|
180
187
|
{ "pid": "magikarp", "dexNum": 129, "isForm": false },
|
|
181
188
|
{ "pid": "magikarp-f", "dexNum": 129, "isForm": true },
|
|
182
189
|
{ "pid": "gyarados", "dexNum": 130, "isForm": false },
|
|
183
190
|
{ "pid": "gyarados-f", "dexNum": 130, "isForm": true },
|
|
191
|
+
{ "pid": "gyarados-mega", "dexNum": 130, "isForm": true },
|
|
184
192
|
{ "pid": "lapras", "dexNum": 131, "isForm": false },
|
|
185
193
|
{ "pid": "ditto", "dexNum": 132, "isForm": false },
|
|
186
194
|
{ "pid": "eevee", "dexNum": 133, "isForm": false },
|
|
@@ -193,6 +201,7 @@
|
|
|
193
201
|
{ "pid": "kabuto", "dexNum": 140, "isForm": false },
|
|
194
202
|
{ "pid": "kabutops", "dexNum": 141, "isForm": false },
|
|
195
203
|
{ "pid": "aerodactyl", "dexNum": 142, "isForm": false },
|
|
204
|
+
{ "pid": "aerodactyl-mega", "dexNum": 142, "isForm": true },
|
|
196
205
|
{ "pid": "snorlax", "dexNum": 143, "isForm": false },
|
|
197
206
|
{ "pid": "articuno", "dexNum": 144, "isForm": false },
|
|
198
207
|
{ "pid": "zapdos", "dexNum": 145, "isForm": false },
|
|
@@ -201,6 +210,8 @@
|
|
|
201
210
|
{ "pid": "dragonair", "dexNum": 148, "isForm": false },
|
|
202
211
|
{ "pid": "dragonite", "dexNum": 149, "isForm": false },
|
|
203
212
|
{ "pid": "mewtwo", "dexNum": 150, "isForm": false },
|
|
213
|
+
{ "pid": "mewtwo-mega-x", "dexNum": 150, "isForm": true },
|
|
214
|
+
{ "pid": "mewtwo-mega-y", "dexNum": 150, "isForm": true },
|
|
204
215
|
{ "pid": "mew", "dexNum": 151, "isForm": false },
|
|
205
216
|
{ "pid": "meltan", "dexNum": 152, "isForm": false },
|
|
206
217
|
{ "pid": "melmetal", "dexNum": 153, "isForm": false }
|
|
@@ -15,9 +15,12 @@
|
|
|
15
15
|
{ "pid": "charmander", "dexNum": 4, "isForm": false },
|
|
16
16
|
{ "pid": "charmeleon", "dexNum": 5, "isForm": false },
|
|
17
17
|
{ "pid": "charizard", "dexNum": 6, "isForm": false },
|
|
18
|
+
{ "pid": "charizard-mega-x", "dexNum": 6, "isForm": true },
|
|
19
|
+
{ "pid": "charizard-mega-y", "dexNum": 6, "isForm": true },
|
|
18
20
|
{ "pid": "squirtle", "dexNum": 7, "isForm": false },
|
|
19
21
|
{ "pid": "wartortle", "dexNum": 8, "isForm": false },
|
|
20
22
|
{ "pid": "blastoise", "dexNum": 9, "isForm": false },
|
|
23
|
+
{ "pid": "blastoise-mega", "dexNum": 9, "isForm": true },
|
|
21
24
|
{ "pid": "caterpie", "dexNum": 10, "isForm": false },
|
|
22
25
|
{ "pid": "metapod", "dexNum": 11, "isForm": false },
|
|
23
26
|
{ "pid": "butterfree", "dexNum": 12, "isForm": false },
|
|
@@ -87,6 +90,7 @@
|
|
|
87
90
|
{ "pid": "kadabra-f", "dexNum": 64, "isForm": true },
|
|
88
91
|
{ "pid": "alakazam", "dexNum": 65, "isForm": false },
|
|
89
92
|
{ "pid": "alakazam-f", "dexNum": 65, "isForm": true },
|
|
93
|
+
{ "pid": "alakazam-mega", "dexNum": 65, "isForm": true },
|
|
90
94
|
{ "pid": "machop", "dexNum": 66, "isForm": false },
|
|
91
95
|
{ "pid": "machoke", "dexNum": 67, "isForm": false },
|
|
92
96
|
{ "pid": "machamp", "dexNum": 68, "isForm": false },
|
|
@@ -119,6 +123,7 @@
|
|
|
119
123
|
{ "pid": "gastly", "dexNum": 92, "isForm": false },
|
|
120
124
|
{ "pid": "haunter", "dexNum": 93, "isForm": false },
|
|
121
125
|
{ "pid": "gengar", "dexNum": 94, "isForm": false },
|
|
126
|
+
{ "pid": "gengar-mega", "dexNum": 94, "isForm": true },
|
|
122
127
|
{ "pid": "onix", "dexNum": 95, "isForm": false },
|
|
123
128
|
{ "pid": "drowzee", "dexNum": 96, "isForm": false },
|
|
124
129
|
{ "pid": "hypno", "dexNum": 97, "isForm": false },
|
|
@@ -143,6 +148,7 @@
|
|
|
143
148
|
{ "pid": "chansey", "dexNum": 113, "isForm": false },
|
|
144
149
|
{ "pid": "tangela", "dexNum": 114, "isForm": false },
|
|
145
150
|
{ "pid": "kangaskhan", "dexNum": 115, "isForm": false },
|
|
151
|
+
{ "pid": "kangaskhan-mega", "dexNum": 115, "isForm": true },
|
|
146
152
|
{ "pid": "horsea", "dexNum": 116, "isForm": false },
|
|
147
153
|
{ "pid": "seadra", "dexNum": 117, "isForm": false },
|
|
148
154
|
{ "pid": "goldeen", "dexNum": 118, "isForm": false },
|
|
@@ -158,11 +164,13 @@
|
|
|
158
164
|
{ "pid": "electabuzz", "dexNum": 125, "isForm": false },
|
|
159
165
|
{ "pid": "magmar", "dexNum": 126, "isForm": false },
|
|
160
166
|
{ "pid": "pinsir", "dexNum": 127, "isForm": false },
|
|
167
|
+
{ "pid": "pinsir-mega", "dexNum": 127, "isForm": true },
|
|
161
168
|
{ "pid": "tauros", "dexNum": 128, "isForm": false },
|
|
162
169
|
{ "pid": "magikarp", "dexNum": 129, "isForm": false },
|
|
163
170
|
{ "pid": "magikarp-f", "dexNum": 129, "isForm": true },
|
|
164
171
|
{ "pid": "gyarados", "dexNum": 130, "isForm": false },
|
|
165
172
|
{ "pid": "gyarados-f", "dexNum": 130, "isForm": true },
|
|
173
|
+
{ "pid": "gyarados-mega", "dexNum": 130, "isForm": true },
|
|
166
174
|
{ "pid": "lapras", "dexNum": 131, "isForm": false },
|
|
167
175
|
{ "pid": "ditto", "dexNum": 132, "isForm": false },
|
|
168
176
|
{ "pid": "eevee", "dexNum": 133, "isForm": false },
|
|
@@ -175,6 +183,7 @@
|
|
|
175
183
|
{ "pid": "kabuto", "dexNum": 140, "isForm": false },
|
|
176
184
|
{ "pid": "kabutops", "dexNum": 141, "isForm": false },
|
|
177
185
|
{ "pid": "aerodactyl", "dexNum": 142, "isForm": false },
|
|
186
|
+
{ "pid": "aerodactyl-mega", "dexNum": 142, "isForm": true },
|
|
178
187
|
{ "pid": "snorlax", "dexNum": 143, "isForm": false },
|
|
179
188
|
{ "pid": "articuno", "dexNum": 144, "isForm": false },
|
|
180
189
|
{ "pid": "zapdos", "dexNum": 145, "isForm": false },
|
|
@@ -183,6 +192,8 @@
|
|
|
183
192
|
{ "pid": "dragonair", "dexNum": 148, "isForm": false },
|
|
184
193
|
{ "pid": "dragonite", "dexNum": 149, "isForm": false },
|
|
185
194
|
{ "pid": "mewtwo", "dexNum": 150, "isForm": false },
|
|
195
|
+
{ "pid": "mewtwo-mega-x", "dexNum": 150, "isForm": true },
|
|
196
|
+
{ "pid": "mewtwo-mega-y", "dexNum": 150, "isForm": true },
|
|
186
197
|
{ "pid": "mew", "dexNum": 151, "isForm": false },
|
|
187
198
|
{ "pid": "chikorita", "dexNum": 152, "isForm": false },
|
|
188
199
|
{ "pid": "bayleef", "dexNum": 153, "isForm": false },
|
|
@@ -218,6 +229,7 @@
|
|
|
218
229
|
{ "pid": "mareep", "dexNum": 179, "isForm": false },
|
|
219
230
|
{ "pid": "flaaffy", "dexNum": 180, "isForm": false },
|
|
220
231
|
{ "pid": "ampharos", "dexNum": 181, "isForm": false },
|
|
232
|
+
{ "pid": "ampharos-mega", "dexNum": 181, "isForm": true },
|
|
221
233
|
{ "pid": "bellossom", "dexNum": 182, "isForm": false },
|
|
222
234
|
{ "pid": "marill", "dexNum": 183, "isForm": false },
|
|
223
235
|
{ "pid": "azumarill", "dexNum": 184, "isForm": false },
|
|
@@ -288,9 +300,11 @@
|
|
|
288
300
|
{ "pid": "qwilfish", "dexNum": 211, "isForm": false },
|
|
289
301
|
{ "pid": "scizor", "dexNum": 212, "isForm": false },
|
|
290
302
|
{ "pid": "scizor-f", "dexNum": 212, "isForm": true },
|
|
303
|
+
{ "pid": "scizor-mega", "dexNum": 212, "isForm": true },
|
|
291
304
|
{ "pid": "shuckle", "dexNum": 213, "isForm": false },
|
|
292
305
|
{ "pid": "heracross", "dexNum": 214, "isForm": false },
|
|
293
306
|
{ "pid": "heracross-f", "dexNum": 214, "isForm": true },
|
|
307
|
+
{ "pid": "heracross-mega", "dexNum": 214, "isForm": true },
|
|
294
308
|
{ "pid": "sneasel", "dexNum": 215, "isForm": false },
|
|
295
309
|
{ "pid": "sneasel-f", "dexNum": 215, "isForm": true },
|
|
296
310
|
{ "pid": "teddiursa", "dexNum": 216, "isForm": false },
|
|
@@ -311,6 +325,7 @@
|
|
|
311
325
|
{ "pid": "houndour", "dexNum": 228, "isForm": false },
|
|
312
326
|
{ "pid": "houndoom", "dexNum": 229, "isForm": false },
|
|
313
327
|
{ "pid": "houndoom-f", "dexNum": 229, "isForm": true },
|
|
328
|
+
{ "pid": "houndoom-mega", "dexNum": 229, "isForm": true },
|
|
314
329
|
{ "pid": "kingdra", "dexNum": 230, "isForm": false },
|
|
315
330
|
{ "pid": "phanpy", "dexNum": 231, "isForm": false },
|
|
316
331
|
{ "pid": "donphan", "dexNum": 232, "isForm": false },
|
|
@@ -331,6 +346,7 @@
|
|
|
331
346
|
{ "pid": "larvitar", "dexNum": 246, "isForm": false },
|
|
332
347
|
{ "pid": "pupitar", "dexNum": 247, "isForm": false },
|
|
333
348
|
{ "pid": "tyranitar", "dexNum": 248, "isForm": false },
|
|
349
|
+
{ "pid": "tyranitar-mega", "dexNum": 248, "isForm": true },
|
|
334
350
|
{ "pid": "lugia", "dexNum": 249, "isForm": false },
|
|
335
351
|
{ "pid": "hooh", "dexNum": 250, "isForm": false },
|
|
336
352
|
{ "pid": "celebi", "dexNum": 251, "isForm": false },
|
|
@@ -344,6 +360,7 @@
|
|
|
344
360
|
{ "pid": "combusken-f", "dexNum": 256, "isForm": true },
|
|
345
361
|
{ "pid": "blaziken", "dexNum": 257, "isForm": false },
|
|
346
362
|
{ "pid": "blaziken-f", "dexNum": 257, "isForm": true },
|
|
363
|
+
{ "pid": "blaziken-mega", "dexNum": 257, "isForm": true },
|
|
347
364
|
{ "pid": "mudkip", "dexNum": 258, "isForm": false },
|
|
348
365
|
{ "pid": "marshtomp", "dexNum": 259, "isForm": false },
|
|
349
366
|
{ "pid": "swampert", "dexNum": 260, "isForm": false },
|
|
@@ -375,6 +392,7 @@
|
|
|
375
392
|
{ "pid": "ralts", "dexNum": 280, "isForm": false },
|
|
376
393
|
{ "pid": "kirlia", "dexNum": 281, "isForm": false },
|
|
377
394
|
{ "pid": "gardevoir", "dexNum": 282, "isForm": false },
|
|
395
|
+
{ "pid": "gardevoir-mega", "dexNum": 282, "isForm": true },
|
|
378
396
|
{ "pid": "surskit", "dexNum": 283, "isForm": false },
|
|
379
397
|
{ "pid": "masquerain", "dexNum": 284, "isForm": false },
|
|
380
398
|
{ "pid": "shroomish", "dexNum": 285, "isForm": false },
|
|
@@ -397,15 +415,19 @@
|
|
|
397
415
|
{ "pid": "sableye", "dexNum": 302, "isForm": false },
|
|
398
416
|
{ "pid": "sableye-mega", "dexNum": 302, "isForm": true },
|
|
399
417
|
{ "pid": "mawile", "dexNum": 303, "isForm": false },
|
|
418
|
+
{ "pid": "mawile-mega", "dexNum": 303, "isForm": true },
|
|
400
419
|
{ "pid": "aron", "dexNum": 304, "isForm": false },
|
|
401
420
|
{ "pid": "lairon", "dexNum": 305, "isForm": false },
|
|
402
421
|
{ "pid": "aggron", "dexNum": 306, "isForm": false },
|
|
422
|
+
{ "pid": "aggron-mega", "dexNum": 306, "isForm": true },
|
|
403
423
|
{ "pid": "meditite", "dexNum": 307, "isForm": false },
|
|
404
424
|
{ "pid": "meditite-f", "dexNum": 307, "isForm": true },
|
|
405
425
|
{ "pid": "medicham", "dexNum": 308, "isForm": false },
|
|
406
426
|
{ "pid": "medicham-f", "dexNum": 308, "isForm": true },
|
|
427
|
+
{ "pid": "medicham-mega", "dexNum": 308, "isForm": true },
|
|
407
428
|
{ "pid": "electrike", "dexNum": 309, "isForm": false },
|
|
408
429
|
{ "pid": "manectric", "dexNum": 310, "isForm": false },
|
|
430
|
+
{ "pid": "manectric-mega", "dexNum": 310, "isForm": true },
|
|
409
431
|
{ "pid": "plusle", "dexNum": 311, "isForm": false },
|
|
410
432
|
{ "pid": "minun", "dexNum": 312, "isForm": false },
|
|
411
433
|
{ "pid": "volbeat", "dexNum": 313, "isForm": false },
|
|
@@ -463,11 +485,13 @@
|
|
|
463
485
|
{ "pid": "kecleon", "dexNum": 352, "isForm": false },
|
|
464
486
|
{ "pid": "shuppet", "dexNum": 353, "isForm": false },
|
|
465
487
|
{ "pid": "banette", "dexNum": 354, "isForm": false },
|
|
488
|
+
{ "pid": "banette-mega", "dexNum": 354, "isForm": true },
|
|
466
489
|
{ "pid": "duskull", "dexNum": 355, "isForm": false },
|
|
467
490
|
{ "pid": "dusclops", "dexNum": 356, "isForm": false },
|
|
468
491
|
{ "pid": "tropius", "dexNum": 357, "isForm": false },
|
|
469
492
|
{ "pid": "chimecho", "dexNum": 358, "isForm": false },
|
|
470
493
|
{ "pid": "absol", "dexNum": 359, "isForm": false },
|
|
494
|
+
{ "pid": "absol-mega", "dexNum": 359, "isForm": true },
|
|
471
495
|
{ "pid": "wynaut", "dexNum": 360, "isForm": false },
|
|
472
496
|
{ "pid": "snorunt", "dexNum": 361, "isForm": false },
|
|
473
497
|
{ "pid": "glalie", "dexNum": 362, "isForm": false },
|
|
@@ -592,9 +616,11 @@
|
|
|
592
616
|
{ "pid": "gabite-f", "dexNum": 444, "isForm": true },
|
|
593
617
|
{ "pid": "garchomp", "dexNum": 445, "isForm": false },
|
|
594
618
|
{ "pid": "garchomp-f", "dexNum": 445, "isForm": true },
|
|
619
|
+
{ "pid": "garchomp-mega", "dexNum": 445, "isForm": true },
|
|
595
620
|
{ "pid": "munchlax", "dexNum": 446, "isForm": false },
|
|
596
621
|
{ "pid": "riolu", "dexNum": 447, "isForm": false },
|
|
597
622
|
{ "pid": "lucario", "dexNum": 448, "isForm": false },
|
|
623
|
+
{ "pid": "lucario-mega", "dexNum": 448, "isForm": true },
|
|
598
624
|
{ "pid": "hippopotas", "dexNum": 449, "isForm": false },
|
|
599
625
|
{ "pid": "hippopotas-f", "dexNum": 449, "isForm": true },
|
|
600
626
|
{ "pid": "hippowdon", "dexNum": 450, "isForm": false },
|
|
@@ -615,6 +641,7 @@
|
|
|
615
641
|
{ "pid": "snover-f", "dexNum": 459, "isForm": true },
|
|
616
642
|
{ "pid": "abomasnow", "dexNum": 460, "isForm": false },
|
|
617
643
|
{ "pid": "abomasnow-f", "dexNum": 460, "isForm": true },
|
|
644
|
+
{ "pid": "abomasnow-mega", "dexNum": 460, "isForm": true },
|
|
618
645
|
{ "pid": "weavile", "dexNum": 461, "isForm": false },
|
|
619
646
|
{ "pid": "weavile-f", "dexNum": 461, "isForm": true },
|
|
620
647
|
{ "pid": "magnezone", "dexNum": 462, "isForm": false },
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"canDynamax": false,
|
|
34
34
|
"canBeAlpha": false,
|
|
35
35
|
"debutIn": "xy",
|
|
36
|
-
"obtainableIn": ["xy-
|
|
36
|
+
"obtainableIn": ["xy-y", "oras-or", "oras-as", "go", "lza"],
|
|
37
37
|
"eventOnlyIn": [],
|
|
38
38
|
"storableIn": [],
|
|
39
39
|
"shinyReleased": true,
|
|
@@ -33,7 +33,18 @@
|
|
|
33
33
|
"canDynamax": false,
|
|
34
34
|
"canBeAlpha": false,
|
|
35
35
|
"debutIn": "xy",
|
|
36
|
-
"obtainableIn": [
|
|
36
|
+
"obtainableIn": [
|
|
37
|
+
"xy-x",
|
|
38
|
+
"xy-y",
|
|
39
|
+
"oras-or",
|
|
40
|
+
"oras-as",
|
|
41
|
+
"go",
|
|
42
|
+
"usum-us",
|
|
43
|
+
"usum-um",
|
|
44
|
+
"lgpe-lgp",
|
|
45
|
+
"lgpe-lge",
|
|
46
|
+
"lza"
|
|
47
|
+
],
|
|
37
48
|
"eventOnlyIn": [],
|
|
38
49
|
"storableIn": [],
|
|
39
50
|
"shinyReleased": true,
|
|
@@ -34,8 +34,18 @@
|
|
|
34
34
|
"canDynamax": false,
|
|
35
35
|
"canBeAlpha": false,
|
|
36
36
|
"debutIn": "xy",
|
|
37
|
-
"obtainableIn": [
|
|
38
|
-
|
|
37
|
+
"obtainableIn": [
|
|
38
|
+
"xy-x",
|
|
39
|
+
"oras-or",
|
|
40
|
+
"oras-as",
|
|
41
|
+
"go",
|
|
42
|
+
"usum-us",
|
|
43
|
+
"usum-um",
|
|
44
|
+
"lgpe-lgp",
|
|
45
|
+
"lgpe-lge",
|
|
46
|
+
"lza"
|
|
47
|
+
],
|
|
48
|
+
"eventOnlyIn": ["xy-y"],
|
|
39
49
|
"storableIn": [],
|
|
40
50
|
"shinyReleased": true,
|
|
41
51
|
"baseHp": 78,
|
|
@@ -34,8 +34,18 @@
|
|
|
34
34
|
"canDynamax": false,
|
|
35
35
|
"canBeAlpha": false,
|
|
36
36
|
"debutIn": "xy",
|
|
37
|
-
"obtainableIn": [
|
|
38
|
-
|
|
37
|
+
"obtainableIn": [
|
|
38
|
+
"xy-y",
|
|
39
|
+
"oras-or",
|
|
40
|
+
"oras-as",
|
|
41
|
+
"go",
|
|
42
|
+
"usum-us",
|
|
43
|
+
"usum-um",
|
|
44
|
+
"lgpe-lgp",
|
|
45
|
+
"lgpe-lge",
|
|
46
|
+
"lza"
|
|
47
|
+
],
|
|
48
|
+
"eventOnlyIn": ["xy-x"],
|
|
39
49
|
"storableIn": [],
|
|
40
50
|
"shinyReleased": true,
|
|
41
51
|
"baseHp": 78,
|