FRLG Shiny Hunt Fishing Refactor#1297
Open
Dalton-V wants to merge 1 commit into
Open
Conversation
…nter logic to Navigation.
ed14e81 to
6bd1bda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why:
For the upcoming Held Item Farmer - Safari Zone (Dragon Fang) I needed to use a fishing encounter loop. I figured a shared method for fishing encounters would be nice. Realized that the current state of Fishing Shiny Hunt has a lot of redundant code and some things that don't make sense.
Some things that didn't make sense:
AdvanceWhiteDialogWatcher
//dialog with red arrow ("Oh! A bite!")There are no normal red arrow dialogs in the fishing loop. Also "Oh! A bite!" is not a dialog that appears in this game.
BITE_WAIT_MS
// Adaptive delay before pressing A after casting rod.// Adjusted dynamically to maximize encounter success.There is no reason to have logic for when to press buttons for fishing in FRLG.
If there is white dialog, you press B.
If you detect a black screen or the battle, the pokemon was hooked and the battle is started.
If nothing is detected press SELECT and try again.
GO_HOME_WHEN_DONE
Was not using the helper method
run_end_of_programAlso noticed that there were no status notifications and the error stat was visible when zero.
Need to do a bit more testing prior to moving out of draft. Got a shiny using the new logic in the held item farmer (added into the lucky egg farmer, need to update the stats still...):

After testing this new fishing loop encounters ~21% more pokemon per hour.