Members
(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) 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
(constant) typeChart :Object.<string, Object.<string, number>>
Gen 1 type matchup chart showing effectiveness multipliers.
Type:
- Object.<string, Object.<string, number>>
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() → {void}
Calculates how many party Pokémon have each type (e.g., water, fire).
Sends the results to `displayTeamWeaknessTable` for rendering.
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(typeCounts) → {void}
Displays a table summarizing the number of Pokémon per type in the current team.
Parameters:
Name | Type | Description |
---|---|---|
typeCounts |
Object.<string, number> | An object mapping each type (e.g., 'fire') to its count |
- Source:
Returns:
- Type
- void
fetchDexEntries() → {Promise.<Object>}
Fetches the Gen 1 Pokédex entries from a local JSON file.
Returns:
A Promise resolving to parsed Dex data including images and Pokémon.
- Type
- Promise.<Object>
getIndividualTypeAnalysis(types, pokemonData) → {Object}
Processes a Pokémon's effectiveness map (from JSON) into categorized matchups.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
types |
Array.<string> | Array of Pokémon types (e.g., ['fire', 'flying']) | ||||||
pokemonData |
Object | Full Pokémon object from the JSON data
Properties
|
- Source:
Returns:
Breakdown of type matchups:
- weaknesses: string[]
- resistances: string[]
- neutral: string[]
- strongAgainst: string[]
- noEffect: string[]
- Type
- Object
getIndividualTypeAnalysis(types) → {Object}
Analyzes how a given type or type combination fares against all other types.
Parameters:
Name | Type | Description |
---|---|---|
types |
Array.<string> | Array of a Pokémon's types (e.g., ['water', 'ice']) |
Returns:
Object with keys:
- weaknesses: string[]
- resistances: string[]
- immunities: string[]
- neutral: string[]
- strongAgainst: string[]
- Type
- Object
updatePartyDisplay() → {void}
Updates the party display area with current party Pokémon.
Loads sprites and shows a breakdown of type matchups.
Returns:
- Type
- void