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.
th3mouk/pokemongo-iv-calc 适用场景与选型建议
th3mouk/pokemongo-iv-calc 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 86 次下载、GitHub Stars 达 8, 最近一次更新时间为 2017 年 01 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「calculator」 「pokemon」 「pokemon go」 「PoGo」 「iv calculator」 「pogo iv」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 th3mouk/pokemongo-iv-calc 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 th3mouk/pokemongo-iv-calc 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 th3mouk/pokemongo-iv-calc 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Pokeapi PHP Wrapper
The Pokemon Go API library.
Yii2 extension help to get the result of the calculating from the aggregated delivery services
SDK com regras para cálculo de juros.
Endroid Pokemon
Biblioteca para calcular juros em parcelamentos.
统计信息
- 总下载量: 86
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-10