This PHP library is the most accurate to calculate Pokemons IV's.
composer require th3mouk/pokemongo-iv-calc
php bin/ivcalculator calculate bulbasaur 515 59 2500 4 3 def
php bin/ivcalculator calculate bulbasaur xxx xx 2500 4 3 def atk hp$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.
- 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)
Simply use static Helper with in first argument the pokemon level and second your trainer level.
Helpers::dustsToMax(20.5, 20)Helpers::candiesToMax(23, 27)Helpers::calculateCP(238, 184, 171, 29, true)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 testsFeel free to improve this library.

