th3mouk/pokemongo-iv-calc 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

Latest Stable Version Latest Unstable Version Total Downloads License

SensioLabsInsight Build Status Scrutinizer Code Quality

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 (atk and/or def and/or hp)

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

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固