When playing pokemon games, to fight effectively, I usually
- look for the type(s) of the opponent pokemon
- find a pokemon type chart to find types that are super effective to the opponent type
- look through pokemons in my team for a super effective move
The goal of this package is to make this process easier.
Using npm:
$ npm i --save pokemon-chooser
fightAgainst(string)
string (string): The name of a pokemon, or the name of a type
(object): Returns an object containing super effective (2x or 4x), normal, not very effective (1/2 or 1/4), and no effect types.
https://egghead.io/courses/how-to-write-an-open-source-javascript-library
pokemon types reference: https://pokemondb.net/type
Note: this chart is for games from 2013 onwards - Pokémon X/Y, OR/AS, Pokémon GO and Sun/Moon. Type charts for older games have some minor differences.
pokedex data reference: https://github.com/piecioshka/pokemon-picker