th3mouk/pokemongo-iv-calc
Composer 安装命令:
composer require th3mouk/pokemongo-iv-calc
包简介
The most accurate PHP lib to calculate Pokemon Go IV
README 文档
README
This PHP library is the most accurate to calculate Pokemons IV's.
Installation
composer require th3mouk/pokemongo-iv-calc
Usage
From command line
php bin/ivcalculator calculate bulbasaur 515 59 2500 4 3 def php bin/ivcalculator calculate bulbasaur xxx xx 2500 4 3 def atk hp
Use the class
$pokemon = (new Calculator())->calculate( $input->getArgument('name'), (int) $input->getArgument('cp'), (int) $input->getArgument('hp'), (int) $input->getArgument('dusts'), (int) $input->getArgument('global'), (int) $input->getArgument('max-stats'), $input->getArgument('bests'), (bool) $input->getOption('upgraded') );
To manipulate different IV combinaisons I use Illuminate\Collection.
So pokemon->getIvCombinaisons() will return a Collection easily manipulable.
Parameters:
- Name of the pokemon in english 🇬🇧
- CP
- HP
- Dusts
- 1/2/3/4 see steps here
- 1/2/3/4 see steps here
- Finish the command with stats given by the coach (
atkand/ordefand/orhp)
Where :
1 is the worst appreciation (<8 for an IV or <50% for global)
And
4 is the best range (15 for an IV or >80% global IV)
Helpers
Simply use static Helper with in first argument the pokemon level and second your trainer level.
Dusts calculator
Helpers::dustsToMax(20.5, 20)
Candies calculator
Helpers::candiesToMax(23, 27)
CP calculator
Helpers::calculateCP(238, 184, 171, 29, true)
Contributing
Before commiting, please run vendor/bin/php-cs-fixer fix . command, and update the test suite.
To launch the test suite:
php vendor/bin/peridot tests
Please
Feel free to improve this library.
统计信息
- 总下载量: 86
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-10