Skip to content

Pokémon's type list and effectiveness calculation

License

Notifications You must be signed in to change notification settings

hakobe/poketype

Repository files navigation

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

About

Pokémon's type list and effectiveness calculation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published