update doc

This commit is contained in:
Moka 2024-11-15 18:32:13 +01:00 committed by GitHub
parent 58f7310cd8
commit 158902c974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1792,18 +1792,15 @@ export class GameData {
} }
/** /**
* @param {PokemonSpecies} species * Checks whether the root species of a given {@PokemonSpecies} has been unlocked in the dex
* @returns {boolean} whether root species has been unlocked for given {@linkcode PokemonSpecies}
*/ */
isRootSpeciesUnlocked(species: PokemonSpecies): boolean { isRootSpeciesUnlocked(species: PokemonSpecies): boolean {
return !!this.dexData[species.getRootSpeciesId()]?.caughtAttr; return !!this.dexData[species.getRootSpeciesId()]?.caughtAttr;
} }
/** /**
* Unlocks nature for a given {@linkcode PokemonSpecies} and its prevolutions. * Unlocks the given {@linkcode Nature} for a {@linkcode PokemonSpecies} and its prevolutions.
* Will fail silently if root species has not been unlocked * Will fail silently if root species has not been unlocked
* @param {PokemonSpecies} species
* @param {Nature} nature
*/ */
unlockSpeciesNature(species: PokemonSpecies, nature: Nature): void { unlockSpeciesNature(species: PokemonSpecies, nature: Nature): void {
if (!this.isRootSpeciesUnlocked(species)) { if (!this.isRootSpeciesUnlocked(species)) {