Skip to content

Commit

Permalink
Update utils.pokemon.js
Browse files Browse the repository at this point in the history
Include Gen 9 Pokemon
  • Loading branch information
JimBim89 authored Sep 1, 2023
1 parent 6e528c5 commit 4b107e4
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions static/js/utils/utils.pokemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const rarityNames = ['Common', 'Uncommon', 'Rare', 'Very Rare', 'Ultra Rare', 'N
// FontAwesome gender classes.
const genderClasses = ['fa-mars', 'fa-venus', 'fa-neuter']
var pokemonSearchList = []
const availablePokemonCount = 809
const availablePokemonCount = 1010
const pokemonIds = new Set()

function initPokemonData() {
Expand Down Expand Up @@ -45,6 +45,8 @@ function initPokemonData() {
gen = 7
} else if (id <= 898) {
gen = 8
} else if (id <= 1010) {
gen = 9
}
pokemonData[id].gen = gen
pokemonSearchList.push({
Expand Down Expand Up @@ -85,19 +87,6 @@ function getPokemonIds() {
for (let i = 1; i <= availablePokemonCount; i++) {
pokemonIds.add(i)
}
// Gen 8.
pokemonIds.add(819)
pokemonIds.add(820)
pokemonIds.add(831)
pokemonIds.add(832)
pokemonIds.add(862)
pokemonIds.add(863)
pokemonIds.add(865)
pokemonIds.add(866)
pokemonIds.add(867)
pokemonIds.add(870)
pokemonIds.add(888)
pokemonIds.add(889)
}
return new Set(pokemonIds)
}
Expand Down

0 comments on commit 4b107e4

Please sign in to comment.