Skip to content

Commit

Permalink
fix: missing evos
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 19, 2024
1 parent 5608afb commit e65ddda
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 56 deletions.
8 changes: 5 additions & 3 deletions src/classes/PokeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,16 @@ export default class PokeApi extends Masterfile {

async evoApi(evolvedPokemon: Set<number>, parsedPokemon: AllPokemon) {
await Promise.all(
Object.keys(this.baseStats).map(async (id) => {
Object.keys(parsedPokemon).map(async (id) => {
try {
if (!evolvedPokemon.has(+id)) {
const evoData: SpeciesApi = await this.fetch(
`https://pokeapi.co/api/v2/pokemon-species/${id}`,
)
this.baseStats[id].legendary = evoData.is_legendary
this.baseStats[id].mythic = evoData.is_mythical
if (this.baseStats[id]) {
this.baseStats[id].legendary = evoData.is_legendary
this.baseStats[id].mythic = evoData.is_mythical
}
if (evoData.evolves_from_species) {
const prevEvoId =
Rpc.HoloPokemonId[
Expand Down
209 changes: 171 additions & 38 deletions static/baseStats.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,96 @@
{
"25": {
"evolutions": [
{
"evoId": 26,
"formId": 49
}
]
},
"57": {
"evolutions": [
{
"evoId": 979,
"formId": 0
}
]
},
"102": {
"evolutions": [
{
"evoId": 103,
"formId": 77
}
],
"legendary": false,
"mythic": false
},
"104": {
"evolutions": [
{
"evoId": 105,
"formId": 79
}
],
"legendary": false,
"mythic": false
},
"109": {
"evolutions": [
{
"evoId": 110,
"formId": 706
}
],
"legendary": false,
"mythic": false
},
"123": {
"evolutions": [
{
"evoId": 900,
"formId": 0
}
]
},
"156": {
"evolutions": [
{
"evoId": 157,
"formId": 1133
}
]
},
"203": {
"evolutions": [
{
"evoId": 981,
"formId": 0
}
],
"legendary": false,
"mythic": false
},
"206": {
"evolutions": [
{
"evoId": 982,
"formId": 2994
}
],
"legendary": false,
"mythic": false
},
"222": {
"evolutions": [
{
"evoId": 864,
"formId": 2507
}
],
"legendary": false,
"mythic": false
},
"234": {
"evolutions": [
{
Expand All @@ -7,12 +99,68 @@
}
]
},
"290": {
"evolutions": [
{
"evoId": 292,
"formId": 0
}
],
"legendary": false,
"mythic": false
},
"439": {
"evolutions": [
{
"evoId": 122,
"formId": 1080
}
],
"legendary": false,
"mythic": false
},
"502": {
"evolutions": [
{
"evoId": 503,
"formId": 1913
}
]
},
"548": {
"evolutions": [
{
"evoId": 549,
"formId": 0
}
],
"legendary": false,
"mythic": false
},
"550": {
"evolutions": [
{
"evoId": 902,
"formId": 2807
}
],
"legendary": false,
"mythic": false
},
"625": {
"evolutions": [
{
"evoId": 983,
"formId": 0
}
]
},
"627": {
"evolutions": [
{
"evoId": 628,
"formId": 2276
}
]
},
"679": {
Expand Down Expand Up @@ -129,48 +277,32 @@
],
"unreleased": true
},
"899": {
"pokemonName": "Wyrdeer",
"quickMoves": [
221,
234,
249,
263,
282
],
"chargedMoves": [
14,
22,
26,
30,
31,
60,
70,
78,
79,
95,
108,
116,
125,
127,
131,
132,
251,
273,
304,
321
],
"attack": 206,
"defense": 145,
"stamina": 230,
"types": [
1,
14
"704": {
"evolutions": [
{
"evoId": 705,
"formId": 0
}
]
},
"712": {
"evolutions": [
{
"evoId": 713,
"formId": 2812
}
],
"unreleased": true,
"legendary": false,
"mythic": false
},
"723": {
"evolutions": [
{
"evoId": 724,
"formId": 2809
}
]
},
"902": {
"pokemonName": "Basculegion-male",
"quickMoves": [
Expand All @@ -197,6 +329,7 @@
277,
279,
284,
316,
321,
353,
383
Expand Down
10 changes: 1 addition & 9 deletions static/tempEvos.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,7 @@
"tempEvolutions": []
},
"445": {
"tempEvolutions": [
{
"tempEvoId": 1,
"attack": 339,
"defense": 222,
"stamina": 239,
"unreleased": true
}
]
"tempEvolutions": []
},
"448": {
"tempEvolutions": [
Expand Down
19 changes: 13 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,9 @@
"@jridgewell/sourcemap-codec" "^1.4.10"

"@na-ji/pogo-protos@<3.0.0":
version "2.91.0"
resolved "https://registry.yarnpkg.com/@na-ji/pogo-protos/-/pogo-protos-2.91.0.tgz#6e2680448f09579de0f07524a3305a9e9df8ad26"
integrity sha512-8k3JFek+B+6URYFuefq+3qR2NKG+aT0SjPMbTO51KGGWEhY9rPuSUSPGldtKseQh2YPJWDXE3q+m9hmOM749YQ==
version "2.105.0"
resolved "https://registry.yarnpkg.com/@na-ji/pogo-protos/-/pogo-protos-2.105.0.tgz#a4e1d921b3606afb2e073996895f9aa2af761fc9"
integrity sha512-kHL96kUX0mZR2TbNUhWm3JcHIANEtrodNaiTMvlbL1s/0TYn6ZIMfEyY/TWomS6JElbUqUmLtWVURJaQ6Xreeg==
dependencies:
protobufjs "^6.11.3"

Expand Down Expand Up @@ -868,9 +868,11 @@
integrity sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==

"@types/node@>=13.7.0":
version "20.8.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.3.tgz#c4ae2bb1cfab2999ed441a95c122bbbe1567a66d"
integrity sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==
version "20.11.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.5.tgz#be10c622ca7fcaa3cf226cf80166abc31389d86e"
integrity sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==
dependencies:
undici-types "~5.26.4"

"@types/prettier@^2.1.5":
version "2.6.4"
Expand Down Expand Up @@ -2498,6 +2500,11 @@ typescript@^4.5.5:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

update-browserslist-db@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38"
Expand Down

0 comments on commit e65ddda

Please sign in to comment.