Global

Members

(constant) generationOptions :HTMLFieldSetElement

Generation-dependent form controls
Type:
  • HTMLFieldSetElement
Source:

(constant) interactionStatus :HTMLElement

Live status region for party interaction updates.
Type:
  • HTMLElement
Source:

(constant) loadingMessages :LoadingMessageGroups

Type:
Source:

(constant) loadingStatus :HTMLElement

The loading message when JSON fetched
Type:
  • HTMLElement
Source:

(constant) maxPartySize :number

The maximum allowed number of Pokémon in a party
Type:
  • number
Source:

(constant) party :Array.<string>

An array of Pokémon dex IDs currently in the party.
Type:
  • Array.<string>
Source:

(constant) results :HTMLElement

The container where filtered Pokémon are displayed
Type:
  • HTMLElement
Source:

(constant) selectedEvolution :HTMLSelectElement

Filter for showing only final-evolution Pokémon
Type:
  • HTMLSelectElement
Source:

(constant) selectedEvolve :HTMLSelectElement

Filter for excluding Pokémon that evolve by trade
Type:
  • HTMLSelectElement
Source:

(constant) selectedGeneration :HTMLSelectElement

Dropdown for choosing a Pokémon generation
Type:
  • HTMLSelectElement
Source:

(constant) selectedLegendary :HTMLSelectElement

Filter for excluding legendary Pokémon
Type:
  • HTMLSelectElement
Source:

(constant) selectedSprites :HTMLSelectElement

Dropdown for choosing sprite style
Type:
  • HTMLSelectElement
Source:

(constant) selectedUnobtainable :HTMLSelectElement

Filter for hiding unobtainable Pokémon
Type:
  • HTMLSelectElement
Source:

(constant) selectedVersion :HTMLSelectElement

Version filter: red, blue, or yellow
Type:
  • HTMLSelectElement
Source:

Methods

ViewPokemon(dexResults) → {void}

Renders filtered Pokémon sprites based on selected version, evolution, and other options. Appends the images to the results container.
Parameters:
Name Type Description
dexResults Object The full Dex dataset including image base path and Pokémon list
Source:
Returns:
Type
void

calculateTeamWeaknesses(generationData) → {void}

Calculates the team's defensive matchups using the currently selected generation data.
Parameters:
Name Type Description
generationData Object | null
Source:
Returns:
Type
void

clearParty() → {void}

Clears all Pokémon from the party and hides the Clear Party button. Also re-renders the (empty) party area.
Source:
Returns:
Type
void

displayTeamWeaknessTable(typeAnalysis) → {void}

Displays a table summarizing the team's defensive matchups.
Parameters:
Name Type Description
typeAnalysis Object
Source:
Returns:
Type
void

fetchDexEntries(file) → {Promise.<Object>}

Fetches data for a selected Pokémon generation.
Parameters:
Name Type Description
file string JSON filename for the selected generation
Source:
Returns:
Type
Promise.<Object>

fetchGenerations() → {Promise.<Object>}

Fetches the list of supported generations.
Source:
Returns:
Type
Promise.<Object>

getIndividualTypeAnalysis(pokemonData) → {Object}

Categorizes a Pokémon's defensive type effectiveness.
Parameters:
Name Type Description
pokemonData Object Pokémon object from the generation JSON
Source:
Returns:
Categorized defensive matchups
Type
Object

getRandomLoadingMessage() → {string}

Picks a random loading message from a random category.
Source:
Returns:
A randomly selected Pokémon-themed loading message.
Type
string

(async) loadGenerations()

Loads supported Pokémon generations and adds them to the generation dropdown.
Source:

populateSpriteOptions(generationData)

Populates the sprite dropdown using the currently selected generation's JSON data.
Parameters:
Name Type Description
generationData Object
Source:

populateVersionOptions(generationData)

Populates the game version dropdown using the currently selected generation's JSON data.
Parameters:
Name Type Description
generationData Object
Source:

updatePartyDisplay(generationData) → {void}

Updates the party display area with current party Pokémon.
Parameters:
Name Type Description
generationData Object | null
Source:
Returns:
Type
void

validateGenerationData(data) → {Object}

Validates required fields in generation data.
Parameters:
Name Type Description
data Object Parsed generation JSON data
Source:
Throws:
If required generation data is missing
Type
Error
Returns:
Validated generation data
Type
Object

validateGenerationList(data) → {Object}

Validates the supported generation list.
Parameters:
Name Type Description
data Object Parsed generation JSON data
Source:
Throws:
If required generation data is missing
Type
Error
Returns:
Validated generation data
Type
Object

Type Definitions

LoadingMessageGroups

Pokémon-themed loading messages grouped by category.
Type:
  • Object
Properties:
Name Type Description
trainer Array.<string>
strategy Array.<string>
legendary Array.<string>
sprites Array.<string>
misc Array.<string>
Source: