Nanobot: Polygonal Mascot

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

    1.0.1 • Public • Published

    pokeball-shake Build Status

    Algorithm to determine how many times pokeball shakes

    Install

    $ yarn add pokeball-shake
    

    Usage

    const pokeballShake = require('pokeball-shake')
    const pokemonF = require('pokemon-f')
     
    const f = await pokemonF(35, 'greatball', 29)
     
    pokeballShake(163, 'greatball', f)
    // => Pokeball shaked `2` time before pokemon goes free.

    API

    pokeballShake(catchRate, pokeball, f, [statusAilment])

    catchRate

    Type: number
    Required

    Pokemon's catch rate

    pokeball

    Type: string
    Options: pokeball, greatball, ultraball and safariball
    Required

    Pokeball's name

    f

    Type: number
    Required

    Algorithm to calculate f
    Use pokemon-f to calculate f.

    statusAilment

    Type: number
    Default: 0
    Options:

    • 12 if poisoned, burned, or paralyzed
    • 25 if frozen or asleep

    Related

    License

    MIT © Bu Kinoshita

    Install

    npm i pokeball-shake

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.79 kB

    Total Files

    11

    Last publish

    Collaborators

    • bukinoshita