Comments (9)
I added IV calculation with options in the properties to set minIV.
config.properties
#Minimum IV to keep a pokemon
transfer_IV_threshold=90
Bot.kt
EDIT: This is not required. Just added to show current IV of pokebank.
api.pokebank.pokemons.map {
var IV = ((it.individualStamina + it.individualAttack + it.individualDefense) * 100) / 45
"Have ${it.pokemonId.name} (${it.nickname}) with ${it.cp} CP and IV ${IV}"
}.forEach { println(it) }
Settings.kt
val transferIVThreshold = getPropertyIfSet("Minimum IV to keep a pokemon", "transfer_IV_threshold", 80, String::toInt)
Releasepokemon.kt
EDIT: Removed unfinished evolution transfer limits
val minIV = settings.transferIVThreshold
groupedPokemon.forEach {
val sorted = it.value.sortedByDescending { it.cp }
for ((index, pokemon) in sorted.withIndex()) {
var IV = ((pokemon.individualStamina + pokemon.individualAttack + pokemon.individualDefense) * 100) / 45
// never transfer highest rated Pokemon
// never transfer > maxCP, unless set in obligatoryTransfer
// stop releasing when pokemon is set in ignoredPokemon
if (index > 0 && (pokemon.cp < maxCP || obligatoryTransfer.contains(pokemon.pokemonId.name)) &&
(!ignoredPokemon.contains(pokemon.pokemonId.name)) && IV < minIV) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} and IV ${IV}")
pokemon.transferPokemon()
}
}
}
}
from pokemongobot.
Yes, I forgot to remove that.
That's for me, and I am going to add a evolution switch which will use lucky eggs and do as many evolution as possible
EDIT: The bot.kt is not required. It is only so you can see the IV of current pokebank
from pokemongobot.
@mroge009 yes sorry you are right, I went back to look at the formula, it is only atk/def/sta.
var IV = ((it.individualStamina + it.individualAttack + it.individualDefense) * 100) / 45
is correct :)
TY for adding this!
from pokemongobot.
I did something similar in #39 but I just used the CP.
The dust price is the dust needed to level the pokemon up?
Anyway all the characteristics of a pokemon that we can use are defined here https://github.com/AeonLucid/POGOProtos/blob/master/src/POGOProtos/Data/PokemonData.proto where stamina and stamina_max should be the HP, but i don't see the dust price.
from pokemongobot.
What does IV stand for?
Also stuff like the Dust price is available in the GAME_MASTER protobuf, which will be incorporated in the Java API soon'ish, so it would be futile to store them in this repo as well then.
from pokemongobot.
I'm implementig this right now @mroge009. But i have to remove this part
"RATTATA" -> if (index > pokemon.candy / 25) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 25} evolutions pending")
pokemon.transferPokemon()
}
"PIDGEY", "WEEDLE", "CATERPIE" -> if (index > pokemon.candy / 12) {
println("Going to transfer ${pokemon.pokemonId.name} with CP ${pokemon.cp} because you currently have ${pokemon.getCandy() / 12} evolutions pending")
pokemon.transferPokemon()
}
you have to let the user choose which pokemon to transfer directly, even if everyone is going to transfer those
from pokemongobot.
Awesome that was fast! @jabbink if you haven't looked it up, IV stood for individual value in the original games and is also in Go. Each Pokemon has a random +0 - 15 range to each stat, a perfect (100%) pokemon would have 15/15/15/15 to each of attack, defense, stamina, hp. So due to RNG a 0/0/0/0 vs. a 15/15/15/15 pokemon could vary by about 10% in CP.
TL;DR - don't just throw low CP pokemon away, one of these could be perfect and is really rare / worth spending the extra dust on leveling up.
from pokemongobot.
@Xenxes I think IV is only atk, def, and sta where hp is a function of sta. I only used the first 3 in my calculations and they seem to work fine with my highest being a 93% Flareon
from pokemongobot.
Merged with a slight modification, instead of having this formula in the code twice, I added it as extension function to the Pokemon-class.
<3 Kotlin
from pokemongobot.
Related Issues (20)
- Encounter failed with result HOT 3
- run a few hours then get this error message then after that not catch any pokemon HOT 1
- System hangs up HOT 4
- error message popup then the whole night hang there HOT 1
- bot not starting "Exception in Thread default" HOT 1
- [Question] Is it safe to open the bot after the latest update? HOT 9
- Im guessing this bot is dead HOT 2
- [Question] Pokefarmer Hash Service HOT 1
- Bot doing fine, getting this error everytime HOT 4
- Exception in thread "default" HOT 3
- Getting profile data from pogo server..Unexpected response envelope status received: SESSION_INVALIDATED HOT 1
- I cannot find the solution anywhere. Please help HOT 1
- Bot gets stuck in a loop of DOWNLOAD_SETTINGS & GET_INVENTORY HOT 1
- [BUG?] Bot can't get player HOT 1
- ..
- Can't start bot, I think it's a language problem
- Can't start the bot, I think it's a language problem HOT 1
- Can't start the bot
- when getting profile data from pogo server HOT 4
- Stuck on getting profile data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pokemongobot.