Skip to content

Commit

Permalink
fix: fixed smogon url parsing for ursaluna-bloodmoon
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Nov 28, 2023
1 parent 68609d0 commit 19d3658
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib/mappers/pokemonMapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,10 +844,11 @@ function parseSpeciesForSmogonPage(pokemonName: string, pokemonNumber: number, p
return `${smogonBaseUrl}/sm/pokemon/${parsedPokemonName}`;
}

// If the Pokémon is `'past'` in Generation 9, but was not included in `speciesThatAreNotInGeneration8Nor9`
// or the Pokémon is within the numbers range for generation 8,
// IF the pokemon is not ursaluna-bloodmoon
// AND the Pokémon is `'past'` in Generation 9, but was not included in `speciesThatAreNotInGeneration8Nor9`
// OR the Pokémon is within the numbers range for generation 8,
// then build a Generation 8 based URL
if (pokemonTier.toLowerCase() === 'past' || (pokemonNumber >= 810 && pokemonNumber <= 905)) {
if (pokemonName !== 'ursaluna-bloodmoon' && (pokemonTier.toLowerCase() === 'past' || (pokemonNumber >= 810 && pokemonNumber <= 905))) {
return `${smogonBaseUrl}/ss/pokemon/${parsedPokemonName}`;
}

Expand Down

0 comments on commit 19d3658

Please sign in to comment.