Pokémon's type list and effectiveness calculation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
src
.editorconfig
.gitignore
LICENSE
README.md
package.json
test.ts
tsconfig.json
tslint.yaml
yarn.lock

README.md

poketype

CircleCI

Pokemon have particular characteristics, such as natures, abilities, typing, and moves. This project focuses on the typing aspect of Pokemon, and how particular typing of Pokemon can be effective against another.

Pokemon can have up to 2 different types, such as “Water” and “Flying”. By using the existing type list of all Pokemon, This project aims determine how effective it is against another. As an example, a Pokemon that is “Water” and “Flying” is incredibly ineffective against Pokemon of the “Electric” typing. This project aims to calculate effectiveness and reveal the results to the user.

Synopsis

import poketype from 'poketype'

const { ほのお, くさ } = poketype.Types // English type names are supported

const フシギダネ = poketype.createPokemon(くさ)
const ひのこ = ほのお
const effectiveness = poketype.calcEffectiveness(ひのこ, フシギダネ)

console.log(effectiveness.message) // 'こうかは ばつぐんだ!'

LICENSE

MIT by @hakobe