PokéBot Gen3 is a shiny hunting bot, written in Python that runs libmgba + mGBA Python bindings under the hood. Pokémon Ruby, Sapphire, Emerald, FireRed and LeafGreen are supported.
This adds a check to handle_encounter() whether the game is actually in a battle.
Before, using handle_encounter() without setting disable_auto_catch=True could lead to accidentally skipping a Shiny/CCF encounter in soft-resetting modes.
While all modes should currently set the parameter correctly, this change will make it less likely for a future mode to have the same issue again.
Apart from that, this fixes the save data class' get_player() method, which previously would return the active player data rather than the one from the saved game.
Checklist
[x] Black Linter has been ran, using --line-length 120 argument
Description
This adds a check to
handle_encounter()
whether the game is actually in a battle.Before, using
handle_encounter()
without settingdisable_auto_catch=True
could lead to accidentally skipping a Shiny/CCF encounter in soft-resetting modes.While all modes should currently set the parameter correctly, this change will make it less likely for a future mode to have the same issue again.
Apart from that, this fixes the save data class'
get_player()
method, which previously would return the active player data rather than the one from the saved game.Checklist
--line-length 120
argument