diff --git a/generatePokemonData.ts b/generatePokemonData.ts index a6c803a..ae0ad82 100644 --- a/generatePokemonData.ts +++ b/generatePokemonData.ts @@ -2,7 +2,7 @@ import * as fs from 'fs'; import Pokemon from 'pokemongo-json-pokedex/output/pokemon.json'; import { LevelMultipliers } from 'app/models/LevelMultipliers'; -import { Grade, ILeaguePokemon, IPokemon, IStats, League } from 'app/models/Pokemon'; +import { Grade, ILeaguePokemon, IPokemon, IStats, League, Type } from 'app/models/Pokemon'; type ICpAndTotalFound = Record>; interface IStatsDistribution { @@ -42,6 +42,10 @@ Pokemon.forEach((mon) => { id: mon.id, name: mon.name, dex: mon.dex, + types: { + type1: mon.types[0].name.toLowerCase() as Type, + type2: mon.types[1] ? mon.types[1].name.toLowerCase() as Type : null, + }, stats: mon.stats, family: mon.family.id, pvp: { diff --git a/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx b/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx index eede277..c346aa6 100644 --- a/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx +++ b/src/ts/app/components/PokemonExplorer/PokemonExplorer.tsx @@ -123,8 +123,8 @@ export class PokemonExplorer extends React.Component
Base Stats
-
{ }
-
{ }
+
{ leaguePokemon.types.type1 }
+
{ leaguePokemon.types.type2 }
{ leaguePokemon.stats.baseStamina }
{ leaguePokemon.stats.baseAttack }
{ leaguePokemon.stats.baseDefense }
diff --git a/src/ts/app/models/Pokemon.ts b/src/ts/app/models/Pokemon.ts index e015192..6e4e447 100644 --- a/src/ts/app/models/Pokemon.ts +++ b/src/ts/app/models/Pokemon.ts @@ -13,11 +13,16 @@ export interface IBaseStats { baseStamina : number; } +export type Type = 'bug' | 'dark' | 'dragon' | 'electric' | 'fairy' | 'fighting' | 'fire' | 'flying' | 'ghost' | 'grass' | 'ground' | 'ice' | 'normal' | 'poison' | 'psychic' | 'rock' | 'steel' | 'water'; export interface IPokemon { name : string; id : string; family : string; dex : number; + types : { + type1 : Type; + type2 : Type | null; + }; stats : IBaseStats; } export type League = 'great' | 'ultra';