Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sweet Scent method #163

Closed
wants to merge 12 commits into from
Closed

Conversation

MythicWebsite
Copy link
Contributor

@MythicWebsite MythicWebsite commented Dec 18, 2023

Adds a method for using Sweet Scent to hunt for shinies. Runs from battles in RSE and resets for FRLG.

Had to change a yield to a run_single_frame() to fix random behavior where a yield would cause you to enter manual mode. We're looking into fixing that.

The cursor options list in menu_parsers.py was also incorrect for FRLG. I copied the list and changed the number for Sweet Scent, but once I'm able to understand the numbers, they can be fixed.

Removed quest_log case I added for starters because I learned that the case was only true upon starting the quest_log, but not during the rest of it. Added a different way to properly check for it being finished.

@MythicWebsite
Copy link
Contributor Author

Changed how the rng files are named so that Sweet Scent isn't adding to the same file as static mons as they're not calculated the same.

@@ -299,7 +297,8 @@ def select_mon(self):
if self.game in ["POKEMON EMER", "POKEMON FIRE", "POKEMON LEAF"]:
while task_is_active("TASK_HANDLECHOOSEMONINPUT"):
context.emulator.press_button("A")
yield
# yield
context.emulator.run_single_frame()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you're running the frame instead of yielding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It randomly breaks when yielding. Works about 50% with yield, 100% with single frame

Mowlawner and others added 4 commits December 19, 2023 10:17
…fore attempting to navigate

- restored `yield` in `select_mon` function
- adjusted the sweet scent code to only try setting the sweet scent mon once
@MythicWebsite
Copy link
Contributor Author

Everything should be good on this now, all issues were worked out and confirmed for every game.

@40Cakes 40Cakes marked this pull request as draft January 24, 2024 03:02
@40Cakes
Copy link
Owner

40Cakes commented Jan 24, 2024

Converting to draft for now, the other modes have been refactored quite heavily and this will need a bit of work to merge - will try to have a look at doing this if/when I get time.

@hanzi
Copy link
Collaborator

hanzi commented May 8, 2024

Closing this PR since it hasn't been worked on for a while. Also, the bot's code base has changed considerably since then which would unfortunately require this PR to be mostly if not completely rewritten.

But still, good work nonetheless! 🙂

@hanzi hanzi closed this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants