poketype
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

/poketype/

    Package Sidebar

    Install

    npm i poketype

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    152 kB

    Total Files

    21

    Last publish

    Collaborators

    • hakobe