1.0.1 • Published 5 years ago

pokeball-shake v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

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