update alolan sprites, forms
@ -34,13 +34,43 @@ const getClosestCpMultiplierIndex = (value : number) => {
|
||||
const familyOrder : Array<string> = [];
|
||||
const familyEvolutionOrder : Record<string, Array<string>> = {};
|
||||
const familyEncountered : Record<string, Array<ILeaguePokemon>> = {};
|
||||
const parseNameAndForm = (monId : string, monName : string) => {
|
||||
if (monId.indexOf('_ALOLA') > -1 ||
|
||||
monId.indexOf('CASTFORM') > -1 ||
|
||||
monId.indexOf('DEOXYS') > -1 ||
|
||||
monId.indexOf('WORMADAM') > -1 ||
|
||||
monId.indexOf('BURMY') > -1 ||
|
||||
monId.indexOf('CHERRIM') > -1 ||
|
||||
monId.indexOf('SHELLOS') > -1 ||
|
||||
monId.indexOf('GASTRODON') > -1 ||
|
||||
monId.indexOf('ROTOM') > -1 ||
|
||||
monId.indexOf('GIRATINA') > -1 ||
|
||||
monId.indexOf('SHAYMIN') > -1 ||
|
||||
monId.indexOf('ARCEUS') > -1 ||
|
||||
monId.indexOf('DEOXYS') > -1 ||
|
||||
monId.indexOf('DEOXYS') > -1 ||
|
||||
monId.indexOf('DEOXYS') > -1
|
||||
) {
|
||||
const formTokenIndex = monId.indexOf('_');
|
||||
return {
|
||||
name: monName.substr(0, formTokenIndex),
|
||||
form: monId.substr(formTokenIndex + 1),
|
||||
};
|
||||
}
|
||||
return {
|
||||
name: monName,
|
||||
form: null,
|
||||
};
|
||||
}
|
||||
Pokemon.forEach((mon) => {
|
||||
const { name, form } = parseNameAndForm(mon.id, mon.name);
|
||||
const baseAtk = mon.stats.baseAttack;
|
||||
const baseDef = mon.stats.baseDefense;
|
||||
const baseHp = mon.stats.baseStamina;
|
||||
const pokemon : ILeaguePokemon = {
|
||||
id: mon.id,
|
||||
name: mon.name,
|
||||
name,
|
||||
form,
|
||||
dex: mon.dex,
|
||||
types: {
|
||||
type1: mon.types[0].name.toLowerCase() as Type,
|
||||
|
||||
BIN
src/img/019_alola.png
Normal file
|
After Width: | Height: | Size: 587 B |
BIN
src/img/020_alola.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
src/img/026_alola.png
Normal file
|
After Width: | Height: | Size: 640 B |
BIN
src/img/027_alola.png
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
src/img/028_alola.png
Normal file
|
After Width: | Height: | Size: 838 B |
BIN
src/img/037_alola.png
Normal file
|
After Width: | Height: | Size: 550 B |
BIN
src/img/038_alola.png
Normal file
|
After Width: | Height: | Size: 797 B |
BIN
src/img/050_alola.png
Normal file
|
After Width: | Height: | Size: 474 B |
BIN
src/img/051_alola.png
Normal file
|
After Width: | Height: | Size: 729 B |
BIN
src/img/052_alola.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
src/img/053_alola.png
Normal file
|
After Width: | Height: | Size: 710 B |
BIN
src/img/074_alola.png
Normal file
|
After Width: | Height: | Size: 505 B |
BIN
src/img/075_alola.png
Normal file
|
After Width: | Height: | Size: 800 B |
BIN
src/img/076_alola.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
src/img/088_alola.png
Normal file
|
After Width: | Height: | Size: 668 B |
BIN
src/img/089_alola.png
Normal file
|
After Width: | Height: | Size: 796 B |
BIN
src/img/103_alola.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
src/img/105_alola.png
Normal file
|
After Width: | Height: | Size: 668 B |
BIN
src/img/808.png
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 493 B |
BIN
src/img/809.png
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 371 KiB After Width: | Height: | Size: 382 KiB |
@ -169,6 +169,13 @@ export class PokemonExplorer extends React.Component<IPokemonExplorerProps, ISta
|
||||
'is-primary'
|
||||
);
|
||||
|
||||
const pokemonIconCss = classNames(
|
||||
`pokemon-${dex}`,
|
||||
{
|
||||
alola: leaguePokemon.form === 'ALOLA'
|
||||
}
|
||||
);
|
||||
|
||||
let type1 : JSX.Element | null = null;
|
||||
if (leaguePokemon.types.type1) {
|
||||
type1 = <div className={ `${pokemonType} ${leaguePokemon.types.type1}` }>{ leaguePokemon.types.type1 }</div>;
|
||||
@ -184,8 +191,11 @@ export class PokemonExplorer extends React.Component<IPokemonExplorerProps, ISta
|
||||
<div>
|
||||
<div className={ styles.pokemonInfoWrapper }>
|
||||
<div className={ styles.pokemonInfoLeftColumn }>
|
||||
<i className={ `pokemon-${dex}` } />
|
||||
<i className={ pokemonIconCss } />
|
||||
<h4>No.{ dex }</h4>
|
||||
{ leaguePokemon.form &&
|
||||
<h6 className={ styles.formHeader }>{ leaguePokemon.form } Forme</h6>
|
||||
}
|
||||
<div className={ styles.pokemonTypeWrapper }>
|
||||
{ type1 }
|
||||
{ type2 }
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
&:global(.nes-container) {
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
font-size: 0.7em;
|
||||
flex-basis: 50%;
|
||||
}
|
||||
@ -202,6 +203,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.formHeader {
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.pokemonBaseStats {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// This file is automatically generated.
|
||||
// Please do not change this file!
|
||||
export const fieldRow: string;
|
||||
export const formHeader: string;
|
||||
export const ivInput: string;
|
||||
export const leaguePokemonRank: string;
|
||||
export const pokemonBaseStats: string;
|
||||
|
||||
@ -84,6 +84,6 @@ export class PokemonSelectList extends React.Component<IPokemonSelectListProps,
|
||||
active: this.props.activePokemonIndex === index
|
||||
});
|
||||
const onClick = () => this.props.handleActivatePokemon(index);
|
||||
return <div key={ index } style={ style } className={ css } onClick={ onClick }>{ pokemon.name }</div>;
|
||||
return <div key={ index } style={ style } className={ css } onClick={ onClick }>{ pokemon.name + (pokemon.form ? ` (${pokemon.form})` : '') }</div>;
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@ export type Type = 'bug' | 'dark' | 'dragon' | 'electric' | 'fairy' | 'fighting'
|
||||
export interface IPokemon {
|
||||
name : string;
|
||||
id : string;
|
||||
form : string | null;
|
||||
family : string;
|
||||
dex : number;
|
||||
types : {
|
||||
|
||||