When calculating the candy cost for evolutions, it checks that the start pokemon is really before the end pokemon. But with the split of PokemonBase and Pokemon a typo crept in, which actually checks the devolutions of the start pokemon.
This rewrites it into a simpler function, we already go through the devolutions anyway, so just have one loop which goes from the end pokemon to every devolution pokemon. If the start pokemon wasn't seen until there are no devolutions anymore, it either means that start and end are the wrong way around or that both aren't related.
When calculating the candy cost for evolutions, it checks that the start pokemon is really before the end pokemon. But with the split of
PokemonBase
andPokemon
a typo crept in, which actually checks the devolutions of the start pokemon.This rewrites it into a simpler function, we already go through the devolutions anyway, so just have one loop which goes from the end pokemon to every devolution pokemon. If the start pokemon wasn't seen until there are no devolutions anymore, it either means that start and end are the wrong way around or that both aren't related.