Members
(constant) generationOptions :HTMLFieldSetElement
Generation-dependent form controls
Type:
- HTMLFieldSetElement
(constant) interactionStatus :HTMLElement
Live status region for party interaction updates.
Type:
- HTMLElement
(constant) loadingMessages :LoadingMessageGroups
Type:
- Source:
(constant) loadingStatus :HTMLElement
The loading message when JSON fetched
Type:
- HTMLElement
(constant) maxPartySize :number
The maximum allowed number of Pokémon in a party
Type:
- number
(constant) party :Array.<string>
An array of Pokémon dex IDs currently in the party.
Type:
- Array.<string>
(constant) results :HTMLElement
The container where filtered Pokémon are displayed
Type:
- HTMLElement
(constant) selectedEvolution :HTMLSelectElement
Filter for showing only final-evolution Pokémon
Type:
- HTMLSelectElement
(constant) selectedEvolve :HTMLSelectElement
Filter for excluding Pokémon that evolve by trade
Type:
- HTMLSelectElement
(constant) selectedGeneration :HTMLSelectElement
Dropdown for choosing a Pokémon generation
Type:
- HTMLSelectElement
(constant) selectedLegendary :HTMLSelectElement
Filter for excluding legendary Pokémon
Type:
- HTMLSelectElement
(constant) selectedSprites :HTMLSelectElement
Dropdown for choosing sprite style
Type:
- HTMLSelectElement
(constant) selectedUnobtainable :HTMLSelectElement
Filter for hiding unobtainable Pokémon
Type:
- HTMLSelectElement
(constant) selectedVersion :HTMLSelectElement
Version filter: red, blue, or yellow
Type:
- HTMLSelectElement
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 |
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 |
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.
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 |
Returns:
- Type
- Promise.<Object>
fetchGenerations() → {Promise.<Object>}
Fetches the list of supported generations.
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.
populateSpriteOptions(generationData)
Populates the sprite dropdown using the currently
selected generation's JSON data.
Parameters:
| Name | Type | Description |
|---|---|---|
generationData |
Object |
populateVersionOptions(generationData)
Populates the game version dropdown using the currently
selected generation's JSON data.
Parameters:
| Name | Type | Description |
|---|---|---|
generationData |
Object |
updatePartyDisplay(generationData) → {void}
Updates the party display area with current party Pokémon.
Parameters:
| Name | Type | Description |
|---|---|---|
generationData |
Object | null |
Returns:
- Type
- void
validateGenerationData(data) → {Object}
Validates required fields in generation data.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Parsed generation JSON data |
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 |
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: